Commit 477222b
committed
feat(parity): port the JS points-to solver to the native engine and unify per-engine resolution
Native (Rust):
- Extract all eight pts binding kinds in the JS extractor (param,
this-call, array-element, spread-arg, for-of, array-callback,
object-rest-param, object-prop) and surface them on FileSymbols
- Run the same fixed-point points-to solver as the WASM path inside
build_call_edges: thisCall-to-fnRef conversion, four-case key gate with
receiver-key fallback, hop-penalised alias edges with pts upgrade
- Normalize inline-new receivers (new A().t() -> receiver "A") in
extract_receiver_name, mirroring extractReceiverName in the TS extractor
- Apply the >=0.5 confidence filter on exact cross-file lookups (#1439)
WASM/TS:
- Plumb params and all eight binding arrays through NativeFileEntry so the
hybrid path feeds the native solver
- Serialize thisCallBindings across the WASM worker boundary
- Backport the native engine's class-field type-annotation extraction
(private repo: Repository seeds typeMap "repo"/"this.repo")
- Remove the four JS pts post-passes that duplicated the native solver on
the hybrid path (param-flow, fnRef, thisCall, object-rest)
- Report the native build summary and build_meta counts after the JS
edge-writing post-passes so they include CHA/this-dispatch edges (#1452)
WASM, full-native orchestrator, and hybrid builds now produce identical
edge multisets on the javascript fixture (155 rows each, including
confidence and dynamic flags); javascript 42/42 and pts-javascript 13/13
expected edges on both engines; 392 Rust tests, 3043 JS tests, and the
176-test resolution benchmark are green.
Closes #1453
Closes #1452
Closes #14391 parent 4ef042e commit 477222b
13 files changed
Lines changed: 2150 additions & 552 deletions
File tree
- crates/codegraph-core/src
- domain/graph/builder
- stages
- extractors
- features
- src
- domain
- graph/builder/stages
- extractors
- tests/parsers
Lines changed: 22 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1348 | 1348 | | |
1349 | 1349 | | |
1350 | 1350 | | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
1351 | 1355 | | |
1352 | 1356 | | |
1353 | 1357 | | |
| |||
1359 | 1363 | | |
1360 | 1364 | | |
1361 | 1365 | | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
1362 | 1375 | | |
1363 | 1376 | | |
1364 | 1377 | | |
| |||
1382 | 1395 | | |
1383 | 1396 | | |
1384 | 1397 | | |
1385 | | - | |
1386 | | - | |
1387 | | - | |
1388 | | - | |
1389 | | - | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
1390 | 1407 | | |
1391 | 1408 | | |
1392 | 1409 | | |
| |||
Lines changed: 805 additions & 117 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
569 | 577 | | |
570 | 578 | | |
571 | 579 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
| 924 | + | |
| 925 | + | |
939 | 926 | | |
940 | 927 | | |
941 | 928 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
321 | 417 | | |
322 | 418 | | |
323 | 419 | | |
| |||
341 | 437 | | |
342 | 438 | | |
343 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
344 | 464 | | |
345 | 465 | | |
346 | 466 | | |
| |||
359 | 479 | | |
360 | 480 | | |
361 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
362 | 490 | | |
363 | 491 | | |
364 | 492 | | |
| |||
0 commit comments