Make Buffer read*/write* native functions with a DFG/FTL intrinsic - #35343
Open
Jarred-Sumner wants to merge 26 commits into
Open
Make Buffer read*/write* native functions with a DFG/FTL intrinsic#35343Jarred-Sumner wants to merge 26 commits into
Jarred-Sumner wants to merge 26 commits into
Claude / Claude Code Review
completed
Jul 24, 2026 in 24m 48s
Code review found 2 potential issues
Found 5 candidates, confirmed 2. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 2 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/jsc/bindings/JSBuffer.cpp:3408 |
Dead code in the new var-width helpers (unused param + unreachable guard) |
| 🟡 Nit | src/js/builtins/BunBuiltinNames.h:63 |
Dead $dataView private name after removing DataView-backed builtins |
Annotations
Check warning on line 3408 in src/jsc/bindings/JSBuffer.cpp
claude / Claude Code Review
Dead code in the new var-width helpers (unused param + unreachable guard)
Two bits of dead code left in the new var-width helper block: (1) `bufferWriteVarWidthCheckValue`'s `JSValue valueValue` parameter is never read — all three `OUT_OF_RANGE` calls pass `jsNumber(number)` — so drop it and stop threading it from the call site at :3492; (2) `bufferWriteVarWidthOffset`'s leading `!offsetValue.isNumber()` guard (:3399-3402) is unreachable because its only caller already does the identical check at :3495-3496, so the helper collapses to a one-line forward to `bufferAcce
Check warning on line 63 in src/js/builtins/BunBuiltinNames.h
claude / Claude Code Review
Dead $dataView private name after removing DataView-backed builtins
The removed builtins were the only users of the `$dataView` private property (`this.$dataView ||= new DataView(...)`). After this PR nothing in `src/js/` references `$dataView` and nothing in `src/jsc/bindings/` references `dataViewPrivateName`, so `macro(dataView)` in `BunBuiltinNames.h:76` and `declare function $dataView(): TODO;` in `builtins.d.ts:341` are both dead — the same cleanup this PR already did for `$checkBufferRead`.
Loading