1. 22 8月, 2019 1 次提交
  2. 15 8月, 2019 2 次提交
    • N
      Reduce memory consumption for string concatenation from O(n^2) to O(n) (#37915) · 99cc3811
      Neal Gafter 提交于
      Fixes #7398
      Fixes #37572
      Relates to https://github.com/aspnet/Razor/issues/614 and many other customer accommodations that are no longer needed.
      
      History of this bug:  When constant folding a long sequence of string concatenations, there is an intermediate constant value for every left-hand operand.  So the total memory consumed to compute the whole concatenation was *O(n^2)*.  The compiler would simply perform this work and eventually run out of memory, simply crashing with no useful diagnostic.  Later, the concatenation implementation was instrumented so it would detect when it was likely to run out of memory soon, and would instead report a diagnostic at the last step. See https://github.com/dotnet/roslyn/commit/f177077665a5bef862014f1898b961d1759c9248.  Test `Bug529600()` was added to demonstrate that we produced a diagnostic.  However, the compiler still consumed *O(n^2)* memory for the concatenation and this test used to consume so much memory that it would cause other tests running in parallel to fail because they might not have enough memory to succeed.  So the test was disabled and eventually removed.  The compiler would still crash with programs containing large string concatenations, or consume huge amounts of memory and take a long time before reporting a diagnostic, so the underlying problem had not been addressed.
      
      Here we have revised the implementation of constant folding string concatenations so that it requires *O(n)* memory and remove the old instrumentation.  As a consequence the test `Bug529600()` now runs very quickly and does not consume gobs of memory.
      99cc3811
    • R
  3. 21 7月, 2019 1 次提交
  4. 18 7月, 2019 1 次提交
  5. 16 7月, 2019 1 次提交
    • N
      Target-typed switch expression (#37052) · fbdb480b
      Neal Gafter 提交于
      Implements https://github.com/dotnet/csharplang/issues/2389
      Fixes #35958
      
      Note that the switch expression conversion is not a standard implicit conversion.  Specifically, it should not be considered as a valid implicit conversion as input to a user-defined conversion, as that could permit two chained user-defined conversions.
      
      Also changes binding of switch expression to ECMA so it can interact properly with switch expressions.
      Fixes #14965
      fbdb480b
  6. 15 7月, 2019 1 次提交
  7. 12 7月, 2019 1 次提交
  8. 25 6月, 2019 1 次提交
  9. 20 6月, 2019 1 次提交
  10. 19 6月, 2019 1 次提交
  11. 14 6月, 2019 1 次提交
  12. 13 6月, 2019 1 次提交
  13. 12 6月, 2019 1 次提交
  14. 05 6月, 2019 1 次提交
  15. 24 5月, 2019 1 次提交
  16. 21 5月, 2019 1 次提交
  17. 19 5月, 2019 1 次提交
  18. 04 5月, 2019 2 次提交
  19. 03 5月, 2019 1 次提交
  20. 02 5月, 2019 1 次提交
  21. 30 4月, 2019 1 次提交
    • A
      Make sure nullability mismatch in constraints specified in different partial... · b252adb7
      AlekseyTs 提交于
      Make sure nullability mismatch in constraints specified in different partial declarations (types/methods) are properly detected and reported. (#35272)
      
       Make sure nullability mismatch in constraints specified in different partial declarations (types/methods) are properly detected and reported.
      
      Fixes #30229.
      Fixes #35179.
      
      Implements the following LDM decision:
      
      For partial types, the invariant matching from type inference and merging. A mismatch
      between two non-oblivious candidates produces an error. No warnings are produced.
      
      For partial methods, nullability has to match with exception for oblivious and we produce warnings.
      For the result, we use the implementation signature inside the implementation, and the
      declaration signature for the callers.
      b252adb7
  22. 27 4月, 2019 1 次提交
  23. 26 4月, 2019 1 次提交
  24. 20 4月, 2019 1 次提交
  25. 17 4月, 2019 3 次提交
  26. 12 4月, 2019 1 次提交
  27. 11 4月, 2019 2 次提交
  28. 06 4月, 2019 1 次提交
  29. 02 4月, 2019 1 次提交
    • R
      Readonly members more test coverage (#34602) · 0d15dd1a
      Rikki Gibson 提交于
      * Check parser behavior for bad expression property declaration
      
      * Make readonly modifiers more strict on accessors to match accessibility behavior
      
      * Fix tests
      
      * Improve implicit copy warning message. Add compound property assignment test.
      
      * Test ErrorCode.ERR_ReadOnlyModMissingAccessor with an indexer
      
      * Simplify error message for 'static readonly' members
      0d15dd1a
  30. 30 3月, 2019 2 次提交
    • 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
    • R
      Readonly members prototype cleanup (#34468) · 56214c6c
      Rikki Gibson 提交于
      * Use RefKind.In for the ThisParameter of a readonly method
      
      * Remove prototype comments
      
      * Add readonly lambda test
      
      * Fix formatting
      
      * Update compiler test plan
      
      * Tweak wording
      
      * Move OverrideBaseMethod test to CodeGen tests file. Add 'fixed' test.
      
      * Test readonly partial methods
      
      * Add readonly explicit interface implementation test
      
      * Expand on ReadOnlyMembers_BaseMethod code gen tests
      
      * Check symbol APIs for mismatched readonly partial method
      
      * Update speclet
      
      * Respond to feedback
      
      * Refactor metadata round trip test
      56214c6c
  31. 28 3月, 2019 1 次提交
  32. 27 3月, 2019 1 次提交
    • R
      Readonly members LangVersion checks (#34404) · 6626a113
      Rikki Gibson 提交于
      * Add IDS_FeatureReadOnlyMembers
      
      * Add CheckFeatureAvailability checks for readonly members
      
      * Remove prototype comment
      
      * Ensure LangVersion test is valid with default language version
      
      * Fix DeclarationParsingTests
      
      * Remove unnecessary comment
      6626a113
  33. 23 3月, 2019 1 次提交
    • R
      Readonly members improved diagnostics (#34338) · 6697dfc6
      Rikki Gibson 提交于
      * Add new readonly members error codes
      
      * Use new diagnostics and update tests
      
      * Improve ValueChecks error messages
      
      * Remove unused error messages
      
      * Fixes from feedback
      
      * Allow 'readonly' on getter-only auto props and get accessors
      
      * Update spec. Improve error messages.
      6697dfc6
  34. 20 3月, 2019 1 次提交
    • R
      Readonly members warnings and semantic errors (#34022) · 9947942d
      Rikki Gibson 提交于
      * readonly members warnings WIP
      
      * Remove dead code
      
      * Readonly members semantic checks. Warn on implicit copy of 'this'.
      
      * Add to readonly ref readonly test
      
      * Warn on implicit copies for get property access
      
      * Don't warn on calls to base methods
      
      * Add test for setter accesses in a readonly member
      
      * Allow readonly setter accesses in readonly methods
      
      * Test increment, compound assignment, and field-like events
      
      * Fixes from feedback
      
      * Add mutating readonly event accessors test
      
      * Expand on readonly base members test
      
      * Check for implicit copies in foreach/using/deconstruction scenarios
      
      * Split base method tests into multiple tests for clarity
      
      * Test remaining cases
      
      * Fix whitespace in test
      
      * Add ReadOnlyMethod_RefLocal
      
      * Fixes from Fred's feedback
      9947942d