next.js
98ab0990 - [turbopack] correct a fencepost error in our inline string descision (#93524)

Commit
63 days ago
[turbopack] correct a fencepost error in our inline string descision (#93524) ## What? Fix an off-by-one in the `RcStr` inline-length check. Strings of length exactly `MAX_INLINE_LEN` should be stored inline, not on the heap. ## Why? `<` should have been `<=`. The buffer holds `MAX_INLINE_LEN` bytes and the 4-bit tag field can encode that length, so the strict comparison was wasting one byte of inline capacity for no reason — 7-byte strings were allocating on the default 64-bit build. Bug dates back to #74482, the original inline-string change. This covers fun things like: "default" (×11), "project" (×8), "process" (×8), "postcss" (×7), "require" (×6), "browser" (×4) <!-- NEXT_JS_LLM_PR -->
Author
Parents
Loading