Skip to content

Commit 1209dde

Browse files
Add better explanation to AnalysisCharacteristicAttribute (#118799)
1 parent c270c9e commit 1209dde

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/AnalysisCharacteristicAttribute.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
namespace System.Runtime.CompilerServices
55
{
66
// When applied to an intrinsic method, the method will become a characteristic check.
7+
//
8+
// The method needs to return bool and have no parameters.
9+
//
10+
// The compiler will replace the body of the method with a constant true/false depending
11+
// on whether the characteristic (tag) was added to the whole program view.
12+
// The name of the characteristic is the name of the method.
13+
// Compiler can add characteristics to the whole program view using the
14+
// NodeFactory.AnalysisCharacteristic(string) method.
715
[AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
816
internal class AnalysisCharacteristicAttribute : Attribute
917
{

0 commit comments

Comments
 (0)