From 7a257160bb5e9ea9efd97916a4840ffbdb22f266 Mon Sep 17 00:00:00 2001 From: Malte Ubl Date: Wed, 28 Oct 2026 18:45:52 -0700 Subject: [PATCH] Pin the accumulated dynamic handle tags NODE_ISLAND and the twelve WS_* stream handles lived in SCR_DYNH_NEW_TAGS, whose rows are numbered positionally from the largest pinned value. Adding SEGMENTER_WORD and SEGMENTS_WORD ahead of them renumbered every WS_* tag by two, and those numbers are immediate operands in the link-gated stream units (scr_webstreams.c, scr_stream.c, scr_stream_from_web.c, scr_fetch.c): eight runtime objects changed and 35 non-Intl corpus programs stopped being byte-identical in the zero-cost gate. Move the thirteen older rows to SCR_DYNH_TAGS with the values they already had (84 through 96). Their numbers, the enum, and every unit's object code return to the base build, and the two Intl tags number from 97. Co-Authored-By: Claude Opus 5.5 --- packages/runtime/src/scr_dyn.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/runtime/src/scr_dyn.h b/packages/runtime/src/scr_dyn.h index 4047ad307..c46b5dc9c 100644 --- a/packages/runtime/src/scr_dyn.h +++ b/packages/runtime/src/scr_dyn.h @@ -207,6 +207,7 @@ typedef enum { X(NET_SERVER, 3) /* ScrNetServer — net.Server (http.Server rides the same handle) */ \ X(NET_SOCKET, 2) /* ScrNetSocket — net.Socket */ \ X(NET_SOCKET_ADDRESS, 47) /* net.SocketAddress (scr_net.c) */ \ + X(NODE_ISLAND, 84) /* a Node island value (scr_node_island_handle.c) */ \ X(PRIVATE_KEY, 65) /* node:crypto PrivateKeyObject (scr_pki.c) */ \ X(PUBLIC_KEY, 66) /* node:crypto PublicKeyObject (scr_pki.c) */ \ X(REGEXP, 26) /* native RegExp, shared compiled pattern */ \ @@ -236,25 +237,24 @@ typedef enum { X(WEB_TRANSFORM, 73) /* native identity TransformStream (scr_fetch.c) */ \ X(WEB_WRITABLE, 74) /* a TransformStream's WritableStream (scr_fetch.c) */ \ X(WEB_WRITER, 75) /* WritableStreamDefaultWriter (scr_fetch.c) */ \ - X(WORKER, 35) + X(WORKER, 35) \ + X(WS_BYTE_STRATEGY, 85) /* ByteLengthQueuingStrategy (scr_webstreams.c) */ \ + X(WS_COUNT_STRATEGY, 86) /* CountQueuingStrategy (scr_webstreams.c) */ \ + X(WS_RCONTROLLER, 87) /* ReadableStreamDefaultController (scr_webstreams.c) */ \ + X(WS_READABLE, 88) /* ReadableStream for checked-dynamic code (scr_webstreams.c) */ \ + X(WS_READER, 89) /* ReadableStreamDefaultReader (scr_webstreams.c) */ \ + X(WS_TCONTROLLER, 90) /* TransformStreamDefaultController (scr_webstreams.c) */ \ + X(WS_TEXT_DECODER, 91) /* TextDecoderStream (scr_webstreams.c) */ \ + X(WS_TEXT_ENCODER, 92) /* TextEncoderStream (scr_webstreams.c) */ \ + X(WS_TRANSFORM, 93) /* TransformStream for checked-dynamic code (scr_webstreams.c) */ \ + X(WS_WCONTROLLER, 94) /* WritableStreamDefaultController (scr_webstreams.c) */ \ + X(WS_WRITABLE, 95) /* WritableStream for checked-dynamic code (scr_webstreams.c) */ \ + X(WS_WRITER, 96) /* WritableStreamDefaultWriter (scr_webstreams.c) */ /* Tags added since the last pin, by name only (see above). */ #define SCR_DYNH_NEW_TAGS(Y) \ - Y(NODE_ISLAND) /* a Node island value (scr_node_island_handle.c) */ \ Y(SEGMENTER_WORD) /* ICU word-granularity Segmenter (scr_intl.c) */ \ - Y(SEGMENTS_WORD) /* its word segmentation result (scr_intl.c) */ \ - Y(WS_BYTE_STRATEGY) /* ByteLengthQueuingStrategy (scr_webstreams.c) */ \ - Y(WS_COUNT_STRATEGY) /* CountQueuingStrategy (scr_webstreams.c) */ \ - Y(WS_RCONTROLLER) /* ReadableStreamDefaultController (scr_webstreams.c) */ \ - Y(WS_READABLE) /* ReadableStream for checked-dynamic code (scr_webstreams.c) */ \ - Y(WS_READER) /* ReadableStreamDefaultReader (scr_webstreams.c) */ \ - Y(WS_TCONTROLLER) /* TransformStreamDefaultController (scr_webstreams.c) */ \ - Y(WS_TEXT_DECODER) /* TextDecoderStream (scr_webstreams.c) */ \ - Y(WS_TEXT_ENCODER) /* TextEncoderStream (scr_webstreams.c) */ \ - Y(WS_TRANSFORM) /* TransformStream for checked-dynamic code (scr_webstreams.c) */ \ - Y(WS_WCONTROLLER) /* WritableStreamDefaultController (scr_webstreams.c) */ \ - Y(WS_WRITABLE) /* WritableStream for checked-dynamic code (scr_webstreams.c) */ \ - Y(WS_WRITER) /* WritableStreamDefaultWriter (scr_webstreams.c) */ + Y(SEGMENTS_WORD) /* its word segmentation result (scr_intl.c) */ /* Values below the largest pinned one that no tag holds, each with the * reason. Never reuse one without removing it here. */