Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 25-Sep-2024 | - | ||||
0001-Expose-line-and-column-information-for-use-in-PHP.patch | H A D | 25-Sep-2024 | 6.9 KiB | 189 | 166 | |
0002-Track-implied-added-nodes-for-options-use-in-PHP.patch | H A D | 25-Sep-2024 | 2.8 KiB | 68 | 57 | |
0003-Patch-utilities-and-data-structure-to-be-able-to-gen.patch | H A D | 25-Sep-2024 | 3.5 KiB | 103 | 83 | |
0004-Remove-unused-upper-case-tag-static-data.patch | H A D | 25-Sep-2024 | 1.9 KiB | 54 | 46 | |
0005-Shrink-size-of-static-binary-search-tree.patch | H A D | 25-Sep-2024 | 3.8 KiB | 116 | 98 | |
0006-Patch-out-unused-CSS-style-code.patch | H A D | 25-Sep-2024 | 14.4 KiB | 446 | 378 | |
README.md | H A D | 25-Sep-2024 | 2.2 KiB | 40 | 32 |
README.md
1# Lexbor patches 2 3Upon syncing the Lexbor sources, the patches in this directory need to be applied. 4The current Lexbor version is 2.4.0. 5 6## Overview 7 8This contains the following patch files in mailbox format. 9 10* 0001-Expose-line-and-column-information-for-use-in-PHP.patch 11 A PHP specific patch to expose the line and column number to PHP. 12* 0002-Track-implied-added-nodes-for-options-use-in-PHP.patch 13 A PHP specific patch to track implied added nodes for options. 14* 0003-Patch-utilities-and-data-structure-to-be-able-to-gen.patch 15 A PHP specific patch to patch utilities and data structure to be able to generate smaller lookup tables. 16 This patch won't be upstreamed because it breaks generality of those data structures, i.e. it only works 17 because we only use it for character encoding. 18* 0004-Remove-unused-upper-case-tag-static-data.patch 19 A PHP specific patch to remove unused upper case tag static data. This shrinks the static data size. 20* 0005-Shrink-size-of-static-binary-search-tree.patch 21 A PHP specific patch to shrink the size of the static binary search tree for entities. 22 This shrinks the static data size and reduces data cache pressure. 23* 0006-Patch-out-unused-CSS-style-code.patch 24 A PHP specific patch to remove CSS style and selector bindings from the Lexbor document. 25 26 **Note** for this patch the utilities to generate the tables are also patched. 27 Make sure to apply on a fresh Lexbor clone and run (in `lexbor/utils/encoding`): `python3 single-byte.py` and `python3 multi-byte.py` to generate the tables. 28 Also run `python3 tokenizer_entities_bst.py` to generate the static binary search tree for entities. 29 30## How to apply 31 32* cd into `ext/dom/lexbor/lexbor` 33* `git am -3 ../patches/0001-Expose-line-and-column-information-for-use-in-PHP.patch` 34* `git am -3 ../patches/0002-Track-implied-added-nodes-for-options-use-in-PHP.patch` 35* `git am -3 ../patches/0003-Patch-utilities-and-data-structure-to-be-able-to-gen.patch` 36* `git am -3 ../patches/0004-Remove-unused-upper-case-tag-static-data.patch` 37* `git am -3 ../patches/0005-Shrink-size-of-static-binary-search-tree.patch` 38* `git am -3 ../patches/0006-Patch-out-unused-CSS-style-code.patch` 39* `git reset HEAD~6` # 6 is the number of commits created by the above commands 40