1. 01 3月, 2019 6 次提交
  2. 28 2月, 2019 9 次提交
    • N
      Run generate-compiler-code · 7e5deddc
      Neal Gafter 提交于
      7e5deddc
    • N
      Follow up on merge. · 9da39af6
      Neal Gafter 提交于
      9da39af6
    • N
      Minor changes per code review. · 4f64ad5f
      Neal Gafter 提交于
      4f64ad5f
    • N
      Address some code review comments. · 7e325b52
      Neal Gafter 提交于
      7e325b52
    • J
      Enable C# 8.0 in the code base · 0f39fb94
      Jared Parsons 提交于
      This change enables C# 8.0 use in the code base as well as moving the
      recommended Visual Studio version to 2019 Preview 4.  The following
      features are now allowed to be used:
      
      - `switch` expressions
      - recursive pattern matching
      - `using` declarations
      - `static` local functions
      - local / parameter shadowing in local functions / lambdas
      - `null` coalescing assignment
      - `async` streams: keep this out of our public API surface for now as we
      don't want to block unification with netcoreapp in the future.
      
      Before getting into the features which are off limits I wanted to
      outline how compiler toolsets work in this repository. There are three
      toolsets we need to consider when adopting new features:
      
      1. The compiler toolset which provides the IDE experience: Intellisense,
      syntax highlighting, etc ...
      1. The compiler toolset which is used when the solution is built. This
      is explicitly different than the compiler toolset which ships with the
      MSBuild driving the compilation.
      1. The compiler toolset is built from source on every PR and used as the
      toolset for the PR (overriding 2 above).
      
      That being said the following features are offlimit for now:
      
      - Index / Range: the API surface area, including the parts the compiler
      depends on, underwent significant churn for .NET Core Preview 3. Until
      we converge it means toolsets 1 and 2 can be a bit out of sync.
      - `unmanaged` generic `struct`: this is not included in VS2019 Preview 4
      and hence using it would make the IDE experience poor.
      - Nullable Reference Types: this area is under active churn and we could
      easily get into a situation where toolsets 2 and 3 disagreed on code
      checked into the repository creating unmergeable PRs. As such we're
      holding off on this in master for now. Until then please use the branch
      [features/NullableDogfood](https://github.com/dotnet/roslyn/tree/features/NullableDogfood)
      to dogfood NRT. This will be merged back into master closer to
      Dev16.0GA.
      
      Note: This change only affects the C# compiler toolset. There are no
      changes to our MSBuild or .NET Core SDK toolsets. Those will be coming
      soonish though.
      0f39fb94
    • R
      Fix stack overflow where overload resolution gets parameter type attributes (#33498) · ceea0803
      Rikki Gibson 提交于
      * Add reproducer for #33388
      
      * Skip normalizing task types if binding attribute arguments
      
      * Use InAttributeArgument property
      
      * Add test where task-like normalization affects overload resolution
      
      * Update AttributeArgument_TaskLikeOverloadResolution test case
      
      * Add assert and remove apparently unused branch
      
      * Add back comparison of remaining parameter types with InAttributeArgument guard
      
      * Update comment on remaining parameter comparisons
      
      * Add comment describing why we don't normalize task types in attribute arguments
      ceea0803
    • J
      f06f0785
    • C
      Store nullable attribute constructor params in a field: (#33668) · 509277e1
      Chris Sienkiewicz 提交于
      * Store nullable attribute constructor params in a field:
      - Add a derived nullable attribute symbol
      - Add a constructor symbol that allows assignment to a field
      - Generate the appropriate constructors for byte and byte[] versions of the attribute
      - Add tests
      509277e1
    • C
  3. 27 2月, 2019 2 次提交
  4. 26 2月, 2019 5 次提交
  5. 25 2月, 2019 1 次提交
    • N
      Revise NullableWalker to use a two-state solution · 6c329e3e
      Neal Gafter 提交于
      The NullableWalker is revised so that the inferred state of an expression is either `NotNull` or `MaybeNull` (represented by the new type `NullableFlowState`).  There is no longer such as thing as an oblivious rvalue.  There are four kinds of lvalues:
      - oblivious lvalues read as NotNull but null can be written to them
      - annotated lvalues read as MaybeNull and null can be written to them
      - unannotated lvalues read as NotNull and null may not be written to them
      - unconstrained type parameters read as MaybeNull but null may not be written to them
      
      In order to preserve the safety in the face of such unconstrained type parameters, we warn immediately when a null value of such a type is introduced.  This is a safety warning.  The contexts in which such a warning are given are
      - `default` and `default(T)`
      - `null` conversion to `T` (when `T` is known to be ref type)
      - `e?.M()` when the return type is `T`
      - dynamic conversion or cast to `T` when the dynamic might be null
      - explicit conversion to `T`
      - `e as T` when there is not an implicit conversion from the type of `e` to `T`
      - a call to a method like `FirstOrDefault()` that is annotated with `[MaybeNull] (not yet implemented)
      
      We remove the hidden diagnostics previously computed by the NullableWalker.
      
      We add debugger display support for a number of types used by the NullableWalker.  The display for `NullableWalker` summarizes the computed nullability of variables in a nice compact form.
      
      We remove support for definite assignment in the NullableWalker.  Some scenarios involving the use of not-definitely-assigned variables may cause cascaded diagnostics.  We might remove them in the future by initializing all vaiables to the `NotNull` state when they enter scope.
      
      We overhaul and simplify the inplementation of conversions, the null-conditional operator, and result inference for lifted operators.
      
      We simplify the Meet and Join operations so that they form a lattice on both the NullableAnnotation and NullableFlowState.
      
      Catch variables are now initialized to a non-null state on entry to the catch block.
      
      In unreachable code, every expression produces a non-null rvalue.  An erroneous expression produces a non-null rvalue (to suppress cascaded diagnostics).
      6c329e3e
  6. 23 2月, 2019 4 次提交
  7. 20 2月, 2019 4 次提交
    • C
      Replace slot watermark (#33455) · 4a94aece
      Charles Stoner 提交于
      4a94aece
    • J
    • J
      Bootstrap builds should use ExitingTraceListener · 04be188f
      Jared Parsons 提交于
      The bootstrap builds of the compiler today are using the default trace
      listener which presents a dialog. That means when a `Debug.Assert` call
      fires we end up hanging the build in Azure.
      
      The intent was always for the bootstrap builds to use the
      `ExitingTraceListener`. This way they exit with a crash and call stack
      that allows the compiler team to diagnose the failure.
      
      The behavior of `Debug.Assert` showing a dialog is the most likely
      explanation for our current random hangs in the determinism leg. That is
      the only place we still use a `DEBUG + BOOTSTRAP` build. The symptoms
      line up. If that's the case this will start showing us the stack trace
      of the assert.
      04be188f
    • C
      Document ref enumerator disposal compat break (#33367) · fb6b8983
      Chris Sienkiewicz 提交于
      * Document ref enumerator disposal compat break
      * Add a ref struct disposal test:
      - Check that we don't call Dispose on a ref struct enumerator in language versions lower than 8.0
      - Add an execution test to check end to end
      fb6b8983
  8. 19 2月, 2019 2 次提交
    • J
      Ensure pipename argument quoted · cb84901e
      Jared Parsons 提交于
      The name for the named pipe used between MSBuild and VBCSCompiler is
      generated from a combination of values including the current user name,
      specifically `%USERNAME%`. It is possible for this value to have spaces
      in it and hence the argument must be quoted when passing it to the
      command line of VBCSCompiler instances.
      
      Regression initially introduced: #32257
      cb84901e
    • J
      Ensure pipename argument quoted · aaed7b57
      Jared Parsons 提交于
      The name for the named pipe used between MSBuild and VBCSCompiler is
      generated from a combination of values including the current user name,
      specifically `%USERNAME%`. It is possible for this value to have spaces
      in it and hence the argument must be quoted when passing it to the
      command line of VBCSCompiler instances.
      
      Regression initially introduced: #32257
      aaed7b57
  9. 16 2月, 2019 5 次提交
    • C
    • J
      Respond to PR feedback · 0c576cb5
      Jared Parsons 提交于
      0c576cb5
    • A
      Use new well-known API for System.Index/Range (#32805) · 1f44fbf4
      Andy Gocke 提交于
      This change does two things: shrinks the required Index/Range APIs to
      a minimal set, and changes the new required API names to those decided
      in the latest CoreFX design review 
      (CoreCLR change at https://github.com/dotnet/coreclr/pull/22331).
      1f44fbf4
    • J
      Don't accidentally share a named semaphore between test processes · b26e16d4
      Jason Malinowski 提交于
      WpfSharedTestData had two static members: Instance and
      TestSerializationGateName. TestSerializationGateName is the name of a
      system-wide Semaphore that was used to execute WpfFacts one at time.
      The intent is this was a GUID so it wouldn't actually be shared.
      Unfortunately, the Instance member is initialized first; and the
      non-static Semaphore field is initialized with the still uninitialized
      TestSerializationGateName. This means our Semaphore would always be
      named with a GUID of all-zeros, causing us to share the semaphore
      between all running xUnit processes. This was terribly bad for
      two reasons:
      
      1. It kills test performance. We run tests in parallel in separate
         processes to ensure isolation, but this sharing of the semaphore
         meant that all of those processes are only running one test at a
         time, defeating all running of tests in parallel.
      2. If one test process crashes, the Semaphore is never freed, meaning
         all your other test processes will deadlock and never complete.
      
      It's unclear why this code is using a Semaphore, but since we have
      no need to share the Semaphore between processes, we can use a
      SemaphoreSlim. This also has the added benefit of properly supporting
      a WaitAsync that isn't implemented by launching off a Thread just to
      wait for the system semaphore.
      b26e16d4
    • J
      Be more deliberate about nullability checking · f2ac8cac
      Jared Parsons 提交于
      Most nullability checking of tuple values should occur during the
      nullable walking phase. This is because the test relies on the inference
      of the values, not the explicit types in the code. The only time we need
      to validate tuple nullability constarints during initial binding is when
      we're binding a named type.
      f2ac8cac
  10. 15 2月, 2019 2 次提交