-
Notifications
You must be signed in to change notification settings - Fork 846
cleanup to minimize diff for RFC FS-1087 #8867
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
Conversation
|
@dsyme looking at it |
|
Also, I learned the trick of pushing cleanup associated with a feature to and then pointing This means there is really no rush with these PR-related cleanups, an I'll use this technique more regularly now. |
| let expr = stripExpr expr | ||
|
|
||
| // Process the debug point and see if there's a replacement technique to process this expression | ||
| if GenExprPreSteps cenv cgbuf eenv sp expr sequel then () else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just 2-char indentation apart from this line
| reprL | ||
|
|
||
| and bindingL g (TBind(v, repr, _)) = | ||
| valAtBindL g v --- (wordL(tagText "=") ^^ exprL g repr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are just cleanup to DebugPrint to give slightly better formatting when dumping expressions etc.
| #else | ||
| [<System.Diagnostics.DebuggerDisplay("({StartLine},{StartColumn}-{EndLine},{EndColumn}) {FileName} IsSynthetic={IsSynthetic}")>] | ||
| #endif | ||
| [<System.Diagnostics.DebuggerDisplay("({StartLine},{StartColumn}-{EndLine},{EndColumn}) {ShortFileName} -> {DebugCode}")>] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need to make this debugging support differ in DEBUG mode
|
|
||
| #r @"..\..\..\..\Release\net40\bin\FSharp.Core.UnitTests.dll" | ||
|
|
||
| FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Core.ComparersRegression.createData () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I shortned a lot of names since they are crazy long in the Test Explorer and there was redundancy in the names in any case
| let expr = stripExpr expr | ||
| /// Process the debug point and check for alternative ways to generate this expression. | ||
| /// Returns 'true' if the expression was processed by alternative means. | ||
| and GenExprPreSteps (cenv: cenv) (cgbuf: CodeGenBuffer) eenv sp expr sequel = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This factors out these "pre steps" into a separate method, which we use from both GenExprAux and GenLinearExpr.
This factoring is useful for me in the other PR when detecting and generating code for state machines.
| | None -> | ||
| false | ||
|
|
||
| match expr with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This big change is nearly all 2-char indentation
TIHan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me!
|
Thanks all! |
* cleanup to minimize diff for RFC FS-1087 * a little more cleanup * a little more cleanup * a little more cleanup * trim length of names in FSHarp.Core.UnitTests * min diff * min diff
Replacement for #8865 coming from a different branch
The changes are cosmetic. The one change to values is in IlxGen.fs where it is cleaner to use a list for the "selfv" rather than an option in some places and a list in another. But that is also a cosmetic change as it's easy to verify that the list always contains 0 or 1 elements here.
There is also some improvement to debugging in the compiler with much improved DebugText for Expr and TOp values. THis helps speed debugger performance and I think prevents some stack overflow crashed suring debugging when formatting large expressions.
Also trim length of names of tests in FSharp.Core.UnitTests.