Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
bffa186
Make generator suspension walkers dual before inline cloning
metaphorics Sep 4, 2026
8a6ac1c
Pin generator walker duality at both clone gates
metaphorics Sep 4, 2026
98ba804
Document the walker-duality miscompile class
metaphorics Sep 4, 2026
9e76e88
Harden walker duality with violation tests and return guards
metaphorics Sep 4, 2026
9fa4d29
Close remaining walker asymmetries found in PR review
metaphorics Sep 4, 2026
0aaf411
Signal async-arrow refusal with the requires-es2015 diagnostic
metaphorics Sep 4, 2026
6d9dbb2
Collapse duplicate branch helper; fix gate recipe in the doc
metaphorics Sep 4, 2026
60db035
Close six walker and gate holes from the full grill audit
metaphorics Sep 5, 2026
6fb9b8f
Pin the state-name terminator and gate the class prelude temp kind
metaphorics Sep 5, 2026
1bd6d9c
Lower destructuring defaults instead of erasing them
metaphorics Sep 5, 2026
9031222
Report yield and await parsed outside their function contexts
metaphorics Sep 5, 2026
bc2ef3b
Hoist suspending class computed keys out of the lowering IIFE
metaphorics Sep 5, 2026
50ee16f
Treat if-without-else as the empty else in the machine
metaphorics Sep 5, 2026
1b172e1
Keep sibling, rest, and await semantics in suspending declarations
metaphorics Sep 5, 2026
c9b792e
Anchor, gate, and contextualize the yield and await diagnostics
metaphorics Sep 5, 2026
20f1ec8
Harden the leak detectors against identifier substrings
metaphorics Sep 5, 2026
532b184
Preserve key evaluation order and make class contexts visible
metaphorics Sep 5, 2026
3986c8e
Make static-field suspensions refuse the way key suspensions do
metaphorics Sep 5, 2026
4c9f642
Lower for-of to the index form and convert for-in heads at ES5
metaphorics Sep 5, 2026
773bebd
Pin the for-of pattern-binding composition
metaphorics Sep 5, 2026
3c4ae9c
Track super-before-this flow in derived constructors
metaphorics Sep 5, 2026
9ab2ba5
Register super-flow codes in the diagnostic map
metaphorics Sep 5, 2026
78d4961
Emit TS2855 for base fields read through super
metaphorics Sep 5, 2026
c75faec
Register the super field code in the diagnostic map
metaphorics Sep 5, 2026
8fa4ef2
Mark super complete only after its arguments resolve
metaphorics Sep 5, 2026
dcb9701
Emit TS2576 for base statics read through super
metaphorics Sep 5, 2026
8d35f22
Emit TS2448 and kin for use before declaration
metaphorics Sep 5, 2026
620549b
Emit TS1014 for a non-trailing rest parameter
metaphorics Sep 5, 2026
3b987f4
Emit TS2427 for interfaces named like primitives
metaphorics Sep 5, 2026
b5ef4e5
Split the super field rule flavor by target
metaphorics Sep 5, 2026
f64129e
Emit TS2371 for defaults on overload signatures
metaphorics Sep 5, 2026
33f680f
Emit TS1114 and TS1116 for label misuse
metaphorics Sep 5, 2026
e167ef1
Emit TS1107 for breaks crossing a function boundary
metaphorics Sep 5, 2026
e2e2864
Register the wave-two diagnostic codes
metaphorics Sep 5, 2026
a412209
Bootstrap validated PR #199 review fixes
metaphorics Sep 6, 2026
4d29d32
Retry PR #199 validation on Ubuntu 22.04
metaphorics Sep 6, 2026
e86ceb0
Retry PR #199 validation on macOS
metaphorics Sep 6, 2026
64a2650
Fix super-call flow merging and preserve rewritten emitter evaluation…
coderabbitai[bot] Sep 6, 2026
3c8884f
Fix remaining PR #199 review findings
metaphorics Sep 7, 2026
7a662c7
Isolate label scopes inside class static blocks
metaphorics Sep 7, 2026
2135d4c
Lower ES5 assignment-target for-of and order computed destructuring keys
metaphorics Sep 7, 2026
28a0815
Rewrite member assignment targets in lowered ES5 for-of heads
metaphorics Sep 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ jobs:
- name: Clippy
run: cargo clippy --workspace --all-targets --locked -- -D warnings

- name: Fetch pinned TypeScript test fixtures
run: >-
cargo run --locked -p bamts-verification -- source fetch
typescript-primary-tests --dest target/authority/typescript-7.0.2-tests

- name: Test workspace
run: cargo test --workspace --locked

Expand Down
15 changes: 15 additions & 0 deletions CONCEPTS.md
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Concepts

## walker duality

The ES5 generator lowerer's suspension predicates (`contains_yield`,
`contains_await`, `count_yields`, `contains_yield_array`,
`statements_contain_await`) are views of one predicate that must agree
per shape: containment true with count zero inline-clones a live
suspension (miscompile), and a non-zero count on an eval-accepted shape
inflates resume-label arithmetic. Zero in `count_yields` means "provably
clean"; anything not provably clean routes to `eval`, which either splits
or refuses.

*Avoid:* "three-view predicate", "count/contains symmetry" — say walker
duality.
717 changes: 709 additions & 8 deletions crates/bamts-compiler/src/checker.rs

Large diffs are not rendered by default.

844 changes: 681 additions & 163 deletions crates/bamts-compiler/src/checker/binder.rs

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions crates/bamts-compiler/src/diagnostics_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ const TS1136: DiagnosticCode = DiagnosticCode::new("TS1136");
const TS1160: DiagnosticCode = DiagnosticCode::new("TS1160");
/// Unterminated regular expression literal.
const TS1161: DiagnosticCode = DiagnosticCode::new("TS1161");
const TS1163: DiagnosticCode = DiagnosticCode::new("TS1163");
const TS1308: DiagnosticCode = DiagnosticCode::new("TS1308");
/// Expected corresponding JSX closing tag.
const TS17002: DiagnosticCode = DiagnosticCode::new("TS17002");
/// JSX fragment has no corresponding closing tag.
Expand Down Expand Up @@ -88,6 +90,8 @@ pub fn typescript_parse_code(code: DiagnosticCode, message: &str) -> Option<Diag
"BAMTS-P014" => TS1003,
"BAMTS-P015" => TS17015,
"BAMTS-P016" => TS17014,
"BAMTS-P017" => TS1163,
"BAMTS-P018" => TS1308,
Comment on lines +93 to +94

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The new P017 and P018 mappings are absent from the required diagnostic registry and JSON map, so verification does not track these newly projected diagnostics. [api mismatch]

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/bamts-compiler/src/diagnostics_parser.rs
**Line:** 93:94
**Comment:**
	*Api Mismatch: The new `P017` and `P018` mappings are absent from the required diagnostic registry and JSON map, so verification does not track these newly projected diagnostics.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

"BAMTS-C051" if is_export_modifier_on_class_element(message) => TS1031,
_ => return None,
})
Expand Down Expand Up @@ -123,6 +127,10 @@ pub fn typescript_parse_message(code: DiagnosticCode) -> Option<&'static str> {
"TS1136" => "Property assignment expected.",
"TS1160" => "Unterminated template literal.",
"TS1161" => "Unterminated regular expression literal.",
"TS1163" => "A 'yield' expression is only allowed in a generator body.",
"TS1308" => {
"'await' expressions are only allowed within async functions and at the top levels of modules."
}
"TS17002" => "Expected corresponding JSX closing tag for '{0}'.",
"TS17008" => "JSX element '{0}' has no corresponding closing tag.",
"TS17014" => "JSX fragment has no corresponding closing tag.",
Expand Down
Loading
Loading