Repo sync - #12
Open
SonicField wants to merge 1368 commits into
Open
Conversation
Summary: Add `Query` matchers for output memory-indirect operands, covering base vreg, offset, and absence of an index register. Reviewed By: DinoV Differential Revision: D113313606 fbshipit-source-id: 1b6882a6a19f3f71483fa446aef611ca29705292
Summary: Add a `Query::guard()` matcher for `Guard` operands. Removes the last use of the formatted LIR helper from `lir_target_select_test.cpp`. Reviewed By: DinoV Differential Revision: D113313605 fbshipit-source-id: 0ad5c2197bd12195409950f338990cf6381cfe89
Summary: Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.4.11 to 3.4.12. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/cure53/DOMPurify/releases">dompurify's releases</a>.</em></p> <blockquote> <h2>DOMPurify 3.4.12</h2> <ul> <li>Fixed an issue where a hook would not get called for custom elements, thanks <a href="https://github.com/Rikuxx0"><code>@Rikuxx0</code></a></li> <li>Hardened the handling of hooks removing elements, <a href="https://github.com/mkrause-bee360"><code>@mkrause-bee360</code></a></li> <li>Added support for a few new SVG attributes, thanks <a href="https://github.com/cbn-falias"><code>@cbn-falias</code></a> & <a href="https://github.com/Develop-KIM"><code>@Develop-KIM</code></a></li> <li>Hardened the handling of declarative partial updates</li> <li>Updated the documentation is several spots, README, wiki, etc.</li> <li>Bumped several dependencies where possible</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/cure53/DOMPurify/commit/a9ca1e537422319a557a9a2aa61f003b23b4a197"><code>a9ca1e5</code></a> release: 3.4.12 (<a href="https://redirect.github.com/cure53/DOMPurify/issues/1537">#1537</a>)</li> <li>See full diff in <a href="https://github.com/cure53/DOMPurify/compare/3.4.11...3.4.12">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookincubator/cinderx/network/alerts). </details> Pull Request resolved: #132 Reviewed By: yoney Differential Revision: D113572214 Pulled By: DinoV fbshipit-source-id: 2eb452d65f8bcd30cf096ff62c2337453ffa8aa4
Summary: Lower `LoadGlobalCached` with `kMoveRelaxed` and use relaxed atomic cache stores in free-threaded builds. Reviewed By: alexmalyshev Differential Revision: D113760713 fbshipit-source-id: f0537650f3efee61a42c47a8159f994c216ba797
Summary: Profiling the JIT compile pipeline showed the backend linear-scan register allocator, not the HIR passes, dominates compile time. Two hot spots stood out: 1. `LiveInterval::covers()` was the single hottest function. During the scan it is queried at monotonically non-decreasing locations, so this adds a `range_hint_` that resumes the search from the last examined range instead of binary-searching from scratch. The hint is validated on use and falls back to the original `upper_bound` when stale. 2. `LiveInterval::addRange` was O(n^2) when building fixed physical-register intervals. A register reserved at every call site accumulates one disjoint range per site, arriving in descending order, and each sorted-vector insert is an O(n) `memmove`. Those intervals are isolated (keyed by static operands, never touched by the vreg `addRange`/`setFrom`/`splitAt` paths), so `reserveRegisters` now appends ranges and `calculateLiveIntervals` sorts and merges each fixed interval once, producing identical merged ranges in O(n log n). Together these cut per-compile time on the stress test by ~15% (median 144ms to 124ms), with no change to allocation output. Reviewed By: mpage Differential Revision: D113085355 fbshipit-source-id: 6fd2b45543662a6a24a349029617543a09147668
Summary: This diff was automatically generated by the Pyre per-target upgrade tool. It adds `# pyre-fixme` or `pyrefly: ignore` comments to suppress type errors that will be introduced by an upcoming Pyre or Pyrefly release. These suppressions allow the upgrade to proceed without breaking existing code. Upgrading to new pyrefly Version. Without landing this diff your type checking tests may break. If assigned as a reviewer please help us get these diffs across the finish line. Thank you! #pyreupgrade Differential Revision: D113794122 fbshipit-source-id: 407ad94bcaddf5f2231ec4a6371fe37bfc2db40b
Summary: Replace undefined padding bits with initialized reserved bits. Reviewed By: alexmalyshev Differential Revision: D113781816 fbshipit-source-id: a07c5d6683e3b0ec87d3863d5cdb4fce79cccb04
Summary: None of the rt::box* runtime helpers are necessary. We can call out to PyBool_FromLong, PyFloat_FromDouble, PyLong_FromSize_t, and PyLong_FromSsize_t directly. 8-bit, 16-bit, and 32-bit values can be extended to 64-bit values with a single instruction. It's different for unboxing, as we do need to verify Python ints fit in the sized integer types. However we don't need the 64-bit runtime helpers, we can use `PyLong_AsSize_t` and `PyLong_AsSsize_t`. Reviewed By: DinoV Differential Revision: D113191211 fbshipit-source-id: 8731025f34442d334ff4627b6d53d1a375ca3f76
Summary: Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.2 to 3.1.4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/fastify/fast-uri/releases">fast-uri's releases</a>.</em></p> <blockquote> <h2>v3.1.4</h2> <h2>⚠️ Security Release</h2> <p>Fix for <a href="https://github.com/fastify/fast-uri/security/advisories/GHSA-v2hh-gcrm-f6hx">https://github.com/fastify/fast-uri/security/advisories/GHSA-v2hh-gcrm-f6hx</a></p> <p><strong>Full Changelog</strong>: <a href="https://github.com/fastify/fast-uri/compare/v3.1.3...v3.1.4">https://github.com/fastify/fast-uri/compare/v3.1.3...v3.1.4</a></p> <h2>v3.1.3</h2> <h2>⚠️ Security Release</h2> <ul> <li>Fixes: <a href="https://github.com/fastify/fast-uri/security/advisories/GHSA-4c8g-83qw-93j6">https://github.com/fastify/fast-uri/security/advisories/GHSA-4c8g-83qw-93j6</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/fastify/fast-uri/compare/v3.1.2...v3.1.3">https://github.com/fastify/fast-uri/compare/v3.1.2...v3.1.3</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/fastify/fast-uri/commit/6aeece669e4166b2446a89f17c07a3b15dfb7ed4"><code>6aeece6</code></a> Bumped v3.1.4</li> <li><a href="https://github.com/fastify/fast-uri/commit/2d50fbabc80e4d0884fe0f6a98fe118ce6faa353"><code>2d50fba</code></a> fix: reject literal backslash in URI authority</li> <li><a href="https://github.com/fastify/fast-uri/commit/0549fe35b0d482233f3be2816439f3ec803603fa"><code>0549fe3</code></a> Bumped v3.1.3</li> <li><a href="https://github.com/fastify/fast-uri/commit/2a6d357a18a68e6d812824379fd3388a1ae50d05"><code>2a6d357</code></a> Merge commit from fork</li> <li>See full diff in <a href="https://github.com/fastify/fast-uri/compare/v3.1.2...v3.1.4">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookincubator/cinderx/network/alerts). </details> Pull Request resolved: #133 Reviewed By: yoney Differential Revision: D113769800 Pulled By: alrobichaud fbshipit-source-id: 5fd029d7241cbeb932a50a81470e34c685d340a7
Summary: Bumps [postcss](https://github.com/postcss/postcss) from 8.5.15 to 8.5.23. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/postcss/postcss/releases">postcss's releases</a>.</em></p> <blockquote> <h2>8.5.23</h2> <ul> <li>Do not load source map without <code>opts.from</code> for security reasons.</li> </ul> <h2>8.5.22</h2> <ul> <li>Fixed custom property losing semicolon before a comment (by <a href="https://github.com/sarathfrancis90"><code>@sarathfrancis90</code></a>).</li> </ul> <h2>8.5.21</h2> <ul> <li>Fixed childless at-rule losing semicolon before comment (by <a href="https://github.com/sarathfrancis90"><code>@sarathfrancis90</code></a>).</li> <li>Fixed docs (by <a href="https://github.com/isker"><code>@isker</code></a>).</li> </ul> <h2>8.5.20</h2> <ul> <li>Fixed missing space if <code>AtRule#params</code> is set after (by <a href="https://github.com/sarathfrancis90"><code>@sarathfrancis90</code></a>).</li> <li>Fixed mixing AST error on warnings (by <a href="https://github.com/MahinAnowar"><code>@MahinAnowar</code></a>).</li> </ul> <h2>8.5.19</h2> <ul> <li>Fixed cleaning <code>before</code> for new nodes inserted to <code>Root</code> (by <a href="https://github.com/MahinAnowar"><code>@MahinAnowar</code></a>).</li> </ul> <h2>8.5.18</h2> <ul> <li>Restricted loading previous source maps file to the <code>opts.from</code> folder for security reasons (use <code>unsafeMap: true</code> to disable the check).</li> </ul> <h2>8.5.17</h2> <ul> <li>Fixed <code>Maximum call stack size exceeded</code> error.</li> <li>Fixed Prototype hijacking for <code>postcss.fromJSON()</code>.</li> <li>Fixed <code>Input#origin()</code> for unmapped end position (by <a href="https://github.com/chatman-media"><code>@chatman-media</code></a>).</li> </ul> <h2>8.5.16</h2> <ul> <li>Fixed <code>Input#origin()</code> position (by <a href="https://github.com/mizdra"><code>@mizdra</code></a>).</li> <li>Fixed <code>raws</code> after rehydrating a JSON AST (by <a href="https://github.com/sarathfrancis90"><code>@sarathfrancis90</code></a>).</li> <li>Fixed putting parent-less node in <code>nodes</code> of new node (by <a href="https://github.com/MahinAnowar"><code>@MahinAnowar</code></a>).</li> <li>Fixed computing <code>offset</code> in <code>positionBy()</code> (by <a href="https://github.com/greymoth-jp"><code>@greymoth-jp</code></a>).</li> <li>Fixed <code>rangeBy()</code> on <code>index: 0</code> (by <a href="https://github.com/sarathfrancis90"><code>@sarathfrancis90</code></a>).</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/postcss/postcss/blob/main/CHANGELOG.md">postcss's changelog</a>.</em></p> <blockquote> <h2>8.5.23</h2> <ul> <li>Do not load source map without <code>opts.from</code> for security reasons.</li> </ul> <h2>8.5.22</h2> <ul> <li>Fixed custom property losing semicolon before a comment (by <a href="https://github.com/sarathfrancis90"><code>@sarathfrancis90</code></a>).</li> </ul> <h2>8.5.21</h2> <ul> <li>Fixed childless at-rule losing semicolon before comment (by <a href="https://github.com/sarathfrancis90"><code>@sarathfrancis90</code></a>).</li> <li>Fixed docs (by <a href="https://github.com/isker"><code>@isker</code></a>).</li> </ul> <h2>8.5.20</h2> <ul> <li>Fixed missing space if <code>AtRule#params</code> is set after (by <a href="https://github.com/sarathfrancis90"><code>@sarathfrancis90</code></a>).</li> <li>Fixed mixing AST error on warnings (by <a href="https://github.com/MahinAnowar"><code>@MahinAnowar</code></a>).</li> </ul> <h2>8.5.19</h2> <ul> <li>Fixed cleaning <code>before</code> for new nodes inserted to <code>Root</code> (by <a href="https://github.com/MahinAnowar"><code>@MahinAnowar</code></a>).</li> </ul> <h2>8.5.18</h2> <ul> <li>Restricted loading previous source maps file to the <code>opts.from</code> folder for security reasons (use <code>unsafeMap: true</code> to disable the check).</li> </ul> <h2>8.5.17</h2> <ul> <li>Fixed <code>Maximum call stack size exceeded</code> error.</li> <li>Fixed Prototype hijacking for <code>postcss.fromJSON()</code>.</li> <li>Fixed <code>Input#origin()</code> for unmapped end position (by <a href="https://github.com/chatman-media"><code>@chatman-media</code></a>).</li> </ul> <h2>8.5.16</h2> <ul> <li>Fixed <code>Input#origin()</code> position (by <a href="https://github.com/mizdra"><code>@mizdra</code></a>).</li> <li>Fixed <code>raws</code> after rehydrating a JSON AST (by <a href="https://github.com/sarathfrancis90"><code>@sarathfrancis90</code></a>).</li> <li>Fixed putting parent-less node in <code>nodes</code> of new node (by <a href="https://github.com/MahinAnowar"><code>@MahinAnowar</code></a>).</li> <li>Fixed computing <code>offset</code> in <code>positionBy()</code> (by <a href="https://github.com/greymoth-jp"><code>@greymoth-jp</code></a>).</li> <li>Fixed <code>rangeBy()</code> on <code>index: 0</code> (by <a href="https://github.com/sarathfrancis90"><code>@sarathfrancis90</code></a>).</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/postcss/postcss/commit/eb9e1fe793740bb3280bdf5bf98147f857f011bd"><code>eb9e1fe</code></a> Release 8.5.23 version</li> <li><a href="https://github.com/postcss/postcss/commit/9d19c78ac91108b3f7d7130e55c6fa806c0efb84"><code>9d19c78</code></a> Update dependencies</li> <li><a href="https://github.com/postcss/postcss/commit/7beca139e70f9075c6b19700fcb00dd8033e5da8"><code>7beca13</code></a> Does no load source map file without opts.from</li> <li><a href="https://github.com/postcss/postcss/commit/decea51421682341401575b3740709fda0e12930"><code>decea51</code></a> Typo</li> <li><a href="https://github.com/postcss/postcss/commit/c18e30d126395d42a0726aa00e03a8f1088985ae"><code>c18e30d</code></a> Update EM banner</li> <li><a href="https://github.com/postcss/postcss/commit/98a39ad73d163a90be924d5126c771262110f1fc"><code>98a39ad</code></a> Update EM banner</li> <li><a href="https://github.com/postcss/postcss/commit/a3e48c492ddec0e4879d513b8b995fee887af352"><code>a3e48c4</code></a> Release 8.5.22 version</li> <li><a href="https://github.com/postcss/postcss/commit/f49d6911795f53b2cfe023bb686bf1144ec30618"><code>f49d691</code></a> Fix custom property losing its semicolon before a comment (<a href="https://redirect.github.com/postcss/postcss/issues/2117">#2117</a>)</li> <li><a href="https://github.com/postcss/postcss/commit/28e0daf8f2fe5ba9e19ea3f8c27c8fe176f9419e"><code>28e0daf</code></a> Release 8.5.21 version</li> <li><a href="https://github.com/postcss/postcss/commit/3d2b4e43e38274f233b5609d09687cadad8215d9"><code>3d2b4e4</code></a> Update dependencies</li> <li>Additional commits viewable in <a href="https://github.com/postcss/postcss/compare/8.5.15...8.5.23">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~GitHub%20Actions">GitHub Actions</a>, a new releaser for postcss since your current version.</p> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookincubator/cinderx/network/alerts). </details> Pull Request resolved: #134 Reviewed By: yoney Differential Revision: D113769976 Pulled By: alrobichaud fbshipit-source-id: 1f04c5f8c0ebc3f2c10f06b9f8e65dfbe25f17c4
Summary: Creating a C++ API to load small PyLongObject instances. Used in the HIR builder and in the LIR generator. There was the `Context::zero()` API but that's no longer used. Remove it. Reviewed By: yoney Differential Revision: D113843660 fbshipit-source-id: f73bea6b6c6bf363d355fc6f4c8a60fe63feeb8a
Summary: Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.8.4 to 1.10.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md">shell-quote's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/ljharb/shell-quote/compare/v1.9.0...v1.10.0">v1.10.0</a> - 2026-07-10</h2> <h3>Merged</h3> <ul> <li>[New] <code>parse</code>: add opt-in <code>splitUnquoted</code> option for shell field-splitting of unquoted expansions <a href="https://redirect.github.com/ljharb/shell-quote/pull/1"><code>[https://github.com/facebookincubator/cinderx/issues/1](https://github.com/ljharb/shell-quote/issues/1)</code></a></li> </ul> <h3>Commits</h3> <ul> <li>[Fix] <code>parse</code>: match nested <code>${...}</code> braces so nested parameter expansion is consumed as one substitution <a href="https://github.com/ljharb/shell-quote/commit/c0842c8a7a034066da2496a75e91cbe500ff736c"><code>c0842c8</code></a></li> <li>[Tests] <code>parse</code>: pin single-quote literalness and unmatched-quote handling <a href="https://github.com/ljharb/shell-quote/commit/a0d03e35c8ede24016502c4433b8f5d6b3100a62"><code>a0d03e3</code></a></li> <li>[readme] remove the space in js code fences so evalmd evaluates them <a href="https://github.com/ljharb/shell-quote/commit/2116fa36aeea77fe8d561b0db46b1f9b26b8cf1b"><code>2116fa3</code></a></li> <li>[Tests] <code>quote</code>: pin conservative escaping of <code>=</code>, <code>@</code>, <code>^</code>, <code>,</code>, <code>:</code>, <code>!</code> (<a href="https://redirect.github.com/ljharb/shell-quote/issues/11">https://github.com/facebookincubator/cinderx/issues/11</a>) <a href="https://github.com/ljharb/shell-quote/commit/1c36f3ff77d26d200620c1027e5c271050120b8e"><code>1c36f3f</code></a></li> <li>[readme] document that <code>quote</code> outputs POSIX quoting, not <code>cmd.exe</code>/PowerShell <a href="https://github.com/ljharb/shell-quote/commit/100e96e0ffadcca97d63dda15651c70b9f83507c"><code>100e96e</code></a></li> <li>[readme] document <code>parse</code>'s supported parameter-expansion subset <a href="https://github.com/ljharb/shell-quote/commit/e1c75cd6e4a3c60003792c7f2802587d328622cb"><code>e1c75cd</code></a></li> <li>[Fix] <code>parse</code>: a backslash inside single quotes must not escape the closing quote <a href="https://github.com/ljharb/shell-quote/commit/5d460a332b54b83153297fe7d1964330b28fa491"><code>5d460a3</code></a></li> <li>[readme] fix stale example outputs <a href="https://github.com/ljharb/shell-quote/commit/2de86f5d44f44d3ac9df36413d8a05f3534cdec6"><code>2de86f5</code></a></li> <li>[Tests] <code>quote</code>: pin that a backslash with whitespace is not doubled in single quotes (<a href="https://redirect.github.com/ljharb/shell-quote/issues/14">https://github.com/facebookincubator/cinderx/issues/14</a>) <a href="https://github.com/ljharb/shell-quote/commit/190e236bcf1d81caa8e40e8ea3bb11998575be71"><code>190e236</code></a></li> <li>[readme] <code>quote</code>: use output verbatim; do not re-quote it (<a href="https://redirect.github.com/ljharb/shell-quote/issues/11">https://github.com/facebookincubator/cinderx/issues/11</a>) <a href="https://github.com/ljharb/shell-quote/commit/1b364683b1e9e8d078fd3017cde82cf10c9c04a5"><code>1b36468</code></a></li> <li>[Refactor] <code>parse</code>: fix swapped <code>SINGLE_QUOTE</code>/<code>DOUBLE_QUOTE</code> variable names <a href="https://github.com/ljharb/shell-quote/commit/801af5c935b27d6dcda63b3975d5e92a7b6f887f"><code>801af5c</code></a></li> <li>[types] fix an error TS v6 ignores but v7 fails on <a href="https://github.com/ljharb/shell-quote/commit/59bbf8b81bf3236842deb72805744d489f650eba"><code>59bbf8b</code></a></li> <li>[Dev Deps] update <code>arethetypeswrong/cli</code>, <code>evalmd</code> <a href="https://github.com/ljharb/shell-quote/commit/a04d47516e1cd5b1b4d3f720ddf97561ed0082fc"><code>a04d475</code></a></li> <li>[Dev Deps] update <code>arethetypeswrong/ci</code>, <code>eslint</code> <a href="https://github.com/ljharb/shell-quote/commit/d390f9a92b97a04b1f799298634e90dc581021e6"><code>d390f9a</code></a></li> <li>[Tests] <code>quote</code>: the tilde test escapes every <code>~</code>, not just a leading one (<a href="https://redirect.github.com/ljharb/shell-quote/issues/9">https://github.com/facebookincubator/cinderx/issues/9</a>) <a href="https://github.com/ljharb/shell-quote/commit/617d119795c7b44d6e49a4d41f80195c4aa5735c"><code>617d119</code></a></li> </ul> <h2><a href="https://github.com/ljharb/shell-quote/compare/v1.8.4...v1.9.0">v1.9.0</a> - 2026-06-24</h2> <h3>Commits</h3> <ul> <li>[New] add types <a href="https://github.com/ljharb/shell-quote/commit/dca6e21a02df4cc1a83ed1b5baa4d82df134170a"><code>dca6e21</code></a></li> <li>[Dev Deps] update <code>eslint</code> <a href="https://github.com/ljharb/shell-quote/commit/9aa9e8f60991f8c4053a29e476795d891ff851ad"><code>9aa9e8f</code></a></li> <li>[Fix] <code>parse</code>: finalize tokens in linear time (GHSA-395f-4hp3-45gv) <a href="https://github.com/ljharb/shell-quote/commit/7ff5488599d01c323514f02f5efb74088dd134ec"><code>7ff5488</code></a></li> <li>[actions] update workflows <a href="https://github.com/ljharb/shell-quote/commit/75e849741ffaf2d3aa53ae0e18ef6bf9929ef478"><code>75e8497</code></a></li> <li>[actions] Windows + node 4/6/7: pin eslint to 9 before install, since npm 2/3 cannot stage eslint 10<code>types/esrecurse</code> <a href="https://github.com/ljharb/shell-quote/commit/3fb739de44b81c69431947d54fbfc18998dd6d72"><code>3fb739d</code></a></li> <li>[actions] retry <code>npm install</code> on Windows to survive npm 2/3 staging-rename flake <a href="https://github.com/ljharb/shell-quote/commit/abe0163293c82963fa8a16cfaa87181846d5aced"><code>abe0163</code></a></li> <li>[actions] Windows + node 5/7: install deps with a modern node <a href="https://github.com/ljharb/shell-quote/commit/b4bafa2e7e58d53d9839b1c24976f61e54b43326"><code>b4bafa2</code></a></li> <li>[Fix] <code>quote</code>: escape leading <code>~</code> to prevent shell tilde-expansion <a href="https://github.com/ljharb/shell-quote/commit/7a76c1a12d8461c2234a1c655b943cee84cbff91"><code>7a76c1a</code></a></li> <li>[Dev Deps] update <code>auto-changelog</code>, <code>tape</code> <a href="https://github.com/ljharb/shell-quote/commit/7184b4458b65c17b931e126d8cb5f586c6717dc8"><code>7184b44</code></a></li> <li>[Dev Deps] apparently <code>jackspeak</code> is no longer in the graph <a href="https://github.com/ljharb/shell-quote/commit/9ba368a4057b9f498b0fef23b5b15543ef81b98c"><code>9ba368a</code></a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/ljharb/shell-quote/commit/64988d9a0e73a2ae710488952e3614958ef289d4"><code>64988d9</code></a> v1.10.0</li> <li><a href="https://github.com/ljharb/shell-quote/commit/617d119795c7b44d6e49a4d41f80195c4aa5735c"><code>617d119</code></a> [Tests] <code>quote</code>: the tilde test escapes every <code>~</code>, not just a leading one (<a href="https://redirect.github.com/ljharb/shell-quote/issues/9">https://github.com/facebookincubator/cinderx/issues/9</a>)</li> <li><a href="https://github.com/ljharb/shell-quote/commit/59bbf8b81bf3236842deb72805744d489f650eba"><code>59bbf8b</code></a> [types] fix an error TS v6 ignores but v7 fails on</li> <li><a href="https://github.com/ljharb/shell-quote/commit/190e236bcf1d81caa8e40e8ea3bb11998575be71"><code>190e236</code></a> [Tests] <code>quote</code>: pin that a backslash with whitespace is not doubled in singl...</li> <li><a href="https://github.com/ljharb/shell-quote/commit/a04d47516e1cd5b1b4d3f720ddf97561ed0082fc"><code>a04d475</code></a> [Dev Deps] update <code>arethetypeswrong/cli</code>, <code>evalmd</code></li> <li><a href="https://github.com/ljharb/shell-quote/commit/b9545b39f4de17aa169410823c98acf58387e474"><code>b9545b3</code></a> [New] <code>parse</code>: add opt-in <code>splitUnquoted</code> option for shell field-splitting of...</li> <li><a href="https://github.com/ljharb/shell-quote/commit/1b364683b1e9e8d078fd3017cde82cf10c9c04a5"><code>1b36468</code></a> [readme] <code>quote</code>: use output verbatim; do not re-quote it (<a href="https://redirect.github.com/ljharb/shell-quote/issues/11">https://github.com/facebookincubator/cinderx/issues/11</a>)</li> <li><a href="https://github.com/ljharb/shell-quote/commit/1c36f3ff77d26d200620c1027e5c271050120b8e"><code>1c36f3f</code></a> [Tests] <code>quote</code>: pin conservative escaping of <code>=</code>, <code>@</code>, <code>^</code>, <code>,</code>, <code>:</code>, <code>!</code> (<a href="https://redirect.github.com/ljharb/shell-quote/issues/11">https://github.com/facebookincubator/cinderx/issues/11</a>)</li> <li><a href="https://github.com/ljharb/shell-quote/commit/e1c75cd6e4a3c60003792c7f2802587d328622cb"><code>e1c75cd</code></a> [readme] document <code>parse</code>'s supported parameter-expansion subset</li> <li><a href="https://github.com/ljharb/shell-quote/commit/c0842c8a7a034066da2496a75e91cbe500ff736c"><code>c0842c8</code></a> [Fix] <code>parse</code>: match nested <code>${...}</code> braces so nested parameter expansion is ...</li> <li>Additional commits viewable in <a href="https://github.com/ljharb/shell-quote/compare/v1.8.4...v1.10.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookincubator/cinderx/network/alerts). </details> Pull Request resolved: #135 Reviewed By: yoney Differential Revision: D113770031 Pulled By: alrobichaud fbshipit-source-id: 16137d7b97a423d93c261b54a5c6166ced2df168
Summary: Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.20.5 to 1.20.6. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/expressjs/body-parser/releases">body-parser's releases</a>.</em></p> <blockquote> <h2>1.20.6</h2> <h2>Important: Security</h2> <ul> <li>Security fix for <a href="https://www.cve.org/CVERecord?id=CVE-2025-13466">CVE-2026-12590</a> (<a href="https://github.com/expressjs/body-parser/security/advisories/GHSA-v422-hmwv-36x6">GHSA-v422-hmwv-36x6</a>)</li> </ul> <h2>What's Changed</h2> <ul> <li>fix: improve limit option validation by <a href="https://github.com/Phillip9587"><code>@Phillip9587</code></a> in <a href="https://redirect.github.com/expressjs/body-parser/pull/741">expressjs/body-parser#741</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/expressjs/body-parser/compare/1.20.5...1.20.6">https://github.com/expressjs/body-parser/compare/1.20.5...1.20.6</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/expressjs/body-parser/blob/master/HISTORY.md">body-parser's changelog</a>.</em></p> <blockquote> <h1>1.20.6 / 2026-07-09</h1> <ul> <li>Security fix for <a href="https://github.com/expressjs/body-parser/security/advisories/GHSA-v422-hmwv-36x6">GHSA-v422-hmwv-36x6</a></li> <li>fix: improve <code>limit</code> option validation (<a href="https://redirect.github.com/expressjs/body-parser/issues/698">#698</a>) <ul> <li>Invalid <code>limit</code> values (e.g. unparseable strings or <code>NaN</code>) now throw instead of being silently ignored, which previously disabled size limit enforcement</li> <li><code>null</code> and <code>undefined</code> fall back to the default 100kb limit</li> </ul> </li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/expressjs/body-parser/commit/5cc4fb8867c93a3aa4455927e38858c9ab89ff43"><code>5cc4fb8</code></a> 1.20.6 (<a href="https://redirect.github.com/expressjs/body-parser/issues/746">#746</a>)</li> <li><a href="https://github.com/expressjs/body-parser/commit/3492672eee593d5c158f239b6e9115498a5dbeac"><code>3492672</code></a> fix: improve limit option validation (<a href="https://redirect.github.com/expressjs/body-parser/issues/741">#741</a>)</li> <li>See full diff in <a href="https://github.com/expressjs/body-parser/compare/1.20.5...1.20.6">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookincubator/cinderx/network/alerts). </details> Pull Request resolved: #136 Reviewed By: yoney Differential Revision: D113770163 Pulled By: alrobichaud fbshipit-source-id: 38407b2cb05be241f97a138af8487ee8537f1970
Summary: Add a Yarn resolution for `brace-expansion` 5.0.8, replacing vulnerable transitive versions pulled in by Docusaurus dependencies. Regenerate `yarn.lock` and add the package to fbsource’s Yarn offline mirror. Reviewed By: alexmalyshev Differential Revision: D113917444 fbshipit-source-id: 1054fb4894ebddbd7662cb189e0dd3f2c89a0cc2
Summary: Free-threaded builds use safe runtime calls instead of direct list-slot access. Reviewed By: alexmalyshev Differential Revision: D113913262 fbshipit-source-id: d1c4e01797a0f81b02f3ec5ada2cf8d40be4bd76
Summary: Prep work for tracking a per-list element count in `IntrusiveList`. Today `Instr` mutates its block's instruction list directly through raw `IntrusiveListNode` operations (`Instr::unlink/insertBefore/insertAfter/ replaceWith/expandInto` all poke `block_node_`), which bypasses the owning `IntrusiveList`. That makes it impossible for the list to maintain its own size. Move those operations onto `BasicBlock`, where they route through the `instrs_` `IntrusiveList`. New `BasicBlock` methods: * `remove(Instr& instr)` * `insertBefore(Instr& existing, Instr& new_instr)` * `insertAfter(Instr& existing, Instr& new_instr)` * `replace(Instr& existing, Instr& new_instr)` * `expand(Instr& existing, std::span<Instr*> expansion)` `IntrusiveList` gains a `remove(reference)` so removal has a single path through the list (the hook a future `size_` field will update). This is a pure refactor with no behavior change; the `size_` field is a follow-up. Reviewed By: yoney Differential Revision: D112614066 fbshipit-source-id: 40bc841e018fabc0d11e4c3132c867d27d1d75c5
Summary: D113272094 switched `logImplV` in `Common/log.cpp` from `jit::ThreadedCompileSerialize` to a raw `static std::mutex` + `std::lock_guard`, and dropped `#include "cinderx/Jit/threaded_compile.h"` (which had been pulling in `<mutex>` transitively) -- but did not add a direct `#include <mutex>`. Internal Buck and the Linux/macOS GitHub builds still pick up `<mutex>` transitively through other headers, so they stayed green. The cinderx GitHub Windows CI (clang-cl + MSVC STL) does not, so every `windows-latest` + Python 3.14 job fails to compile: Common/log.cpp: error: no type named 'mutex' in namespace 'std' Common/log.cpp: error: no member named 'lock_guard' in namespace 'std' Add the direct `#include <mutex>` so `std::mutex`/`std::lock_guard` are always available. This is include-what-you-use correct: the file uses them directly and should not rely on a transitive include. Reviewed By: alexmalyshev Differential Revision: D113917360 fbshipit-source-id: 6aa2c0f80693399763ff011b574ff6a5a1261292
Summary: Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 5.2.5 to 5.2.6. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/webpack/webpack-dev-server/releases">webpack-dev-server's releases</a>.</em></p> <blockquote> <h2>v5.2.6</h2> <h3>Patch Changes</h3> <ul> <li> <p>fix: allow <code>undefined</code> as the <code>Server</code> constructor <code>options</code> argument again (by <a href="https://github.com/bjohansebas"><code>@bjohansebas</code></a> in <a href="https://redirect.github.com/webpack/webpack-dev-server/pull/5695">#5695</a>)</p> <p>Restores accepting <code>undefined</code> (defaulting it to <code>{}</code>) for the <code>options</code> argument, so passing a webpack config's optional <code>devServer</code> field type-checks and works as before.</p> </li> <li> <p>Protect the built-in state-changing routes (<code>/webpack-dev-server/invalidate</code> and <code>/webpack-dev-server/open-editor</code>) against cross-site request forgery. Requests are now checked with <code>Sec-Fetch-Site</code> (falling back to an <code>Origin</code>/<code>Host</code> comparison when it is absent), so a cross-site page can no longer trigger a rebuild or open a file in the editor. Same-origin requests, user-initiated navigations, and non-browser clients (e.g. curl) are unaffected. (by <a href="https://github.com/bjohansebas"><code>@bjohansebas</code></a> in <a href="https://redirect.github.com/webpack/webpack-dev-server/pull/5698">#5698</a>)</p> </li> <li> <p>Handle malformed <code>Host</code> and <code>Origin</code> header values gracefully when validating requests. (by <a href="https://github.com/bjohansebas"><code>@bjohansebas</code></a> in <a href="https://redirect.github.com/webpack/webpack-dev-server/pull/5699">#5699</a>)</p> </li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/webpack/webpack-dev-server/blob/v5.2.6/CHANGELOG.md">webpack-dev-server's changelog</a>.</em></p> <blockquote> <h2>5.2.6</h2> <h3>Patch Changes</h3> <ul> <li> <p>fix: allow <code>undefined</code> as the <code>Server</code> constructor <code>options</code> argument again (by <a href="https://github.com/bjohansebas"><code>@bjohansebas</code></a> in <a href="https://redirect.github.com/webpack/webpack-dev-server/pull/5695">#5695</a>)</p> <p>Restores accepting <code>undefined</code> (defaulting it to <code>{}</code>) for the <code>options</code> argument, so passing a webpack config's optional <code>devServer</code> field type-checks and works as before.</p> </li> <li> <p>Protect the built-in state-changing routes (<code>/webpack-dev-server/invalidate</code> and <code>/webpack-dev-server/open-editor</code>) against cross-site request forgery. Requests are now checked with <code>Sec-Fetch-Site</code> (falling back to an <code>Origin</code>/<code>Host</code> comparison when it is absent), so a cross-site page can no longer trigger a rebuild or open a file in the editor. Same-origin requests, user-initiated navigations, and non-browser clients (e.g. curl) are unaffected. (by <a href="https://github.com/bjohansebas"><code>@bjohansebas</code></a> in <a href="https://redirect.github.com/webpack/webpack-dev-server/pull/5698">#5698</a>)</p> </li> <li> <p>Handle malformed <code>Host</code> and <code>Origin</code> header values gracefully when validating requests. (by <a href="https://github.com/bjohansebas"><code>@bjohansebas</code></a> in <a href="https://redirect.github.com/webpack/webpack-dev-server/pull/5699">#5699</a>)</p> </li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/webpack/webpack-dev-server/commit/8a37b0ed89d07ca81532188fe19f080a2ee51475"><code>8a37b0e</code></a> chore(release): new release (<a href="https://redirect.github.com/webpack/webpack-dev-server/issues/5697">#5697</a>)</li> <li><a href="https://github.com/webpack/webpack-dev-server/commit/f21ed0f44aceb6132abb591ee8b60d770b6e489f"><code>f21ed0f</code></a> fix: handle malformed Host and Origin headers (<a href="https://redirect.github.com/webpack/webpack-dev-server/issues/5699">#5699</a>)</li> <li><a href="https://github.com/webpack/webpack-dev-server/commit/80cd9eea54975fe632a518d8bd902a260f374e7c"><code>80cd9ee</code></a> fix: reject cross-site requests to open-editor and invalidate endpoints (<a href="https://redirect.github.com/webpack/webpack-dev-server/issues/5698">#5698</a>)</li> <li><a href="https://github.com/webpack/webpack-dev-server/commit/308e853808fc8f5d0722276e1a87aa73c91859a5"><code>308e853</code></a> fix: handle undefined options in Server constructor (<a href="https://redirect.github.com/webpack/webpack-dev-server/issues/5695">#5695</a>)</li> <li><a href="https://github.com/webpack/webpack-dev-server/commit/8b2b9151f41e0d6157c8bd051cf5f16bce5dba17"><code>8b2b915</code></a> chore: update branch references from v4 to v5 in workflow configuration</li> <li><a href="https://github.com/webpack/webpack-dev-server/commit/870ed2258dda612c8feeaf8d971afd08233696ad"><code>870ed22</code></a> chore: add v5 branch to release workflow triggers</li> <li>See full diff in <a href="https://github.com/webpack/webpack-dev-server/compare/v5.2.5...v5.2.6">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookincubator/cinderx/network/alerts). </details> Pull Request resolved: #137 Reviewed By: yoney Differential Revision: D113770326 Pulled By: alrobichaud fbshipit-source-id: aad91e7f5cbc7759ac1cc3c5064277c19f098ce0
Summary: Update RuntimeTests to identify free-threaded Python builds with the 3.14t suffix when selecting and updating HIR expectations. Add dedicated expectations for eight HIRBuilderStaticTest cases while preserving the existing Python 3.14 expectations. Runtime assertion failures in the remaining four tests are unchanged and out of scope. Reviewed By: alexmalyshev Differential Revision: D113893113 fbshipit-source-id: 003dea13de508da1cc02f0743f4624d191a863bf
Summary: Bumps [svgo](https://github.com/svg/svgo) from 3.3.3 to 3.3.4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/svg/svgo/releases">svgo's releases</a>.</em></p> <blockquote> <h2>v3.3.4</h2> <h2>What's Changed</h2> <h3>Security</h3> <ul> <li><a href="https://svgo.dev/docs/plugins/removeScripts/">removeScriptElement</a>, remove JavaScript URIs case-insensitively and make <code><script></code> handling namespace aware. By <a href="https://github.com/SethFalco"><code>@SethFalco</code></a></li> </ul> <h2>Support</h2> <p>SVGO v3 is not officially supported, please consider upgrading to SVGO v4 instead. We've backported this fix as there are security implications, but there is no commitment to do this for more complex changes in future.</p> <p>Consider reading our <a href="https://svgo.dev/docs/migrations/migration-from-v3-to-v4/">Migration Guide from v3 to v4</a> which should ease the process.</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/svg/svgo/commit/72a23886b4698b27624b936f3a15a80afd36d75f"><code>72a2388</code></a> Merge commit from fork</li> <li>See full diff in <a href="https://github.com/svg/svgo/compare/v3.3.3...v3.3.4">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebookincubator/cinderx/network/alerts). </details> Pull Request resolved: #131 Reviewed By: yoney Differential Revision: D113572168 Pulled By: DinoV fbshipit-source-id: e20789eee44e520c71ab8856f3025db4e1a4c588
Summary:
Give `IntrusiveList` a `size_` counter, maintained by every container mutation.
To guarantee the counter can never silently drift, enforce at the type level
that all membership changes go through the container: `IntrusiveListNode`'s
`setPrev`/`setNext`/`insertBefore`/`insertAfter`/`unlink` are private, with
`IntrusiveList` as a friend. Only the read-only `prev()`/`next()`/`isLinked()`
accessors stay public (the iterator and callers still need them).
The one place that mutated nodes directly was `copy_graph.cpp`, which unlinked
`CopyGraph::Node`s from their `children`/`leaf_nodes_` lists via raw
`node.unlink()`. Route those through the container.
With the earlier removal of the cached node-member offset, `IntrusiveList` is
back to 3 pointers, so the `sizeof` `static_assert`s for `Function`/`CFG`/
`BasicBlock` return to their original values.
Use the counter to cheapen HIR CFG size queries:
* `CFG::numBlocks()` O(blocks) -> O(1) (`blocks.size()`)
* `CFG::numInstrs()` O(blocks + instrs) -> O(blocks) (sums each block's
O(1) `BasicBlock::size()`)
These feed `checkHirSize()`, which gates JIT compilation on oversized HIR.
Reviewed By: kddnewton
Differential Revision: D112614112
fbshipit-source-id: 0744adc7748e56de96dbc313f04ce8fffa34d807
Summary: Rename the conflicting local variable. Reviewed By: alexmalyshev Differential Revision: D113950530 fbshipit-source-id: 48ef87c772b0657e5571fc62edad2c2ab89b7342
Summary: Add dedicated Python 3.14t expectations for HIR inliner cases. Reviewed By: alexmalyshev Differential Revision: D113893763 fbshipit-source-id: 2f3f70bc736b6a2d076ac949f959b99f6019c91a
Summary: Construct the per-instruction `CopyGraphWithOperand` on the stack. This removes one heap allocation and deletion per LIR instruction while preserving the same copy processing. Reviewed By: martindemello Differential Revision: D113938668 fbshipit-source-id: e23b8ad038e85d62d594dee67ba6d1325a1cf3d1
Summary: Add dedicated Python 3.14t HIR expectations for all 14 AllPassesTest cases. Reviewed By: alexmalyshev Differential Revision: D113894355 fbshipit-source-id: c36460ab1e2b9ba45a317aef072890fc5cfdc3ff
Summary: Add dedicated Python 3.14t HIR expectations for all 132 SimplifyTest cases. Reviewed By: alexmalyshev Differential Revision: D113895188 fbshipit-source-id: dcd54a2dfa8cbbfb3c04ba98c58ea060b34371a5
Summary:
Adds `SpillAllocator`, a deliberately naive register allocator that spills every
virtual register to its own stack slot, and makes the register allocator
selectable from the command line / environment. It's meant for testing and
isolating the rest of the JIT pipeline from the optimizing linear scan
allocator.
Configuration:
- New `-X cinderx-jit-reg-alloc=<linear-scan|spill>` option (and
`CINDERX_JIT_REG_ALLOC` env var), parsed in `pyjit.cpp` into a new
`RegAllocKind` config enum. The default is `linear-scan`. Any other value
raises a `ValueError` during CinderX initialization.
- `gen_asm.cpp` selects the allocator through the `RegisterAllocator` interface
based on `getConfig().reg_alloc`.
SpillAllocator (`cinderx/Jit/lir/spill_alloc.{cpp,h}`, new `:spill-alloc`
library):
- Gives every vreg a home stack slot it keeps for the whole function, so a
value defined in one block and used in another is just re-read from the same
slot -- no live intervals, interval splitting, or cross-block location
bookkeeping.
- Rewrites each instruction to refer only to physical locations, loading
operands that must be in registers (per `getInputPhyRegUse` /
`getOutputPhyRegUse`) into caller-save scratch registers around the
instruction and leaving everything else in its slot.
- Lowers phis to copies on the incoming edges (phi-output slots are unique, so
no critical-edge splitting is needed) and strips the `kReturn` /
`kBranchToYieldExit` pseudo-terminators for PostRegAllocRewrite.
- Handles `kBind` (store the bound register into the slot), calls (operands
stay in slots; PostRegAllocRewrite applies the calling convention), and
read-modify-write `kInc`/`kDec`.
- Because nothing is ever live in a register across an instruction boundary,
caller-save registers are always free at calls and no callee-saved register
is ever clobbered.
Generators and coroutines are supported. A generator runs with the frame
pointer swapped between the machine stack and a heap-allocated generator frame,
so a value produced on one side of a `Move` into the frame-pointer register but
read on the other is stale once spilled. `handleFramePointerSwitch` carries
those values across the switch in a register: the frame-setup call's result on
the forward switch (stack -> heap), and the return-value exit phi on the
reverse switch (heap -> stack, including the extra deferred-refcount step on
free-threaded builds).
Reviewed By: DinoV
Differential Revision: D112574130
fbshipit-source-id: 06c4c72bd9ebc3480dcd67533cd13071e190d940
Summary: Add dedicated Python 3.14t HIR expectations for DeadCodeEliminationAndSimplifyTest cases. Reviewed By: alexmalyshev Differential Revision: D114046240 fbshipit-source-id: adfca3027afd5a965d7fe53258b278fa5f4e5376
Summary: Just a refactor, setting up for next diff. Reviewed By: yoney Differential Revision: D114023459 fbshipit-source-id: afa2c02876e44ce0f1fc150599f913ccb1b12eee
Summary:
`DataFlowAnalyzer` and the HIR `DataflowAnalysis` hierarchy were two parallel
constructs that both reached into the same `DataFlowBlock` instances, and each
carried its own worklist solver: `DataFlowAnalyzer::runAnalysis` (used only by
the unit test) and the hand-rolled loops in `ForwardDataflowAnalysis` /
`BackwardDataflowAnalysis` (used by production). The two solvers computed
identical math; the only things that varied were the flow direction and the
meet operator (union vs intersection, the latter needing an all-ones seed).
This consolidates everything onto one engine:
- `DataFlowAnalyzer<T>` now owns its blocks via `createBlock()`, holds the sole
`num_bits_`, and exposes a single solver `solve(Direction, Meet)` that handles
boundary blocks structurally and top-initializes for intersection. This
replaces `runAnalysis` and removes the dead `getObjectIndex`, the
`setEntryBlock` / `setExitBlock` pair (the latter had a copy-paste bug that
assigned `entry_block_`), and an unused `BitVector` local.
- The HIR side flattens from a 3-level hierarchy to `RegisterAnalysis` plus its
two concrete subclasses. `ForwardDataflowAnalysis` and
`BackwardDataflowAnalysis` are gone, along with every `computeNewIn`,
`computeNewOut`, and `setUninitialized` override. Each analysis now supplies
only `computeGenKill` and a `(Direction, Meet)` pair: `LivenessAnalysis` is
`{Backward, Union}`, `AssignmentAnalysis` is `{Forward, Intersect | Union}`.
Public signatures (`run`, `getIn` / `getOut`, constructors) are unchanged, so
the five production consumers need no changes. Also drops the now-unused
`BitVector::addBits`.
The synthetic entry/exit blocks are gone; sources are identified structurally,
relying on the CFG entry block having no predecessors, an invariant the SSA and
dominator passes already assume.
Reviewed By: mpage
Differential Revision: D112888067
fbshipit-source-id: 75fc7f20a9416802a8a11834d6e845bb1f4a282c
Summary: It's just noise right now. Reviewed By: yoney Differential Revision: D116882652 fbshipit-source-id: 33f8346650662d3f3921f6fd9cd0d7e7313aa3d5
Summary: Copy the active BitVector union member during moves instead of always reading bits. Reviewed By: DinoV Differential Revision: D116938582 fbshipit-source-id: 19da7f9ba1bb370fe3322259170b23323a691030
Summary: Add coverage for JIT dict lookups during concurrent updates and with dict subclasses. Reviewed By: DinoV Differential Revision: D116945515 fbshipit-source-id: 66d0c2ed1d0022c8179a954f4ee64005418fa49b
Summary: I ran the AI Labs test in D115743871 and got an error and the following stack trace (just relevant parts shown below): ``` 9133 | Stack trace for 1 thread(s) [8782 cinderx_compile]: 9139 | PyEval_AcquireThread ← blocked waiting for the GIL 9140 | pybind11::gil_scoped_acquire() ← explicitly asking for it 9142 | c10::TensorImpl::decref_pyobject() ← must drop a Python ref 9145 | c10::TensorImpl::~TensorImpl() ← a torch Tensor being freed 9153 | _PyObject_FreeInstanceAttributes 9159 | allocator_traits<pair<CompilationKey, ...Ref<PyFunctionObject>>>::destroy 9160 | cinderx::jit::Context::finalizeMultiThreadedCompile() ← holds the mutex 9818 | Stack trace for 1 thread(s) [8772 icvr_launcher_m]: 9819 | __GI___lll_lock_wait ← blocked, untimed 9822 | pthread_mutex_lock 9824 | cinderx::jit::Context::funcDestroyed(...) ← wants the mutex 9835 | Python stack trace for this thread (holds GIL) 9840 | torch/_inductor/compile_fx.py:773 _recursive_post_grad_passes ``` These logs are from the `watcher.cpp` tool, which prints all the stacktraces of all current threads when it sees that the GIL is being held for a while. It seems that there's a deadlock with `funcDestroyed()` having the GIL and waiting on `JITCompilationLock` while `finalizeMultiThreadedCompile()` has `JITCompilationLock` and is waiting on the GIL in order to do deallocations. The fix here makes it so that the deallocations in `finalizeMultiThreadedCompile()` happen outside the `JITCompilationLock`. Reviewed By: DinoV Differential Revision: D116940812 fbshipit-source-id: d9ed1c346a0b36e3cf32e960148a3685cb1a24ce
Summary: Guard POSIX-only stack-walking code from Windows builds. On macOS, use <sys/ucontext.h>, Darwin-specific register accessors, and unqualified signalset macros to support modern Xcode SDKs and arm64e pointer authentication. Update the associated tests accordingly. Reviewed By: DinoV Differential Revision: D116973275 fbshipit-source-id: 8d713698d41d4a7dab0a67cbb52ff4dfc28f3566
Summary: Trying to remove the use of static type objects. Reviewed By: yoney Differential Revision: D116660074 fbshipit-source-id: c6235f50afdf96bb4bdae87182cbd1c80cdaa23f
Summary: Keep frame pointers enabled for the stack-walk tests. Reviewed By: DinoV Differential Revision: D116998702 fbshipit-source-id: d75c5f0c9d21d48ca4bf98d928e2abcdf541ffbb
Summary: Pure refactoring, no functional change. Split out of the target promotion diff above it, where this was incidental to the actual change. `AttributeMutator::Kind` was enumerated in three places that had to agree: the enum, the `setAttr` switch and the `getAttr` switch. `CINDERX_FOREACH_ATTR_KIND` becomes the single source of truth and the enum and both switches are generated from it, so adding a kind means adding a row plus a body. The bodies move out of the switches into `getAttrForKind<K>`/`setAttrForKind<K>`, templates on a compile-time Kind. `getAttr`/`setAttr` are then written in terms of those, so each body still exists exactly once. Splitting them out this way lets a caller that has already established the kind call the one body directly and pay no switch -- which is what the diff above this one does, and the reason this shape was chosen over an ordinary function per kind. The `store_ok` column exists because the two switches do not cover the same set. `__getattr__` only participates in loads, so `kGetAttr` has no store body; the store-side generator pastes the column onto `CINDERX_ATTR_KIND_STORE_ONLY` and drops that row rather than emitting a case that could only abort. `kGetAttr` therefore reaches `setAttr`'s `default:` and aborts exactly as it did when it was a labelled fallthrough into `default:`. Reviewed By: yoney, kddnewton Differential Revision: D115279011 fbshipit-source-id: 095930f64885f33fe4bfbf44ed8d80b1dcaa6ecc
Summary: This is taking inspiration from the Hotspot paper where they discuss their inline caches using a register for the cache which isn't used by the normal calling convention. By moving the cache to the last argument we can have our invoke functions be compatible with `PyObject_GetAttr` and `PyObject_SetAttr`. It doesn't really matter what order they're in for our existing caches but in the function pointer version in the next diff it does. We flow this all the way down to the mutators as well. This allows our dispatch to avoid any register shuffling as we go from invoke -> getAttr/invokeSlowPath. Ultimately in the later diffs our `specialized` function can end up looking like: ``` # Type check uwsgi[0x359ed81c] <+0>: ldr x8, [x2, #0x8] uwsgi[0x359ed820] <+4>: ldr x9, [x0, #0x8] uwsgi[0x359ed824] <+8>: and x8, x8, #0xfffffffffffffff uwsgi[0x359ed828] <+12>: cmp x9, x8 uwsgi[0x359ed82c] <+16>: b.ne 0x359ed838 ; <+28> # Fast path uwsgi[0x359ed830] <+20>: add x2, x2, #0x10 uwsgi[0x359ed834] <+24>: b 0x359ed460 ; cinderx::jit::GetAttrMutator::getAttr(_object*, _object*, cinderx::jit::GetAttrMutator*) # Slow path uwsgi[0x359ed838] <+28>: b 0x359ed0fc ; cinderx::jit::LoadAttrCache::invokeSlowPath(_object*, _object*, cinderx::jit::LoadAttrCache*) ``` I'm kind of surprised we end up with 3 branches in the code but maybe that's something BOLT will end up helping us with. Reviewed By: alexmalyshev Differential Revision: D116378896 fbshipit-source-id: 4357f86ba1cebf0e7ba2f1833ce778424095fdea
Summary: Adds a new `target` function pointer for our inline caches. Instead of dispatching directly to the invoke helper we now dispatch to the current value in target. Currently we have a pretty hard limitation in our inline caches - we can only cache based upon type because that's the most common thing we cache against and adding other cases is difficult to work into the tight loop. Having a function pointer will open us up to replacing the entry point with a non-type based entrypoint and then introduce new mutators types who are cached based upon object identity (for types and modules). It also lets us get in some additional microoptimizations. If a site is monomorphic we can put in a targeted function which is only going to consume the first attribute. Furthermore we can put in optimizations for other sizes. To do this we also add logic for packing the attributes. As a comparison I also did a variation where we make our inline caches more inline... we put the actual type comparison into the generated code (still reading from the cache). After some refinement that ends up looking like D115652278. But it seems like the extra code that we execute in the JITed functions ends up losing out in most cases. Reviewed By: alexmalyshev Differential Revision: D115130483 fbshipit-source-id: 2b227ac7c7cebbd99bd4a2218eb3609ec7c6e85e
Summary: `AttributeMutator` bitpacks its `Kind` into the unused bits of the cached `PyTypeObject*`. Under `CINDERX_IC_USE_TARGET_PROMOTION` this moves the tag from the low 3 bits to the top 3, freeing the low bits for future metadata. The non-promotion build keeps the existing low-bit layout exactly, selected by a new `kKindInHighBits` constant. Bits 61-63 rather than anything lower: bit 60 and below can legitimately be part of a user-space address (x86-64 5-level paging reaches 57 significant bits, aarch64 LVA 52). The layout does not tolerate a pointer tagged in its top byte, as HWASAN and MTE produce on aarch64, so `setType` now `JIT_CHECK`s that the high bits are clear instead of silently truncating the tag. `changeKindFromSplitInline` open-coded the packing rather than calling `setType`, so it would have written the new `Kind` into the low bits while `getKind` read the high bits. That corrupts the type pointer rather than just the tag, since `type()` masks only bits 61-63 and would have left the low-bit value in the returned pointer. It now routes through `setType`. Only `inline_cache.cpp` changes; the packing is entirely contained in `type()`, `setType()` and `getKind()`. `reset()` and `isEmpty()` need no change because empty is all-zero and a populated entry always holds a non-null pointer, so `type_ == 0` separates them under either layout. Reviewed By: alexmalyshev Differential Revision: D115215699 fbshipit-source-id: 5750c6f352d7e24fbae9ffa8be7502c9af457b40
Summary: `LoadModuleAttrCache` handles module attribute reads at sites where the compiler already knows the receiver is a module. Where it does not, the JIT emits `LoadAttrCached`, and `fill()` rejected modules outright -- `module_getattro` is not `PyObject_GenericGetAttr`, so every such read fell through to a full `PyObject_GetAttr`. This adds a `kModule` AttributeMutator kind so those sites specialize once the receiver turns out to be a module. `ModuleMutator` mirrors `LoadModuleAttrCache`, including its version split: 3.14+ holds a pointer into the interpreter's global cache, 3.12 keeps the value alongside the dict version it was read at. `getModuleDict` and `getModuleDictAndAttribute` moved up the file and are reused as-is, so the rules for what counts as a cacheable module read -- strict modules included, shadowed names excluded -- stay in one place. `type_` holds the module's *type*, not the module, and `ModuleMutator` carries the module pointer for the identity check. Storing the module in `type_` would have been a smaller struct, but `type_` is load-bearing elsewhere: the general scan and `invokeUnrolled` match `entry.type()` against `Py_TYPE(obj)`, so such an entry could never match in a multi-entry cache, and `fill()` hands the same pointer to `ac_watcher.watch()`, which would then run `PyType_HasFeature` on a module. Keeping a real type there means the framework guard passes for any module and `ModuleMutator` adds identity on top, which also degrades gracefully when a module shares a cache with other receivers. `kModule` is registered only under `CINDERX_IC_USE_TARGET_PROMOTION`. We can't support module identity under the old caches. `AttributeMutator` grows from 24 to 32 bytes on 3.12, where `ModuleMutator` is the widest union member; 3.14+ is unchanged. A `static_assert` pins the size so future growth is deliberate. Reviewed By: alexmalyshev Differential Revision: D115215696 fbshipit-source-id: ac4c504ec1db5a938c86349b272d08d98e148c8a
Summary:
`LoadTypeAttrCache` handles `SomeClass.attr` where the compiler already knows the
receiver is a type. Where it does not, the JIT emits `LoadAttrCached`, and
`fill()` rejected type objects because `type_getattro` is not
`PyObject_GenericGetAttr`. Every such read ran the full type lookup protocol.
This adds a `kType` `AttributeMutator` kind so those sites specialize once the
receiver turns out to be a type.
The entry is guarded on the class itself rather than on `Py_TYPE(class)`. That
is what makes it cost nothing but the value: `ac_watcher.watch(cls)` plus
`AttributeCache::typeChanged(cls)`, which resets entries by matching
`entry.type()`, is the entire invalidation story. No version tag is stored and no
new bookkeeping is added. `PyType_Modified` recurses into subclasses and fires the
watcher once per visited type, so a value inherited from a base is invalidated
too even though the entry names only the subclass.
The hazard in guarding that way is that such an entry must never be matched
against `Py_TYPE(obj)`, or an *instance* of the cached class would be handed the
class's own attribute. `kAttrIdentityTag` is how an entry says which of the two
it wants: an identity-guarded entry stores `cls | 0x01`, and the guard becomes
```
guard == Py_TYPE(obj) || guard == (obj | kAttrIdentityTag)
```
The two comparisons cannot collide. A receiver and a type are both at least
8-byte aligned, so a tagged word can never equal an untagged `Py_TYPE(obj)`, and
an untagged word can never equal a tagged receiver. Which means the guard stays a
bare compare against the stored word -- nothing is masked off on the hot path --
and the two kinds of entry can sit in one cache and be found by one scan.
That disjointness is what keeps this small. There is no monomorphising step, no
second dispatch target, and no separate scan: `getAttrForKind<kType>` is an
ordinary arm like every other kind, reached the ordinary way.
Codegen emits the second compare for loads only. `fill()` only ever makes an
identity-guarded entry when `!is_set`, so a store cache cannot hold one and would
be paying for a compare that can never fire. The type compare still branches
straight to the hit, so a type-guarded hit is the same compare and branch it was
before; only a miss pays the extra `or`/`cmp`/`branch`.
`fill()` claims a receiver only when its metatype is plain `type`. That is
`lookupTypeAttr`'s own precondition -- it declines anything whose metatype
overrides `tp_getattro` -- so an entry is only made where the cached path can
actually be taken, and it keeps the metatype out of the picture entirely: the
only type an entry depends on is the class it watches.
`lookupTypeAttr` is extracted from `LoadTypeAttrCache::invokeSlowPath` rather
than copied. That function carries an explicit "keep in sync with
`PyType_Type.tp_getattro`" warning, so a second copy is precisely the failure the
warning exists to prevent. Both callers now share it, and the rules for which
reads are cacheable -- found on the type or its bases with no `tp_descr_get`,
plain functions, staticmethods unwrapped to their func, nothing else -- live in
one place. A read that is not cacheable still returns the right answer; it just
leaves the entry's value null, which keeps that class pinned to the lookup
instead of retrying an entry it can never fill.
`TypeMutator` is `{value}`, 8 bytes, against the 16 `SplitMutator` already
needed, so `AttributeMutator` does not grow. A `static_assert` now pins its size
so that adding a fatter sub-mutator is a deliberate act rather than a silent cost
to every other kind.
`kType` is registered only under `CINDERX_IC_USE_TARGET_PROMOTION`, and that
gating is load-bearing rather than tidy: without promotion the Kind itself
occupies the low bits of the type pointer that the identity tag would need.
Reviewed By: alexmalyshev
Differential Revision: D115215700
fbshipit-source-id: c6a8042e2ac8ec9c276def3b7853b24d0444eb2c
Summary: These are just various tweaks to our functions to improve code quality of the generated functions. Some of this is breaking functions out so that the smaller hot paths get inlined. Also dropping use of `Ref<>` in some places where we actually end up generating worse code gen than using manual incref/decref (because we end up with multiple decref code paths generated). And some slower paths we don't want to inline because they bloat the fast path functions. Reviewed By: alexmalyshev Differential Revision: D116665916 fbshipit-source-id: d58495017d90023b8cad593df5ae3ba25c7ea400
Summary: This gives us different variations where w have the getattr fallback vs when we don't. This is particularly effective for ` cinderx::jit::DataDescrMutator::getAttr` (.29% of all time spent in IG) because it lets us tail call the tp_descr_get function, so the inline cache variation goes from 37 to 13 instructions on ARM64. This is particularly nice because we get to elide setting up the stack frame because there's no fallback call. Reviewed By: alexmalyshev Differential Revision: D116387387 fbshipit-source-id: 2cb728d92f8b003f7ddb23b8926fee32db547c95
Summary: The OSS build enables frame pointers for stack_walk_test.cpp, but walkSelf() can inline into TestBody(), making its first caller GoogleTest code compiled without frame pointers. Add fixture-owned, non-inlined frames around self-walks so the tests reliably exercise the intended behavior. Reviewed By: DinoV Differential Revision: D117194593 fbshipit-source-id: 8c01052242a112d96ab764b748def18658908b20
Summary: Construct objects through `Slab::emplace()` and advance the slab only after successful construction. Reviewed By: alexmalyshev Differential Revision: D117164666 fbshipit-source-id: 972ed7ca444b8b1cda5425c1665c9de726b82855
Summary: Annotate SlabArena mutex replacement after fork so TSAN does not retain stale lock state. ThreadSanitizer: lock-order-inversion (potential deadlock) (/data/users/alperyoney/fbsource4/buck-out/v2/art/fbcode/a57827884e45a11c/cinderx/PythonBin/__python_3.14__/out/install/bin/python3.14+0x14f5b7) (BuildId: c1601a80ad284c5d4541a9a1a8e395e53cee7f3d) in pthread_mutex_lock ================== ``` Reviewed By: DinoV Differential Revision: D117216746 fbshipit-source-id: d7cf9f7cfa30f6680328f8d35ab29d9306a5a91e
Summary: Add shared reset helpers for standard and recursive mutexes, including their TSAN lifecycle annotations. Reviewed By: DinoV Differential Revision: D117217167 fbshipit-source-id: 7df897fc7e61b516d7708c47256108c301b8ec5e
Summary: Use the shared post-fork mutex reset helper for `CodeAllocatorCinder::allocator_mutex_`, preventing stale TSAN lock state in forked children. ThreadSanitizer: double lock of a mutex (/data/users/alperyoney/fbsource4/buck-out/v2/art/fbcode/d8949898cc409f58/cinderx/PythonBin/__python_3.14t__/out/install/bin/python3.14t+0x14f5b7) (BuildId: 39d23ade7532494758611f3de2c12e438866310d) in pthread_mutex_lock ================== ``` --- ``` $ TSAN_OPTIONS="suppressions=$PWD/tsan_suppressions_cpython.txt" buck run fbcode//mode/dev-tsan fbcode//cinderx:python3.14t -- -m unittest discover PythonLib/test_cinderx/test_free_threading/ ``` Reviewed By: DinoV Differential Revision: D117219846 fbshipit-source-id: 2b6824f942961ba068fbd2f59fa1f7aa38c00540
Summary: Agents are still too eager to wrap code in `#if defined(CINDER_X86_64)` checks. Ideally they'd be using `kBuildArch` more. Reviewed By: yoney Differential Revision: D117229372 fbshipit-source-id: 89f3bdc221f5579a96daab56014bef8818fa421d
Summary: Removes the HIR opcodes in favor of generating a cached load / store in LIR. Reviewed By: alexmalyshev Differential Revision: D116818494 fbshipit-source-id: 34bf7ac83120ecd043bd0745791beda924c3a078
Summary:
The helpers caught one more spot where we were getting this wrong:
```
case hir::Opcode::kGetANext: {
auto& instr = i.as<GetAIter>(); // was static_cast<const GetAIter*>
```
Reviewed By: alexmalyshev
Differential Revision: D116832505
fbshipit-source-id: 5a46da38335dd6ee5d246f60745f78199096463e
Summary:
Two places track a JIT generator's spill-word count, and only one of them is
real.
`CodeRuntime::spill_words_` is written once per compiled generator at the end of
codegen, from `env_.shadow_frames_and_spill_size`, and read by
`allocateAndLinkGenAndInterpreterFrame()` to size the generator's allocation and
to drive the memcpy that moves already-spilled data off the caller's stack
frame. That is the right granularity: the spill area is a property of the
compiled code, not of any one generator instance.
`GenDataFooter::spillWords` has no writer anywhere in the tree. Grepping for it
turns up the declaration, one stale doc comment and one reader. The footer is a
`reinterpret_cast` over raw memory with fields assigned individually, so the
`size_t spillWords{}` initializer never runs, and neither allocation path zeroes
the body: `JitGenFreeList::allocate()` zeroes only the two GC pre-header words,
and the fallback is `PyObject_GC_NewVar`.
The one reader is `jitgen_sizeof()`, so `gen.__sizeof__()` on a JIT generator
returns uninitialized memory:
```
no jit: [200, 200, 200, 200, 200, 200]
jit-all: [1089009172935336, ...] # ~1 PB
```
The garbage is often pointer-shaped, `0x7b619fdd1e3c` for one generator, and
sometimes small enough to look plausible, `6` for another.
The field is a leftover. The spill data and footer used to be a separate
`malloc`'d block hung off `gi_jit_data`, and `spillWords` was the only way back
to the base pointer on free:
```
auto gen_data = reinterpret_cast<uint64_t*>(gen_data_footer) -
gen_data_footer->spillWords;
```
T209500214 rolled that block into the generator object's own variable-length
tail, so nothing needs to recover a base pointer any more. The writer went away
with the old allocator and only the reader was left behind. That task is
closed, so its `TASK(...)` comment goes too, along with the base-address comment
that describes the old layout.
So delete the field and have `jitgen_sizeof()` read the count from the same
place the allocator does. The footer already holds `compiled_func`, and
`jitgen_traverse()` next door already reaches through it to `runtime()`.
`__sizeof__` and the allocation are now guaranteed to agree by construction
rather than by two fields being kept in sync.
The arithmetic itself was already correct and does need a spill count: CPython's
`gen_sizeof()` derives everything from the code object, so it cannot see the JIT
data in the tail.
Removing the field also shrinks `GenDataFooter`, and therefore every JIT
generator, by 8 bytes.
Reviewed By: DinoV
Differential Revision: D117250489
fbshipit-source-id: 6e380212c056676739ad00d74079d783764dcfa3
Summary: - Add `kLoad` and `kStore` to `FOREACH_LIR_OPCODE_COMMON` in `ops.h`. - Define their properties in `ops.cpp`: no flag writes, Load is non-essential (memory read), Store is essential with memory output, both have Out-sized operands. - Update `instruction.cpp` to treat `Store Ind` like Move for PhyReg use (avoid mem->mem). - Add `translateLoad`/`translateStore` to `autogen.cpp` for x86_64 and AArch64, with TSAN read/write handling for x86. - Keep existing `Move` translation fully memory-capable (old behavior) so this diff does not change any existing LIR generation yet. `Move` still handles reg/reg, imm/reg, reg/mem, mem/reg. Reviewed By: DinoV Differential Revision: D117215778 fbshipit-source-id: c655c260fb8cdbab3fc2bdc4f482dd62a53fe89d
Summary: Mac doesn't have the semaphore support we want but it does have the ability to reasonable suspend threads. Use that instead on Mac OS/X. Reviewed By: yoney Differential Revision: D117274435 fbshipit-source-id: 2beb5bd441b37477449370b48ba9a2d99f3e7fd5
Summary: Use the shared post-fork mutex reset helper for `CodeAllocator::runtime_mutex_`. ThreadSanitizer: lock-order-inversion (potential deadlock) (/data/users/alperyoney/fbsource4/buck-out/v2/art/fbcode/d8949898cc409f58/cinderx/PythonBin/__pyth on_3.14t__/out/install/bin/python3.14t+0x14f5b7) (BuildId: 39d23ade7532494758611f3de2c12e438866310d) in pthread_mutex_lock ================== ThreadSanitizer: reported 1 warnings ``` Reviewed By: mpage Differential Revision: D117366380 fbshipit-source-id: 7d80a70de6bcbcf4910d8fbdeaef3c63b4c60392
Summary: `createConfig()` translates each `hir_opts` flag into its `PassConfig` bit, and it covers every field of `HIROptimizations` except `dead_code_elim`. So the `DeadCodeElimination` pass in `Compiler::runPasses` never runs. Wire the flag up. On its own this is performance-neutral on `cinderx/benchmarks:inference_pipeline`, since refcount insertion runs its own `DeadCodeElimination` at the end of `bindGuards` and that already sweeps up most of what the pipeline pass would have. We should still have the flag working though. Reviewed By: DinoV Differential Revision: D117381498 fbshipit-source-id: 8f020c2fc3b1dd56d845e97904201e6b812b76c3
Summary: Convert all existing memory-based usages of `Move` to explicit `Load`/`Store`. `Move` can still act as a load or a store, for temporary compatibility. - `generator.cpp/h`: All `OutInd`/`OutStk` stores and `Ind`/`Stk`/`MemImm` loads become `Store`/`Load`. - `postalloc.cpp`: `insertMoveToMemoryLocation` now emits Store/Load, call arg rewriting (`rewriteRegularFunction` SysV+Win32, `rewriteVectorCallCommon`, `rewriteVectorCallTstateFunctions`) directly emits `Load` for Stack inputs with lastUse propagation instead of Move+rewrite, `rewriteBitExtensionInstrs` Stack->Load, and `optimizeMoveSequence` fixed to set opcode to `kMove` when replacing `Load mem->reg` with reg->reg move and to correctly handle self-reload. - `target_select.cpp`: `selectX64MoveToMemoryLargeConstant` supports Store, AArch64 stack legalization uses Load, IncDec legalization uses Store. - `spill_alloc.cpp`: spill loads -> Load, spill stores/Bind/phi copies -> Store, `loadToScratch` -> Load. - `linear_scan.cpp`: edge copies pick Move vs Load vs Store based on from/to register/stack. - `postgen.cpp`: `rewriteGuardHasType` Move -> Load, `rewriteMoveAbsoluteAddress` Move Mem -> Load when original was Move (keeps MoveRelaxed), stack lowering and call input lowering -> Load. - `c_helper_translations.cpp`: inlined `rt::cast` LIR string `Move [%` -> `Load [%`. - `backend_test.cpp`: FP `Move Ind` -> `Load Ind`, `Move OutStk/OutInd` -> `Store`, `Move Stk` -> `Load`, `MoveSequenceOpt` tests updated to expect Store/Load, `InlineJITRTCastTest`/`PostgenJITRTCastTest` expected `Load`. - `lir_inliner_test.cpp`: `Move Ind` -> `Load Ind`. - `lir_test.cpp`: `ListDynamicIndexLoadStoreUsesScaledArrayLIR` regex updated from Move to Load/Store (generator now emits Load/Store). Reviewed By: DinoV Differential Revision: D117215776 fbshipit-source-id: 50bf459552410b502f3f9b7fff3caae3d2ac91f4
Summary: Agents are still very eager to use `JIT_CHECK` and `JIT_ABORT`. I'd like to start pushing them towards raising C++ exceptions instead, which we can recover from. Reviewed By: yoney Differential Revision: D117412143 fbshipit-source-id: 368e4f730009668ecc2ba7e3245b8c2336c254fb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.