Commit ce0117a
authored
feat(codegen+runtime): representation-aware type lowering + native-ABI material evidence gate (#5466)
v0.5.1213. Lands the type-lowering track: i32/u32/f64/i128(BigInt)/StringRef native reps with runtime-guarded fast/fallback splits (scalar params, number-keyed Map/Set, typed string/i32 methods, typed function/closure/method clones, packed numeric array loops with side-exit versioning), plus the differential typed-vs-any material evidence CI gate with anti-gaming guards and the --explain-lowering report.
Review hardening folded in: spec-exact ToInt32 (toint32_wrap) at user-visible bitwise sites + runtime js_dynamic_bitnot ((1e20)|0 and ~(1e20) were wrong on main too); magnitude-bound proof behind toint32_fast; captured-buffer locals can't earn unchecked native-pointer proofs; reverse local-value alias chains invalidate on write; runtime-key array stores register the matching typed-feedback contract; typed_i1_functions gates the i1 typed-call branch.
Verified: the 3 pre-merge runtime regressions (Array.fromAsync, dynamic-import namespace, fetch headers.forEach) byte-match node; 16-test gap differential clean (3 mismatches attributed pre-existing via a control binary at the merge parent); native-region-proof/native-abi-proof suites, typed-feedback runtime evidence, and capture workloads green locally and on CI.1 parent 3a0d4e1 commit ce0117a
148 files changed
Lines changed: 40540 additions & 1756 deletions
File tree
- .github/workflows
- benchmarks
- compiler_output
- fixtures
- suite
- crates
- perry-codegen
- docs
- src
- codegen
- collectors
- expr
- property_get
- lower_call
- property_get
- native_value
- verify
- runtime_decls
- stdlib_ffi
- stmt
- type_analysis
- tests
- native_proof_regressions
- perry-runtime/src
- array
- closure
- gc/tests/runtime_roots
- object
- field_get_set
- promise
- string
- typed_feedback
- typedarray
- value
- perry
- src
- commands
- compile
- optimized_libs
- run
- tests
- scripts
- compiler_output_harness
- release_sweep_tiers
- test-files
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
520 | 523 | | |
521 | 524 | | |
522 | 525 | | |
| |||
525 | 528 | | |
526 | 529 | | |
527 | 530 | | |
| 531 | + | |
528 | 532 | | |
529 | 533 | | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
530 | 550 | | |
531 | 551 | | |
532 | 552 | | |
| |||
582 | 602 | | |
583 | 603 | | |
584 | 604 | | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
585 | 669 | | |
586 | 670 | | |
587 | 671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
1 | 36 | | |
2 | 37 | | |
3 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
0 commit comments