leptris 1.9.334.0-aarch64-linux → 1.9.334.1-aarch64-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/CHANGELOG.md +16 -0
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/element.rb +14 -9
- data/lib/leptris/xml/native_layer.rb +6 -0
- data/lib/leptris.rb +17 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1f4a0ad14ba1ae7fa74c05ff1ca5f0edef39f711ae7cd6a6b1f2cd385847fa1f
|
|
4
|
+
data.tar.gz: ced9f2e3ab5c97b1f4641288f8c17a423c79448e9273c32e4917620a9ec956f8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f688711eb741e401ff98ec400e73b2c010b8ce1550be6cb8806f7170ac0716407ba4af6cfbc6b66aa7bebb54fa2f318b38b1d3ce71d43444645521348efc3672
|
|
7
|
+
data.tar.gz: 0c9bd5a7126ae47a5e000dfa516b65d721458d069b0bd25c9bfb2b661ec9ba665ac72ab5a181984ab2391506d04e3985623bfc417b2a532742dd97713cac95d5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [1.9.334.1] - 2026-10-10
|
|
2
|
+
|
|
3
|
+
### Performance
|
|
4
|
+
|
|
5
|
+
- **The attach paths stop minting FFI::Pointer wrappers per node
|
|
6
|
+
(#408 Ask 1)**: every native fast path read the canonical
|
|
7
|
+
Integer address through `c_ptr.address` — lazily materializing
|
|
8
|
+
a Pointer per node handed to one C call — instead of the
|
|
9
|
+
`c_address` twin. The FFI-fallback append paths route through
|
|
10
|
+
`leptris_element_add_child_addr` (both sides as Integers; same
|
|
11
|
+
status contract). Measured on the object-mode build(500):
|
|
12
|
+
FFI::Pointer allocations 1002 → 2 (the document/root wrappers
|
|
13
|
+
that genuinely need one), ~4% CPU off the build row under
|
|
14
|
+
load. Ask 2's face (`Descriptor#build_result`) shipped in
|
|
15
|
+
1.9.334.0.
|
|
16
|
+
|
|
1
17
|
## [1.9.334.0] - 2026-10-10
|
|
2
18
|
|
|
3
19
|
### Added — engine sync (libleptris 1.9.332-1.9.334)
|
data/lib/leptris/version.rb
CHANGED
data/lib/leptris/xml/element.rb
CHANGED
|
@@ -386,7 +386,7 @@ class Leptris::XML::Element < Leptris::XML::Node
|
|
|
386
386
|
# build appends.
|
|
387
387
|
return true unless node.is_a?(Leptris::XML::Element)
|
|
388
388
|
return false unless defined?(Leptris::XML::NATIVE_FAST)
|
|
389
|
-
!Leptris::XML::Native.ns_lift_needed?(node.
|
|
389
|
+
!Leptris::XML::Native.ns_lift_needed?(node.c_address)
|
|
390
390
|
end
|
|
391
391
|
|
|
392
392
|
# A node is foreign to +document+ when it belongs to another one
|
|
@@ -445,7 +445,7 @@ class Leptris::XML::Element < Leptris::XML::Node
|
|
|
445
445
|
end
|
|
446
446
|
if native_fast_children?
|
|
447
447
|
unless Leptris::XML::Native.insert_binding_child(
|
|
448
|
-
@document, @c_address, node.
|
|
448
|
+
@document, @c_address, node.c_address, 1).nil?
|
|
449
449
|
return node
|
|
450
450
|
end
|
|
451
451
|
end
|
|
@@ -478,7 +478,7 @@ class Leptris::XML::Element < Leptris::XML::Node
|
|
|
478
478
|
end
|
|
479
479
|
if native_fast_children?
|
|
480
480
|
unless Leptris::XML::Native.insert_binding_child(
|
|
481
|
-
@document, @c_address, node.
|
|
481
|
+
@document, @c_address, node.c_address, 2).nil?
|
|
482
482
|
return node
|
|
483
483
|
end
|
|
484
484
|
end
|
|
@@ -511,7 +511,7 @@ class Leptris::XML::Element < Leptris::XML::Node
|
|
|
511
511
|
end
|
|
512
512
|
if native_fast_children?
|
|
513
513
|
unless Leptris::XML::Native.insert_binding_child(
|
|
514
|
-
@document, @c_address, node.
|
|
514
|
+
@document, @c_address, node.c_address, 3).nil?
|
|
515
515
|
return node
|
|
516
516
|
end
|
|
517
517
|
end
|
|
@@ -556,7 +556,7 @@ class Leptris::XML::Element < Leptris::XML::Node
|
|
|
556
556
|
end
|
|
557
557
|
cross = nodes.any? { |n| Leptris::XML::Element.foreign_to?(n, @document) }
|
|
558
558
|
if native_fast_children?
|
|
559
|
-
addrs = nodes.map { |n| n.
|
|
559
|
+
addrs = nodes.map { |n| n.c_address }
|
|
560
560
|
done = Leptris::XML::Native.append_binding_children(
|
|
561
561
|
@document, @c_address, addrs)
|
|
562
562
|
done = 0 unless done.is_a?(Integer)
|
|
@@ -698,7 +698,7 @@ class Leptris::XML::Element < Leptris::XML::Node
|
|
|
698
698
|
# The face raises on failure (TODO.perf/36); Qnil = the
|
|
699
699
|
# child needs the lift — the full path handles it.
|
|
700
700
|
unless Leptris::XML::Native.append_binding_child(
|
|
701
|
-
@document, @c_address, node_or_markup.
|
|
701
|
+
@document, @c_address, node_or_markup.c_address).nil?
|
|
702
702
|
return node_or_markup
|
|
703
703
|
end
|
|
704
704
|
end
|
|
@@ -706,8 +706,11 @@ class Leptris::XML::Element < Leptris::XML::Node
|
|
|
706
706
|
unless Leptris::XML::Element.skip_adoption_lift?(node_or_markup)
|
|
707
707
|
Leptris::XML::Element.lift_namespaces_for_adoption(node_or_markup, namespaces)
|
|
708
708
|
end
|
|
709
|
+
# Address-based attach (#408): same status contract, no
|
|
710
|
+
# FFI::Pointer mint for either side.
|
|
709
711
|
Leptris::XML::FFI.check_status(
|
|
710
|
-
Leptris::XML::FFI.
|
|
712
|
+
Leptris::XML::FFI.leptris_element_add_child_addr(
|
|
713
|
+
@c_address, node_or_markup.c_address))
|
|
711
714
|
node_or_markup
|
|
712
715
|
when String
|
|
713
716
|
# TODO.perf/34: one dispatch parses the markup and appends
|
|
@@ -732,7 +735,8 @@ class Leptris::XML::Element < Leptris::XML::Node
|
|
|
732
735
|
added = []
|
|
733
736
|
frag.children.each do |n|
|
|
734
737
|
Leptris::XML::FFI.check_status(
|
|
735
|
-
Leptris::XML::FFI.
|
|
738
|
+
Leptris::XML::FFI.leptris_element_add_child_addr(
|
|
739
|
+
@c_address, n.c_address))
|
|
736
740
|
added << n
|
|
737
741
|
end
|
|
738
742
|
Leptris::XML::NodeSet.new(@document, added)
|
|
@@ -753,7 +757,8 @@ class Leptris::XML::Element < Leptris::XML::Node
|
|
|
753
757
|
Leptris::XML::Element.lift_namespaces_for_adoption(node, namespaces)
|
|
754
758
|
end
|
|
755
759
|
Leptris::XML::FFI.check_status(
|
|
756
|
-
Leptris::XML::FFI.
|
|
760
|
+
Leptris::XML::FFI.leptris_element_add_child_addr(
|
|
761
|
+
@c_address, node.c_address))
|
|
757
762
|
Leptris::XML::Node.invalidate_cross_document!(node, @document)
|
|
758
763
|
remove_from_source_original(node)
|
|
759
764
|
last_installed
|
|
@@ -27,6 +27,12 @@ begin
|
|
|
27
27
|
if Gem.win_platform?
|
|
28
28
|
require "leptris/xml/native_#{RUBY_VERSION[/\A\d+\.\d+/].tr('.', '_')}"
|
|
29
29
|
else
|
|
30
|
+
# #1623: the bundle beside this file must carry a valid
|
|
31
|
+
# signature before dyld maps it — pre-verify and re-stamp.
|
|
32
|
+
Leptris.resign_bundle_if_needed(
|
|
33
|
+
File.expand_path(
|
|
34
|
+
"native#{RUBY_PLATFORM.include?('darwin') ? '.bundle' : '.so'}",
|
|
35
|
+
__dir__))
|
|
30
36
|
require "leptris/xml/native"
|
|
31
37
|
end
|
|
32
38
|
rescue LoadError => e
|
data/lib/leptris.rb
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
require "leptris/version"
|
|
4
4
|
|
|
5
5
|
module Leptris
|
|
6
|
+
# leptris#1623: macOS 14.x dyld intermittently SIGKILLs native
|
|
7
|
+
# bundles whose adhoc signature went stale (post-build byte
|
|
8
|
+
# rewrites) or is absent (x86_64 links carry none by default).
|
|
9
|
+
# A kill cannot be rescued — pre-verify and re-stamp BEFORE dyld
|
|
10
|
+
# ever sees the binary. Adhoc is deterministic and needs no
|
|
11
|
+
# identity; Developer ID rides owner secrets when wired.
|
|
12
|
+
def self.resign_bundle_if_needed(path)
|
|
13
|
+
return false unless path && File.exist?(path)
|
|
14
|
+
return false unless RUBY_PLATFORM.include?("darwin")
|
|
15
|
+
return true if system("codesign", "--verify", path.to_s,
|
|
16
|
+
out: File::NULL, err: File::NULL)
|
|
17
|
+
system("codesign", "--force", "--sign", "-", path.to_s,
|
|
18
|
+
out: File::NULL, err: File::NULL) &&
|
|
19
|
+
system("codesign", "--verify", path.to_s,
|
|
20
|
+
out: File::NULL, err: File::NULL)
|
|
21
|
+
end
|
|
22
|
+
|
|
6
23
|
autoload :XML, "leptris/xml"
|
|
7
24
|
# One file, three entry constants (HTML/HTML4/HTML5) — each
|
|
8
25
|
# autoload maps so any reference loads the facade.
|