[PR #4515] [CLOSED] feat(js): resolve class instance method calls in semantic graphs #6283

Closed
opened 2026-10-31 01:13:16 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4515
Author: @sachin-wft
Created: 10/16/2026
Status: ❌ Closed

Base: main ← Head: feat/js-class-method-calls-4437


📝 Commits (4)

  • 277b348 feat(js): resolve this and const-new class method calls
  • a572ede feat(js): resolve this-field class method calls
  • 26aaae4 feat(js): resolve getter-hop, super and inherited method calls
  • dd0c181 test(js): cover class method call resolution for 4437

📊 Changes

3 files changed (+1295 additions, -0 deletions)

View changed files

➕ src/domain/javascript/javascriptSemanticAnalysis.class_method_calls.test.ts (+378 -0)
📝 src/domain/javascript/javascriptSemanticCallResolution.ts (+104 -0)
➕ src/domain/javascript/javascriptSemanticClassReceivers.ts (+813 -0)

📄 Description

Why

Callers traces miss class method callers today. Every member call records a dynamic-call unknown. Analysts of class based code get seed only traces.

What changed

  • Resolve this, const-new, field, and getter receivers to exact targets when unique.
  • Emit candidate edges for overrides, subclass methods, and reassigned keys.
  • Add 17 regression tests with positive and negative variants.

Scope

  • Covers static JavaScript analysis only. No execution.
  • Leaves out external receivers, mixins beyond Object.assign, and decorators. They stay unknown.
  • Leaves the sink zero unknowns quirk from the issue open questions untouched.

Tradeoffs

  • Chose registry plus candidates over exact only. Exact only would leave issue lines 9 and 10 unresolved.

Blast Radius

  • Touches JS semantic resolution only and reuses the existing candidate flow. The full 982 test semantic set passes.

Verification

  • Repro fixture traces lines 9, 10, 13 for load and line 3 for sink.
  • 40 files and 982 tests pass in the JS semantic set.
  • tsc and oxlint are clean on touched files.

Fixes #4437.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4515 **Author:** [@sachin-wft](https://github.com/sachin-wft) **Created:** 10/16/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/js-class-method-calls-4437` --- ### 📝 Commits (4) - [`277b348`](https://github.com/morluto/rea/commit/277b348c1e23e900f0d7f1d82dd97e34cdda0d0a) feat(js): resolve this and const-new class method calls - [`a572ede`](https://github.com/morluto/rea/commit/a572ede94932508994e3c58f9d0f6135be085108) feat(js): resolve this-field class method calls - [`26aaae4`](https://github.com/morluto/rea/commit/26aaae4ef675ee652cc363561313514ad169e00d) feat(js): resolve getter-hop, super and inherited method calls - [`dd0c181`](https://github.com/morluto/rea/commit/dd0c1819b0d19ebf7f06fb396c6701c768ecf97d) test(js): cover class method call resolution for 4437 ### 📊 Changes **3 files changed** (+1295 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `src/domain/javascript/javascriptSemanticAnalysis.class_method_calls.test.ts` (+378 -0) 📝 `src/domain/javascript/javascriptSemanticCallResolution.ts` (+104 -0) ➕ `src/domain/javascript/javascriptSemanticClassReceivers.ts` (+813 -0) </details> ### 📄 Description ## Why Callers traces miss class method callers today. Every member call records a dynamic-call unknown. Analysts of class based code get seed only traces. ## What changed - Resolve this, const-new, field, and getter receivers to exact targets when unique. - Emit candidate edges for overrides, subclass methods, and reassigned keys. - Add 17 regression tests with positive and negative variants. ## Scope - Covers static JavaScript analysis only. No execution. - Leaves out external receivers, mixins beyond Object.assign, and decorators. They stay unknown. - Leaves the sink zero unknowns quirk from the issue open questions untouched. ## Tradeoffs - Chose registry plus candidates over exact only. Exact only would leave issue lines 9 and 10 unresolved. ## Blast Radius - Touches JS semantic resolution only and reuses the existing candidate flow. The full 982 test semantic set passes. ## Verification - Repro fixture traces lines 9, 10, 13 for load and line 3 for sink. - 40 files and 982 tests pass in the JS semantic set. - tsc and oxlint are clean on touched files. Fixes #4437. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:13:16 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6283
No description provided.