1. 17 7月, 2019 1 次提交
    • T
      Fix EnC debug information emitted for patterns (#37239) · 5739c71b
      Tomáš Matoušek 提交于
      * Fix EnC debug information emitted for patterns
      
      Update calculation of syntax offset to account for a new case when a node (a switch expression) that is associated with a variable, closure or lambda may share start offset with other node of the same kind (`expr switch { … } switch { … }`). Use the offset of the `switch` keyword instead of the starting offset of the expression to disambiguate.
      
      Assign ordinals to variables synthesized for storing pattern values across cases. This is required to support complex patterns since we can no longer rely on the type of these variables to be distinct. This will require follow up in the IDE to disallow updating/adding/reordering the case clauses of switch expression which there an active statement is present within the switch statement. If the cases are unmodified the compiler guarantees that the order in which the synthesized variables are generated remains the same, so we can map the variables using their ordinal.
      
      Mark all variables synthesized during lowering of switch expression as short-lived. Their lifespan is limited to the switch expression, which does not include a sequence point.
      
      Disallow editing methods that contain switch expression. This is necessary until bugs https://github.com/dotnet/roslyn/issues/37232, https://github.com/dotnet/roslyn/issues/37237 are fixed.
      
      * Feedback
      
      * Update tests
      5739c71b
  2. 30 3月, 2019 1 次提交
    • N
      Implement pattern-matching in the nullable walker (#34273) · 583505c5
      Neal Gafter 提交于
      * Implement pattern-matching in the nullable walker
      
      Fixes #29909
      Fixes #31881
      Fixes #30952
      Fixes #33499
      Fixes #30597
      Fixes #32414
      Fixes #23944
      
      * Remove infinite recursion by using an empty struct cache.
      
      * Changes per code review comments.
      
      * Remove debugging code accidentally left behind.
      
      * Analysis of patterns-matching in the nullable walker requires valid (>0) slots.
      
      * Skip a flaky test
      
      * Patch after merge.
      
      * Make ctor private to force use of factory methods
      
      * Correct a typo.
      
      * Fixup after merge.
      583505c5
  3. 13 3月, 2019 1 次提交
  4. 09 3月, 2019 1 次提交
    • N
      Simplify some names in the nullable reference types feature · 85b05131
      Neal Gafter 提交于
      - Rename `TypeSymbolWithAnnotations` to `TypeWithAnnotations`
      - Rename its type field from `TypeSymbol` to `Type`
      - Fields of Symbols that are of type `TypeWithAnnotations` that are currently named `Type` would be renamed `TypeWithAnnotations`
      Fixes #33736
      85b05131
  5. 05 1月, 2019 1 次提交
  6. 19 12月, 2018 1 次提交
  7. 14 12月, 2018 1 次提交
  8. 10 12月, 2018 1 次提交
  9. 30 10月, 2018 1 次提交
  10. 30 3月, 2018 1 次提交
  11. 28 3月, 2018 2 次提交
    • N
      Address issues from previous recursive-patterns code reviews · e00aff99
      Neal Gafter 提交于
      Fixes #25663
      
      ### From https://github.com/dotnet/roslyn/pull/24059
      
      - In `CheckConsistentDecision`, use some notation like `v != null --> !(v == null)` for more clarity than the English language comment.
      - Add a private constructor to prevent construction of `DagStateEquivalence`
      - Hint creation of builder size in `CheckSwitchErrors`
      - Suppress subsumption errors on switch expression case if the pattern has an error.
      - In `LowerTest`, we have special handling for decisions on constant-valued input. But such decisions should already have been removed from the decision dag. Assert that this situation cannot occur and remove the special handling code.
      - Merge two cases in `switch (sortedNodes[0])` in `LowerDecisionDag`
      - Comment on `GetDagNodeLabel` is now less redundant.
      
      ### From https://github.com/dotnet/roslyn/pull/25544
      
      - In `AwaitExpressionSpiller.cs`, move `VisitSwitchDispatch` to right before `VisitThrowStatement` so it is in the same place where `VisitSwitchStatement` used to be to make deltas more clear in the end.
      - Remove `params` overload `public BoundStatement Switch(BoundExpression ex, params SyntheticSwitchSection[] sections)` and force caller to properly construct an immutable array.
      e00aff99
    • J
      Local function script globals (#24921) · dc5ec070
      Joseph Musser 提交于
      Merging on behalf of @jnm2
      dc5ec070
  12. 27 3月, 2018 1 次提交
    • N
      Move the spiller between initial lowering and lambda lowering · f7b666db
      Neal Gafter 提交于
      - Added some improved debug-time display for synthesized locals
      - Added some invariant checking regarding bound nodes.
      - Move invocation of the spiller into LocalRewriter.Rewrite
      - Add an error for when an expression tree contains a switch expression
      - Made the local substituter apply at the top level in the expression spiller because expressions can now contain statements (BoundSpillSequence)
      - Move the error ERR_ByRefTypeAndAwait to IteratorAndAsyncCaptureWalker
      - Skip broken tests due to #25702
      f7b666db
  13. 21 3月, 2018 1 次提交
    • N
      Replace old switch implementation with new one · d46f75ae
      Neal Gafter 提交于
      - Add a new bound node to represent the dispatch of a switch statement, and use it for a sequence of value tests in the pattern switch.
      - Generate a string switch using a hash code (as before) for a pattern switch.
      - Remove much of the old switch binder, except what is still used.
      - Fix wrong `InputType` recorded for BoundRecursivePattern.
      - Prevent cascaded subsumption errors from erroneous patterns.
      - Make the bound node factory use BoundSwitchDispatch rather than BoundSwitchStatement.
      - Remove obsolete bound nodes from previous switch implementation.
      d46f75ae
  14. 01 12月, 2017 1 次提交
    • A
      Change AssignmentOperator to use IsRef instead of RefKind (#23415) · bb0207f6
      Andy Gocke 提交于
      Assignments can be ref or regular, but there's no such thing as a
      "ref-readonly" assignment or "out" assignment, only left-hand sides that
      can be ref-kind. Changing to IsRef prevents bugs around looking for the
      RefKind of the assignment instead of looking for the RefKind of the LHS.
      bb0207f6
  15. 09 11月, 2017 1 次提交
  16. 03 11月, 2017 1 次提交
    • V
      Reuse proxy fields in async state machine · a5091001
      vsadov 提交于
      We currently provide every local with its own proxy, even when locals are in disjoint scopes.
      That is done for the purpose of debugging, especially EnC.
      
      We do not have to do this in Release ( /o+ ) and reduce the size of async state where possible through reusing of backing fields.
      
      NOTE: reuse does impact debugging experience when reuse happens - locals that are mapped to recycled fields generally cannot be examined. Otherwise debugging experience stays the same.
      
      Fixes:#15290
      a5091001
  17. 13 10月, 2017 1 次提交
  18. 17 6月, 2017 1 次提交
  19. 05 4月, 2017 1 次提交
  20. 04 4月, 2017 1 次提交
  21. 13 3月, 2017 1 次提交
  22. 11 3月, 2017 1 次提交
  23. 04 3月, 2017 1 次提交
  24. 19 1月, 2017 1 次提交
  25. 12 11月, 2016 2 次提交
  26. 16 8月, 2016 1 次提交
  27. 15 8月, 2016 1 次提交
  28. 13 8月, 2016 1 次提交
  29. 12 8月, 2016 2 次提交
  30. 02 8月, 2016 1 次提交
  31. 24 6月, 2016 1 次提交
  32. 06 6月, 2016 1 次提交
  33. 27 2月, 2016 1 次提交
  34. 31 10月, 2015 1 次提交
  35. 16 10月, 2015 1 次提交
  36. 22 8月, 2015 1 次提交
  37. 05 6月, 2015 1 次提交