-
Notifications
You must be signed in to change notification settings - Fork 833
Source maps: allow to specify that an expression has no debug info in text parsers #6520
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
5a5bae2
4e1263c
af43319
caa3185
f035b97
5f8365c
4b3894b
2e71865
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 |
|---|---|---|
|
|
@@ -219,6 +219,10 @@ void SExpressionParser::parseDebugLocation() { | |
| while (debugLocEnd[0] && debugLocEnd[0] != '\n') { | ||
| debugLocEnd++; | ||
| } | ||
| if (debugLocEnd == debugLoc) { | ||
| loc = nullptr; | ||
| return; | ||
| } | ||
|
Member
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. How does this relate to the PR - is it necessary because of something, or necessary for a new test, or something else?
Contributor
Author
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. This is just parsing |
||
| char const* pos = debugLoc; | ||
| while (pos < debugLocEnd && pos[0] != ':') { | ||
| pos++; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,4 +124,41 @@ | |
| ;;@ waka:200:2 | ||
| (i32.const 2) | ||
| ) | ||
|
|
||
| ;; CHECK: (func $foo (param $x i32) (param $y i32) | ||
| ;; CHECK-NEXT: ;;@ src.cpp:90:1 | ||
| ;; CHECK-NEXT: (if | ||
| ;; CHECK-NEXT: ;;@ | ||
| ;; CHECK-NEXT: (i32.add | ||
| ;; CHECK-NEXT: (local.get $x) | ||
| ;; CHECK-NEXT: (local.get $y) | ||
|
Member
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. To make sure I understand, these
Member
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. This might be worth clarifying in the README.
Contributor
Author
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. Right. I have updated the README. |
||
| ;; CHECK-NEXT: ) | ||
| ;; CHECK-NEXT: (then | ||
| ;; CHECK-NEXT: ;;@ src.cpp:100:1 | ||
| ;; CHECK-NEXT: (return) | ||
| ;; CHECK-NEXT: ) | ||
| ;; CHECK-NEXT: (else | ||
| ;; CHECK-NEXT: ;;@ | ||
| ;; CHECK-NEXT: (return) | ||
| ;; CHECK-NEXT: ) | ||
| ;; CHECK-NEXT: ) | ||
| ;; CHECK-NEXT: ) | ||
| (func $foo (param $x i32) (param $y i32) | ||
| ;;@ src.cpp:90:1 | ||
| (if | ||
| ;;@ | ||
| (i32.add | ||
| (local.get $x) | ||
| (local.get $y) | ||
| ) | ||
| (then | ||
| ;;@ src.cpp:100:1 | ||
| (return) | ||
| ) | ||
| (else | ||
| ;;@ | ||
| (return) | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
Uh oh!
There was an error while loading. Please reload this page.