-
Notifications
You must be signed in to change notification settings - Fork 840
Improve Portable PDB debugging in FSharp.Private.Compiler.dll #6383
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a60e099
Fix portable pdb writing
KevinRansom 61aed5f
enable portable pdbs for fsharp.private.compiler.dll
KevinRansom 831ae68
feedback
KevinRansom 403e370
Merge branch 'master' into symbols
KevinRansom 6fcfaf9
Release build
KevinRansom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -361,38 +361,49 @@ module internal Implementation = | |
| #if DEBUG | ||
| if Flags.debug then Console.Write("reduce popping {0} values/states, lookahead {1}", n, report haveLookahead lookaheadToken) | ||
| #endif | ||
| for i = 0 to n - 1 do | ||
| // For every range to reduce merge it | ||
| for i = 0 to n - 1 do | ||
| if valueStack.IsEmpty then failwith "empty symbol stack" | ||
| let topVal = valueStack.Peep() | ||
| let topVal = valueStack.Peep() // Grab topVal | ||
| valueStack.Pop() | ||
| stateStack.Pop() | ||
| ruleValues.[(n-i)-1] <- topVal.value | ||
| ruleStartPoss.[(n-i)-1] <- topVal.startPos | ||
| ruleEndPoss.[(n-i)-1] <- topVal.endPos | ||
| if i = 0 then lhsPos.[1] <- topVal.endPos | ||
| if i = n - 1 then lhsPos.[0] <- topVal.startPos | ||
|
|
||
| // Use the lookahead token to populate the locations if the rhs is empty | ||
| if n = 0 then | ||
|
|
||
| let ruleIndex = (n-i)-1 | ||
| ruleValues.[ruleIndex] <- topVal.value | ||
| ruleStartPoss.[ruleIndex] <- topVal.startPos | ||
| ruleEndPoss.[ruleIndex] <- topVal.endPos | ||
|
|
||
| if i = 0 then | ||
| // Initial range | ||
| lhsPos.[0] <- topVal.startPos | ||
| lhsPos.[1] <- topVal.endPos | ||
| elif topVal.startPos.FileIndex = lhsPos.[1].FileIndex && topVal.startPos.Line <= lhsPos.[1].Line then | ||
| // Reduce range if same file as the initial end point | ||
| lhsPos.[0] <- topVal.startPos | ||
|
|
||
| // Use the lookahead token to populate the locations if the rhs is empty | ||
| if n = 0 then | ||
| if haveLookahead then | ||
| lhsPos.[0] <- lookaheadStartPos | ||
| lhsPos.[1] <- lookaheadEndPos | ||
| lhsPos.[0] <- lookaheadStartPos | ||
| lhsPos.[1] <- lookaheadEndPos | ||
| else | ||
| lhsPos.[0] <- lexbuf.StartPos | ||
| lhsPos.[1] <- lexbuf.EndPos | ||
| try | ||
| // printf "reduce %d\n" prod | ||
| let redResult = reduction parseState | ||
| valueStack.Push(ValueInfo(redResult, lhsPos.[0], lhsPos.[1])) | ||
| try | ||
|
Contributor
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. The diff could be made minimal, though it's no big deal, the other changes are an improvement
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. I know, but my OCD doesn't work that way :-( |
||
| // printf "reduce %d\n" prod | ||
| let redResult = reduction parseState | ||
| let valueInfo = ValueInfo(redResult, lhsPos.[0], lhsPos.[1]) | ||
| valueStack.Push(valueInfo) | ||
| let currState = stateStack.Peep() | ||
| let newGotoState = gotoTable.Read(int tables.productionToNonTerminalTable.[prod], currState) | ||
| stateStack.Push(newGotoState) | ||
|
|
||
| #if DEBUG | ||
| if Flags.debug then Console.WriteLine(" goto state {0}", newGotoState) | ||
| #endif | ||
| with | ||
| | Accept res -> | ||
| finished <- true | ||
| with | ||
| | Accept res -> | ||
| finished <- true | ||
| valueStack.Push(ValueInfo(res, lhsPos.[0], lhsPos.[1])) | ||
| | RecoverableParseError -> | ||
| #if DEBUG | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.