moxml 0.5.87 → 0.5.88

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22bb7c49cd05d3432ccc90eab997ec45ecd00e8677678e8868a40c1ce087f0bf
4
- data.tar.gz: 69bf26fa41c2049edb4b46de37af54fd9dc2946cb0580b8127e9cda9d3b7f588
3
+ metadata.gz: 3da81cdaaa2647c6108fb24c6616a7da3c6c089b8c8a7f92487153d63995b2f3
4
+ data.tar.gz: 768131fdcf003decd4969cebf509e13882c614dae60cb2c2745a6764fb288e0c
5
5
  SHA512:
6
- metadata.gz: ffe7b307857e13577d14c770af45e8792236703083e286109bdc024690cf937b5ff828e1f39cad29ec5f16ba5c3343d07969f3e47647f2a14342e561b317854a
7
- data.tar.gz: 488175d437d83b3d9ee66c62e7c6cb09f79dcc8aec87fa596df82d7a4817d4ad4a71a12a67281670be01ea2590a08bfc34256d701c3436a1e5553935230c1272
6
+ metadata.gz: 0f6b74c76e0174900feb641f2253a803f5ce0d29f0a7f8f4ee979ad055929ba297f400a9c9fcb37d56bb1ff137f18253606903794aa13a6107e0a412a0a7e989
7
+ data.tar.gz: c635ec9a1958c823d4f2fad192326ae85f489756f2d8110af771ee8ad5ca49e6708e529cce0814292a44b1054dbab879d03bc839c87fc65c043bf131949d733d
@@ -235,28 +235,22 @@ module Moxml
235
235
  ::Moxml::ElementBehavior.instance_method(:[])
236
236
 
237
237
  # Bindings >= 1.9.194.1 (the floor) carry unshadowed
238
- # aliases; the UnboundMethod#bind_call face for older
239
- # shapes is deleted.
240
- # Doc-level entity-marker memo (one WeakMap,
241
- # generation-stamped Integer values).
242
- ENTITY_DOC_MEMO = ::ObjectSpace::WeakMap.new
243
238
 
244
239
  module Reads
245
- # Marker presence is a DOCUMENT fact, but the wrapper
246
- # memo re-derives it per node (the per-read machinery
247
- # was ~a quarter of the consumer walk). Doc-level
248
- # WeakMap, generation-stamped into one Integer
249
- # (immediates make safe weak values): one C document
250
- # read plus one map hit per bare read. Entries die
251
- # with their documents; a stale generation re-derives.
240
+ # Marker presence is a DOCUMENT fact, memoized per
241
+ # wrapper: one Integer stamp ivar (generation << 1 |
242
+ # bearing) — an ivar read + compare per bare read,
243
+ # versus the old doc-WeakMap hit which cost a bind_call
244
+ # plus a map lookup, more than the attribute read
245
+ # itself. A stale generation re-derives; stamps die
246
+ # with their wrappers (wrapper lifetime = doc scope).
252
247
  def doc_entity_bearing?
253
- doc = NN_DOCUMENT.bind_call(self)
254
- memo = ENTITY_DOC_MEMO[doc]
248
+ stamp = @doc_entity_stamp
255
249
  gen = ::Moxml::Adapter::Leptris.serialize_generation
256
- return memo.allbits?(1) if memo && (memo >> 1) == gen
250
+ return stamp.allbits?(1) if stamp && (stamp >> 1) == gen
257
251
 
258
252
  bearing = ::Moxml::Adapter::Leptris.entity_bearing?(self)
259
- ENTITY_DOC_MEMO[doc] = (gen << 1) | (bearing ? 1 : 0)
253
+ @doc_entity_stamp = (gen << 1) | (bearing ? 1 : 0)
260
254
  bearing
261
255
  end
262
256
 
data/lib/moxml/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Moxml
4
- VERSION = "0.5.87"
4
+ VERSION = "0.5.88"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moxml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.87
4
+ version: 0.5.88
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-09-26 00:00:00.000000000 Z
11
+ date: 2026-09-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  Moxml is a unified XML manipulation library that provides a common API