Skip to content

refactor: avoid unnecessary assignment in blas/ext/base siblings#13328

Draft
Planeshifter wants to merge 1 commit into
developfrom
philipp/fix-propagation-2026-07-06
Draft

refactor: avoid unnecessary assignment in blas/ext/base siblings#13328
Planeshifter wants to merge 1 commit into
developfrom
philipp/fix-propagation-2026-07-06

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

This pull request:

  • Propagates the refactor from 3ceff10 (refactor: avoid unnecessary assignment) to sibling blas/ext/base/*last-index-of packages, collapsing the redundant idx = N - 1 - idx; return idx; sequence into a single return N - 1 - idx;. Target packages:
    • blas/ext/base/dlast-index-of
    • blas/ext/base/slast-index-of

Related Issues

None.

Questions

No.

Other

Validation: pattern search scoped to blas/ext/base/*/lib/ndarray.js, followed by two independent adversarial passes and a style-consistency check confirming each target is textually identical to the source's pre-refactor shape. Deliberately excluded: the equivalent src/main.c sequences in the same packages, since the source commit did not touch C.

Checklist

AI Assistance

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored by an automated Claude Code routine that propagates recent develop fixes to sibling packages with the same defect pattern. Pattern detection, candidate-site validation, and patch generation were AI-assisted; the resulting diff is the verbatim analog of 3ceff10.


@stdlib-js/reviewers


Generated by Claude Code

…dex-of`

Propagates refactor from 3ceff10 ("refactor: avoid unnecessary
assignment") to sibling last-index-of packages, collapsing the redundant
`idx = N - 1 - idx; return idx;` sequence into a single return.
@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label Jul 6, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/dlast-index-of $\\color{green}363/363$
$\\color{green}+100.00\\%$
$\\color{green}17/17$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}363/363$
$\\color{green}+100.00\\%$
blas/ext/base/slast-index-of $\\color{green}363/363$
$\\color{green}+100.00\\%$
$\\color{green}17/17$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}363/363$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants