leptris 1.9.417.0-arm-linux → 1.9.418.0-arm-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/leptris/version.rb +1 -1
- data/lib/libleptris.so +0 -0
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +11 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/TODO.max-perf/15-c-face-vs-pugixml.md +70 -0
- data/vendor-src/libleptris/src/leptris/common/entities.c +5 -0
- data/vendor-src/libleptris/src/leptris/dom/element_query.c +9 -1
- data/vendor-src/libleptris/test/CMakeLists.txt +1 -0
- data/vendor-src/libleptris/test/parser/test_entity_decode.cpp +54 -0
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 92fddc51ac8c047f7ba7d9ffbe7fa519fbcdc4b4733e06e1a1149b0bfa882f16
|
|
4
|
+
data.tar.gz: 0cb014d35445a79cac27fdca278330f6c26639faae83051c931f17da758c71dc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b34ed16598d5b19133b2ecac3ae14c091439c357b575d9a2fe1ce862996d410186382a6aca21a9656e31a17e1c4657eef53d3601194d2ed56db41a05fdc27d0e
|
|
7
|
+
data.tar.gz: a6fdc94096759c318f70823896995c96eb841b5e6e89cf4d8170ef3106a878f4479b61d345bb53a5cca19dc178ecd318cc9132af07ea6f37060d071d14368536
|
data/Rakefile
CHANGED
|
@@ -8,7 +8,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
8
8
|
# Pin for `rake compile` and the platform-gem builds. Keep in lockstep
|
|
9
9
|
# with .github/workflows/build.yml (which calls `rake compile`) and the
|
|
10
10
|
# CHANGELOG when libleptris releases.
|
|
11
|
-
LIBLEPTRIS_VERSION = "1.9.
|
|
11
|
+
LIBLEPTRIS_VERSION = "1.9.418"
|
|
12
12
|
# Vendored alongside libleptris for fn:normalize-unicode (TODO
|
|
13
13
|
# .restructure/20): built per platform with a RELOCATABLE @rpath
|
|
14
14
|
# install name, loaded by ffi.rb before libleptris so the
|
data/lib/leptris/version.rb
CHANGED
data/lib/libleptris.so
CHANGED
|
Binary file
|
data/vendor-src/README.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.9.418] - 2026-11-12
|
|
4
|
+
## Fixed
|
|
5
|
+
|
|
6
|
+
- **entities: unknown named entities preserve their terminating semicolon**. decode_entity's lenient unknown-entity branch consumed the `;` while copying the name — `©` came back as `©` (one character short) on every consumer of the decode face: the attribute accessor's lazy expansion, text content, and the bindings' decode calls. The semicolon is part of the literal spelling; it is now emitted. Pins: unknown entities byte-exact in attributes and text; mixed known/unknown decode (`&` decodes; `©`/` ` stay literal — HTML-only, not XML-predefined).
|
|
7
|
+
|
|
8
|
+
- **attributes: the bulk attribute-pairs export serves decoded values**. `leptris_element_attribute_pairs`' values column read the RAW view while the per-attribute getter decoded — every listing face that routes through the bulk export (the bindings' `attribute_pairs` and the native packet/pairs faces the adapters use) showed literals where the accessor decoded (lutaml/moxml#540: the XSD unicode-block pattern cases flipped to failing between trains). The values column now routes through the per-attribute getter (same decode, cached into the attribute — repeat bulk reads skip the work). The raw views remain on `leptris_element_attributes_raw` (#635).
|
|
9
|
+
|
|
10
|
+
## Tests
|
|
11
|
+
|
|
12
|
+
- New `test_entity_decode` battery: the unknown-entity byte-exactness contract, mixed known/unknown decode, and the bulk values column. Two pin drafts were discarded for wrong premises (attribute-name NUL behavior; `©`/` ` as XML-predefined — they are HTML-only).
|
|
13
|
+
|
|
3
14
|
## [1.9.417] - 2026-11-11
|
|
4
15
|
## Performance
|
|
5
16
|
|
|
@@ -335,3 +335,73 @@ near-identical code (the cuts only ADD work-free fast paths) —
|
|
|
335
335
|
a 4.8x swing on one leg. Single-run macos attr/text-13MB datapoints
|
|
336
336
|
MUST NOT drive verdicts; the macos lane needs repeated-run medians
|
|
337
337
|
before any row there is called a regression or a win.
|
|
338
|
+
|
|
339
|
+
## Track D addendum 7 — the scanner arc OPENED (2026-11-11 evening)
|
|
340
|
+
|
|
341
|
+
Post-all-cuts text-shape samples (300k-element fixture, no-inline
|
|
342
|
+
build): direct_parse_internal's own body dominates the parse at
|
|
343
|
+
34-73% across samples — the per-tag dispatch loop (open scan, close
|
|
344
|
+
scan+match, text-run dispatch, elem carve/zero) is THE remaining
|
|
345
|
+
arc, exactly as the ledger predicted. The region split needs
|
|
346
|
+
inFunction attribution: the sample tool cannot see inside one frame,
|
|
347
|
+
so the next session's opening move is the noinline region-wrap probe
|
|
348
|
+
(close-tag region first — biggest single suspect; needs the
|
|
349
|
+
goto/label surgery threaded through DParser).
|
|
350
|
+
|
|
351
|
+
INSTRUMENT LAWS learned tonight: (1) `git checkout main -- <file>`
|
|
352
|
+
on a worktree branch copies from the STALE LOCAL main — always
|
|
353
|
+
`git checkout HEAD --` or origin/<ref>; it silently reverted the
|
|
354
|
+
fast-out mid-profile and produced one void sample. (2) The Bash tool
|
|
355
|
+
shell layers make `$!`/pgrep -f unreliable for backgrounding a
|
|
356
|
+
sample target — pgrep -x with the binary name + the process printing
|
|
357
|
+
its own getpid() is the reliable pattern. (3) Sample files written
|
|
358
|
+
into the wt/ worktree dirs vanished between commands (sandbox
|
|
359
|
+
sweep class) — write samples into the main repo tree and extract in
|
|
360
|
+
the same command.
|
|
361
|
+
|
|
362
|
+
ALSO this session: the interleaved-lane default flip REJECTED
|
|
363
|
+
(1.72x slower on element-dense text; addendum 6), and the
|
|
364
|
+
no-attribute fast-out SHIPPED (PR #2009, ubuntu-x86 attr-13MB to
|
|
365
|
+
parity). Release trains v1.9.416 + v1.9.417 sealed, all registries.
|
|
366
|
+
|
|
367
|
+
## Track D addendum 8 — the region split MEASURED (probe branch probe/close-region)
|
|
368
|
+
|
|
369
|
+
The close-tag region extracted NOINLINE (dp_close_tag_probe — the
|
|
370
|
+
instrument lives on probe/close-region, DO NOT MERGE) and sampled on
|
|
371
|
+
the post-fast-out text shape (~1250 in-frame samples):
|
|
372
|
+
|
|
373
|
+
- loop residual (open-tag scan + dispatch + elem carve/zero): 21%
|
|
374
|
+
- text-run family (scan_run_neon 17% + scalar wrapper 2.2% +
|
|
375
|
+
dp_text_create 8.5% + set_content 1.5%): ~29%
|
|
376
|
+
- wiring (dp_wire_child 9% + int32 encode 5.8% + edge_idx 0.7%): ~15%
|
|
377
|
+
- CLOSE-TAG REGION (probe 7.2% + pos_close_at 4.4%): 11.6%
|
|
378
|
+
- positions journal (pos_record 6.6% + the close_at share above): ~11%
|
|
379
|
+
- count3 pre-scan: 5.8%
|
|
380
|
+
|
|
381
|
+
Next-cut ranking by (size x boundedness):
|
|
382
|
+
1. text_scan_run's NEON residual (17% in-kernel — the chunk loop +
|
|
383
|
+
flag handling; an AVX2 mirror also lands for x86).
|
|
384
|
+
2. The loop residual's elem carve/zeroing (memset per 64-element
|
|
385
|
+
chunk vs explicit-init stores).
|
|
386
|
+
3. The positions journal (12% combined; SKIP_SOURCE_POSITIONS
|
|
387
|
+
already opts out — the default-on cost is the conformance/positions
|
|
388
|
+
faces' price).
|
|
389
|
+
The close-tag region (11.6%) has no obvious algorithmic cut — memcmp
|
|
390
|
+
fast paths already cover it.
|
|
391
|
+
|
|
392
|
+
## Track D addendum 8b — the scan-kernel analysis (2026-11-11, ranked cut #1 CLOSED as structural)
|
|
393
|
+
|
|
394
|
+
The text_scan_run NEON kernel read + analysis: the 17% in-kernel
|
|
395
|
+
share for the fixture-class run lengths (30-64B) is dominated by
|
|
396
|
+
PER-RUN FIXED COST — the call, the 3 needle vdup setups, the
|
|
397
|
+
accumulator zeroing, and one vmaxvq reduction per 16B chunk — not
|
|
398
|
+
per-byte throughput. The batched-reduction redesign (8 chunks
|
|
399
|
+
reduction-free, then chunk-rescan on hit) only wins runs >128B;
|
|
400
|
+
the bench-class runs break even or lose. The cut that actually
|
|
401
|
+
moves this block = merging the run scan INTO the caller's loop
|
|
402
|
+
(killing the per-run call+setup for short runs entirely), which is
|
|
403
|
+
the loop-body surgery slice — it inherits the region-wrap probe
|
|
404
|
+
(the text branch wraps the same way the close-tag region did).
|
|
405
|
+
|
|
406
|
+
RANKED CUT #1 therefore moves to the loop-surgery slice with the
|
|
407
|
+
scan-merge as its first step. Nothing ships from the kernel alone.
|
|
@@ -147,6 +147,11 @@ size_t decode_entity(const char* input, char* output, size_t outlen) {
|
|
|
147
147
|
while (input[in_pos]) {
|
|
148
148
|
char c = input[in_pos];
|
|
149
149
|
if (c == ';') {
|
|
150
|
+
/* The ';' belongs to the literal entity —
|
|
151
|
+
* emit it or the preserved spelling loses
|
|
152
|
+
* its terminator (© came back as
|
|
153
|
+
* ©). */
|
|
154
|
+
if (out_pos < outlen - 1) output[out_pos++] = ';';
|
|
150
155
|
in_pos++; /* Skip ';' */
|
|
151
156
|
break;
|
|
152
157
|
}
|
|
@@ -1526,7 +1526,15 @@ LEPTRIS_API size_t leptris_element_attribute_pairs(
|
|
|
1526
1526
|
a; a = leptris_attr_next(a)) {
|
|
1527
1527
|
if (written >= max_count) break;
|
|
1528
1528
|
if (out_names) out_names[written] = attr_cname(a);
|
|
1529
|
-
|
|
1529
|
+
/* The values column serves the SAME view the per-attribute
|
|
1530
|
+
* getter does — decoded (XML 1.0 §4.6: character references
|
|
1531
|
+
* decode in attribute values exactly as in content). The
|
|
1532
|
+
* raw views belong to leptris_element_attributes_raw
|
|
1533
|
+
* (#635). Decoding caches into the attribute (the entities
|
|
1534
|
+
* flag clears), so repeat bulk reads skip the work. The
|
|
1535
|
+
* element's pool carries the decoded copies. */
|
|
1536
|
+
if (out_values) out_values[written] =
|
|
1537
|
+
leptris_attribute_get_value(elem, (LeptrisAttribute)a);
|
|
1530
1538
|
if (out_attrs) out_attrs[written] = (LeptrisAttribute)a;
|
|
1531
1539
|
written++;
|
|
1532
1540
|
}
|
|
@@ -119,6 +119,7 @@ leptris_add_test(test_parser parser/test_parser.cpp)
|
|
|
119
119
|
leptris_add_test(test_large_docs parser/test_large_documents.cpp)
|
|
120
120
|
leptris_add_test(test_encoding parser/test_encoding.cpp)
|
|
121
121
|
leptris_add_test(test_utf8_simd parser/test_utf8_simd.cpp)
|
|
122
|
+
leptris_add_test(test_entity_decode parser/test_entity_decode.cpp)
|
|
122
123
|
leptris_add_test(test_dom dom/test_dom.cpp)
|
|
123
124
|
leptris_add_test(test_element_children dom/test_element_children.cpp)
|
|
124
125
|
leptris_add_test(test_entity_refs dom/test_entity_refs.cpp)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Entity decode: unknown named entities preserved byte-exact in
|
|
2
|
+
// lenient mode (libxml2/pugixml semantics). The decode_entity core
|
|
3
|
+
// consumed the terminating ';' without emitting it — unknown refs
|
|
4
|
+
// came back one character short (© 2026). Found via the
|
|
5
|
+
// lutaml/moxml#540 investigation (the binding faces route unknown
|
|
6
|
+
// entities through this same core).
|
|
7
|
+
#include <leptris.h>
|
|
8
|
+
#include <leptris/dom/document.h>
|
|
9
|
+
#include <gtest/gtest.h>
|
|
10
|
+
#include <cstring>
|
|
11
|
+
|
|
12
|
+
TEST(EntityDecode, UnknownNamedEntityPreservesSemicolon) {
|
|
13
|
+
const char* xml = "<r a=\"© 2026\">x © y</r>";
|
|
14
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
15
|
+
LeptrisDocument doc =
|
|
16
|
+
leptris_parse_string(xml, std::strlen(xml), &st);
|
|
17
|
+
ASSERT_NE(doc, nullptr);
|
|
18
|
+
LeptrisElement root = leptris_document_root(doc);
|
|
19
|
+
EXPECT_STREQ(leptris_element_attribute(root, "a"), "© 2026");
|
|
20
|
+
LeptrisNodeRef t =
|
|
21
|
+
leptris_node_first_child(leptris_element_as_node(root));
|
|
22
|
+
ASSERT_NE(t, nullptr);
|
|
23
|
+
EXPECT_STREQ(leptris_text_node_get_content(t), "x © y");
|
|
24
|
+
leptris_document_free(doc);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
TEST(EntityDecode, UnknownEntityMixedWithKnownDecodesBoth) {
|
|
28
|
+
/* © and are HTML-only — in XML they are unknown
|
|
29
|
+
* entities and stay literal (byte-exact, semicolons included);
|
|
30
|
+
* only the five predefined entities decode. */
|
|
31
|
+
const char* xml =
|
|
32
|
+
"<r v=\"& © <\">&<</r>";
|
|
33
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
34
|
+
LeptrisDocument doc =
|
|
35
|
+
leptris_parse_string(xml, std::strlen(xml), &st);
|
|
36
|
+
ASSERT_NE(doc, nullptr);
|
|
37
|
+
LeptrisElement root = leptris_document_root(doc);
|
|
38
|
+
EXPECT_STREQ(leptris_element_attribute(root, "v"),
|
|
39
|
+
"& © <");
|
|
40
|
+
EXPECT_STREQ(
|
|
41
|
+
leptris_text_node_get_content(
|
|
42
|
+
leptris_node_first_child(leptris_element_as_node(root))),
|
|
43
|
+
"&<");
|
|
44
|
+
|
|
45
|
+
/* The bulk pairs export serves the decoded values column too —
|
|
46
|
+
* the binding's listing faces route through it (moxml#540). */
|
|
47
|
+
const char* names[4];
|
|
48
|
+
const char* values[4];
|
|
49
|
+
size_t n = leptris_element_attribute_pairs(
|
|
50
|
+
root, names, values, NULL, 4);
|
|
51
|
+
ASSERT_EQ(n, 1u);
|
|
52
|
+
EXPECT_STREQ(values[0], "& © <");
|
|
53
|
+
leptris_document_free(doc);
|
|
54
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
|
|
3
3
|
"name": "leptris",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.418",
|
|
5
5
|
"description": "High-performance XML parser and XPath 1.0 engine in C (libleptris)",
|
|
6
6
|
"homepage": "https://github.com/leptris/leptris",
|
|
7
7
|
"license": "MIT",
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: leptris
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.
|
|
4
|
+
version: 1.9.418.0
|
|
5
5
|
platform: arm-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|
|
@@ -872,6 +872,7 @@ files:
|
|
|
872
872
|
- vendor-src/libleptris/test/memory/test_pool.cpp
|
|
873
873
|
- vendor-src/libleptris/test/memory/test_pool_arena.cpp
|
|
874
874
|
- vendor-src/libleptris/test/parser/test_encoding.cpp
|
|
875
|
+
- vendor-src/libleptris/test/parser/test_entity_decode.cpp
|
|
875
876
|
- vendor-src/libleptris/test/parser/test_interleaved.cpp
|
|
876
877
|
- vendor-src/libleptris/test/parser/test_large_documents.cpp
|
|
877
878
|
- vendor-src/libleptris/test/parser/test_parser.cpp
|