1. 15 5月, 2015 1 次提交
  2. 07 4月, 2015 1 次提交
  3. 18 3月, 2015 1 次提交
  4. 12 3月, 2015 1 次提交
  5. 11 3月, 2015 1 次提交
  6. 07 3月, 2015 1 次提交
    • V
      Restored requirement for struct constructors to always have formal parameters · 1a6b2f0d
      VSadov 提交于
      Fixes #1029
      
      While overall parameterless constructors in structs are valid from IL perspective, without a convenient way to declare them they were virtually nonexistent. As we performed more and more testing, we kept discovering cases where parameterless struct constructors caused inconsistent behavior in libraries or even in some versions of CLR.
      
      After reconsidering the potential issues arising from breaking long standing assumptions, we decided it was best for our users to restore the requirement on struct constructors to always have formal parameters.
      1a6b2f0d
  7. 06 3月, 2015 1 次提交
  8. 26 2月, 2015 1 次提交
  9. 25 2月, 2015 1 次提交
  10. 09 2月, 2015 1 次提交
  11. 20 1月, 2015 1 次提交
    • T
      Update Microsoft.Net.ToolsetCompilers and Microsoft.Net.RoslynDiagnostics to... · d2142093
      tmeschter 提交于
      Update Microsoft.Net.ToolsetCompilers and Microsoft.Net.RoslynDiagnostics to version 1.0.0-rc1-20150116-01.
      
      Also turn on the DeclarePublicAPI analyzer for all of the C# assemblies that end up in our NuGet packages. I can't turn the DeclarePublicAPI analyzer on for our VB projects yet due to bugs in the analyzer driver. (changeset 1400249)
      d2142093
  12. 14 1月, 2015 2 次提交
    • R
      e315208f
    • A
      Prevent memory starvation or a compiler crash due to an OutOfMemoryException... · f1770776
      AlekseyTs 提交于
      Prevent memory starvation or a compiler crash due to an OutOfMemoryException caused by constant folding for deeply nested constant string concatenation.
      
      To prevent memory starvation, especially inside a 64  bit process, we keep track of lengths of all (to a certain degree) constant string values stored in the bound expression tree that we are building and report an error as soon as the combined length of all of them is about to be greater than Int32.MaxValue. The length of the resulting constant value might still be shorter than Int32.MaxValue.
      
      ***NO_CI***
       (changeset 1395692)
      f1770776
  13. 09 1月, 2015 2 次提交
    • T
      Currently we include a method ordinal to the name of a synthesized member... · 74142c4f
      TomasMatousek 提交于
      Currently we include a method ordinal to the name of a synthesized member produced during lowering of the method. When a method is added during EnC in the middle of existing members the ordinal is not enough to avoid name conflicts with the previously emitted synthesized members.
           In order to guarantee uniqueness of the names we now include generation ordinal in synthesized names as well, wherever we use method ordinal. Generation ordinal 0 (regular build) is omitted - the additional number is only added to names of synthesized members created during EnC compilation.
      
           An alternative would be to find the highest existing ordinal and start indexing EnC members from there. Such approach would probably work but including the generation number is much simpler and imposes less constraints on the EnC compilation.
      
           In addition to including the generic ordinal this changeset also fixes a couple of bugs that were previously masked or we haven't had coverage of the scenarios:
           - the EnC changeset calculation was not properly handling additions of synthesized members into existing synthesized classes.
           - SymbolMatcher didn't map local variable types forward correctly for variables of synthesized types.
           - SymbolMatcher didn't handle generic static lambda display classes with generic. Currently we create generic parameters for these classes via alpha renaming of the type parameters of the top-level generic method. VB is constructing fresh generic parameters, which seems a better approach. I'll leave changing this to a follow-up changeset.
      
           As a byproduct of this change we can now enable editing of methods containing dynamic operations. It just works now! Each update of such method creates a new set of dynamic sites. We don't attempt to reuse existing sites. It's little bit wasteful but it also avoids the need of invalidating the call-site caches. (changeset 1393184)
      74142c4f
    • A
      Make tests passing on a non-English OS, even in presence of corresponding... · 673f18e1
      AlekseyTs 提交于
       Make tests passing on a non-English OS, even in presence of corresponding localized resources. In the process several product issues were fixed like:
           - Localized exception messages incorporated into diagnostics by command line compiler are not obeying /preferreduilang switch.
           - Some strings are loaded from resources at the time when diagnostic object is created. Resources are loaded earlier than they could be. When error message is requested, it might not be localized in accordance with the requested culture.
           - When target culture is not provided, DiagnosticInfo objects used as arguments within another diagnostic object are formatted using InvariantCulture, whereas all other arguments use current culture (as expected). Portions of the message are localized to different languages. (changeset 1392630)
      673f18e1
  14. 07 1月, 2015 5 次提交
    • M
      Fix for bug 1096600. · ed31ebb0
      manishv 提交于
      1) Add VB and C# compiler tests to verify that all configurable compiler diagnostics (non-errors) that show up in the ruleset editor have a non-null and non-empty Title and Category.
      2) Commented out some more unused diagnostic IDs in both compilers that were found through these tests.
      3) Add title resource strings for hidden and info compiler diagnostics. These are configurable and show up in the ruleset editor. (changeset 1390346)
      ed31ebb0
    • N
      Interpolated strings - multiple small changes · e2306f52
      nmgafter 提交于
      (1) The alignment expression is syntactically a general expression.
      (2) The alignment must be a constant int of magnitude less than 32768
      (3) Be resilient versus malignant mscorlib
      (4) Bug fixes
       (changeset 1389224)
      e2306f52
    • N
      nameof spec change - extension methods not supported · c152e330
      nmgafter 提交于
      The spec for how nameof should work in the face of extension methods is not really worked out, and the implementation is hacky and unlikely to align with an eventual rational specification. So we've decided to make it an error today so we can work out and implement some intentional rational behavior in the future without breaking backward compatibility. Nobody seems to use this particular intersection of features anyway. (changeset 1388917)
      c152e330
    • 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
    • A
      Diagnostic Titles for C# compiler warnings, plus some Descriptions · 806b177f
      AlexTurnMSFT 提交于
      This adds a per-rule Title for all C# and VB compiler warnings that have message strings.  These Titles will show up in the ruleset editor.
      
      This also includes Descriptions that show up upon expansion for a set of high-hit C# warnings.  I added Descriptions for high-hit warnings per MSDN.  The work is still pending to add the equivalent VB warning Descriptions.
      
      The principle was to basically restate the base Message string without its fill-ins as the Title, swapping in general words such as "method" and "type".  Often, just removing the fill-ins and quotes was enough, as the surrounding context already said what the code element was.  Sometimes the message needed to be reworded a bit.  I also left out any further clauses (such as "Consider ..."), except for shortened versions necessary to disambiguate similar warnings.  For now, I'm leaving such clauses in the messages themselves, using Description for longer-form explanations - we can see if we get feedback there.
      
      This should be the content work needed to ship the ruleset editor without blank titles.  There was one key bug remaining (now filed) where rules kept around solely to make previous /nowarns and #pragmas happy still show up in the ruleset editor.
      
      Remaining work:
      * Descriptions for VB compiler warnings
      * Titles/Descriptions for C#/VB compiler errors
      * Categories for VB/C# compiler warnings/errors (changeset 1387213)
      806b177f
  15. 24 12月, 2014 7 次提交
  16. 04 12月, 2014 1 次提交
  17. 21 11月, 2014 1 次提交
  18. 13 11月, 2014 1 次提交
    • H
      [Open] added new API in compiler · 9dd89b56
      heejaechang 提交于
           ContainsSymbolsWIthName and GetSymbolsWithName which can be used to either check whether certain name exist in the compilation without using symbol or get those symbols that has the name.
      
           also added corresponding API in workspace layer so that it can be used in IDE as well for things like SymbolFinder
      
           we are planning to use it further more in features such as "NavigateTo" (changeset 1370769)
      9dd89b56
  19. 07 11月, 2014 1 次提交
  20. 31 10月, 2014 1 次提交
  21. 17 10月, 2014 1 次提交
  22. 07 10月, 2014 1 次提交
    • T
      Introduces EmitOptions for options passed to Compilation.Emit(). · 1621a00f
      TomasMatousek 提交于
           Moves options that were previously on CompilationOptions but were not used until emit phase to EmitOptions: fileAlignment, baseAddress, highEntropyVirtualAddressSpace, subsystemVersion, runtimeMetadataVersion. They hold on values written to various PE headers. We can now easily add other similar PE flags to EmitOptions, which is a common customer request, without affecting code that works with compilation options in other layers (workspaces, project system, etc.).
      
           Removes EmitMeadataOnly method and instead adds a MetadataOnly flag to EmitOptions. Removes MetadataOnlyEmitOptions - they were not used and can now be easily added as bools to EmitOptions.
      
           Moves pdbFilePath and outputName from parameters of Emit to EmitOptions.
      
      IDE: remove tracking of options that were moved to EmitOptions, since the IDE doesn't care about options that don't affect compilation. (changeset 1348623)
      1621a00f
  23. 02 10月, 2014 6 次提交
    • V
      Implements a spec refinement to how autoprops behave in constructors. · 1a7ebab9
      VSadov 提交于
      For accesses to an autoprop in a corresponding [static|instance] constructor -
      
      (a) It should bind to the property, but the property should be treated as a readable/writable even if it is a readonly autoprop.
      (b) The definite assignment behavior should be as if directly accessing the backing field.
      (c) It should code gen to the property accessor (if one exists) or a field access (if not).
      
      The most observable outcome of all this is that it is possible to assign a readonly autoprop in the constructor and that
      in a struct instance constructor you no longer need to initialize whole struct before using any of its autoprops.
      
      The following code is now valid and does what you think it does:
      
      public struct S
      {
          public int X{get;}
          public int Y{get;}
      
          public S()
          {
              X = 42;
              Y = X;
          }
      
          public static void Main()
          {
              S s = new S();
              System.Console.WriteLine(s.Y);
          }
      }
      
      .
      
       (changeset 1346315)
      1a7ebab9
    • T
      Add doc for /checksumalgorithm command line option. · ad736dc9
      TomasMatousek 提交于
       (changeset 1346054)
      ad736dc9
    • A
      9d36a64a
    • J
      The Roslyn code base was terminating on a stack overflow in places where the... · 5ec2e9a8
      jaredpar 提交于
      The Roslyn code base was terminating on a stack overflow in places where the native compiler would issue a simple error. This is acceptable behavior for the command line compiler but troublesome for the IDE where it was causing Visual Studio to terminate on bad code. Simply pasting certain samples caused the IDE to vanish with data loss.
      
      This change uses RuntimeHelpers.EnsureSufficientStackSpace to help guard against this problem. This function will terminate with a recoverable exception if the CLR determines insufficient stack space is available for an average .Net function to execute.
      
      At the moment this function isn't available in the PCL hence reflection is needed. Once it becomes available the reflection will be removed and the hepler will be accessed directly. (changeset 1344040)
      5ec2e9a8
    • T
      763c91ef
    • N
      b7560fee