-
Notifications
You must be signed in to change notification settings - Fork 0
Make generator suspension walkers dual before inline cloning #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bffa186
8a6ac1c
98ba804
9e76e88
9fa4d29
0aaf411
6d9dbb2
60db035
6fb9b8f
1bd6d9c
9031222
bc2ef3b
50ee16f
1b172e1
c9b792e
20f1ec8
532b184
3986c8e
4c9f642
773bebd
3c4ae9c
9ab2ba5
78d4961
c75faec
8fa4ef2
dcb9701
8d35f22
620549b
3b987f4
b5ef4e5
f64129e
33f680f
e167ef1
e2e2864
a412209
4d29d32
e86ceb0
64a2650
3c8884f
7a662c7
2135d4c
28a0815
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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. |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
|
@@ -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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: The new Assessment: 🟠 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, | ||
| }) | ||
|
|
@@ -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.", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.