Skip to content

Commit

Permalink
perf(es/lints): Avoid needless allocations in no-dupe-args (#9041)
Browse files Browse the repository at this point in the history
**Description:**

I introduced a zero-allocation variant for `swc_ecma_utils::DestructuringFinder` that does not allocate anything.
  • Loading branch information
kdy1 committed Jun 14, 2024
1 parent 931f752 commit e560198
Show file tree
Hide file tree
Showing 4 changed files with 807 additions and 35 deletions.
10 changes: 10 additions & 0 deletions crates/swc/tests/errors/lints/no-dupe-args/hash-mode/input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function foo(
[a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
[c0, c1, c2, c3, c4, c5, c6, c7, c8, c9], [d0, d1, d2, d3, d4, d5, d6, d7, d8, d9],
[e0, e1, e2, e3, e4, e5, e6, e7, e8, e9], [f0, f1, f2, f3, f4, f5, f6, f7, f8, f9],
[g0, g1, g2, g3, g4, g5, g6, g7, g8, g9], [h0, h1, h2, h3, h4, h5, h6, h7, h8, h9],
[a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
[i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
[a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {

}
Loading

0 comments on commit e560198

Please sign in to comment.