(asm_dir: Path)
| 463 | } |
| 464 | diagnostics = [ |
| 465 | _diagnostic( |
| 466 | "domain_not_recovered", |
| 467 | "this backend does not deserialize the snapshot, so no class table is reachable", |
| 468 | subject="classes", |
| 469 | ), |
| 470 | _diagnostic( |
| 471 | "domain_not_recovered", |
| 472 | "no function names are recoverable from instruction bytes alone", |
| 473 | subject="function_names", |
| 474 | ), |
| 475 | _diagnostic( |
| 476 | "domain_not_recovered", |
| 477 | "entries are carved strings in carve order, so no ObjectPool index space was established", |
| 478 | subject="pool_index_space", |
| 479 | ), |
| 480 | ] |
| 481 | if functions: |
| 482 | diagnostics.insert( |
| 483 | 0, |
| 484 | _diagnostic( |
| 485 | "domain_heuristic_only", |
| 486 | "code ranges come from frame-prologue and call-target scanning, not from a snapshot parser", |
| 487 | subject="functions", |
| 488 | ), |
| 489 | ) |
| 490 | |
| 491 | return _build_model( |
| 492 | request, |
| 493 | capabilities, |
| 494 | libraries=[ |
| 495 | {"id": i, "uri": uri, "display_name": None, "provenance": HEURISTIC} |
| 496 | for i, uri in enumerate(uris) |
| 497 | ], |
| 498 | classes=[], |
| 499 | functions=functions, |
| 500 | object_pool=_ordinal_pool(entries), |
| 501 | diagnostics=diagnostics, |
| 502 | ) |
| 503 | |
| 504 | |
| 505 | # -------------------------------------------------------------------------- |
| 506 | # blutter backend |
| 507 | # -------------------------------------------------------------------------- |
| 508 | |
| 509 | |
| 510 | def _extract_blutter_function_name(head_line: str) -> Optional[str]: |
| 511 | text = head_line.strip() |
| 512 | if not text.endswith("{"): |
| 513 | return None |
| 514 | text = text[:-1].strip() |
| 515 | if not text or text.startswith("//"): |
| 516 | return None |
| 517 | |
| 518 | for tag in ("[closure] ", "[ffi] "): |
| 519 | if text.startswith(tag): |
| 520 | text = text[len(tag) :].strip() |
| 521 | |
| 522 | changed = True |
no test coverage detected