1. 11 1月, 2016 1 次提交
    • V
      Use Array.Empty when calling into well known helpers that do not care. · 6153d9f6
      vsadov 提交于
      Typical example is Linq.Expressions APIs which do not persist arrays (since they are mutable) and therefore do not care at all if empty arrays are reused or reallocated.
      Passing empty arrays to such APIs is fairly common case and using Array.Empty if available would reduce allocations.
      
      Fixes #6759
      6153d9f6
  2. 29 12月, 2015 1 次提交
  3. 17 12月, 2015 1 次提交
    • V
      Trivial fix for 6805. · 7b81dc50
      vsadov 提交于
      Just fixing the easy-out check that verifies if index conversion is needed at all. Currently the condition is always true - likely a typo.
      Otherwise, the part that creates conversion does the right thing regardless, so the end result should be the same.
      
      Fixes #6805
      7b81dc50
  4. 07 12月, 2015 1 次提交
  5. 16 10月, 2015 1 次提交
  6. 09 10月, 2015 1 次提交
  7. 08 10月, 2015 1 次提交
  8. 01 10月, 2015 1 次提交
    • A
      Improve compiler behavior around stack overflow caused by long binary expressions. · 12be92ba
      AlekseyTs 提交于
      Fixes #5395.
      
      Adjusted Binder, Optimizer, Flow Analysis, code generator and majority of bound tree visitors to not use recursion to handle binary expressions nested on the left side of another binary expression.
      Adjusted majority of bound tree visitors to detect that stack overflow is about to happen while an expression is being traversed and report a diagnostic pointing to the expression at fault instead of crashing compiler.
      12be92ba
  9. 30 9月, 2015 1 次提交
    • V
      Adjustment of the fix for #4471 · 2bd86a00
      vsadov 提交于
      Old compiler did not insert casts for interface peoperty accesses on generic receiver when receiver was constrained to be a class.
      2bd86a00
  10. 09 9月, 2015 1 次提交
    • V
      Fixing a compat issue with invoking properties on generic type parameters in expression trees. · af831242
      vsadov 提交于
      While the casts are semantically incorrect, the conditions under which they are observable are extremely narrow:
      We would have to deal with a generic T receiver which is actually a struct that implements a property form an interface and the implementation of the getter must make observable mutations to the instance.
      
      At this point it seems more appropriate to continue adding these casts.
      
      Fixes #4471
      af831242
  11. 05 9月, 2015 1 次提交
  12. 22 8月, 2015 1 次提交
  13. 15 8月, 2015 2 次提交
    • V
      CR feedback. · 8fa47a3b
      vsadov 提交于
      No need to use Visit to create a constant expression.
      8fa47a3b
    • V
      Make expression trees involving enum literals to look like produced by native compiler · 75befe7d
      vsadov 提交于
      Native compiler exposes results of constant folding in the expression trees.
      In particular, conversion from an enum literal to an underlying type is fairly consistently folded by the native compiler as it can be observed in the expression trees.
      
      Roslyn, on the other hand, was not very consistent here.
      Some cases like explicitly converted literals were folded - Ex:  IntTakingMethod((int)E1.a)
      Other cases like implicit conversions to underlying type introduced in the processs of type promotion in binary expressions were not.
      
      This fixes known differences in this behavior.
      
      Fixes #4085
      Fixes #3292
      75befe7d
  14. 16 4月, 2015 1 次提交
  15. 15 4月, 2015 1 次提交
  16. 05 4月, 2015 1 次提交
  17. 01 2月, 2015 1 次提交
    • B
      Complete the style update to the rest of Open\src directory · 995eb372
      beep boop 提交于
           Background:
      
           As discussed in the dev team all hands all code under the GitHub dotnet foundation is using a single process for contribution, API review, infrastructure and coding style. The idea is to present a unified view to our customer and give them a single story for contributing to any project under the dotnet foundation.
      
           https://github.com/dotnet/corefx/wiki/Contributing#c-coding-style
      
           The coding style transition is automated using a Roslyn based rewrite tool:
      
           https://github.com/dotnet/codeformatter
      
           This will be applied in stages across our developer tree. Right now the focus is on the Open directory as this is what is being presented on github. Code owners will be contacted before the transition happens.
      
           Note: this is a soft style requirement. There are no build errors that come from this change.
       (changeset 1408227)
      995eb372
  18. 15 1月, 2015 1 次提交
  19. 14 1月, 2015 1 次提交
  20. 09 1月, 2015 1 次提交
    • P
      Use a compatible MethodInfo when generating MethodCallExpressions for virtual... · 769e907a
      pgavlin 提交于
      Use a compatible MethodInfo when generating MethodCallExpressions for virtual methods on value types.
      
      When generating a call to a virtual method on a value type, the least overridden method virtual method is only used in special circumstances. These circumstances are exactly the checks performed by MayUseCallForStructMethod during IL emission when deciding whether or not to call a method with a value type receiver directly). This change applies the same rules when generating MethodCallExpressions for value type receivers in expression lambdas, bringing the generated code back in line with Dev12.
      ***NO_CI***
       (changeset 1394691)
      769e907a
  21. 07 1月, 2015 1 次提交
    • N
      Conversions for interpolated strings v8 · bbbbe68d
      nmgafter 提交于
      We also add all of the relevant optimizations requested for current and future
      formatting performance improvements. We now use full overload resolution
      (using a new binder type specialized for synthesizing invocations) to
      select an appropriate string.Format method or format factory method, which
      enables it to handle params, generics, arbitrary argument conversions, etc, and we
      optimize the special case of no fill-ins by processing the {{ and }} escapes,
      producing a literal in the generated code. (changeset 1388224)
      bbbbe68d
  22. 05 12月, 2014 1 次提交
    • P
      Use the correct {get,set} method when lowering property accesses in expression trees. · c1a84b47
      pgavlin 提交于
      A property's own {get,set} method was always being used when lowering property accesses in expression trees. This is incorrect in the face of partially overridden properties: the fix is to instead use the own or least overridden property accessor.
      
      I also went ahead and fixed up a few other places in the codebase that were either not accessing the correct accessor or inconsistently accessing the correct accessor.
      ***NO_CI***
       (changeset 1380961)
      c1a84b47
  23. 25 11月, 2014 1 次提交
    • P
      Search base types for operator {true,false} when binding user-defined... · 196f8f54
      pgavlin 提交于
      Search base types for operator {true,false} when binding user-defined short-circuit logical operators for compatibility with Dev12.
      
      While making this change, I noticed that flow analysis was incorrect for lifted user-defined short-circuit logical operators; I've fixed this issue as well. (changeset 1376827)
      196f8f54
  24. 12 9月, 2014 1 次提交
  25. 12 7月, 2014 1 次提交
    • T
      To support EnC well the compiler needs to carefully distinguish between... · d4b0a867
      TomasMatousek 提交于
      To support EnC well the compiler needs to carefully distinguish between long-lived and short-lived synthesized variables. Long-lived variables may cross sequence points and thus need to be mapped the the corresponding variables in the previous generation when emitting EnC deltas. Short-lived local variables shall never cross sequence points.
      
      This change revisits helpers that create synthesized variables and assigns each synthesized variable a SynthesizedLocalKind. Negative kind values are reserved for short-lived variables, positive values for long-lived variables.
      
      The change removed the option to give a synthesized variable an explicit name. The names of the variables are assigned at code-gen time based on their SynthesizedLocalKind. This is to enforce that the names of long-lived variables follow a naming pattern that allows use to reverse-engineer the SynthesizedLocalKind value from the variable name.
      
      Also renames DebugInformationKind.PDBOnly to DebugInformationKind.PdbOnly to follow .NET naming guidelines.
       (changeset 1293017)
      d4b0a867
  26. 02 7月, 2014 1 次提交
  27. 20 6月, 2014 1 次提交
    • T
      Splits Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.CSharp and... · fc3b332f
      TomasMatousek 提交于
      Splits Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.CSharp and Microsoft.CodeAnalysis.VisualBasic into portable and desktop assemblies.
      
      Existing Core\Source, CSharp\Source and VisualBasic\Source directories are renamed to Core\Portable, CSharp\Portable and VisualBasic\Portable.
      New sibling Desktop folders are added and non-portable source is moved there.
      "System.Runtime" references has to be removed in order for the portable project system magic to automatically add facade references.
       (changeset 1281686)
      fc3b332f
  28. 04 6月, 2014 1 次提交
  29. 01 5月, 2014 1 次提交
    • T
      We need to be more conscious about producing synthesized symbols during... · 211b47ed
      TomasMatousek 提交于
      We need to be more conscious about producing synthesized symbols during lowering in order to enable EnC of method bodies whose lowering produce such symbols (e.g. lambdas, iterators, dynamic sites, etc.).
      
           This change refactors synthesized symbols in C# so that all symbols produced during lowering phase implement an interface (ISynthesizedMethodBodyImplementationSymbol) that can be used in the emit phase to retrieve information necessary for updating the corresponding metadata entities should they enter EnC.
      
           I also attempted to somewhat improve and increase consistency of the naming of synthesized symbols involved in this change.
      
           No new functionality is added by this change. (changeset 1247789)
      211b47ed
  30. 22 4月, 2014 1 次提交
    • T
      MethodCompiler refactorings: · a90eb5d9
      TomasMatousek 提交于
           - We mix "CompilerGenerated" and "Synthesized", but they mean the same - renames the former to the latter. The latter is less ambiguous since we also name "generated" the result of CodeGen phase.
           - Merges Compiler.cs into MethodCompiler.cs, CSharpCompilation.cs and Binder_Initializers.cs -- to match VB.
           - Renames misc members/types so that those that serve the same purpose in C# and VB are called the same. (changeset 1235392)
      a90eb5d9
  31. 12 4月, 2014 1 次提交
  32. 19 3月, 2014 1 次提交