1. 20 1月, 2023 16 次提交
  2. 19 1月, 2023 24 次提交
    • A
      JIT: update bbNums before inverting loops (#80827) · ad9efe88
      Andy Ayers 提交于
      We use the bbNum to decide how to manipulate "in loop" edges when inverting
      loops, and this was sometimes misleading as the bbNums did not reflect block
      order.
      
      Per the code this is not a correctness issue, but needless redirections can
      confuse loop recognition.
      
      Fixes #80809.
      ad9efe88
    • V
      NativeAOT fixes around data flow analysis (#80694) · 04f9d132
      Vitek Karas 提交于
      Removes the `Origin` class as it doesn't seem to serve any purpose anymore. The code used it to basically just only call `GetDisplayName` on members and pass that as the `reason` to dependency analysis. Replaced with passing just string directly as the `reason`.
      
      Fixes bugs in warning subsystem when the warning is generated from an origin which is a module or assembly. This would previously crash the compiler. There are basically no tests for this right now - some of the tests in linker which hit this can't be easily ported yet due to NativeAOT not producing "reflection access to DAM" warnings. I have these mostly working locally but enabling the warnings fails some tests outside of the linker ones, so it needs more work.
      
      Fixes analysis bugs when methods or fields are accessed via `ldtoken` or `ldftn` instructions. In such cases we still need to process them for RUC and DAM based warnings and so on. There are only a few tests for this in this change - more will come when we port the `AnnotatedMembersAccessedViaReflection` from linker, but those all require to enable the "reflection access to DAM" warnings as mentioned above.
      * This required addition of a new TrimAnalysisPattern since the processing happens in reflection scanning and all warnings/marking hapening from there must go through the patterns.
      
      Changes `DynamicDependencyAttribute` processing to happen in a separate dependency node. Previously if there were warnings generated due to the `DynamicDependencyAttribute` the compiler may report them multiple times (if it hit the same member twice during the rest of the analysis). To avoid this, the processing is postponed by adding a new dependency node - which then acts as the unification mechanism and thus warnings are produced just once.
      04f9d132
    • A
      a991b998
    • E
      LambdaExpression.CanCompileToIL should respect IsDynamicCodeSupported (#80759) · 29075ba7
      Eric Erhardt 提交于
      * LambdaExpression.CanCompileToIL should respect IsDynamicCodeSupported
      
      With the new feature switch added in https://github.com/dotnet/runtime/issues/39806, calling LambdaExpression.Compile is throwing a PlatformNotSupportedException. Instead, LambdaExpression should respect IsDynamicCodeSupported and switch to using the interpreter when IsDynamicCodeSupported is false.
      
      * Add tests
      29075ba7
    • J
      Fix dynamic class zeroing (#80822) · 620099d9
      Jan Vorlicek 提交于
      Recent change in the `ThreadLocalModule::AllocateDynamicClass` has
      accidentally removed zeroing for new  CollectibleDynamicEntry instances.
      That leads to crashes when running code in an unloadable context.
      
      This change fixes that.
      620099d9
    • E
    • I
    • V
      [mono][interp] Properly initialize fields of LocalValue (#80795) · b62bbdd2
      Vlad Brezae 提交于
      We were storing uninitialized values. Bug caught with valgrind, hopefully fixes some real crashes.
      b62bbdd2
    • M
      Remove `CustomAttributeData` usage in IsByRefLike (#80841) · 6619e1b9
      Michal Strehovský 提交于
      Grabbing custom attribute data brings the entire reflection stack (we need properties, constructors, fields, methods).
      
      We ask `IsByRefLike` in type loader constraint validation. Ideally we should be able to get rid of the type loader from a hello world, but that's for later. This is a more efficient implementation either way.
      6619e1b9
    • M
      Remove uses of `TypeInfo` from the reflection stack (#80833) · 88ab5ba6
      Michal Strehovský 提交于
      Contributes to #80165.
      
      Not aware of a good reason to keep using it. Removes `TypeDelegator` from apps that don't use it. Saves 7 kB (but also stepping stone for the larger savings later).
      88ab5ba6
    • J
      Remove the TypeKey concept as the primary user for the concept is unable to... · 170587e4
      Jeremy Koritzinsky 提交于
      Remove the TypeKey concept as the primary user for the concept is unable to use it effectively. (#79418)
      
      170587e4
    • M
      Make TypeComponentsCache trimmable (#80726) · fa19917a
      Michal Strehovský 提交于
      Contributes to #80165.
      
      Dispensing of reflection member infos is done through a member policies class. This is a generic class that has specialized implementations for each kind of member info.
      
      It used a clever trick to get to the specific implementations. Just access `MemberPolicies<EventInfo>.Default` to get one for events or `MemberPolicies<PropertyInfo>.Default` to get one for properties. It was also absolutely not trimming friendly.
      
      This change removes the clever trick and replaces it with good old fashioned parameter passing.
      fa19917a
    • L
      Make WriteCommentValue overloads have same behavior (#75074) · d9a7c283
      LateApexEarlySpeed 提交于
      Squashed commit of the following:
      
      commit e89bcfe2d8c3f45232f3d0b861be34ccede948f1
      Author: lateapexearlyspeed <lateapexearlyspeed@163.com>
      Date:   Wed Nov 9 11:56:41 2022 +0800
      
          Change comment behavior: add newline between comments.
      
      commit 60d730ae151c9c2bffdaf7b6ca3cfa68180ba8b8
      Author: lateapexearlyspeed <lateapexearlyspeed@163.com>
      Date:   Thu Oct 27 15:36:43 2022 +0800
      
          Fix comment: test multiple comments in same line.
      
      commit 977e76a298e52ad184adf78ab7172be99b97b9e2
      Merge: 64b6be97fd4 9b9b0c95
      Author: LateApexEarlySpeed <72254037+lateapexearlyspeed@users.noreply.github.com>
      Date:   Fri Sep 23 12:56:01 2022 +0800
      
          Merge branch 'main' into lateapexearlyspeed-MakeWriteCommentValueOverloadSameBehavior
      
      commit 64b6be97fd4c9b59fc601db8a0e6ddd8a8b97a7f
      Author: lateapexearlyspeed <lateapexearlyspeed@163.com>
      Date:   Thu Sep 22 10:39:32 2022 +0800
      
          Fix comment: keep newtonsoft.json asserting tests; add non-indented tests; use pattern match.
      
      commit e3a772ac985801eb89abc028f5a71f2ad502cd55
      Author: lateapexearlyspeed <lateapexearlyspeed@163.com>
      Date:   Tue Sep 20 16:20:59 2022 +0800
      
          Inline expectedIndentedJson to local var.
      
      commit 9e16463cc8826890e6fbeb115ba9a05867ee5017
      Author: lateapexearlyspeed <lateapexearlyspeed@163.com>
      Date:   Tue Sep 20 11:46:44 2022 +0800
      
          Fix comment: update test cases to use string literal to assert.
      
      commit bebb09c0c9bc7b7b1c5076ab6dbcf1f5ec1d884a
      Author: lateapexearlyspeed <lateapexearlyspeed@163.com>
      Date:   Thu Sep 15 17:56:44 2022 +0800
      
          Add tests.
      
      commit 2f9dbff3629f0b9b8b24f2bb2c32ec9c620a6fcd
      Author: lateapexearlyspeed <lateapexearlyspeed@163.com>
      Date:   Wed Sep 7 11:01:11 2022 +0800
      
          Add NewLine between comment and start of (object and array).
      
      commit 9c1bb280f59e3755227747251a1a51fdca9eeab1
      Author: lateapexearlyspeed <lateapexearlyspeed@163.com>
      Date:   Mon Sep 5 15:11:57 2022 +0800
      
          Make WriteCommentValue() overloads have same behavior.
      d9a7c283
    • B
      Add missing license header (#80802) · fead33bd
      Bruce Forstall 提交于
      fead33bd
    • A
      JIT: fix remaining phases that were rebuilding pred edges (#80769) · 7f3f5ef7
      Andy Ayers 提交于
      Loop canonicalization now maintains pred edges. GC poll insertion was already
      maintaining the edges but was rebuilding them anyways.
      
      Now pred lists are never rebuilt.
      
      Also revise `fgUpdateChangedFlowGraph` so that it no longer has the
      ability to remove or rebuild.
      
      Fixes #49030.
      Also fixes #80772.
      7f3f5ef7
    • T
      [wasm][debug]Press alt-shift-d and open firefox debug tab attached to the blazor app (#80722) · 38ac3509
      Thays Grazia 提交于
      * press alt-shift-d and open tab to debug blazor app on firefox.
      
      * Update src/mono/wasm/debugger/BrowserDebugProxy/Firefox/FirefoxDebuggerProxy.cs
      Co-authored-by: NAnkit Jain <radical@gmail.com>
      
      * addressing @radical comments
      Co-authored-by: NAnkit Jain <radical@gmail.com>
      38ac3509
    • J
      Switch to using the .NET SDK properties that are defined to provide the TFM... · 729f22cf
      Jeremy Koritzinsky 提交于
      Switch to using the .NET SDK properties that are defined to provide the TFM instead of using the assembly that defines System.Object (#80646)
      
      Fixes https://github.com/dotnet/runtime/issues/80621
      729f22cf
    • D
      [main] Update dependencies from dotnet/roslyn (#80656) · e6bb6761
      dotnet-maestro[bot] 提交于
      * Update dependencies from https://github.com/dotnet/roslyn build 20230113.14
      
      Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
       From Version 4.6.0-1.23058.1 -> To Version 4.6.0-1.23063.14
      
      * Update dependencies from https://github.com/dotnet/roslyn build 20230116.1
      
      Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
       From Version 4.6.0-1.23058.1 -> To Version 4.6.0-1.23066.1
      
      * Update dependencies from https://github.com/dotnet/roslyn build 20230117.16
      
      Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
       From Version 4.6.0-1.23058.1 -> To Version 4.6.0-1.23067.16
      Co-authored-by: Ndotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
      e6bb6761
    • A
      Implement Startup hooks support in Mono; refactor StartupHookProvider (#80391) · 3c3cc449
      Aleksey Kliger (λgeek) 提交于
      Fixes #47462 
      
      **CoreCLR** This also makes some changes to CoreCLR to decouple EventPipe and startup hooks. Presently if startup hooks are disabled, `RuntimeEventSource.Initialize` is never called.  The PR makes the two features independent by moving runtime event source initialization out of the startup hook feature check.
      
      * Implement startup hooks support in Mono
      
      * Keep StartupHookProvider.ProcessStartupHooks under feature flag
      
      * Don't catch/cleanup the exceptions from startup hooks.
      
      * Add an ios simulator startup hook functional test
      
      * Implement Android functional test
      
      * Add WASM functional test
      
      * Make a single managed startup method for CoreCLR
      
      A common configuration for coreclr is event source enabled, startup
      hooks disabled, so at least one managed call is inevitable.  Since we
      have to call into managed no matter what, let the trimmer determine
      what happens once we get there.
      
      This is different from mono where published trimmed apps may have both
      startup hooks and event source disabled.  In that case we would rather
      avoid a managed call to an empty method early in startup.
      
      * fix build and line damage
      3c3cc449
    • J
      JIT: Streamline TreeLifeUpdater (#80611) · 47f171e0
      Jakob Botsch Nielsen 提交于
      TreeLifeUpdater at most needs to flip 4 bits in two liveness sets when
      it is called, however before this change it uses several full width
      bitset operations to do this. This changes TreeLifeUpdater to do its job
      in a much more direct way by updating the liveness sets directly.
      47f171e0
    • J
      SPMI: Update -metrics passthrough (#80775) · d5f66053
      Jakob Botsch Nielsen 提交于
      jit-analyze no longer accepts comma-separated metrics after
      https://github.com/dotnet/jitutils/pull/362, instead requiring each
      metric to be specified separately on the command line.
      d5f66053
    • M
      Add AVX2 support to IndexOfAnyValues (#78863) · 4e0195e0
      Miha Zupan 提交于
      4e0195e0
    • M
      Fix recent IndexOf regressions (#80779) · c956f69b
      Miha Zupan 提交于
      * Improve IndexOf codegen for non-char types
      
      * Call directly into NonPackedIndexOf where it makes sense
      c956f69b
    • T
      add unsupported attributes to System.Net.Security (#80717) · cdf90c63
      Tomas Weinfurt 提交于
      * add unsupported attributes to System.Net.Security
      
      * using
      
      * CA1416
      cdf90c63