diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index fca2803d533ab7..4ff6f4254361ca 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -15,7 +15,7 @@
]
},
"microsoft.dotnet.xharness.cli": {
- "version": "8.0.0-prerelease.23272.1",
+ "version": "8.0.0-prerelease.23279.1",
"commands": [
"xharness"
]
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 6cff61033ba5bd..22648cbe1e4e8d 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -96,3 +96,8 @@
/docs/project/list-of-diagnostics.md @jeffhandley
/src/libraries/Common/src/System/Obsoletions.cs @jeffhandley
+
+# Area ownership and repo automation
+/docs/area-owners.* @jeffhandley
+/docs/issue*.md @jeffhandley
+/.github/fabricbot.json @jeffhandley
diff --git a/.github/fabricbot.json b/.github/fabricbot.json
index e637dff84057ca..0d44054e037e81 100644
--- a/.github/fabricbot.json
+++ b/.github/fabricbot.json
@@ -2595,7 +2595,7 @@
"subCapability": "IssueCommentResponder",
"version": "1.0",
"config": {
- "taskName": "Replace `needs-author-action` label with `needs-further-triage` label when the author comments on an issue",
+ "taskName": "Replace `needs-author-action` label with `needs-further-triage` label when the author comments on an issue that is not still untriaged",
"actions": [
{
"name": "addLabel",
@@ -2637,6 +2637,74 @@
"label": "needs-author-action"
}
},
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "untriaged"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isOpen",
+ "parameters": {}
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssueCommentResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "Remove `needs-author-action` label when the author comments on an `untriaged` issue",
+ "actions": [
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issue_comment"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "created"
+ }
+ },
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": {
+ "type": "author"
+ }
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "untriaged"
+ }
+ },
{
"name": "isOpen",
"parameters": {}
@@ -4101,6 +4169,77 @@
}
}
]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
@@ -4242,6 +4381,77 @@
}
}
]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
@@ -4356,47 +4566,52 @@
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
+ "name": "isOpen",
"parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
- }
- ]
- }
- ]
- }
- }
- },
- {
- "taskSource": "fabricbot-config",
- "taskType": "trigger",
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssueCommentResponder",
"version": "1.0",
@@ -4434,37 +4649,42 @@
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
+ "name": "isOpen",
"parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -4512,37 +4732,42 @@
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
+ "name": "isOpen",
"parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -4590,37 +4815,42 @@
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
+ "name": "isOpen",
"parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -4632,23 +4862,22 @@
"taskSource": "fabricbot-config",
"taskType": "trigger",
"capabilityId": "IssueResponder",
- "subCapability": "PullRequestResponder",
+ "subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Adam / David - PRs] Closed, Merged, or Moved",
+ "taskName": "[Area Pod: Adam / David - Issue Triage] Excluded",
"actions": [
{
- "name": "moveToProjectColumn",
+ "name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
- "columnName": "Done",
+ "projectName": "Area Pod: Adam / David - Issue Triage",
"isOrgProject": true
}
}
],
- "eventType": "pull_request",
+ "eventType": "issue",
"eventNames": [
- "pull_request"
+ "issues"
],
"conditions": {
"operator": "and",
@@ -4656,149 +4885,48 @@
{
"name": "isInProject",
"parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
+ "projectName": "Area Pod: Adam / David - Issue Triage",
"isOrgProject": true
}
},
{
- "operator": "not",
+ "operator": "or",
"operands": [
{
- "name": "isInProjectColumn",
+ "name": "hasLabel",
"parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
- "columnName": "Done",
- "isOrgProject": true
+ "label": "os-android"
}
- }
- ]
- },
- {
- "operator": "or",
- "operands": [
+ },
{
- "operator": "not",
- "operands": [
- {
- "name": "isOpen",
- "parameters": {}
- }
- ]
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
},
{
- "operator": "and",
- "operands": [
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-Extensions-Caching"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-Extensions-FileSystem"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Console"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Diagnostics.Process"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Formats.Asn1"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Formats.Cbor"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.IO"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.IO.Hashing"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Linq.Parallel"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Security"
- }
- }
- ]
- }
- ]
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
}
]
}
@@ -4810,16 +4938,15 @@
"taskSource": "fabricbot-config",
"taskType": "trigger",
"capabilityId": "IssueResponder",
- "subCapability": "PullRequestResponder",
+ "subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Adam / David - PRs] New PR Needs Champion",
+ "taskName": "[Area Pod: Adam / David - PRs] Moved to Another Area",
"actions": [
{
- "name": "addToProject",
+ "name": "removeFromProject",
"parameters": {
"projectName": "Area Pod: Adam / David - PRs",
- "columnName": "Needs Champion",
"isOrgProject": true
}
}
@@ -4832,85 +4959,48 @@
"operator": "and",
"operands": [
{
- "name": "isAction",
- "parameters": {
- "action": "opened"
- }
- },
- {
- "operator": "or",
+ "operator": "and",
"operands": [
{
- "name": "hasLabel",
- "parameters": {
- "label": "area-Extensions-Caching"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-Extensions-FileSystem"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Console"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Diagnostics.Process"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Formats.Asn1"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Formats.Cbor"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.IO"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-Caching"
+ }
+ }
+ ]
},
{
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.IO.Hashing"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-FileSystem"
+ }
+ }
+ ]
},
{
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Linq.Parallel"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Console"
+ }
+ }
+ ]
},
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Security"
- }
- }
- ]
- },
- [
- [
{
"operator": "not",
"operands": [
{
- "name": "isAssignedToUser",
+ "name": "hasLabel",
"parameters": {
- "user": "adamsitnik"
+ "label": "area-System.Diagnostics.Process"
}
}
]
@@ -4919,22 +5009,20 @@
"operator": "not",
"operands": [
{
- "name": "isActivitySender",
+ "name": "hasLabel",
"parameters": {
- "user": "adamsitnik"
+ "label": "area-System.Formats.Asn1"
}
}
]
- }
- ],
- [
+ },
{
"operator": "not",
"operands": [
{
- "name": "isAssignedToUser",
+ "name": "hasLabel",
"parameters": {
- "user": "jozkee"
+ "label": "area-System.Formats.Cbor"
}
}
]
@@ -4943,39 +5031,60 @@
"operator": "not",
"operands": [
{
- "name": "isActivitySender",
+ "name": "hasLabel",
"parameters": {
- "user": "jozkee"
+ "label": "area-System.IO"
}
}
]
- }
- ]
- ],
- {
- "operator": "or",
- "operands": [
+ },
{
"operator": "not",
"operands": [
{
- "name": "isInProject",
+ "name": "hasLabel",
"parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
- "isOrgProject": true
+ "label": "area-System.IO.Hashing"
}
}
]
},
{
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
- "columnName": "Done",
- "isOrgProject": true
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Linq.Parallel"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Security"
+ }
+ }
+ ]
}
]
+ },
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "unlabeled"
+ }
+ },
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "isOrgProject": true
+ }
}
]
}
@@ -4988,20 +5097,13 @@
"subCapability": "PullRequestResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Adam / David - PRs] Updated PR Needs Champion",
+ "taskName": "[Area Pod: Adam / David - PRs] Closed, Merged, or Moved",
"actions": [
{
- "name": "removeFromProject",
- "parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
- "isOrgProject": true
- }
- },
- {
- "name": "addToProject",
+ "name": "moveToProjectColumn",
"parameters": {
"projectName": "Area Pod: Adam / David - PRs",
- "columnName": "Needs Champion",
+ "columnName": "Done",
"isOrgProject": true
}
}
@@ -5014,20 +5116,189 @@
"operator": "and",
"operands": [
{
- "name": "isOpen",
- "parameters": {}
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "isOrgProject": true
+ }
},
{
"operator": "not",
"operands": [
{
- "name": "isAction",
+ "name": "isInProjectColumn",
"parameters": {
- "action": "opened"
+ "projectName": "Area Pod: Adam / David - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
}
}
]
},
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isOpen",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-Caching"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-FileSystem"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Console"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Diagnostics.Process"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Formats.Asn1"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Formats.Cbor"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.IO"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.IO.Hashing"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Linq.Parallel"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Security"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Adam / David - PRs] New PR Needs Champion",
+ "actions": [
+ {
+ "name": "addToProject",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "columnName": "Needs Champion",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "opened"
+ }
+ },
{
"operator": "or",
"operands": [
@@ -5093,39 +5364,67 @@
}
]
},
- {
- "operator": "not",
- "operands": [
- {
- "name": "isAssignedToUser",
- "parameters": {
- "user": "adamsitnik"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isAssignedToUser",
- "parameters": {
- "user": "jozkee"
- }
- }
- ]
- },
- {
- "operator": "or",
- "operands": [
+ [
+ [
{
"operator": "not",
"operands": [
{
- "name": "isInProject",
+ "name": "isAssignedToUser",
"parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
- "isOrgProject": true
+ "user": "adamsitnik"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "adamsitnik"
+ }
+ }
+ ]
+ }
+ ],
+ [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isAssignedToUser",
+ "parameters": {
+ "user": "jozkee"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "jozkee"
+ }
+ }
+ ]
+ }
+ ]
+ ],
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "isOrgProject": true
}
}
]
@@ -5139,6 +5438,77 @@
}
}
]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
@@ -5151,7 +5521,7 @@
"subCapability": "PullRequestResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Adam / David - PRs] Adam Assigned as Champion",
+ "taskName": "[Area Pod: Adam / David - PRs] Updated PR Needs Champion",
"actions": [
{
"name": "removeFromProject",
@@ -5164,7 +5534,7 @@
"name": "addToProject",
"parameters": {
"projectName": "Area Pod: Adam / David - PRs",
- "columnName": "Champion: Adam",
+ "columnName": "Needs Champion",
"isOrgProject": true
}
}
@@ -5180,6 +5550,17 @@
"name": "isOpen",
"parameters": {}
},
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "opened"
+ }
+ }
+ ]
+ },
{
"operator": "or",
"operands": [
@@ -5246,63 +5627,1062 @@
]
},
{
- "operator": "or",
+ "operator": "not",
"operands": [
{
"name": "isAssignedToUser",
"parameters": {
"user": "adamsitnik"
}
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isAssignedToUser",
+ "parameters": {
+ "user": "jozkee"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "isOrgProject": true
+ }
+ }
+ ]
},
{
- "operator": "and",
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Adam / David - PRs] Adam Assigned as Champion",
+ "actions": [
+ {
+ "name": "removeFromProject",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "isOrgProject": true
+ }
+ },
+ {
+ "name": "addToProject",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "columnName": "Champion: Adam",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-Caching"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-FileSystem"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Console"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Diagnostics.Process"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Formats.Asn1"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Formats.Cbor"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.IO"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.IO.Hashing"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Linq.Parallel"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Security"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "isAssignedToUser",
+ "parameters": {
+ "user": "adamsitnik"
+ }
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "opened"
+ }
+ },
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "adamsitnik"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "columnName": "Needs Champion",
+ "isOrgProject": true
+ }
+ },
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Adam / David - PRs] David Assigned as Champion",
+ "actions": [
+ {
+ "name": "removeFromProject",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "isOrgProject": true
+ }
+ },
+ {
+ "name": "addToProject",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "columnName": "Champion: David",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-Caching"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-FileSystem"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Console"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Diagnostics.Process"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Formats.Asn1"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Formats.Cbor"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.IO"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.IO.Hashing"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Linq.Parallel"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Security"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "isAssignedToUser",
+ "parameters": {
+ "user": "jozkee"
+ }
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "opened"
+ }
+ },
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "jozkee"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "columnName": "Needs Champion",
+ "isOrgProject": true
+ }
+ },
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Adam / David - PRs] Excluded",
+ "actions": [
+ {
+ "name": "removeFromProject",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "isOrgProject": true
+ }
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Adam / David - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssuesOnlyResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Moved to Another Area",
+ "actions": [
+ {
+ "name": "removeFromProject",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issues"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-DependencyInjection"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-Hosting"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.CodeDom"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.ComponentModel"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.ComponentModel.Composition"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Composition"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Configuration"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Reflection"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Reflection.Emit"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Reflection.Metadata"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Resources"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Text.RegularExpressions"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.DirectoryServices"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "unlabeled"
+ }
+ },
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
+ "isOrgProject": true
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssuesOnlyResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Needs Triage",
+ "actions": [
+ {
+ "name": "removeFromProject",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
+ "isOrgProject": true
+ }
+ },
+ {
+ "name": "addToProject",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
+ "columnName": "Needs Triage",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issues"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-DependencyInjection"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-Hosting"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.CodeDom"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.ComponentModel"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.ComponentModel.Composition"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Composition"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Configuration"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Reflection"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Reflection.Emit"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Reflection.Metadata"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Resources"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Text.RegularExpressions"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.DirectoryServices"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "reopened"
+ }
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-Extensions-DependencyInjection"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-Extensions-Hosting"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.CodeDom"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.ComponentModel"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.ComponentModel.Composition"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.Composition"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.Configuration"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.Reflection"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.Reflection.Emit"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.Reflection.Metadata"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.Resources"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.Text.RegularExpressions"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.DirectoryServices"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
+ "isOrgProject": true,
+ "columnName": "Triaged"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
"operands": [
{
- "name": "isAction",
+ "name": "hasLabel",
"parameters": {
- "action": "opened"
+ "label": "os-tizen"
}
- },
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
{
- "name": "isActivitySender",
+ "name": "hasLabel",
"parameters": {
- "user": "adamsitnik"
+ "label": "os-tvos"
}
}
]
- }
- ]
- },
- {
- "operator": "or",
- "operands": [
+ },
{
"operator": "not",
"operands": [
{
- "name": "isInProject",
+ "name": "hasLabel",
"parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
- "isOrgProject": true
+ "label": "arch-wasm"
}
}
]
- },
- {
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
- "columnName": "Needs Champion",
- "isOrgProject": true
- }
- },
- {
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
- "columnName": "Done",
- "isOrgProject": true
- }
}
]
}
@@ -5314,131 +6694,132 @@
"taskSource": "fabricbot-config",
"taskType": "trigger",
"capabilityId": "IssueResponder",
- "subCapability": "PullRequestResponder",
+ "subCapability": "IssueCommentResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Adam / David - PRs] David Assigned as Champion",
+ "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Needs Further Triage",
"actions": [
{
"name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
"isOrgProject": true
}
},
{
"name": "addToProject",
"parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
- "columnName": "Champion: David",
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
+ "columnName": "Needs Triage",
"isOrgProject": true
}
}
],
- "eventType": "pull_request",
+ "eventType": "issue",
"eventNames": [
- "pull_request"
+ "issue_comment"
],
"conditions": {
"operator": "and",
"operands": [
- {
- "name": "isOpen",
- "parameters": {}
- },
{
"operator": "or",
"operands": [
{
"name": "hasLabel",
"parameters": {
- "label": "area-Extensions-Caching"
+ "label": "area-Extensions-DependencyInjection"
}
},
{
"name": "hasLabel",
"parameters": {
- "label": "area-Extensions-FileSystem"
+ "label": "area-Extensions-Hosting"
}
},
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.Console"
+ "label": "area-System.CodeDom"
}
},
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.Diagnostics.Process"
+ "label": "area-System.ComponentModel"
}
},
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.Formats.Asn1"
+ "label": "area-System.ComponentModel.Composition"
}
},
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.Formats.Cbor"
+ "label": "area-System.Composition"
}
},
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.IO"
+ "label": "area-System.Configuration"
}
},
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.IO.Hashing"
+ "label": "area-System.Reflection"
}
},
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.Linq.Parallel"
+ "label": "area-System.Reflection.Emit"
}
},
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.Security"
+ "label": "area-System.Reflection.Metadata"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Resources"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Text.RegularExpressions"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.DirectoryServices"
}
}
]
},
{
- "operator": "or",
+ "operator": "not",
"operands": [
{
- "name": "isAssignedToUser",
- "parameters": {
- "user": "jozkee"
- }
- },
- {
- "operator": "and",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "opened"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "jozkee"
- }
- }
- ]
+ "name": "isCloseAndComment",
+ "parameters": {}
}
]
},
+ {
+ "name": "activitySenderHasPermissions",
+ "parameters": {
+ "permissions": "read"
+ }
+ },
{
"operator": "or",
"operands": [
@@ -5448,7 +6829,7 @@
{
"name": "isInProject",
"parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
"isOrgProject": true
}
}
@@ -5457,136 +6838,23 @@
{
"name": "isInProjectColumn",
"parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
- "columnName": "Needs Champion",
- "isOrgProject": true
- }
- },
- {
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Adam / David - PRs",
- "columnName": "Done",
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
+ "columnName": "Triaged",
"isOrgProject": true
}
- }
- ]
- }
- ]
- }
- }
- },
- {
- "taskSource": "fabricbot-config",
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
- "version": "1.0",
- "config": {
- "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Moved to Another Area",
- "actions": [
- {
- "name": "removeFromProject",
- "parameters": {
- "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "isOrgProject": true
- }
- }
- ],
- "eventType": "issue",
- "eventNames": [
- "issues"
- ],
- "conditions": {
- "operator": "and",
- "operands": [
- {
- "operator": "and",
- "operands": [
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-Extensions-DependencyInjection"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-Extensions-Hosting"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.CodeDom"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.ComponentModel"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.ComponentModel.Composition"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Composition"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Configuration"
- }
- }
- ]
- },
+ }
+ ]
+ },
+ {
+ "operator": "and",
+ "operands": [
{
"operator": "not",
"operands": [
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.Reflection"
+ "label": "os-android"
}
}
]
@@ -5597,7 +6865,7 @@
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.Reflection.Emit"
+ "label": "os-maccatalyst"
}
}
]
@@ -5608,7 +6876,7 @@
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.Reflection.Metadata"
+ "label": "os-ios"
}
}
]
@@ -5619,7 +6887,7 @@
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.Resources"
+ "label": "os-tizen"
}
}
]
@@ -5630,7 +6898,7 @@
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.Text.RegularExpressions"
+ "label": "os-tvos"
}
}
]
@@ -5641,25 +6909,12 @@
{
"name": "hasLabel",
"parameters": {
- "label": "area-System.DirectoryServices"
+ "label": "arch-wasm"
}
}
]
}
]
- },
- {
- "name": "isAction",
- "parameters": {
- "action": "unlabeled"
- }
- },
- {
- "name": "isInProject",
- "parameters": {
- "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "isOrgProject": true
- }
}
]
}
@@ -5672,21 +6927,20 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Needs Triage",
+ "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Triaged",
"actions": [
{
- "name": "removeFromProject",
+ "name": "addToProject",
"parameters": {
"projectName": "Area Pod: Buyaa / Steve - Issue Triage",
+ "columnName": "Triaged",
"isOrgProject": true
}
},
{
- "name": "addToProject",
+ "name": "removeLabel",
"parameters": {
- "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "columnName": "Needs Triage",
- "isOrgProject": true
+ "label": "untriaged"
}
}
],
@@ -5697,228 +6951,120 @@
"conditions": {
"operator": "and",
"operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
+ "isOrgProject": true
+ }
+ },
{
"operator": "or",
"operands": [
{
- "operator": "and",
- "operands": [
- {
- "operator": "or",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-Extensions-DependencyInjection"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-Extensions-Hosting"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.CodeDom"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.ComponentModel"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.ComponentModel.Composition"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Composition"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Configuration"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Reflection"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Reflection.Emit"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Reflection.Metadata"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Resources"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Text.RegularExpressions"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.DirectoryServices"
- }
- }
- ]
- },
- {
- "operator": "or",
- "operands": [
- {
- "name": "isAction",
- "parameters": {
- "action": "reopened"
- }
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isInMilestone",
- "parameters": {}
- }
- ]
- }
- ]
- }
- ]
+ "name": "addedToMilestone",
+ "parameters": {}
},
{
- "operator": "or",
- "operands": [
- {
- "name": "labelAdded",
- "parameters": {
- "label": "area-Extensions-DependencyInjection"
- }
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "area-Extensions-Hosting"
- }
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "area-System.CodeDom"
- }
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "area-System.ComponentModel"
- }
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "area-System.ComponentModel.Composition"
- }
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "area-System.Composition"
- }
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "area-System.Configuration"
- }
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "area-System.Reflection"
- }
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "area-System.Reflection.Emit"
- }
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "area-System.Reflection.Metadata"
- }
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "area-System.Resources"
- }
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "area-System.Text.RegularExpressions"
- }
- },
- {
- "name": "labelAdded",
- "parameters": {
- "label": "area-System.DirectoryServices"
- }
- }
- ]
+ "name": "labelAdded",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ },
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "closed"
+ }
}
]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssuesOnlyResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Buyaa Updated Issue",
+ "actions": [
+ {
+ "name": "moveToProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
+ "columnName": "Triage: Buyaa",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issues"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
+ "isOrgProject": true,
+ "columnName": "Needs Triage"
+ }
},
{
- "name": "isOpen",
- "parameters": {}
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "buyaa-n"
+ }
},
{
- "operator": "or",
+ "operator": "and",
"operands": [
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
{
"operator": "not",
"operands": [
{
- "name": "isInProject",
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
"parameters": {
- "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "isOrgProject": true
+ "label": "needs-author-action"
}
}
]
},
{
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "isOrgProject": true,
- "columnName": "Triaged"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -5933,20 +7079,13 @@
"subCapability": "IssueCommentResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Needs Further Triage",
+ "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Buyaa Commented",
"actions": [
{
- "name": "removeFromProject",
- "parameters": {
- "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "isOrgProject": true
- }
- },
- {
- "name": "addToProject",
+ "name": "moveToProjectColumn",
"parameters": {
"projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "columnName": "Needs Triage",
+ "columnName": "Triage: Buyaa",
"isOrgProject": true
}
}
@@ -5959,125 +7098,56 @@
"operator": "and",
"operands": [
{
- "operator": "or",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-Extensions-DependencyInjection"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-Extensions-Hosting"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.CodeDom"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.ComponentModel"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.ComponentModel.Composition"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Composition"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Configuration"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Reflection"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Reflection.Emit"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Reflection.Metadata"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Resources"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.Text.RegularExpressions"
- }
- },
- {
- "name": "hasLabel",
- "parameters": {
- "label": "area-System.DirectoryServices"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isCloseAndComment",
- "parameters": {}
- }
- ]
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
+ "isOrgProject": true,
+ "columnName": "Needs Triage"
+ }
},
{
- "name": "activitySenderHasPermissions",
+ "name": "isActivitySender",
"parameters": {
- "permissions": "read"
+ "user": "buyaa-n"
}
},
{
- "operator": "or",
+ "operator": "and",
"operands": [
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
{
"operator": "not",
"operands": [
{
- "name": "isInProject",
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
"parameters": {
- "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "isOrgProject": true
+ "label": "needs-author-action"
}
}
]
},
{
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "columnName": "Triaged",
- "isOrgProject": true
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -6092,21 +7162,15 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Triaged",
+ "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Steve H Updated Issue",
"actions": [
{
- "name": "addToProject",
+ "name": "moveToProjectColumn",
"parameters": {
"projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "columnName": "Triaged",
+ "columnName": "Triage: Steve H",
"isOrgProject": true
}
- },
- {
- "name": "removeLabel",
- "parameters": {
- "label": "untriaged"
- }
}
],
"eventType": "issue",
@@ -6117,36 +7181,56 @@
"operator": "and",
"operands": [
{
- "name": "isInProject",
+ "name": "isInProjectColumn",
"parameters": {
"projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "isOrgProject": true
+ "isOrgProject": true,
+ "columnName": "Needs Triage"
}
},
{
- "operator": "or",
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "steveharter"
+ }
+ },
+ {
+ "operator": "and",
"operands": [
{
- "name": "addedToMilestone",
+ "name": "isOpen",
"parameters": {}
},
{
- "name": "labelAdded",
- "parameters": {
- "label": "needs-author-action"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
},
{
- "name": "labelAdded",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
},
{
- "name": "isAction",
- "parameters": {
- "action": "closed"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -6158,23 +7242,23 @@
"taskSource": "fabricbot-config",
"taskType": "trigger",
"capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
+ "subCapability": "IssueCommentResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Buyaa Updated Issue",
+ "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Steve H Commented",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
"projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "columnName": "Triage: Buyaa",
+ "columnName": "Triage: Steve H",
"isOrgProject": true
}
}
],
"eventType": "issue",
"eventNames": [
- "issues"
+ "issue_comment"
],
"conditions": {
"operator": "and",
@@ -6190,41 +7274,46 @@
{
"name": "isActivitySender",
"parameters": {
- "user": "buyaa-n"
+ "user": "steveharter"
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
+ "name": "isOpen",
"parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -6236,72 +7325,70 @@
"taskSource": "fabricbot-config",
"taskType": "trigger",
"capabilityId": "IssueResponder",
- "subCapability": "IssueCommentResponder",
+ "subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Buyaa Commented",
+ "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Excluded",
"actions": [
{
- "name": "moveToProjectColumn",
+ "name": "removeFromProject",
"parameters": {
"projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "columnName": "Triage: Buyaa",
"isOrgProject": true
}
}
],
"eventType": "issue",
"eventNames": [
- "issue_comment"
+ "issues"
],
"conditions": {
"operator": "and",
"operands": [
{
- "name": "isInProjectColumn",
+ "name": "isInProject",
"parameters": {
"projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "isOrgProject": true,
- "columnName": "Needs Triage"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "buyaa-n"
+ "isOrgProject": true
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "or",
"operands": [
{
- "name": "isInMilestone",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ },
{
"name": "hasLabel",
"parameters": {
- "label": "needs-author-action"
+ "label": "os-maccatalyst"
}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
"name": "hasLabel",
"parameters": {
- "label": "api-ready-for-review"
+ "label": "os-ios"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
}
}
]
@@ -6317,150 +7404,183 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Steve H Updated Issue",
+ "taskName": "[Area Pod: Buyaa / Steve - PRs] Moved to Another Area",
"actions": [
{
- "name": "moveToProjectColumn",
+ "name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "columnName": "Triage: Steve H",
+ "projectName": "Area Pod: Buyaa / Steve - PRs",
"isOrgProject": true
}
}
],
- "eventType": "issue",
+ "eventType": "pull_request",
"eventNames": [
- "issues"
+ "pull_request"
],
"conditions": {
"operator": "and",
"operands": [
{
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "isOrgProject": true,
- "columnName": "Needs Triage"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "steveharter"
- }
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-DependencyInjection"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Extensions-Hosting"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.CodeDom"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.ComponentModel"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.ComponentModel.Composition"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Composition"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Configuration"
+ }
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Reflection"
+ }
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Reflection.Emit"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Reflection.Metadata"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Resources"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Text.RegularExpressions"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.DirectoryServices"
+ }
+ }
+ ]
}
]
- }
- ]
- }
- }
- },
- {
- "taskSource": "fabricbot-config",
- "taskType": "trigger",
- "capabilityId": "IssueResponder",
- "subCapability": "IssueCommentResponder",
- "version": "1.0",
- "config": {
- "taskName": "[Area Pod: Buyaa / Steve - Issue Triage] Steve H Commented",
- "actions": [
- {
- "name": "moveToProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "columnName": "Triage: Steve H",
- "isOrgProject": true
- }
- }
- ],
- "eventType": "issue",
- "eventNames": [
- "issue_comment"
- ],
- "conditions": {
- "operator": "and",
- "operands": [
+ },
{
- "name": "isInProjectColumn",
+ "name": "isAction",
"parameters": {
- "projectName": "Area Pod: Buyaa / Steve - Issue Triage",
- "isOrgProject": true,
- "columnName": "Needs Triage"
+ "action": "unlabeled"
}
},
{
- "name": "isActivitySender",
+ "name": "isInProject",
"parameters": {
- "user": "steveharter"
+ "projectName": "Area Pod: Buyaa / Steve - PRs",
+ "isOrgProject": true
}
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "isInMilestone",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
- }
- ]
}
]
}
@@ -6848,21 +7968,92 @@
"operator": "not",
"operands": [
{
- "name": "isInProject",
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - PRs",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
"parameters": {
- "projectName": "Area Pod: Buyaa / Steve - PRs",
- "isOrgProject": true
+ "label": "arch-wasm"
}
}
]
- },
- {
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Buyaa / Steve - PRs",
- "columnName": "Done",
- "isOrgProject": true
- }
}
]
}
@@ -7046,6 +8237,77 @@
}
}
]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
@@ -7419,6 +8681,95 @@
}
}
},
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Buyaa / Steve - PRs] Excluded",
+ "actions": [
+ {
+ "name": "removeFromProject",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - PRs",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - PRs",
+ "isOrgProject": true
+ }
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Buyaa / Steve - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
{
"taskSource": "fabricbot-config",
"taskType": "trigger",
@@ -7775,47 +9126,118 @@
}
},
{
- "name": "labelAdded",
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.Management"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.ServiceProcess"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Carlos / Viktor - Issue Triage",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Carlos / Viktor - Issue Triage",
+ "isOrgProject": true,
+ "columnName": "Triaged"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
"parameters": {
- "label": "area-System.Management"
+ "label": "os-tizen"
}
- },
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
{
- "name": "labelAdded",
+ "name": "hasLabel",
"parameters": {
- "label": "area-System.ServiceProcess"
+ "label": "os-tvos"
}
}
]
- }
- ]
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "or",
- "operands": [
+ },
{
"operator": "not",
"operands": [
{
- "name": "isInProject",
+ "name": "hasLabel",
"parameters": {
- "projectName": "Area Pod: Carlos / Viktor - Issue Triage",
- "isOrgProject": true
+ "label": "arch-wasm"
}
}
]
- },
- {
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Carlos / Viktor - Issue Triage",
- "isOrgProject": true,
- "columnName": "Triaged"
- }
}
]
}
@@ -7965,6 +9387,77 @@
}
}
]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
@@ -7996,42 +9489,208 @@
],
"eventType": "issue",
"eventNames": [
- "issues"
+ "issues"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Carlos / Viktor - Issue Triage",
+ "isOrgProject": true
+ }
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "addedToMilestone",
+ "parameters": {}
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ },
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "closed"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssuesOnlyResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Carlos / Viktor - Issue Triage] Carlos Updated Issue",
+ "actions": [
+ {
+ "name": "moveToProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Carlos / Viktor - Issue Triage",
+ "columnName": "Triage: Carlos",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issues"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Carlos / Viktor - Issue Triage",
+ "isOrgProject": true,
+ "columnName": "Needs Triage"
+ }
+ },
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "carlossanlop"
+ }
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssueCommentResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Carlos / Viktor - Issue Triage] Carlos Commented",
+ "actions": [
+ {
+ "name": "moveToProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Carlos / Viktor - Issue Triage",
+ "columnName": "Triage: Carlos",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issue_comment"
],
"conditions": {
"operator": "and",
"operands": [
{
- "name": "isInProject",
+ "name": "isInProjectColumn",
"parameters": {
"projectName": "Area Pod: Carlos / Viktor - Issue Triage",
- "isOrgProject": true
+ "isOrgProject": true,
+ "columnName": "Needs Triage"
}
},
{
- "operator": "or",
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "carlossanlop"
+ }
+ },
+ {
+ "operator": "and",
"operands": [
{
- "name": "addedToMilestone",
+ "name": "isOpen",
"parameters": {}
},
{
- "name": "labelAdded",
- "parameters": {
- "label": "needs-author-action"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
},
{
- "name": "labelAdded",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
},
{
- "name": "isAction",
- "parameters": {
- "action": "closed"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -8046,13 +9705,13 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Carlos / Viktor - Issue Triage] Carlos Updated Issue",
+ "taskName": "[Area Pod: Carlos / Viktor - Issue Triage] Viktor Updated Issue",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
"projectName": "Area Pod: Carlos / Viktor - Issue Triage",
- "columnName": "Triage: Carlos",
+ "columnName": "Triage: Viktor",
"isOrgProject": true
}
}
@@ -8075,41 +9734,46 @@
{
"name": "isActivitySender",
"parameters": {
- "user": "carlossanlop"
+ "user": "viktorhofer"
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
+ "name": "isOpen",
"parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -8124,13 +9788,13 @@
"subCapability": "IssueCommentResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Carlos / Viktor - Issue Triage] Carlos Commented",
+ "taskName": "[Area Pod: Carlos / Viktor - Issue Triage] Viktor Commented",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
"projectName": "Area Pod: Carlos / Viktor - Issue Triage",
- "columnName": "Triage: Carlos",
+ "columnName": "Triage: Viktor",
"isOrgProject": true
}
}
@@ -8153,41 +9817,46 @@
{
"name": "isActivitySender",
"parameters": {
- "user": "carlossanlop"
+ "user": "viktorhofer"
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
+ "name": "isOpen",
"parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -8202,13 +9871,12 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Carlos / Viktor - Issue Triage] Viktor Updated Issue",
+ "taskName": "[Area Pod: Carlos / Viktor - Issue Triage] Excluded",
"actions": [
{
- "name": "moveToProjectColumn",
+ "name": "removeFromProject",
"parameters": {
"projectName": "Area Pod: Carlos / Viktor - Issue Triage",
- "columnName": "Triage: Viktor",
"isOrgProject": true
}
}
@@ -8221,50 +9889,49 @@
"operator": "and",
"operands": [
{
- "name": "isInProjectColumn",
+ "name": "isInProject",
"parameters": {
"projectName": "Area Pod: Carlos / Viktor - Issue Triage",
- "isOrgProject": true,
- "columnName": "Needs Triage"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "viktorhofer"
+ "isOrgProject": true
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "or",
"operands": [
{
- "name": "isInMilestone",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ },
{
"name": "hasLabel",
"parameters": {
- "label": "needs-author-action"
+ "label": "os-maccatalyst"
}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
"name": "hasLabel",
"parameters": {
- "label": "api-ready-for-review"
+ "label": "os-ios"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
}
}
]
@@ -8277,75 +9944,164 @@
"taskSource": "fabricbot-config",
"taskType": "trigger",
"capabilityId": "IssueResponder",
- "subCapability": "IssueCommentResponder",
+ "subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Carlos / Viktor - Issue Triage] Viktor Commented",
+ "taskName": "[Area Pod: Carlos / Viktor - PRs] Moved to Another Area",
"actions": [
{
- "name": "moveToProjectColumn",
+ "name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Carlos / Viktor - Issue Triage",
- "columnName": "Triage: Viktor",
+ "projectName": "Area Pod: Carlos / Viktor - PRs",
"isOrgProject": true
}
}
],
- "eventType": "issue",
+ "eventType": "pull_request",
"eventNames": [
- "issue_comment"
+ "pull_request"
],
"conditions": {
"operator": "and",
"operands": [
{
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Carlos / Viktor - Issue Triage",
- "isOrgProject": true,
- "columnName": "Needs Triage"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "viktorhofer"
- }
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
- "parameters": {}
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-DependencyModel"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Infrastructure-libraries"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Microsoft.Win32"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Diagnostics.EventLog"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Diagnostics.PerformanceCounter"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Diagnostics.TraceSource"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Drawing"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Formats.Tar"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.IO.Compression"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Management"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.ServiceProcess"
+ }
+ }
+ ]
}
]
},
{
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
+ "name": "isAction",
+ "parameters": {
+ "action": "unlabeled"
+ }
},
{
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
- }
- ]
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Carlos / Viktor - PRs",
+ "isOrgProject": true
+ }
}
]
}
@@ -8659,22 +10415,107 @@
"operator": "not",
"operands": [
{
- "name": "isActivitySender",
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "carlossanlop"
+ }
+ }
+ ]
+ }
+ ],
+ [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isAssignedToUser",
+ "parameters": {
+ "user": "viktorhofer"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "viktorhofer"
+ }
+ }
+ ]
+ }
+ ]
+ ],
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Carlos / Viktor - PRs",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Carlos / Viktor - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
"parameters": {
- "user": "carlossanlop"
+ "label": "os-ios"
}
}
]
- }
- ],
- [
+ },
{
"operator": "not",
"operands": [
{
- "name": "isAssignedToUser",
+ "name": "hasLabel",
"parameters": {
- "user": "viktorhofer"
+ "label": "os-tizen"
}
}
]
@@ -8683,37 +10524,23 @@
"operator": "not",
"operands": [
{
- "name": "isActivitySender",
+ "name": "hasLabel",
"parameters": {
- "user": "viktorhofer"
+ "label": "os-tvos"
}
}
]
- }
- ]
- ],
- {
- "operator": "or",
- "operands": [
+ },
{
"operator": "not",
"operands": [
{
- "name": "isInProject",
+ "name": "hasLabel",
"parameters": {
- "projectName": "Area Pod: Carlos / Viktor - PRs",
- "isOrgProject": true
+ "label": "arch-wasm"
}
}
]
- },
- {
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Carlos / Viktor - PRs",
- "columnName": "Done",
- "isOrgProject": true
- }
}
]
}
@@ -8885,6 +10712,77 @@
}
}
]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
@@ -9234,6 +11132,95 @@
}
}
},
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Carlos / Viktor - PRs] Excluded",
+ "actions": [
+ {
+ "name": "removeFromProject",
+ "parameters": {
+ "projectName": "Area Pod: Carlos / Viktor - PRs",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Carlos / Viktor - PRs",
+ "isOrgProject": true
+ }
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Carlos / Viktor - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
{
"taskSource": "fabricbot-config",
"taskType": "trigger",
@@ -9544,47 +11531,107 @@
}
},
{
- "name": "labelAdded",
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.Threading.Channels"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "area-System.Threading.Tasks"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Michael / Tanner - Issue Triage",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Michael / Tanner - Issue Triage",
+ "isOrgProject": true,
+ "columnName": "Triaged"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
"parameters": {
- "label": "area-System.Threading.Channels"
+ "label": "os-maccatalyst"
}
- },
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
{
- "name": "labelAdded",
+ "name": "hasLabel",
"parameters": {
- "label": "area-System.Threading.Tasks"
+ "label": "os-ios"
}
}
]
- }
- ]
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "or",
- "operands": [
+ },
{
"operator": "not",
"operands": [
{
- "name": "isInProject",
+ "name": "hasLabel",
"parameters": {
- "projectName": "Area Pod: Michael / Tanner - Issue Triage",
- "isOrgProject": true
+ "label": "os-tizen"
}
}
]
},
{
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Michael / Tanner - Issue Triage",
- "isOrgProject": true,
- "columnName": "Triaged"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
}
]
}
@@ -9722,6 +11769,218 @@
}
}
]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssuesOnlyResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Michael / Tanner - Issue Triage] Triaged",
+ "actions": [
+ {
+ "name": "addToProject",
+ "parameters": {
+ "projectName": "Area Pod: Michael / Tanner - Issue Triage",
+ "columnName": "Triaged",
+ "isOrgProject": true
+ }
+ },
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": "untriaged"
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issues"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Michael / Tanner - Issue Triage",
+ "isOrgProject": true
+ }
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "addedToMilestone",
+ "parameters": {}
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ },
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ },
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "closed"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssuesOnlyResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Michael / Tanner - Issue Triage] Michael Updated Issue",
+ "actions": [
+ {
+ "name": "moveToProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Michael / Tanner - Issue Triage",
+ "columnName": "Triage: Michael",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issues"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Michael / Tanner - Issue Triage",
+ "isOrgProject": true,
+ "columnName": "Needs Triage"
+ }
+ },
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "michaelgsharp"
+ }
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
@@ -9731,64 +11990,78 @@
"taskSource": "fabricbot-config",
"taskType": "trigger",
"capabilityId": "IssueResponder",
- "subCapability": "IssuesOnlyResponder",
+ "subCapability": "IssueCommentResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Michael / Tanner - Issue Triage] Triaged",
+ "taskName": "[Area Pod: Michael / Tanner - Issue Triage] Michael Commented",
"actions": [
{
- "name": "addToProject",
+ "name": "moveToProjectColumn",
"parameters": {
"projectName": "Area Pod: Michael / Tanner - Issue Triage",
- "columnName": "Triaged",
+ "columnName": "Triage: Michael",
"isOrgProject": true
}
- },
- {
- "name": "removeLabel",
- "parameters": {
- "label": "untriaged"
- }
}
],
"eventType": "issue",
"eventNames": [
- "issues"
+ "issue_comment"
],
"conditions": {
"operator": "and",
"operands": [
{
- "name": "isInProject",
+ "name": "isInProjectColumn",
"parameters": {
"projectName": "Area Pod: Michael / Tanner - Issue Triage",
- "isOrgProject": true
+ "isOrgProject": true,
+ "columnName": "Needs Triage"
}
},
{
- "operator": "or",
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "michaelgsharp"
+ }
+ },
+ {
+ "operator": "and",
"operands": [
{
- "name": "addedToMilestone",
+ "name": "isOpen",
"parameters": {}
},
{
- "name": "labelAdded",
- "parameters": {
- "label": "needs-author-action"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
},
{
- "name": "labelAdded",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
},
{
- "name": "isAction",
- "parameters": {
- "action": "closed"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -9803,13 +12076,13 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Michael / Tanner - Issue Triage] Michael Updated Issue",
+ "taskName": "[Area Pod: Michael / Tanner - Issue Triage] Tanner Updated Issue",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
"projectName": "Area Pod: Michael / Tanner - Issue Triage",
- "columnName": "Triage: Michael",
+ "columnName": "Triage: Tanner",
"isOrgProject": true
}
}
@@ -9832,41 +12105,46 @@
{
"name": "isActivitySender",
"parameters": {
- "user": "michaelgsharp"
+ "user": "tannergooding"
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
+ "name": "isOpen",
"parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -9881,13 +12159,13 @@
"subCapability": "IssueCommentResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Michael / Tanner - Issue Triage] Michael Commented",
+ "taskName": "[Area Pod: Michael / Tanner - Issue Triage] Tanner Commented",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
"projectName": "Area Pod: Michael / Tanner - Issue Triage",
- "columnName": "Triage: Michael",
+ "columnName": "Triage: Tanner",
"isOrgProject": true
}
}
@@ -9910,41 +12188,46 @@
{
"name": "isActivitySender",
"parameters": {
- "user": "michaelgsharp"
+ "user": "tannergooding"
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
+ "name": "isOpen",
"parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -9959,13 +12242,12 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Michael / Tanner - Issue Triage] Tanner Updated Issue",
+ "taskName": "[Area Pod: Michael / Tanner - Issue Triage] Excluded",
"actions": [
{
- "name": "moveToProjectColumn",
+ "name": "removeFromProject",
"parameters": {
"projectName": "Area Pod: Michael / Tanner - Issue Triage",
- "columnName": "Triage: Tanner",
"isOrgProject": true
}
}
@@ -9978,50 +12260,43 @@
"operator": "and",
"operands": [
{
- "name": "isInProjectColumn",
+ "name": "isInProject",
"parameters": {
"projectName": "Area Pod: Michael / Tanner - Issue Triage",
- "isOrgProject": true,
- "columnName": "Needs Triage"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "tannergooding"
+ "isOrgProject": true
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "or",
"operands": [
{
- "name": "isInMilestone",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ },
{
"name": "hasLabel",
"parameters": {
- "label": "needs-author-action"
+ "label": "os-maccatalyst"
}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
"name": "hasLabel",
"parameters": {
- "label": "api-ready-for-review"
+ "label": "os-ios"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
}
}
]
@@ -10034,75 +12309,142 @@
"taskSource": "fabricbot-config",
"taskType": "trigger",
"capabilityId": "IssueResponder",
- "subCapability": "IssueCommentResponder",
+ "subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Michael / Tanner - Issue Triage] Tanner Commented",
+ "taskName": "[Area Pod: Michael / Tanner - PRs] Moved to Another Area",
"actions": [
{
- "name": "moveToProjectColumn",
+ "name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Michael / Tanner - Issue Triage",
- "columnName": "Triage: Tanner",
+ "projectName": "Area Pod: Michael / Tanner - PRs",
"isOrgProject": true
}
}
],
- "eventType": "issue",
+ "eventType": "pull_request",
"eventNames": [
- "issue_comment"
+ "pull_request"
],
"conditions": {
"operator": "and",
"operands": [
{
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Michael / Tanner - Issue Triage",
- "isOrgProject": true,
- "columnName": "Needs Triage"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "tannergooding"
- }
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
- "parameters": {}
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Buffers"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Memory"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Numerics"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Numerics.Tensors"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Runtime"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Runtime.CompilerServices"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Runtime.Intrinsics"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Threading.Channels"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-System.Threading.Tasks"
+ }
+ }
+ ]
}
]
},
{
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
+ "name": "isAction",
+ "parameters": {
+ "action": "unlabeled"
+ }
},
{
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
- }
- ]
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Michael / Tanner - PRs",
+ "isOrgProject": true
+ }
}
]
}
@@ -10439,6 +12781,66 @@
}
}
]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
@@ -10579,21 +12981,81 @@
"operator": "not",
"operands": [
{
- "name": "isInProject",
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Michael / Tanner - PRs",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Michael / Tanner - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
"parameters": {
- "projectName": "Area Pod: Michael / Tanner - PRs",
- "isOrgProject": true
+ "label": "os-ios"
}
}
]
},
{
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Michael / Tanner - PRs",
- "columnName": "Done",
- "isOrgProject": true
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
}
]
}
@@ -10921,6 +13383,89 @@
}
}
},
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Michael / Tanner - PRs] Excluded",
+ "actions": [
+ {
+ "name": "removeFromProject",
+ "parameters": {
+ "projectName": "Area Pod: Michael / Tanner - PRs",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Michael / Tanner - PRs",
+ "isOrgProject": true
+ }
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Michael / Tanner - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
{
"taskSource": "fabricbot-config",
"taskType": "trigger",
@@ -14658,6 +17203,77 @@
}
}
]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
@@ -14734,21 +17350,92 @@
"operator": "not",
"operands": [
{
- "name": "isInProject",
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Eric / Jeff - Issue Triage",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Eric / Jeff - Issue Triage",
+ "columnName": "Triaged",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
"parameters": {
- "projectName": "Area Pod: Eric / Jeff - Issue Triage",
- "isOrgProject": true
+ "label": "os-tvos"
}
}
]
},
{
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Eric / Jeff - Issue Triage",
- "columnName": "Triaged",
- "isOrgProject": true
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
}
]
}
@@ -14865,37 +17552,42 @@
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
+ "name": "isOpen",
"parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -14943,37 +17635,208 @@
}
},
{
- "name": "isOpen",
- "parameters": {}
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssuesOnlyResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Eric / Jeff - Issue Triage] Jeff Updated Issue",
+ "actions": [
+ {
+ "name": "moveToProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Eric / Jeff - Issue Triage",
+ "columnName": "Triage: Jeff",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issues"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Eric / Jeff - Issue Triage",
+ "isOrgProject": true,
+ "columnName": "Needs Triage"
+ }
},
{
- "operator": "not",
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "jeffhandley"
+ }
+ },
+ {
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
+ "name": "isOpen",
"parameters": {}
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssueCommentResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Eric / Jeff - Issue Triage] Jeff Commented",
+ "actions": [
+ {
+ "name": "moveToProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Eric / Jeff - Issue Triage",
+ "columnName": "Triage: Jeff",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issue_comment"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Eric / Jeff - Issue Triage",
+ "isOrgProject": true,
+ "columnName": "Needs Triage"
+ }
},
{
- "operator": "not",
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "jeffhandley"
+ }
+ },
+ {
+ "operator": "and",
"operands": [
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -14988,13 +17851,12 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Jeff - Issue Triage] Jeff Updated Issue",
+ "taskName": "[Area Pod: Eric / Jeff - Issue Triage] Excluded",
"actions": [
{
- "name": "moveToProjectColumn",
+ "name": "removeFromProject",
"parameters": {
"projectName": "Area Pod: Eric / Jeff - Issue Triage",
- "columnName": "Triage: Jeff",
"isOrgProject": true
}
}
@@ -15007,50 +17869,49 @@
"operator": "and",
"operands": [
{
- "name": "isInProjectColumn",
+ "name": "isInProject",
"parameters": {
"projectName": "Area Pod: Eric / Jeff - Issue Triage",
- "isOrgProject": true,
- "columnName": "Needs Triage"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "jeffhandley"
+ "isOrgProject": true
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "or",
"operands": [
{
- "name": "isInMilestone",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ },
{
"name": "hasLabel",
"parameters": {
- "label": "needs-author-action"
+ "label": "os-maccatalyst"
}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
"name": "hasLabel",
"parameters": {
- "label": "api-ready-for-review"
+ "label": "os-ios"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
}
}
]
@@ -15063,75 +17924,65 @@
"taskSource": "fabricbot-config",
"taskType": "trigger",
"capabilityId": "IssueResponder",
- "subCapability": "IssueCommentResponder",
+ "subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Eric / Jeff - Issue Triage] Jeff Commented",
+ "taskName": "[Area Pod: Eric / Jeff - PRs] Moved to Another Area",
"actions": [
{
- "name": "moveToProjectColumn",
+ "name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Eric / Jeff - Issue Triage",
- "columnName": "Triage: Jeff",
+ "projectName": "Area Pod: Eric / Jeff - PRs",
"isOrgProject": true
}
}
],
- "eventType": "issue",
+ "eventType": "pull_request",
"eventNames": [
- "issue_comment"
+ "pull_request"
],
"conditions": {
"operator": "and",
"operands": [
{
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Eric / Jeff - Issue Triage",
- "isOrgProject": true,
- "columnName": "Needs Triage"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "jeffhandley"
- }
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
- "parameters": {}
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "area-Meta"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-area-label"
+ }
+ }
+ ]
}
]
},
{
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
+ "name": "isAction",
+ "parameters": {
+ "action": "unlabeled"
+ }
},
{
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
- }
- ]
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Eric / Jeff - PRs",
+ "isOrgProject": true
+ }
}
]
}
@@ -15339,14 +18190,85 @@
}
}
]
- },
- {
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Eric / Jeff - PRs",
- "columnName": "Done",
- "isOrgProject": true
- }
+ },
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Eric / Jeff - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
}
]
}
@@ -15464,6 +18386,77 @@
}
}
]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
@@ -15705,6 +18698,95 @@
}
}
},
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Eric / Jeff - PRs] Excluded",
+ "actions": [
+ {
+ "name": "removeFromProject",
+ "parameters": {
+ "projectName": "Area Pod: Eric / Jeff - PRs",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Eric / Jeff - PRs",
+ "isOrgProject": true
+ }
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Eric / Jeff - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
{
"taskSource": "fabricbot-config",
"taskType": "trigger",
@@ -15860,41 +18942,112 @@
}
},
{
- "name": "labelAdded",
+ "name": "labelAdded",
+ "parameters": {
+ "label": "code-analyzer"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Libraries Analyzers - Issue Triage",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Libraries Analyzers - Issue Triage",
+ "isOrgProject": true,
+ "columnName": "Triaged"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
"parameters": {
- "label": "code-analyzer"
+ "label": "os-tvos"
}
}
]
- }
- ]
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "or",
- "operands": [
+ },
{
"operator": "not",
"operands": [
{
- "name": "isInProject",
+ "name": "hasLabel",
"parameters": {
- "projectName": "Area Pod: Libraries Analyzers - Issue Triage",
- "isOrgProject": true
+ "label": "arch-wasm"
}
}
]
- },
- {
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Libraries Analyzers - Issue Triage",
- "isOrgProject": true,
- "columnName": "Triaged"
- }
}
]
}
@@ -15990,6 +19143,77 @@
}
}
]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
@@ -16071,13 +19295,179 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Libraries Analyzers - Issue Triage] Buyaa Updated Issue",
+ "taskName": "[Area Pod: Libraries Analyzers - Issue Triage] Buyaa Updated Issue",
+ "actions": [
+ {
+ "name": "moveToProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Libraries Analyzers - Issue Triage",
+ "columnName": "Triage: Buyaa",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issues"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Libraries Analyzers - Issue Triage",
+ "isOrgProject": true,
+ "columnName": "Needs Triage"
+ }
+ },
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "buyaa-n"
+ }
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssueCommentResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Libraries Analyzers - Issue Triage] Buyaa Commented",
+ "actions": [
+ {
+ "name": "moveToProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Libraries Analyzers - Issue Triage",
+ "columnName": "Triage: Buyaa",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issue_comment"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Libraries Analyzers - Issue Triage",
+ "isOrgProject": true,
+ "columnName": "Needs Triage"
+ }
+ },
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "buyaa-n"
+ }
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssuesOnlyResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Libraries Analyzers - Issue Triage] Carlos Updated Issue",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
"projectName": "Area Pod: Libraries Analyzers - Issue Triage",
- "columnName": "Triage: Buyaa",
+ "columnName": "Triage: Carlos",
"isOrgProject": true
}
}
@@ -16100,41 +19490,46 @@
{
"name": "isActivitySender",
"parameters": {
- "user": "buyaa-n"
+ "user": "carlossanlop"
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
+ "name": "isOpen",
"parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -16149,13 +19544,13 @@
"subCapability": "IssueCommentResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Libraries Analyzers - Issue Triage] Buyaa Commented",
+ "taskName": "[Area Pod: Libraries Analyzers - Issue Triage] Carlos Commented",
"actions": [
{
"name": "moveToProjectColumn",
"parameters": {
"projectName": "Area Pod: Libraries Analyzers - Issue Triage",
- "columnName": "Triage: Buyaa",
+ "columnName": "Triage: Carlos",
"isOrgProject": true
}
}
@@ -16178,41 +19573,46 @@
{
"name": "isActivitySender",
"parameters": {
- "user": "buyaa-n"
+ "user": "carlossanlop"
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
+ "name": "isOpen",
"parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInMilestone",
+ "parameters": {}
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-action"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "api-ready-for-review"
+ }
+ }
+ ]
}
]
}
@@ -16227,13 +19627,12 @@
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Libraries Analyzers - Issue Triage] Carlos Updated Issue",
+ "taskName": "[Area Pod: Libraries Analyzers - Issue Triage] Excluded",
"actions": [
{
- "name": "moveToProjectColumn",
+ "name": "removeFromProject",
"parameters": {
"projectName": "Area Pod: Libraries Analyzers - Issue Triage",
- "columnName": "Triage: Carlos",
"isOrgProject": true
}
}
@@ -16246,50 +19645,49 @@
"operator": "and",
"operands": [
{
- "name": "isInProjectColumn",
+ "name": "isInProject",
"parameters": {
"projectName": "Area Pod: Libraries Analyzers - Issue Triage",
- "isOrgProject": true,
- "columnName": "Needs Triage"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "carlossanlop"
+ "isOrgProject": true
}
},
{
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "or",
"operands": [
{
- "name": "isInMilestone",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ },
{
"name": "hasLabel",
"parameters": {
- "label": "needs-author-action"
+ "label": "os-maccatalyst"
}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ },
{
"name": "hasLabel",
"parameters": {
- "label": "api-ready-for-review"
+ "label": "os-ios"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
}
}
]
@@ -16302,75 +19700,65 @@
"taskSource": "fabricbot-config",
"taskType": "trigger",
"capabilityId": "IssueResponder",
- "subCapability": "IssueCommentResponder",
+ "subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
- "taskName": "[Area Pod: Libraries Analyzers - Issue Triage] Carlos Commented",
+ "taskName": "[Area Pod: Libraries Analyzers - PRs] Moved to Another Area",
"actions": [
{
- "name": "moveToProjectColumn",
+ "name": "removeFromProject",
"parameters": {
- "projectName": "Area Pod: Libraries Analyzers - Issue Triage",
- "columnName": "Triage: Carlos",
+ "projectName": "Area Pod: Libraries Analyzers - PRs",
"isOrgProject": true
}
}
],
- "eventType": "issue",
+ "eventType": "pull_request",
"eventNames": [
- "issue_comment"
+ "pull_request"
],
"conditions": {
"operator": "and",
"operands": [
{
- "name": "isInProjectColumn",
- "parameters": {
- "projectName": "Area Pod: Libraries Analyzers - Issue Triage",
- "isOrgProject": true,
- "columnName": "Needs Triage"
- }
- },
- {
- "name": "isActivitySender",
- "parameters": {
- "user": "carlossanlop"
- }
- },
- {
- "name": "isOpen",
- "parameters": {}
- },
- {
- "operator": "not",
+ "operator": "and",
"operands": [
{
- "name": "isInMilestone",
- "parameters": {}
- }
- ]
- },
- {
- "operator": "not",
- "operands": [
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "code-fixer"
+ }
+ }
+ ]
+ },
{
- "name": "hasLabel",
- "parameters": {
- "label": "needs-author-action"
- }
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "code-analyzer"
+ }
+ }
+ ]
}
]
},
{
- "operator": "not",
- "operands": [
- {
- "name": "hasLabel",
- "parameters": {
- "label": "api-ready-for-review"
- }
- }
- ]
+ "name": "isAction",
+ "parameters": {
+ "action": "unlabeled"
+ }
+ },
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Libraries Analyzers - PRs",
+ "isOrgProject": true
+ }
}
]
}
@@ -16588,6 +19976,77 @@
}
}
]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
@@ -16703,6 +20162,77 @@
}
}
]
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
@@ -16943,5 +20473,94 @@
]
}
}
+ },
+ {
+ "taskSource": "fabricbot-config",
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "[Area Pod: Libraries Analyzers - PRs] Excluded",
+ "actions": [
+ {
+ "name": "removeFromProject",
+ "parameters": {
+ "projectName": "Area Pod: Libraries Analyzers - PRs",
+ "isOrgProject": true
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isInProject",
+ "parameters": {
+ "projectName": "Area Pod: Libraries Analyzers - PRs",
+ "isOrgProject": true
+ }
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isInProjectColumn",
+ "parameters": {
+ "projectName": "Area Pod: Libraries Analyzers - PRs",
+ "columnName": "Done",
+ "isOrgProject": true
+ }
+ }
+ ]
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-android"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-maccatalyst"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-ios"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tizen"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "os-tvos"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "arch-wasm"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
}
-]
+]
\ No newline at end of file
diff --git a/docs/area-owners.json b/docs/area-owners.json
index 5be050f85b13b9..8904656472f6bb 100644
--- a/docs/area-owners.json
+++ b/docs/area-owners.json
@@ -248,7 +248,7 @@
"label": "area-Diagnostics-mono"
},
{
- "lead": "marek-safar",
+ "lead": "SamMonoRT",
"owners": [
"lambdageek"
],
diff --git a/docs/area-owners.md b/docs/area-owners.md
index 6a2e4e3714e5af..897cfde9638aed 100644
--- a/docs/area-owners.md
+++ b/docs/area-owners.md
@@ -26,7 +26,7 @@ Note: Editing this file doesn't update the mapping used by `@msftbot` for area-s
| area-DependencyModel | @ericstj | @dotnet/area-dependencymodel | Included:
- Microsoft.Extensions.DependencyModel
|
| area-Diagnostics-coreclr | @tommcdon | @tommcdon | |
| area-Diagnostics-mono | @steveisok | @lateralusX @mdh1418 | |
-| area-EnC-mono | @marek-safar | @lambdageek | Hot Reload on WebAssembly, Android, iOS, etc |
+| area-EnC-mono | @SamMonoRT | @lambdageek | Hot Reload on WebAssembly, Android, iOS, etc |
| area-ExceptionHandling-coreclr | @mangod9 | @janvorli | |
| area-Extensions-Caching | @ericstj | @dotnet/area-extensions-caching | |
| area-Extensions-Configuration | @ericstj | @dotnet/area-extensions-configuration | |
diff --git a/docs/design/coreclr/botr/readytorun-format.md b/docs/design/coreclr/botr/readytorun-format.md
index 2c63997332e487..d68099747d8f66 100644
--- a/docs/design/coreclr/botr/readytorun-format.md
+++ b/docs/design/coreclr/botr/readytorun-format.md
@@ -179,6 +179,7 @@ The following section types are defined and described later in this document:
| PgoInstrumentationData | 117 | Image (added in V5.2)
| ManifestAssemblyMvids | 118 | Image (added in V5.3)
| CrossModuleInlineInfo | 119 | Image (added in V6.3)
+| HotColdMap | 120 | Image (added in V8.0)
## ReadyToRunSectionType.CompilerIdentifier
@@ -644,6 +645,15 @@ The entry of the hashtable is a counted sequence of compressed unsigned integers
This section may be included in addition to a InliningInfo2 section.
+## ReadyToRunSectionType.HotColdMap (v8.0+)
+In ReadyToRun 8.0+, the format supports splitting a method into hot and cold parts so that they are not located together. This hot-cold map section captures the information about how methods are split so that the runtime can locate them for various services.
+
+For every method that is split, there is a single entry in the section. Each entry has two unsigned 32-bit integers. The first integer is the runtime function index of the cold part and the second integer is the runtime function index of the hot part.
+
+The methods in this table are sorted by their hot part runtime function indices, which are also sorted by their cold part runtime function indices because we always emit the cold part in the same order as the hot parts, or by their RVAs because the runtime function table itself is sorted by the RVAs.
+
+This section may not exist if no method is split - this happens when the `--hot-cold-splitting` flag is not specified during compilation, or the compiler decides it should not split any methods.
+
# Native Format
Native format is set of encoding patterns that allow persisting type system data in a binary format that is
diff --git a/docs/design/features/hybrid-globalization.md b/docs/design/features/globalization-hybrid-mode.md
similarity index 89%
rename from docs/design/features/hybrid-globalization.md
rename to docs/design/features/globalization-hybrid-mode.md
index 5d08676ea642e4..0e6ed5d7c1e7f2 100644
--- a/docs/design/features/hybrid-globalization.md
+++ b/docs/design/features/globalization-hybrid-mode.md
@@ -1,6 +1,11 @@
# Hybrid Globalization
-Description, purpose and instruction how to use.
+Originally, internalization data is loaded from ICU data files. In `HybridGlobalization` mode we are leveraging the platform-native internationalization APIs, where it is possible, to allow for loading smaller ICU data files. We still need to rely on ICU files because for a bunch of globalization data no API equivalent is available. For some existing equivalents, the behavior does not fully match the original. The differences you can expect after switching on the mode are listed in this document. Expected size savings can be found under each platform section below.
+
+Hybrid has lower priority than Invariant. To switch on the mode set the property in the build file:
+```
+true
+```
## Behavioral differences
@@ -8,7 +13,9 @@ Hybrid mode does not use ICU data for some functions connected with globalizatio
### WASM
-For WebAssembly in Browser we are using Web API instead of some ICU data. Ideally, we would use `System.Runtime.InteropServices.JavaScript` to call JS code from inside of C# but we cannot reference any assemblies from inside of `System.Private.CoreLib`. That is why we are using iCalls instead.
+For WebAssembly in Browser we are using Web API instead of some ICU data. Ideally, we would use `System.Runtime.InteropServices.JavaScript` to call JS code from inside of C# but we cannot reference any assemblies from inside of `System.Private.CoreLib`. That is why we are using iCalls instead. The host support depends on used Web API functions support - see **dependencies** in each section.
+
+Hybrid has higher priority than sharding or custom modes, described in globalization-icu-wasm.md.
**SortKey**
@@ -33,6 +40,12 @@ Hybrid case change, same as ICU-based, does not support code points expansion e.
ICU-based case change does not respect final-sigma rule, but hybrid does, so "ΒΌΛΟΣ" -> "βόλος", not "βόλοσ".
+Dependencies:
+- [String.prototype.toUpperCase()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase)
+- [String.prototype.toLoweCase()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase)
+- [String.prototype.toLocaleUpperCase()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase)
+- [String.prototype.toLocaleLoweCase()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase)
+
**String comparison**
Affected public APIs:
@@ -40,8 +53,12 @@ Affected public APIs:
- String.Compare,
- String.Equals.
+Dependencies:
+- [String.prototype.localeCompare()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare)
+
The number of `CompareOptions` and `StringComparison` combinations is limited. Originally supported combinations can be found [here for CompareOptions](https://learn.microsoft.com/dotnet/api/system.globalization.compareoptions) and [here for StringComparison](https://learn.microsoft.com/dotnet/api/system.stringcomparison).
+
- `IgnoreWidth` is not supported because there is no equivalent in Web API. Throws `PlatformNotSupportedException`.
``` JS
let high = String.fromCharCode(65281) // %uff83 = テ
@@ -196,6 +213,10 @@ Affected public APIs:
- String.StartsWith
- String.EndsWith
+Dependencies:
+- [String.prototype.normalize()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
+- [String.prototype.localeCompare()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare)
+
Web API does not expose locale-sensitive endsWith/startsWith function. As a workaround, both strings get normalized and weightless characters are removed. Resulting strings are cut to the same length and comparison is performed. This approach, beyond having the same compare option limitations as described under **String comparison**, has additional limitations connected with the workaround used. Because we are normalizing strings to be able to cut them, we cannot calculate the match length on the original strings. Methods that calculate this information throw PlatformNotSupported exception:
- [CompareInfo.IsPrefix](https://learn.microsoft.com/en-us/dotnet/api/system.globalization.compareinfo.isprefix?view=net-8.0#system-globalization-compareinfo-isprefix(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-globalization-compareoptions-system-int32@))
diff --git a/docs/project/list-of-diagnostics.md b/docs/project/list-of-diagnostics.md
index 7c814cdf68ae87..d6783d80ecf90a 100644
--- a/docs/project/list-of-diagnostics.md
+++ b/docs/project/list-of-diagnostics.md
@@ -219,8 +219,8 @@ The diagnostic id values reserved for .NET Libraries analyzer warnings are `SYSL
| __`SYSLIB1100`__ | Configuration binding generator: type is not supported. |
| __`SYSLIB1101`__ | Configuration binding generator: property on type is not supported. |
| __`SYSLIB1102`__ | Configuration binding generator: project's language version must be at least C# 11.|
-| __`SYSLIB1103`__ | *_`SYSLIB1100`-`SYSLIB1118` reserved for Microsoft.Extensions.Configuration.Binder.SourceGeneration.* |
-| __`SYSLIB1104`__ | *_`SYSLIB1100`-`SYSLIB1118` reserved for Microsoft.Extensions.Configuration.Binder.SourceGeneration.* |
+| __`SYSLIB1103`__ | Configuration binding generator: value types are invalid inputs to configuration 'Bind' methods.* |
+| __`SYSLIB1104`__ | Configuration binding generator: Generator cannot determine the target configuration type.* |
| __`SYSLIB1105`__ | *_`SYSLIB1100`-`SYSLIB1118` reserved for Microsoft.Extensions.Configuration.Binder.SourceGeneration.* |
| __`SYSLIB1106`__ | *_`SYSLIB1100`-`SYSLIB1118` reserved for Microsoft.Extensions.Configuration.Binder.SourceGeneration.* |
| __`SYSLIB1107`__ | *_`SYSLIB1100`-`SYSLIB1118` reserved for Microsoft.Extensions.Configuration.Binder.SourceGeneration.* |
diff --git a/eng/CodeAnalysis.src.globalconfig b/eng/CodeAnalysis.src.globalconfig
index d83299c431cce5..0fdc74157b6c6a 100644
--- a/eng/CodeAnalysis.src.globalconfig
+++ b/eng/CodeAnalysis.src.globalconfig
@@ -471,6 +471,9 @@ dotnet_diagnostic.CA1859.severity = warning
# CA1860: Avoid using 'Enumerable.Any()' extension method
dotnet_diagnostic.CA1860.severity = warning
+# CA1861: Avoid constant arrays as arguments
+dotnet_diagnostic.CA1861.severity = warning
+
# CA2000: Dispose objects before losing scope
dotnet_diagnostic.CA2000.severity = none
diff --git a/eng/CodeAnalysis.test.globalconfig b/eng/CodeAnalysis.test.globalconfig
index 84c7837a7e536a..ae1dc7eb9872fc 100644
--- a/eng/CodeAnalysis.test.globalconfig
+++ b/eng/CodeAnalysis.test.globalconfig
@@ -468,6 +468,9 @@ dotnet_diagnostic.CA1859.severity = none
# CA1860: Avoid using 'Enumerable.Any()' extension method
dotnet_diagnostic.CA1860.severity = none
+# CA1861: Avoid constant arrays as arguments
+dotnet_diagnostic.CA1861.severity = none
+
# CA2000: Dispose objects before losing scope
dotnet_diagnostic.CA2000.severity = none
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index b2d2ecbd58066b..b55a2045949060 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,8 +1,8 @@
-
+
https://github.com/dotnet/icu
- 389d19d09d3cf16ec0143dba065fcd704ab8e48c
+ d77dd854ec4d9a3c4a0c584421ee393642d631ef
https://github.com/dotnet/msquic
@@ -12,29 +12,29 @@
https://github.com/dotnet/wcf
7f504aabb1988e9a093c1e74d8040bd52feb2f01
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
https://github.com/dotnet/llvm-project
@@ -44,29 +44,29 @@
https://github.com/dotnet/llvm-project
76f334f354eb653a7b409a5319b591ea09df5a43
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
https://github.com/dotnet/llvm-project
@@ -85,14 +85,14 @@
8374d5fca634a93458c84414b1604c12f765d1ab
-
+
https://github.com/dotnet/cecil
- f283c6229347f2dc3a25b04f6611014d8871d0b0
+ ea84c8236c45ebace0073dbc01e0e75ffba65a65
-
+
https://github.com/dotnet/emsdk
- fb9e15863c4a8b4fa209096f29406cc6dbb8ef32
+ 63af043d58bd8d471da0e236e6255611e061cc4e
@@ -107,9 +107,9 @@
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
@@ -117,166 +117,166 @@
54eb3b811c57f5e94617d31a102fc9cb664ccdd5
-
+
https://github.com/dotnet/xliff-tasks
- 9e7fbcab4e5275f63c0cd37553ba426de9194309
+ 8fd12314c3e648c03a4189ba0bd1c3b09f5d6a01
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
-
+
https://github.com/dotnet/llvm-project
- c01ca3bc8a420b3796d816c43bdd06e337c72ea6
+ 43fe12a7a5f6917dee47ca4de17477ed1ac2c312
https://github.com/dotnet/runtime
@@ -303,58 +303,58 @@
https://github.com/dotnet/runtime
93da0c966f9bc537dd77fbe2cbeb0bec4ff6a48b
-
+
https://github.com/dotnet/xharness
- 5d3b745c64e8092c2ce3ce1feca85d87d814f292
+ 230501dc45d8c96e995ceed1189852eb0ee08693
-
+
https://github.com/dotnet/xharness
- 5d3b745c64e8092c2ce3ce1feca85d87d814f292
+ 230501dc45d8c96e995ceed1189852eb0ee08693
-
+
https://github.com/dotnet/xharness
- 5d3b745c64e8092c2ce3ce1feca85d87d814f292
+ 230501dc45d8c96e995ceed1189852eb0ee08693
-
+
https://github.com/dotnet/arcade
- f4269875971171c278c2cd695e9ef94b6516e4be
+ 234e0726c7384ee84bf08550f2d16a1ff2d5c543
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- c85736cdab833e3cefa202f5e7e28f1fb6543604
+ b9af49c3ae71595e30d893960d9b2cecf83c9743
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- c85736cdab833e3cefa202f5e7e28f1fb6543604
+ b9af49c3ae71595e30d893960d9b2cecf83c9743
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- c85736cdab833e3cefa202f5e7e28f1fb6543604
+ b9af49c3ae71595e30d893960d9b2cecf83c9743
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- c85736cdab833e3cefa202f5e7e28f1fb6543604
+ b9af49c3ae71595e30d893960d9b2cecf83c9743
-
+
https://github.com/dotnet/hotreload-utils
- 38e5743db0070214e73fa04ed1524a254be95c1a
+ 1eec66c6cff38ddf124c6c740b9ccbe2a1144352
-
+
https://github.com/dotnet/runtime-assets
- 886b608e3f566153c047ba0fd31357404365ae4c
+ 32bcf870359408a0cd6f325b558d744f5bf56c93
-
+
https://github.com/dotnet/roslyn
- 0cb0d5796b336c6a746e6d14c129f2e2b44f4f5e
+ fb8455f2f9046b821b826aab81bf8faa00711065
-
+
https://github.com/dotnet/roslyn
- 0cb0d5796b336c6a746e6d14c129f2e2b44f4f5e
+ fb8455f2f9046b821b826aab81bf8faa00711065
-
+
https://github.com/dotnet/roslyn
- 0cb0d5796b336c6a746e6d14c129f2e2b44f4f5e
+ fb8455f2f9046b821b826aab81bf8faa00711065
https://github.com/dotnet/roslyn-analyzers
@@ -364,18 +364,18 @@
https://github.com/dotnet/roslyn-analyzers
2b6ab8d727ce73a78bcbf026ac75ea8a7c804daf
-
+
https://github.com/dotnet/sdk
- 2fd62c3936f5336b836f6b12df170aa0e90da767
+ dfdec2edb38ee24c5551125e1cdf12cf6117b6a7
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- c85736cdab833e3cefa202f5e7e28f1fb6543604
+ b9af49c3ae71595e30d893960d9b2cecf83c9743
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
- c85736cdab833e3cefa202f5e7e28f1fb6543604
+ b9af49c3ae71595e30d893960d9b2cecf83c9743
diff --git a/eng/Versions.props b/eng/Versions.props
index 38116216008637..5e154a36b58b3b 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -40,9 +40,9 @@
Any tools that contribute to the design-time experience should use the MicrosoftCodeAnalysisVersion_LatestVS property above to ensure
they do not break the local dev experience.
-->
- 4.7.0-1.23269.2
- 4.7.0-1.23269.2
- 4.7.0-1.23269.2
+ 4.7.0-2.23301.9
+ 4.7.0-2.23301.9
+ 4.7.0-2.23301.9
- 8.0.100-preview.2.23107.1
+ 8.0.100-preview.6.23303.2
- 8.0.0-beta.23268.1
- 8.0.0-beta.23268.1
- 8.0.0-beta.23268.1
- 8.0.0-beta.23268.1
- 8.0.0-beta.23268.1
- 2.5.1-beta.23268.1
- 8.0.0-beta.23268.1
- 8.0.0-beta.23268.1
- 8.0.0-beta.23268.1
- 8.0.0-beta.23268.1
- 8.0.0-beta.23268.1
- 8.0.0-beta.23268.1
- 8.0.0-beta.23268.1
- 8.0.0-beta.23268.1
- 8.0.0-beta.23268.1
+ 8.0.0-beta.23302.3
+ 8.0.0-beta.23302.3
+ 8.0.0-beta.23302.3
+ 8.0.0-beta.23302.3
+ 8.0.0-beta.23302.3
+ 2.5.1-beta.23302.3
+ 8.0.0-beta.23302.3
+ 8.0.0-beta.23302.3
+ 8.0.0-beta.23302.3
+ 8.0.0-beta.23302.3
+ 8.0.0-beta.23302.3
+ 8.0.0-beta.23302.3
+ 8.0.0-beta.23302.3
+ 8.0.0-beta.23302.3
+ 8.0.0-beta.23302.3
6.0.0-preview.1.102
@@ -105,12 +105,12 @@
6.0.0
8.0.0-preview.5.23279.2
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
1.0.0-alpha.1.23106.1
1.0.0-alpha.1.23106.1
@@ -139,27 +139,27 @@
4.5.0
8.0.0-preview.5.23279.2
- 8.0.0-beta.23273.1
- 8.0.0-beta.23273.1
- 8.0.0-beta.23273.1
- 8.0.0-beta.23273.1
- 8.0.0-beta.23273.1
- 8.0.0-beta.23273.1
- 8.0.0-beta.23273.1
- 8.0.0-beta.23273.1
- 8.0.0-beta.23273.1
- 8.0.0-beta.23273.1
- 8.0.0-beta.23273.1
- 8.0.0-beta.23273.1
- 8.0.0-beta.23273.1
- 8.0.0-beta.23273.1
+ 8.0.0-beta.23280.1
+ 8.0.0-beta.23280.1
+ 8.0.0-beta.23280.1
+ 8.0.0-beta.23280.1
+ 8.0.0-beta.23280.1
+ 8.0.0-beta.23280.1
+ 8.0.0-beta.23280.1
+ 8.0.0-beta.23280.1
+ 8.0.0-beta.23280.1
+ 8.0.0-beta.23280.1
+ 8.0.0-beta.23280.1
+ 8.0.0-beta.23280.1
+ 8.0.0-beta.23280.1
+ 8.0.0-beta.23280.1
- 1.0.0-prerelease.23272.4
- 1.0.0-prerelease.23272.4
- 1.0.0-prerelease.23272.4
- 1.0.0-prerelease.23272.4
- 1.0.0-prerelease.23272.4
- 1.0.0-prerelease.23272.4
+ 1.0.0-prerelease.23303.6
+ 1.0.0-prerelease.23303.6
+ 1.0.0-prerelease.23303.6
+ 1.0.0-prerelease.23303.6
+ 1.0.0-prerelease.23303.6
+ 1.0.0-prerelease.23303.6
16.11.23-beta1.23063.1
2.0.0-beta4.22564.1
@@ -179,10 +179,10 @@
1.1.0
17.4.0-preview-20220707-01
- 8.0.0-prerelease.23272.1
- 8.0.0-prerelease.23272.1
- 8.0.0-prerelease.23272.1
- 8.0.0-alpha.0.23272.2
+ 8.0.0-prerelease.23279.1
+ 8.0.0-prerelease.23279.1
+ 8.0.0-prerelease.23279.1
+ 8.0.0-alpha.0.23280.2
2.4.2
1.0.0
2.4.5
@@ -211,39 +211,39 @@
8.0.0-preview.5.23279.2
- 0.11.4-alpha.23265.2
+ 0.11.4-alpha.23301.1
- 8.0.0-preview.4.23177.3
+ 8.0.0-preview.6.23280.1
2.1.7
8.0.0-alpha.1.23180.2
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
- 8.0.0-preview.6.23277.2
+ 8.0.0-preview.6.23301.1
$(MicrosoftNETWorkloadEmscriptenCurrentManifest80100TransportVersion)
1.1.87-gba258badda
1.0.0-v3.14.0.5722
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
- 14.0.0-alpha.1.23273.3
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
+ 14.0.0-alpha.1.23301.2
1.0.0-alpha.1.23106.1
1.0.0-alpha.1.23106.1
diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1
index e10a5968797463..6c4ac6fec1a99a 100644
--- a/eng/common/sdk-task.ps1
+++ b/eng/common/sdk-task.ps1
@@ -64,7 +64,7 @@ try {
$GlobalJson.tools | Add-Member -Name "vs" -Value (ConvertFrom-Json "{ `"version`": `"16.5`" }") -MemberType NoteProperty
}
if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) {
- $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.4.1" -MemberType NoteProperty
+ $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.6.0-2" -MemberType NoteProperty
}
if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") {
$xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true
diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml
index 44ad26abf54ba2..e20ee3a983cb05 100644
--- a/eng/common/templates/job/job.yml
+++ b/eng/common/templates/job/job.yml
@@ -75,6 +75,10 @@ jobs:
- ${{ if eq(parameters.enableRichCodeNavigation, 'true') }}:
- name: EnableRichCodeNavigation
value: 'true'
+ # Retry signature validation up to three times, waiting 2 seconds between attempts.
+ # See https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu3028#retry-untrusted-root-failures
+ - name: NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY
+ value: 3,2000
- ${{ each variable in parameters.variables }}:
# handle name-value variable syntax
# example:
@@ -83,7 +87,7 @@ jobs:
- ${{ if ne(variable.name, '') }}:
- name: ${{ variable.name }}
value: ${{ variable.value }}
-
+
# handle variable groups
- ${{ if ne(variable.group, '') }}:
- group: ${{ variable.group }}
@@ -169,7 +173,7 @@ jobs:
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- task: MicroBuildCleanup@1
- displayName: Execute Microbuild cleanup tasks
+ displayName: Execute Microbuild cleanup tasks
condition: and(always(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
continueOnError: ${{ parameters.continueOnError }}
env:
@@ -219,7 +223,7 @@ jobs:
displayName: Publish XUnit Test Results
inputs:
testResultsFormat: 'xUnit'
- testResultsFiles: '*.xml'
+ testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit
mergeTestResults: ${{ parameters.mergeTestResults }}
@@ -230,7 +234,7 @@ jobs:
displayName: Publish TRX Test Results
inputs:
testResultsFormat: 'VSTest'
- testResultsFiles: '*.trx'
+ testResultsFiles: '*.trx'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx
mergeTestResults: ${{ parameters.mergeTestResults }}
diff --git a/eng/common/templates/steps/source-build.yml b/eng/common/templates/steps/source-build.yml
index a97a185a367a92..1100521834a943 100644
--- a/eng/common/templates/steps/source-build.yml
+++ b/eng/common/templates/steps/source-build.yml
@@ -68,6 +68,11 @@ steps:
runtimeOsArgs='/p:RuntimeOS=${{ parameters.platform.runtimeOS }}'
fi
+ baseOsArgs=
+ if [ '${{ parameters.platform.baseOS }}' != '' ]; then
+ baseOsArgs='/p:BaseOS=${{ parameters.platform.baseOS }}'
+ fi
+
publishArgs=
if [ '${{ parameters.platform.skipPublishValidation }}' != 'true' ]; then
publishArgs='--publish'
@@ -86,6 +91,7 @@ steps:
$internalRestoreArgs \
$targetRidArgs \
$runtimeOsArgs \
+ $baseOsArgs \
/p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \
/p:ArcadeBuildFromSource=true \
/p:AssetManifestFileName=$assetManifestFileName
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index 38cf94ff88c6f3..ffe0b4e2dfc4d7 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -384,8 +384,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
# If the version of msbuild is going to be xcopied,
# use this version. Version matches a package here:
- # https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet-eng&package=RoslynTools.MSBuild&protocolType=NuGet&version=17.4.1&view=overview
- $defaultXCopyMSBuildVersion = '17.4.1'
+ # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/RoslynTools.MSBuild/versions/17.6.0-2
+ $defaultXCopyMSBuildVersion = '17.6.0-2'
if (!$vsRequirements) {
if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') {
diff --git a/eng/packaging.targets b/eng/packaging.targets
index 29291f1c6e6816..3e5f6a9e582865 100644
--- a/eng/packaging.targets
+++ b/eng/packaging.targets
@@ -16,6 +16,8 @@
false
true
+
+ true
$(MSBuildThisFileDirectory)useSharedDesignerContext.txt
PACKAGE.md
diff --git a/eng/pipelines/common/evaluate-default-paths.yml b/eng/pipelines/common/evaluate-default-paths.yml
index 70be16e61bad4b..8527d6ae77aaa8 100644
--- a/eng/pipelines/common/evaluate-default-paths.yml
+++ b/eng/pipelines/common/evaluate-default-paths.yml
@@ -17,7 +17,9 @@ parameters:
src/libraries/sendtohelix-wasi.targets
src/mono/mono/**/*wasm*
src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/*
+ src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk/*
src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/*
+ src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/*
src/mono/nuget/Microsoft.NETCore.BrowserDebugHost.Transport/*
src/mono/nuget/Microsoft.NET.Workload*
src/mono/sample/wasm/*
@@ -27,6 +29,7 @@ parameters:
src/tasks/WasmAppBuilder/*
src/tasks/WasmBuildTasks/*
src/tasks/WorkloadBuildTasks/*
+ src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/*
src/tests/Common/wasm-test-runner/*
]
_wasm_pipelines: [
@@ -185,6 +188,8 @@ jobs:
- src/mono/nuget/Microsoft.NET.Runtime.MonoAOTCompiler.Task/*
- src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/*
- src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/*
+ - src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk/*
+ - src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/*
- src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/*
- src/mono/nuget/Microsoft.NET.Workload*
- src/mono/nuget/Microsoft.NETCore.BrowserDebugHost.Transport/*
@@ -248,6 +253,7 @@ jobs:
- src/mono/wasm/debugger/*
- src/mono/wasm/Wasm.Build.Tests/*
- src/mono/nuget/Microsoft.NET.Runtime*
+ src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/*
- src/mono/nuget/Microsoft.NET.Workload*
- src/mono/nuget/Microsoft.NETCore.BrowserDebugHost.Transport/*
- ${{ parameters._const_paths._always_exclude }}
diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml
index 12f72b0d9e265f..cf93d34062b7da 100644
--- a/eng/pipelines/common/global-build-job.yml
+++ b/eng/pipelines/common/global-build-job.yml
@@ -162,6 +162,7 @@ jobs:
- template: /eng/common/templates/steps/source-build.yml
parameters:
platform:
+ baseOS: ${{ parameters.baseOS }}
buildScript: $(Build.SourcesDirectory)$(dir)build$(scriptExt)
nonPortable: ${{ parameters.isNonPortableSourceBuild }}
targetRID: ${{ parameters.targetRid }}
diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml
index 4f0d6bfd5aeb3c..bae79645c0c6dc 100644
--- a/eng/pipelines/common/platform-matrix.yml
+++ b/eng/pipelines/common/platform-matrix.yml
@@ -307,6 +307,7 @@ jobs:
container: SourceBuild_centos_x64 # Run the unknown-rid build on a platform with a known RID so our RID graph tooling can automatically add it to the RID graph.
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
+ baseOS: linux
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
isSourceBuild: true
@@ -579,6 +580,26 @@ jobs:
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
+# Android x64 with Docker-in-Docker
+
+- ${{ if containsValue(parameters.platforms, 'android_x64_docker') }}:
+ - template: xplat-setup.yml
+ parameters:
+ jobTemplate: ${{ parameters.jobTemplate }}
+ helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
+ variables: ${{ parameters.variables }}
+ osGroup: android
+ archType: x64
+ targetRid: android-x64
+ platform: android_x64
+ shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
+ container: android_docker
+ jobParameters:
+ runtimeFlavor: mono
+ buildConfig: ${{ parameters.buildConfig }}
+ helixQueueGroup: ${{ parameters.helixQueueGroup }}
+ ${{ insert }}: ${{ parameters.jobParameters }}
+
# Android x86
- ${{ if containsValue(parameters.platforms, 'android_x86') }}:
diff --git a/eng/pipelines/common/templates/pipeline-with-resources.yml b/eng/pipelines/common/templates/pipeline-with-resources.yml
index 9d3815ec3ded11..e135269d9e571a 100644
--- a/eng/pipelines/common/templates/pipeline-with-resources.yml
+++ b/eng/pipelines/common/templates/pipeline-with-resources.yml
@@ -33,10 +33,14 @@ resources:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64-alpine
env:
ROOTFS_DIR: /crossrootfs/arm64
- # This container contains all required toolsets to build for Android and for Linux with bionic libc.
+ # This container contains all required toolsets to build for Android and for Linux with bionic libc.
- container: linux_bionic
- image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-android
+ image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-android
+
+ # This container contains all required toolsets to build for Android as well as tooling to build docker images.
+ - container: android_docker
+ image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-android-docker
- container: linux_x64
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64
diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index cd8f01bf1652c2..3d943fce71b44f 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -102,6 +102,27 @@ jobs:
archiveType: tar
tarCompression: gz
+ # build NativeAOT iOS scenarios
+ - template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/global-build-job.yml
+ buildConfig: release
+ runtimeFlavor: mono
+ platforms:
+ - ios_arm64
+ jobParameters:
+ nameSuffix: iOSNativeAOT
+ isOfficialBuild: false
+ extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+ extraStepsParameters:
+ rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+ includeRootFolder: true
+ displayName: iOS NativeAOT Artifacts
+ artifactName: iOSNativeAOTarm64
+ archiveExtension: '.tar.gz'
+ archiveType: tar
+ tarCompression: gz
+
# build mono
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@@ -143,6 +164,24 @@ jobs:
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
logicalmachine: 'perfiphone12mini'
iOSLlvmBuild: False
+ iOSStripSymbols: False
+
+ - template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+ buildConfig: release
+ runtimeFlavor: mono
+ platforms:
+ - osx_x64
+ jobParameters:
+ testGroup: perf
+ runtimeType: iOSMono
+ projectFile: ios_scenarios.proj
+ runKind: ios_scenarios
+ runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+ logicalmachine: 'perfiphone12mini'
+ iOSLlvmBuild: False
+ iOSStripSymbols: True
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@@ -159,6 +198,57 @@ jobs:
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
logicalmachine: 'perfiphone12mini'
iOSLlvmBuild: True
+ iOSStripSymbols: False
+
+ - template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+ buildConfig: release
+ runtimeFlavor: mono
+ platforms:
+ - osx_x64
+ jobParameters:
+ testGroup: perf
+ runtimeType: iOSMono
+ projectFile: ios_scenarios.proj
+ runKind: ios_scenarios
+ runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+ logicalmachine: 'perfiphone12mini'
+ iOSLlvmBuild: True
+ iOSStripSymbols: True
+
+ # run NativeAOT iOS scenarios
+ - template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+ buildConfig: release
+ runtimeFlavor: mono
+ platforms:
+ - osx_x64
+ jobParameters:
+ testGroup: perf
+ runtimeType: iOSNativeAOT
+ projectFile: ios_scenarios.proj
+ runKind: ios_scenarios
+ runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+ logicalmachine: 'perfiphone12mini'
+ iOSStripSymbols: False
+
+ - template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+ buildConfig: release
+ runtimeFlavor: mono
+ platforms:
+ - osx_x64
+ jobParameters:
+ testGroup: perf
+ runtimeType: iOSNativeAOT
+ projectFile: ios_scenarios.proj
+ runKind: ios_scenarios
+ runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+ logicalmachine: 'perfiphone12mini'
+ iOSStripSymbols: True
# run mono microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
@@ -232,7 +322,7 @@ jobs:
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perftiger'
- # run coreclr perftiger microbenchmarks pgo perf jobs
+ # run coreclr perftiger microbenchmarks no dynamic pgo perf jobs
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
@@ -247,23 +337,7 @@ jobs:
runKind: micro
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perftiger'
- pgoRunType: -NoPgo
-
- - template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
- buildConfig: release
- runtimeFlavor: coreclr
- platforms:
- - windows_x64
- jobParameters:
- testGroup: perf
- liveLibrariesBuildConfig: Release
- projectFile: microbenchmarks.proj
- runKind: micro
- runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
- logicalmachine: 'perftiger'
- pgoRunType: -DynamicPgo
+ pgoRunType: -NoDynamicPGO
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
@@ -279,23 +353,7 @@ jobs:
runKind: micro
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perftiger'
- pgoRunType: --dynamicpgo
-
- - template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
- buildConfig: release
- runtimeFlavor: coreclr
- platforms:
- - windows_x64
- jobParameters:
- testGroup: perf
- liveLibrariesBuildConfig: Release
- projectFile: microbenchmarks.proj
- runKind: micro
- runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
- logicalmachine: 'perftiger'
- pgoRunType: -FullPgo
+ pgoRunType: --nodynamicpgo
# run coreclr perfowl microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
diff --git a/eng/pipelines/coreclr/perf-wasm-prepare-artifacts-steps.yml b/eng/pipelines/coreclr/perf-wasm-prepare-artifacts-steps.yml
index 0502a534d36cef..3015f0d6cb1413 100644
--- a/eng/pipelines/coreclr/perf-wasm-prepare-artifacts-steps.yml
+++ b/eng/pipelines/coreclr/perf-wasm-prepare-artifacts-steps.yml
@@ -12,10 +12,11 @@ steps:
displayName: "Install workload using artifacts"
- script: >-
- mkdir -p $(Build.SourcesDirectory)/artifacts/staging &&
+ mkdir -p $(Build.SourcesDirectory)/artifacts/staging/built-nugets &&
cp -r $(Build.SourcesDirectory)/artifacts/bin/dotnet-latest $(Build.SourcesDirectory)/artifacts/staging &&
cp -r $(Build.SourcesDirectory)/artifacts/bin/microsoft.netcore.app.runtime.browser-wasm $(Build.SourcesDirectory)/artifacts/staging &&
- cp -r $(Build.SourcesDirectory)/artifacts/bin/microsoft.netcore.app.ref $(Build.SourcesDirectory)/artifacts/staging
+ cp -r $(Build.SourcesDirectory)/artifacts/bin/microsoft.netcore.app.ref $(Build.SourcesDirectory)/artifacts/staging &&
+ cp -r $(Build.SourcesDirectory)/artifacts/packages/${{ parameters.configForBuild }}/Shipping/Microsoft.NET.Sdk.WebAssembly.Pack* $(Build.SourcesDirectory)/artifacts/staging/built-nugets
displayName: "Prepare artifacts staging directory"
- template: /eng/pipelines/common/upload-artifact-step.yml
diff --git a/eng/pipelines/coreclr/perf_slow.yml b/eng/pipelines/coreclr/perf_slow.yml
index 1a12f56abeaa2a..ceb84962217ecb 100644
--- a/eng/pipelines/coreclr/perf_slow.yml
+++ b/eng/pipelines/coreclr/perf_slow.yml
@@ -189,7 +189,7 @@ extends:
logicalmachine: 'perfampere'
timeoutInMinutes: 780
- # run coreclr Linux arm64 ampere microbenchmarks perf job
+ # run coreclr Linux arm64 ampere no dynamic pgo microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
@@ -205,7 +205,7 @@ extends:
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perfampere'
timeoutInMinutes: 780
- pgoRunType: --dynamicpgo
+ pgoRunType: --nodynamicpgo
# run coreclr Windows arm64 microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
@@ -240,7 +240,7 @@ extends:
logicalmachine: 'perfampere'
timeoutInMinutes: 500
- # run coreclr Windows arm64 ampere dynamic Pgo microbenchmarks perf job
+ # run coreclr Windows arm64 ampere no dynamic pgo microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
@@ -255,7 +255,7 @@ extends:
runKind: micro
runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
logicalmachine: 'perfampere'
- pgoRunType: -DynamicPgo
+ pgoRunType: -NoDynamicPGO
timeoutInMinutes: 500
# run coreclr cloudvm microbenchmarks perf job
diff --git a/eng/pipelines/coreclr/superpmi-collect.yml b/eng/pipelines/coreclr/superpmi-collect.yml
index 453a4a2e1a8db3..4c66b20aecbc76 100644
--- a/eng/pipelines/coreclr/superpmi-collect.yml
+++ b/eng/pipelines/coreclr/superpmi-collect.yml
@@ -133,6 +133,26 @@ extends:
collectionType: crossgen2
collectionName: libraries
+ - template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml
+ buildConfig: checked
+ platforms:
+ - osx_arm64
+ - linux_arm
+ - linux_arm64
+ - linux_x64
+ - windows_x64
+ - windows_x86
+ - windows_arm64
+ helixQueueGroup: ci
+ helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
+ jobParameters:
+ testGroup: outerloop
+ liveLibrariesBuildConfig: Release
+ collectionType: run
+ collectionName: realworld
+
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml
diff --git a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
index bdc0475fb5da84..89604f865c4ae8 100644
--- a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+++ b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
@@ -35,13 +35,13 @@ steps:
- script: rm -r -f $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp
workingDirectory: $(Build.SourcesDirectory)/artifacts/bin
displayName: clean bindir
-
- - ${{ if eq(parameters.osGroup, 'ios') }}:
- - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false
+
+ - ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.nameSuffix, 'iOSMono')) }}:
+ - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false
env:
DevTeamProvisioning: '-'
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
- displayName: Build HelloiOS AOT sample app LLVM=False
+ displayName: Build HelloiOS AOT sample app LLVM=False STRIP_SYMBOLS=False
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
displayName: 'Publish binlog'
@@ -53,17 +53,39 @@ steps:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App NoLLVM
- artifactName: iOSSampleAppNoLLVM
+ artifactName: iOSSampleAppNoLLVMSymbols
archiveExtension: '.zip'
archiveType: zip
- script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
displayName: Clean bindir
- - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false
+ - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=true
env:
DevTeamProvisioning: '-'
workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
- displayName: Build HelloiOS AOT sample app LLVM=True
+ displayName: Build HelloiOS AOT sample app LLVM=False STRIP_SYMBOLS=True
+ - task: PublishBuildArtifacts@1
+ condition: succeededOrFailed()
+ displayName: 'Publish binlog'
+ inputs:
+ pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
+ artifactName: ${{ parameters.artifactName }}
+ - template: /eng/pipelines/common/upload-artifact-step.yml
+ parameters:
+ rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
+ includeRootFolder: true
+ displayName: iOS Sample App NoLLVM NoSymbols
+ artifactName: iOSSampleAppNoLLVMNoSymbols
+ archiveExtension: '.zip'
+ archiveType: zip
+ - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
+ workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+ displayName: Clean bindir
+ - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false
+ env:
+ DevTeamProvisioning: '-'
+ workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+ displayName: Build HelloiOS AOT sample app LLVM=True STRIP_SYMBOLS=False
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
displayName: 'Publish binlog'
@@ -75,6 +97,71 @@ steps:
rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
includeRootFolder: true
displayName: iOS Sample App LLVM
- artifactName: iOSSampleAppLLVM
+ artifactName: iOSSampleAppLLVMSymbols
+ archiveExtension: '.zip'
+ archiveType: zip
+ - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
+ workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+ displayName: Clean bindir
+ - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=true
+ env:
+ DevTeamProvisioning: '-'
+ workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+ displayName: Build HelloiOS AOT sample app LLVM=True STRIP_SYMBOLS=True
+ - task: PublishBuildArtifacts@1
+ condition: succeededOrFailed()
+ displayName: 'Publish binlog'
+ inputs:
+ pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
+ artifactName: ${{ parameters.artifactName }}
+ - template: /eng/pipelines/common/upload-artifact-step.yml
+ parameters:
+ rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
+ includeRootFolder: true
+ displayName: iOS Sample App LLVM NoSymbols
+ artifactName: iOSSampleAppLLVMNoSymbols
archiveExtension: '.zip'
archiveType: zip
+
+ - ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.nameSuffix, 'iOSNativeAOT')) }}:
+ - script: make world TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false
+ env:
+ DevTeamProvisioning: '-'
+ workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT
+ displayName: Build HelloiOS Native AOT sample app STRIP_SYMBOLS=False
+ - task: PublishBuildArtifacts@1
+ condition: succeededOrFailed()
+ displayName: 'Publish binlog'
+ inputs:
+ pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/msbuild.binlog
+ artifactName: ${{ parameters.artifactName }}
+ - template: /eng/pipelines/common/upload-artifact-step.yml
+ parameters:
+ rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
+ includeRootFolder: true
+ displayName: iOS Sample App Symbols
+ artifactName: iOSSampleAppSymbols
+ archiveExtension: '.zip'
+ archiveType: zip
+ - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin
+ workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT
+ displayName: Clean bindir
+ - script: make world TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=true
+ env:
+ DevTeamProvisioning: '-'
+ workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT
+ displayName: Build HelloiOS Native AOT sample app STRIP_SYMBOLS=True
+ - task: PublishBuildArtifacts@1
+ condition: succeededOrFailed()
+ displayName: 'Publish binlog'
+ inputs:
+ pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/msbuild.binlog
+ artifactName: ${{ parameters.artifactName }}
+ - template: /eng/pipelines/common/upload-artifact-step.yml
+ parameters:
+ rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
+ includeRootFolder: true
+ displayName: iOS Sample App NoSymbols
+ artifactName: iOSSampleAppNoSymbols
+ archiveExtension: '.zip'
+ archiveType: zip
\ No newline at end of file
diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml
index e61e6761a89d7f..56766c72187365 100644
--- a/eng/pipelines/coreclr/templates/perf-job.yml
+++ b/eng/pipelines/coreclr/templates/perf-job.yml
@@ -19,6 +19,7 @@ parameters:
pgoRunType: ''
javascriptEngine: 'NoJS'
iOSLlvmBuild: 'False'
+ iOSStripSymbols: 'False'
skipLiveLibrariesDownload: false
collectHelixLogsScript: ''
timeoutInMinutes: 320
@@ -37,8 +38,8 @@ jobs:
- template: ${{ parameters.runJobTemplate }}
parameters:
# Compute job name from template parameters
- jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_{10}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.iosLlvmBuild) }}
- displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7} {8} {9} {10}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.iosLlvmBuild) }}
+ jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_{10}_{11}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.iosLlvmBuild, parameters.iosStripSymbols) }}
+ displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.iosLlvmBuild, parameters.iosStripSymbols) }}
pool: ${{ parameters.pool }}
buildConfig: ${{ parameters.buildConfig }}
archType: ${{ parameters.archType }}
@@ -56,6 +57,7 @@ jobs:
pgoRunType: ${{ parameters.pgoRunType }}
javascriptEngine: ${{ parameters.javascriptEngine }}
iosLlvmBuild: ${{ parameters.iosLlvmBuild }}
+ iosStripSymbols: ${{ parameters.iosStripSymbols }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
${{ if and(eq(parameters.runtimeType, 'wasm'), eq(parameters.codeGenType, 'aot')) }}:
@@ -68,7 +70,7 @@ jobs:
# Test job depends on the corresponding build job
${{ if eq(parameters.downloadSpecificBuild.buildId, '') }}:
dependsOn:
- - ${{ if not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'wasm')) }}:
+ - ${{ if not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'iOSNativeAOT', 'wasm')) }}:
- ${{ format('coreclr_{0}_product_build_{1}{2}_{3}_{4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
- ${{ if and(ne(parameters.liveLibrariesBuildConfig, ''), eq(parameters.skipLiveLibrariesDownload, 'false')) }}:
- ${{ format('libraries_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }}
@@ -83,13 +85,15 @@ jobs:
- ${{ 'Build_ios_arm64_release_PerfBDNApp' }}
- ${{ if eq(parameters.runtimeType, 'iOSMono')}}:
- ${{ 'build_ios_arm64_release_iOSMono' }}
+ - ${{ if eq(parameters.runtimeType, 'iOSNativeAOT')}}:
+ - ${{ 'build_ios_arm64_release_iOSNativeAOT' }}
- ${{ if and(eq(parameters.osGroup, 'windows'), not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono'))) }}:
+ ${{ if and(eq(parameters.osGroup, 'windows'), not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'iOSNativeAOT'))) }}:
${{ if eq(parameters.runtimeType, 'mono') }}:
extraSetupParameters: -Architecture ${{ parameters.archType }} -MonoDotnet $(Build.SourcesDirectory)\.dotnet-mono
${{ if eq(parameters.runtimeType, 'coreclr') }}:
extraSetupParameters: -CoreRootDirectory $(Build.SourcesDirectory)\artifacts\tests\coreclr\${{ parameters.osGroup }}.${{ parameters.archType }}.Release\Tests\Core_Root -Architecture ${{ parameters.archType }}
- ${{ if and(ne(parameters.osGroup, 'windows'), not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono'))) }}:
+ ${{ if and(ne(parameters.osGroup, 'windows'), not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'iOSNativeAOT'))) }}:
${{ if and(eq(parameters.runtimeType, 'mono'), ne(parameters.codeGenType, 'AOT')) }}:
extraSetupParameters: --architecture ${{ parameters.archType }} --monodotnet $(Build.SourcesDirectory)/.dotnet-mono
${{ if and(eq(parameters.runtimeType, 'wasm'), ne(parameters.codeGenType, 'AOT')) }}:
@@ -104,8 +108,10 @@ jobs:
extraSetupParameters: --corerootdirectory $(Build.SourcesDirectory)/artifacts/tests/coreclr/${{ parameters.osGroup }}.${{ parameters.archType }}.Release/Tests/Core_Root --architecture ${{ parameters.archType }} --alpine
${{ if in(parameters.runtimeType, 'AndroidMono') }}:
extraSetupParameters: -Architecture ${{ parameters.archType }} -AndroidMono
- ${{ if in(parameters.runtimeType, 'iosMono') }}:
- extraSetupParameters: --architecture ${{ parameters.archType }} --iosmono --iosllvmbuild ${{ parameters.iOSLlvmBuild }}
+ ${{ if in(parameters.runtimeType, 'iOSMono') }}:
+ extraSetupParameters: --architecture ${{ parameters.archType }} --iosmono --iosllvmbuild ${{ parameters.iOSLlvmBuild }} --iosstripsymbols ${{ parameters.iOSStripSymbols }}
+ ${{ if in(parameters.runtimeType, 'iOSNativeAOT') }}:
+ extraSetupParameters: --architecture ${{ parameters.archType }} --iosnativeaot --iosllvmbuild ${{ parameters.iOSLlvmBuild }} --iosstripsymbols ${{ parameters.iOSStripSymbols }}
variables:
- ${{ each variable in parameters.variables }}:
@@ -147,7 +153,7 @@ jobs:
displayName: 'live-built libraries'
# Download coreclr
- - ${{ if not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'wasm')) }}:
+ - ${{ if not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'iOSNativeAOT', 'wasm')) }}:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(buildProductRootFolderPath)
@@ -188,6 +194,7 @@ jobs:
mkdir -p $(librariesDownloadDir)/bin/wasm/wasm-data &&
mkdir -p $(librariesDownloadDir)/bin/wasm/dotnet &&
cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-latest/* $(librariesDownloadDir)/bin/wasm/dotnet &&
+ cp -r $(librariesDownloadDir)/BrowserWasm/staging/built-nugets $(librariesDownloadDir)/bin/wasm &&
cp src/mono/wasm/Wasm.Build.Tests/data/test-main-7.0.js $(librariesDownloadDir)/bin/wasm/wasm-data/test-main.js &&
find $(librariesDownloadDir)/bin/wasm -type d &&
find $(librariesDownloadDir)/bin/wasm -type f -exec chmod 664 {} \;
@@ -222,39 +229,50 @@ jobs:
artifactName: 'AndroidBDNApk'
displayName: 'Mono Android BDN Apk'
- # Download iOSMono tests
- - ${{ if eq(parameters.runtimeType, 'iOSMono') }}:
+ # Download iOSMono and Native AOT tests
+ - ${{ if or(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.runtimeType, 'iOSNativeAOT')) }}:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
- unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nollvm
+ unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld
cleanUnpackFolder: false
- artifactFileName: 'iOSSampleAppNoLLVM.zip'
- artifactName: 'iOSSampleAppNoLLVM'
- displayName: 'iOS Sample App NoLLVM'
- - template: /eng/pipelines/common/download-artifact-step.yml
- parameters:
- unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/llvm
- cleanUnpackFolder: false
- artifactFileName: 'iOSSampleAppLLVM.zip'
- artifactName: 'iOSSampleAppLLVM'
- displayName: 'iOS Sample App LLVM'
- # same artifact as above but don't extract .zip
- - task: DownloadBuildArtifacts@0
- displayName: 'Download iOS Sample App NoLLVM'
- inputs:
- buildType: current
- downloadType: single
- downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nollvmzip'
- artifactName: 'iOSSampleAppNoLLVM'
- checkDownloadedFiles: true
+ ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'False'), eq(parameters.iOSStripSymbols, 'False')) }}:
+ artifactName: 'iOSSampleAppNoLLVMSymbols'
+ artifactFileName: 'iOSSampleAppNoLLVMSymbols.zip'
+ ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'False'), eq(parameters.iOSStripSymbols, 'True')) }}:
+ artifactName: 'iOSSampleAppNoLLVMNoSymbols'
+ artifactFileName: 'iOSSampleAppNoLLVMNoSymbols.zip'
+ ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'True'), eq(parameters.iOSStripSymbols, 'False')) }}:
+ artifactName: 'iOSSampleAppLLVMSymbols'
+ artifactFileName: 'iOSSampleAppLLVMSymbols.zip'
+ ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'True'), eq(parameters.iOSStripSymbols, 'True')) }}:
+ artifactName: 'iOSSampleAppLLVMNoSymbols'
+ artifactFileName: 'iOSSampleAppLLVMNoSymbols.zip'
+ ${{ if and(eq(parameters.runtimeType, 'iOSNativeAOT'), eq(parameters.iOSStripSymbols, 'False')) }}:
+ artifactName: 'iOSSampleAppSymbols'
+ artifactFileName: 'iOSSampleAppSymbols.zip'
+ ${{ if and(eq(parameters.runtimeType, 'iOSNativeAOT'), eq(parameters.iOSStripSymbols, 'True')) }}:
+ artifactName: 'iOSSampleAppNoSymbols'
+ artifactFileName: 'iOSSampleAppNoSymbols.zip'
+ displayName: 'iOS Sample App'
# same artifact as above but don't extract .zip
- task: DownloadBuildArtifacts@0
- displayName: 'Download iOS Sample App LLVM'
+ displayName: 'Download iOS Sample App'
inputs:
buildType: current
downloadType: single
- downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/llvmzip'
- artifactName: 'iOSSampleAppLLVM'
+ downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip'
+ ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'False'), eq(parameters.iOSStripSymbols, 'False')) }}:
+ artifactName: 'iOSSampleAppNoLLVMSymbols'
+ ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'False'), eq(parameters.iOSStripSymbols, 'True')) }}:
+ artifactName: 'iOSSampleAppNoLLVMNoSymbols'
+ ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'True'), eq(parameters.iOSStripSymbols, 'False')) }}:
+ artifactName: 'iOSSampleAppLLVMSymbols'
+ ${{ if and(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.iOSLlvmBuild, 'True'), eq(parameters.iOSStripSymbols, 'True')) }}:
+ artifactName: 'iOSSampleAppLLVMNoSymbols'
+ ${{ if and(eq(parameters.runtimeType, 'iOSNativeAOT'), eq(parameters.iOSStripSymbols, 'False')) }}:
+ artifactName: 'iOSSampleAppSymbols'
+ ${{ if and(eq(parameters.runtimeType, 'iOSNativeAOT'), eq(parameters.iOSStripSymbols, 'True')) }}:
+ artifactName: 'iOSSampleAppNoSymbols'
checkDownloadedFiles: true
# Create Core_Root
@@ -265,8 +283,8 @@ jobs:
# Copy the runtime directory into the testhost folder to include OOBs.
- script: "build.cmd -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)\\bin\\mono\\$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\runtime\\net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)\\shared\\Microsoft.NETCore.App\\$(productVersion) /E /I /Y;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\.dotnet-mono /E /I /Y;copy $(Build.SourcesDirectory)\\artifacts\\bin\\coreclr\\$(osGroup).$(archType).$(buildConfigUpper)\\corerun.exe $(Build.SourcesDirectory)\\.dotnet-mono\\shared\\Microsoft.NETCore.App\\$(productVersion)\\corerun.exe"
displayName: "Create mono dotnet (Windows)"
- condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), eq(variables.osGroup, 'windows'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono')))
+ condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), eq(variables.osGroup, 'windows'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono', 'iOSNativeAOT')))
- script: "mkdir $(Build.SourcesDirectory)/.dotnet-mono;./build.sh -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)/bin/mono/$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;cp $(Build.SourcesDirectory)/artifacts/bin/runtime/net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)/* $(Build.SourcesDirectory)/artifacts/bin/testhost/net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)/shared/Microsoft.NETCore.App/$(productVersion) -rf;cp $(Build.SourcesDirectory)/artifacts/bin/testhost/net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)/* $(Build.SourcesDirectory)/.dotnet-mono -r;cp $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)/corerun $(Build.SourcesDirectory)/.dotnet-mono/shared/Microsoft.NETCore.App/$(productVersion)/corerun"
displayName: "Create mono dotnet (Linux)"
- condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), ne(variables.osGroup, 'windows'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono')))
+ condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), ne(variables.osGroup, 'windows'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono', 'iOSNativeAOT')))
diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
index c8267446e516d8..ba6875b6a7fec3 100644
--- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml
+++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
@@ -142,6 +142,7 @@ jobs:
- script: >-
mkdir -p $(librariesDownloadDir)/bin/wasm/data &&
cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-latest $(librariesDownloadDir)/bin/wasm &&
+ cp -r $(librariesDownloadDir)/BrowserWasm/staging/built-nugets $(librariesDownloadDir)/bin/wasm &&
cp src/mono/wasm/Wasm.Build.Tests/data/test-main-7.0.js $(librariesDownloadDir)/bin/wasm/data/test-main.js &&
find $(librariesDownloadDir)/bin/wasm -type f -exec chmod 664 {} \;
displayName: "Create wasm directory (Linux)"
@@ -215,6 +216,6 @@ jobs:
displayName: Publish Logs
inputs:
targetPath: $(Build.SourcesDirectory)/artifacts/log
- artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_$(iOSLlvmBuild)'
+ artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_$(iOSLlvmBuild)_$(iOSStripSymbols)'
continueOnError: true
condition: always()
diff --git a/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml b/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml
index ef55089a230467..ab401a83f6959f 100644
--- a/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml
+++ b/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml
@@ -91,6 +91,9 @@ jobs:
- ${{ if eq(parameters.collectionName, 'benchmarks') }}:
- name: InputDirectory
value: '$(Core_Root_Dir)'
+ - ${{ if eq(parameters.collectionName, 'realworld') }}:
+ - name: InputDirectory
+ value: '$(Core_Root_Dir)'
- ${{ if eq(parameters.collectionName, 'coreclr_tests') }}:
- name: InputDirectory
value: '$(managedTestArtifactRootFolderPath)'
diff --git a/eng/pipelines/runtime-android-grpc-client-tests.yml b/eng/pipelines/runtime-android-grpc-client-tests.yml
index 2c52bbf136c78d..00e51f766d95ce 100644
--- a/eng/pipelines/runtime-android-grpc-client-tests.yml
+++ b/eng/pipelines/runtime-android-grpc-client-tests.yml
@@ -36,7 +36,7 @@ extends:
buildConfig: Release
runtimeFlavor: mono
platforms:
- - android_x64
+ - android_x64_docker
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_gRPC
diff --git a/eng/pipelines/runtime-codeql.yml b/eng/pipelines/runtime-codeql.yml
index 62c002926b70da..34fa555d180fe6 100644
--- a/eng/pipelines/runtime-codeql.yml
+++ b/eng/pipelines/runtime-codeql.yml
@@ -2,8 +2,13 @@ trigger:
none
schedules:
- - cron: 0 12 * * 1
- displayName: Weekly Monday CodeQL/Semmle run
+ - cron: 0 12 * * 1,4,6
+ # CodeQL auto-injects into other pipelines and will do a scan if one hasn't
+ # been done in 72 hours. These can cause timeouts, so we ensure that one has
+ # already been performed. We can increase this to 4x/week or be more
+ # sophisticated if the 72 hour period ending Thursday ("4" in the cron line)
+ # causes a problem.
+ displayName: 3x/week CodeQL/Semmle run
branches:
include:
- main
diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml
index 23fbbff0770c5c..4b182fb0e7be2a 100644
--- a/eng/pipelines/runtime.yml
+++ b/eng/pipelines/runtime.yml
@@ -248,7 +248,7 @@ extends:
extraStepsTemplate: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml
extraStepsParameters:
creator: dotnet-bot
- testBuildArgs: 'nativeaot tree ";nativeaot;Loader;Interop;tracing/eventpipe/config;tracing/eventpipe/simpleprovidervalidation;" test tracing/eventcounter/runtimecounters.csproj /p:BuildNativeAotFrameworkObjects=true'
+ testBuildArgs: 'nativeaot tree ";nativeaot;Loader;Interop;tracing/eventpipe/config;tracing/eventpipe/diagnosticport;tracing/eventpipe/reverse;" test tracing/eventcounter/runtimecounters.csproj /p:BuildNativeAotFrameworkObjects=true'
liveLibrariesBuildConfig: Release
testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig)
extraVariablesTemplates:
@@ -290,7 +290,7 @@ extends:
extraStepsTemplate: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml
extraStepsParameters:
creator: dotnet-bot
- testBuildArgs: nativeaot tree nativeaot
+ testBuildArgs: 'nativeaot tree ";nativeaot;tracing/eventpipe/simpleprovidervalidation;"'
liveLibrariesBuildConfig: Release
testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig)
extraVariablesTemplates:
diff --git a/eng/resolveContract.targets b/eng/resolveContract.targets
index 2dc517aaa96171..6d414f46f93e6b 100644
--- a/eng/resolveContract.targets
+++ b/eng/resolveContract.targets
@@ -1,4 +1,5 @@
+
+
+ true
+ true
+
+
false
diff --git a/eng/targetingpacks.targets b/eng/targetingpacks.targets
index ebdebf46c8b678..14ceef19b704da 100644
--- a/eng/targetingpacks.targets
+++ b/eng/targetingpacks.targets
@@ -35,7 +35,7 @@
LatestRuntimeFrameworkVersion="$(ProductVersion)"
RuntimeFrameworkName="$(LocalFrameworkOverrideName)"
RuntimePackNamePatterns="$(LocalFrameworkOverrideName).Runtime.**RID**"
- RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;maccatalyst-x64;maccatalyst-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86"
+ RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;maccatalyst-x64;maccatalyst-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86"
TargetFramework="$(NetCoreAppCurrent)"
TargetingPackName="$(LocalFrameworkOverrideName).Ref"
TargetingPackVersion="$(ProductVersion)"
@@ -45,20 +45,20 @@
RuntimeFrameworkName="$(LocalFrameworkOverrideName)"
LatestRuntimeFrameworkVersion="$(ProductVersion)"
RuntimePackNamePatterns="$(LocalFrameworkOverrideName).Runtime.Mono.**RID**"
- RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;win-arm;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;maccatalyst-x64;maccatalyst-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86;browser-wasm;wasi-wasm;ios-arm64;iossimulator-arm64;iossimulator-x64;tvos-arm64;tvossimulator-arm64;tvossimulator-x64;android-arm64;android-arm;android-x64;android-x86"
+ RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;maccatalyst-x64;maccatalyst-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86;browser-wasm;wasi-wasm;ios-arm64;iossimulator-arm64;iossimulator-x64;tvos-arm64;tvossimulator-arm64;tvossimulator-x64;android-arm64;android-arm;android-x64;android-x86"
RuntimePackLabels="Mono"
Condition="'@(KnownRuntimePack)' == '' or !@(KnownRuntimePack->AnyHaveMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))"/>
@@ -67,7 +67,7 @@
ExcludedRuntimeIdentifiers="android"
AppHostPackNamePattern="$(LocalFrameworkOverrideName).Host.**RID**"
AppHostPackVersion="$(ProductVersion)"
- AppHostRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86"
+ AppHostRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86"
TargetFramework="$(NetCoreAppCurrent)"
Condition="'@(KnownAppHostPack)' == '' or !@(KnownAppHostPack->AnyHaveMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))" />
diff --git a/eng/testing/ProvisioningVersions.props b/eng/testing/ProvisioningVersions.props
index 4f2df8f136f7d4..7f555c06db3bca 100644
--- a/eng/testing/ProvisioningVersions.props
+++ b/eng/testing/ProvisioningVersions.props
@@ -44,7 +44,7 @@
- true
+ false
diff --git a/eng/testing/performance/blazor_perf.proj b/eng/testing/performance/blazor_perf.proj
index 4c6881dfbb05e4..a526a8cc3b5de3 100644
--- a/eng/testing/performance/blazor_perf.proj
+++ b/eng/testing/performance/blazor_perf.proj
@@ -3,11 +3,14 @@
%HELIX_WORKITEM_UPLOAD_ROOT%\
%24{HELIX_WORKITEM_UPLOAD_ROOT}/
+ set RestoreAdditionalProjectSources=%HELIX_CORRELATION_PAYLOAD%\built-nugets &
+ export RestoreAdditionalProjectSources=$HELIX_CORRELATION_PAYLOAD/built-nugets &&
+
python3
$(HelixPreCommands);chmod +x $HELIX_WORKITEM_PAYLOAD/SOD/SizeOnDisk
--has-workload --readonly-dotnet --msbuild "/p:_TrimmerDumpDependencies=true" --msbuild /warnaserror:NU1602,NU1604 --msbuild-static AdditionalMonoLinkerOptions=%27"%24(AdditionalMonoLinkerOptions) --dump-dependencies"%27 --binlog $(LogDirectory)blazor_publish.binlog
- $(Python) pre.py publish $(PublishArgs)
+ $(EnvVars) $(Python) pre.py publish $(PublishArgs)
diff --git a/eng/testing/performance/ios_scenarios.proj b/eng/testing/performance/ios_scenarios.proj
index 6b30417fdff479..3801fd935d96f8 100644
--- a/eng/testing/performance/ios_scenarios.proj
+++ b/eng/testing/performance/ios_scenarios.proj
@@ -17,6 +17,8 @@
nollvm
llvm
+ symbols
+ nosymbols
@@ -28,19 +30,19 @@
-
+
$(WorkItemDirectory)
- cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(LlvmPath) ./app;$(Python) pre.py --name app
+ cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld ./app;$(Python) pre.py --name app
$(Python) test.py sod --scenario-name "%(Identity)"
$(Python) post.py
-
+
$(WorkItemDirectory)
- cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/$(LlvmPath)zip/iOSSampleApp$(LlvmPath)/iOSSampleApp$(LlvmPath).zip .;$(Python) pre.py --name iOSSampleApp$(LlvmPath).zip
+ cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/iOSSampleApp.zip .;$(Python) pre.py --name iOSSampleApp.zip
$(Python) test.py sod --scenario-name "%(Identity)"
$(Python) post.py
-
+
$(WorkItemDirectory).zip
00:15:00
ios-device
@@ -49,7 +51,7 @@
# PreCommands
export XHARNESSPATH=$XHARNESS_CLI_PATH
- cp -r $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(LlvmPath)/HelloiOS.app $(ScenarioDirectory)helloios/HelloiOS.app
+ cp -r $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/iosHelloWorld/HelloiOS.app $(ScenarioDirectory)helloios/HelloiOS.app
cp -f embedded.mobileprovision $(ScenarioDirectory)helloios/HelloiOS.app
cd $(ScenarioDirectory)helloios
sign HelloiOS.app
diff --git a/eng/testing/performance/performance-setup.ps1 b/eng/testing/performance/performance-setup.ps1
index 29e3d6199cb788..a826f39f045e17 100644
--- a/eng/testing/performance/performance-setup.ps1
+++ b/eng/testing/performance/performance-setup.ps1
@@ -22,10 +22,10 @@ Param(
[string] $LogicalMachine="",
[switch] $AndroidMono,
[switch] $iOSMono,
- [switch] $NoPGO,
- [switch] $DynamicPGO,
- [switch] $FullPGO,
+ [switch] $iOSNativeAOT,
+ [switch] $NoDynamicPGO,
[switch] $iOSLlvmBuild,
+ [switch] $iOSStripSymbols,
[string] $MauiVersion,
[switch] $UseLocalCommitTime
)
@@ -83,21 +83,18 @@ if($MonoDotnet -ne "")
}
}
-if($NoPGO)
+if($NoDynamicPGO)
{
- $Configurations += " PGOType=nopgo"
-}
-elseif($DynamicPGO)
-{
- $Configurations += " PGOType=dynamicpgo"
-}
-elseif($FullPGO)
-{
- $Configurations += " PGOType=fullpgo"
+ $Configurations += " PGOType=nodynamicpgo"
}
if ($iOSMono) {
$Configurations += " iOSLlvmBuild=$iOSLlvmBuild"
+ $Configurations += " iOSStripSymbols=$iOSStripSymbols"
+}
+
+if ($iOSNativeAOT) {
+ $Configurations += " iOSStripSymbols=$iOSStripSymbols"
}
# FIX ME: This is a workaround until we get this from the actual pipeline
@@ -109,17 +106,9 @@ if($Branch.Contains("refs/heads/release"))
$CommonSetupArguments="--channel $CleanedBranchName --queue $Queue --build-number $BuildNumber --build-configs $Configurations --architecture $Architecture"
$SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments"
-if($NoPGO)
-{
- $SetupArguments = "$SetupArguments --no-pgo"
-}
-elseif($DynamicPGO)
-{
- $SetupArguments = "$SetupArguments --dynamic-pgo"
-}
-elseif($FullPGO)
+if($NoDynamicPGO)
{
- $SetupArguments = "$SetupArguments --full-pgo"
+ $SetupArguments = "$SetupArguments --no-dynamic-pgo"
}
if($UseLocalCommitTime)
@@ -196,6 +185,7 @@ Write-PipelineSetVariable -Name 'RunFromPerfRepo' -Value "$RunFromPerformanceRep
Write-PipelineSetVariable -Name 'Compare' -Value "$Compare" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'MonoDotnet' -Value "$UsingMono" -IsMultiJobVariable $false
Write-PipelineSetVariable -Name 'iOSLlvmBuild' -Value "$iOSLlvmBuild" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'iOSStripSymbols' -Value "$iOSStripSymbols" -IsMultiJobVariable $false
# Helix Arguments
Write-PipelineSetVariable -Name 'Creator' -Value "$Creator" -IsMultiJobVariable $false
diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index 871a745c3375d5..38fbbc1a980de3 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -36,7 +36,10 @@ use_latest_dotnet=false
logical_machine=
javascript_engine="v8"
iosmono=false
+iosnativeaot=false
+runtimetype=""
iosllvmbuild=""
+iosstripsymbols=""
maui_version=""
use_local_commit_time=false
only_sanity=false
@@ -139,16 +142,8 @@ while (($# > 0)); do
wasmaot=true
shift 1
;;
- --nopgo)
- nopgo=true
- shift 1
- ;;
- --dynamicpgo)
- dynamicpgo=true
- shift 1
- ;;
- --fullpgo)
- fullpgo=true
+ --nodynamicpgo)
+ nodynamicpgo=true
shift 1
;;
--compare)
@@ -171,10 +166,18 @@ while (($# > 0)); do
iosmono=true
shift 1
;;
+ --iosnativeaot)
+ iosnativeaot=true
+ shift 1
+ ;;
--iosllvmbuild)
iosllvmbuild=$2
shift 2
;;
+ --iosstripsymbols)
+ iosstripsymbols=$2
+ shift 2
+ ;;
--mauiversion)
maui_version=$2
shift 2
@@ -222,12 +225,12 @@ while (($# > 0)); do
echo " --dotnetversions Passed as '--dotnet-versions ' to the setup script"
echo " --alpine Set for runs on Alpine"
echo " --iosmono Set for ios Mono/Maui runs"
+ echo " --iosnativeaot Set for ios Native AOT runs"
echo " --iosllvmbuild Set LLVM for iOS Mono/Maui runs"
+ echo " --iosstripsymbols Set STRIP_DEBUG_SYMBOLS for iOS Mono/Maui runs"
echo " --mauiversion Set the maui version for Mono/Maui runs"
echo " --uselocalcommittime Pass local runtime commit time to the setup script"
- echo " --nopgo Set for No PGO runs"
- echo " --dynamicpgo Set for dynamic PGO runs"
- echo " --fullpgo Set for Full PGO runs"
+ echo " --nodynamicpgo Set for No dynamic PGO runs"
echo ""
exit 1
;;
@@ -329,21 +332,23 @@ if [[ "$monoaot" == "true" ]]; then
fi
if [[ "$iosmono" == "true" ]]; then
- configurations="$configurations iOSLlvmBuild=$iosllvmbuild"
+ runtimetype="Mono"
+ configurations="$configurations iOSLlvmBuild=$iosllvmbuild iOSStripSymbols=$iosstripsymbols RuntimeType=$runtimetype"
extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments"
fi
-if [[ "$nopgo" == "true" ]]; then
- configurations="$configurations PGOType=nopgo"
-fi
-if [[ "$dynamicpgo" == "true" ]]; then
- configurations="$configurations PGOType=dynamicpgo"
+if [[ "$iosnativeaot" == "true" ]]; then
+ runtimetype="NativeAOT"
+ configurations="$configurations iOSStripSymbols=$iosstripsymbols RuntimeType=$runtimetype"
+ extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments"
fi
-if [[ "$fullpgo" == "true" ]]; then
- configurations="$configurations PGOType=fullpgo"
- extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --category-exclusion-filter NoAOT"
+
+if [[ "$nodynamicpgo" == "true" ]]; then
+ configurations="$configurations PGOType=nodynamicpgo"
fi
+
+
cleaned_branch_name="main"
if [[ $branch == *"refs/heads/release"* ]]; then
cleaned_branch_name=${branch/refs\/heads\//}
@@ -406,14 +411,8 @@ if [[ -n "$dotnet_versions" ]]; then
setup_arguments="$setup_arguments --dotnet-versions $dotnet_versions"
fi
-if [[ "$nopgo" == "true" ]]; then
- setup_arguments="$setup_arguments --no-pgo"
-fi
-if [[ "$dynamicpgo" == "true" ]]; then
- setup_arguments="$setup_arguments --dynamic-pgo"
-fi
-if [[ "$fullpgo" == "true" ]]; then
- setup_arguments="$setup_arguments --full-pgo"
+if [[ "$nodynamicpgo" == "true" ]]; then
+ setup_arguments="$setup_arguments --no-dynamic-pgo"
fi
if [[ "$monoaot" == "true" ]]; then
@@ -434,16 +433,11 @@ if [[ "$use_baseline_core_run" == true ]]; then
mv $baseline_core_root_directory $new_baseline_core_root
fi
-if [[ "$iosmono" == "true" ]]; then
- if [[ "$iosllvmbuild" == "True" ]]; then
- # LLVM Mono .app
- mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/llvm $payload_directory/iosHelloWorld
- mkdir -p $payload_directory/iosHelloWorldZip/llvmzip && cp -rv $source_directory/iosHelloWorldZip/llvmzip $payload_directory/iosHelloWorldZip
- else
- # NoLLVM Mono .app
- mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nollvm $payload_directory/iosHelloWorld
- mkdir -p $payload_directory/iosHelloWorldZip/nollvmzip && cp -rv $source_directory/iosHelloWorldZip/nollvmzip $payload_directory/iosHelloWorldZip
- fi
+if [[ "$iosmono" == "true" || "$iosnativeaot" == "true" ]]; then
+ mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld $payload_directory/iosHelloWorld
+ mkdir -p $payload_directory/iosHelloWorldZip && cp -rv $source_directory/iosHelloWorldZip $payload_directory/iosHelloWorldZip
+
+ find "$payload_directory/iosHelloWorldZip/" -type f -name "*.zip" -execdir mv {} "$payload_directory/iosHelloWorldZip/iOSSampleApp.zip" \;
fi
ci=true
@@ -477,6 +471,8 @@ Write-PipelineSetVariable -name "Compare" -value "$compare" -is_multi_job_variab
Write-PipelineSetVariable -name "MonoDotnet" -value "$using_mono" -is_multi_job_variable false
Write-PipelineSetVariable -name "WasmDotnet" -value "$using_wasm" -is_multi_job_variable false
Write-PipelineSetVariable -Name 'iOSLlvmBuild' -Value "$iosllvmbuild" -is_multi_job_variable false
+Write-PipelineSetVariable -Name 'iOSStripSymbols' -Value "$iosstripsymbols" -is_multi_job_variable false
+Write-PipelineSetVariable -Name 'RuntimeType' -Value "$runtimetype" -is_multi_job_variable false
Write-PipelineSetVariable -name "OnlySanityCheck" -value "$only_sanity" -is_multi_job_variable false
# Put it back to what was set on top of this script
diff --git a/eng/testing/scenarios/BuildWasmAppsJobsList.txt b/eng/testing/scenarios/BuildWasmAppsJobsList.txt
index 38e288f81cfa14..914e6a2f956ee1 100644
--- a/eng/testing/scenarios/BuildWasmAppsJobsList.txt
+++ b/eng/testing/scenarios/BuildWasmAppsJobsList.txt
@@ -11,6 +11,7 @@ Wasm.Build.Tests.BuildPublishTests
Wasm.Build.Tests.CleanTests
Wasm.Build.Tests.ConfigSrcTests
Wasm.Build.Tests.IcuShardingTests
+Wasm.Build.Tests.HybridGlobalizationTests
Wasm.Build.Tests.InvariantGlobalizationTests
Wasm.Build.Tests.MainWithArgsTests
Wasm.Build.Tests.NativeBuildTests
diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets
index 4db0bf2f448955..4f4bcb481073ac 100644
--- a/eng/testing/tests.singlefile.targets
+++ b/eng/testing/tests.singlefile.targets
@@ -29,10 +29,10 @@
$(CoreCLRAotSdkDir)
$(NetCoreAppCurrentTestHostSharedFrameworkPath)
$(NetCoreAppCurrentTestHostSharedFrameworkPath)
- $(NoWarn);IL1005;IL2105;IL3000;IL3001;IL3002;IL3003
+ $(NoWarn);IL1005;IL2105;IL3000;IL3001;IL3002;IL3003;IL3050;IL3051;IL3052;IL3053
partial
true
- true
+ false
diff --git a/global.json b/global.json
index d24eda92f8b044..778d73c6fe7963 100644
--- a/global.json
+++ b/global.json
@@ -8,9 +8,9 @@
"dotnet": "8.0.100-preview.4.23260.5"
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23268.1",
- "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23268.1",
- "Microsoft.DotNet.SharedFramework.Sdk": "8.0.0-beta.23268.1",
+ "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23302.3",
+ "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23302.3",
+ "Microsoft.DotNet.SharedFramework.Sdk": "8.0.0-beta.23302.3",
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.Build.Traversal": "3.4.0",
"Microsoft.NET.Sdk.IL": "8.0.0-preview.5.23279.2"
diff --git a/src/coreclr/.nuget/Directory.Build.props b/src/coreclr/.nuget/Directory.Build.props
index 150e9ccfb0b82b..885f7f10739850 100644
--- a/src/coreclr/.nuget/Directory.Build.props
+++ b/src/coreclr/.nuget/Directory.Build.props
@@ -110,9 +110,6 @@
x86
-
- arm
-
arm64
diff --git a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs
index 0ee478fa675458..bc06bf44bac99d 100644
--- a/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs
+++ b/src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs
@@ -620,15 +620,15 @@ public void CreateInstance(
ref Guid riid,
out IntPtr ppvObject)
{
- Type interfaceType = BasicClassFactory.GetValidatedInterfaceType(_classType, ref riid, pUnkOuter);
+ Type interfaceType = GetValidatedInterfaceType(_classType, ref riid, pUnkOuter);
object obj = Activator.CreateInstance(_classType)!;
if (pUnkOuter != null)
{
- obj = BasicClassFactory.CreateAggregatedObject(pUnkOuter, obj);
+ obj = CreateAggregatedObject(pUnkOuter, obj);
}
- ppvObject = BasicClassFactory.GetObjectAsInterface(obj, interfaceType);
+ ppvObject = GetObjectAsInterface(obj, interfaceType);
}
public void LockServer([MarshalAs(UnmanagedType.Bool)] bool fLock)
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs
index 258d0470e71b0e..9365f8ba0b8695 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs
@@ -515,10 +515,11 @@ public static bool IsDefined(MemberInfo element, Type attributeType, bool inheri
if (attrib == null || attrib.Length == 0)
return null;
+ Attribute match = attrib[0];
if (attrib.Length == 1)
- return attrib[0];
+ return match;
- throw new AmbiguousMatchException(SR.RFLCT_AmbigCust);
+ throw ThrowHelper.GetAmbiguousMatchException(match);
}
#endregion
@@ -614,10 +615,11 @@ public static bool IsDefined(ParameterInfo element, Type attributeType, bool inh
if (attrib == null || attrib.Length == 0)
return null;
+ Attribute match = attrib[0];
if (attrib.Length == 1)
- return attrib[0];
+ return match;
- throw new AmbiguousMatchException(SR.RFLCT_AmbigCust);
+ throw ThrowHelper.GetAmbiguousMatchException(match);
}
#endregion
@@ -683,10 +685,11 @@ public static bool IsDefined(Module element, Type attributeType, bool inherit)
if (attrib == null || attrib.Length == 0)
return null;
+ Attribute match = attrib[0];
if (attrib.Length == 1)
- return attrib[0];
+ return match;
- throw new AmbiguousMatchException(SR.RFLCT_AmbigCust);
+ throw ThrowHelper.GetAmbiguousMatchException(match);
}
#endregion
@@ -752,10 +755,11 @@ public static bool IsDefined(Assembly element, Type attributeType, bool inherit)
if (attrib == null || attrib.Length == 0)
return null;
+ Attribute match = attrib[0];
if (attrib.Length == 1)
- return attrib[0];
+ return match;
- throw new AmbiguousMatchException(SR.RFLCT_AmbigCust);
+ throw ThrowHelper.GetAmbiguousMatchException(match);
}
#endregion
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs
index f6d531485b2925..5c2e18b3382b65 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs
@@ -16,7 +16,7 @@ internal sealed partial class EnumComparer : Comparer where T : struct, En
{
public override int Compare(T x, T y)
{
- return System.Runtime.CompilerServices.RuntimeHelpers.EnumCompareTo(x, y);
+ return RuntimeHelpers.EnumCompareTo(x, y);
}
}
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/ComparerHelpers.cs b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/ComparerHelpers.cs
index b020c127629413..f07e70deaf8d88 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/ComparerHelpers.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/ComparerHelpers.cs
@@ -41,7 +41,7 @@ internal static object CreateDefaultComparer(Type type)
{
// Nullable does not implement IComparable directly because that would add an extra interface call per comparison.
var embeddedType = (RuntimeType)type.GetGenericArguments()[0];
- result = RuntimeTypeHandle.CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(NullableComparer), embeddedType);
+ result = CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(NullableComparer), embeddedType);
}
// The comparer for enums is specialized to avoid boxing.
else if (type.IsEnum)
@@ -78,7 +78,7 @@ internal static object CreateDefaultComparer(Type type)
case TypeCode.UInt32:
case TypeCode.Int64:
case TypeCode.UInt64:
- return RuntimeTypeHandle.CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(EnumComparer<>), enumType);
+ return CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(EnumComparer<>), enumType);
}
return null;
@@ -153,7 +153,7 @@ internal static object CreateDefaultEqualityComparer(Type type)
case TypeCode.Int64:
case TypeCode.UInt64:
case TypeCode.UInt16:
- return RuntimeTypeHandle.CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(EnumEqualityComparer<>), enumType);
+ return CreateInstanceForAnotherGenericParameter((RuntimeType)typeof(EnumEqualityComparer<>), enumType);
}
return null;
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs
index 2377566a05312a..bd4532bad23851 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs
@@ -164,7 +164,7 @@ public sealed partial class EnumEqualityComparer : EqualityComparer where
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override bool Equals(T x, T y)
{
- return System.Runtime.CompilerServices.RuntimeHelpers.EnumEquals(x, y);
+ return RuntimeHelpers.EnumEquals(x, y);
}
internal override int IndexOf(T[] array, T value, int startIndex, int count)
@@ -172,7 +172,7 @@ internal override int IndexOf(T[] array, T value, int startIndex, int count)
int endIndex = startIndex + count;
for (int i = startIndex; i < endIndex; i++)
{
- if (System.Runtime.CompilerServices.RuntimeHelpers.EnumEquals(array[i], value)) return i;
+ if (RuntimeHelpers.EnumEquals(array[i], value)) return i;
}
return -1;
}
@@ -182,7 +182,7 @@ internal override int LastIndexOf(T[] array, T value, int startIndex, int count)
int endIndex = startIndex - count + 1;
for (int i = startIndex; i >= endIndex; i--)
{
- if (System.Runtime.CompilerServices.RuntimeHelpers.EnumEquals(array[i], value)) return i;
+ if (RuntimeHelpers.EnumEquals(array[i], value)) return i;
}
return -1;
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs
index e184ddfe89ed37..7fd8ed40d57b82 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs
@@ -131,7 +131,7 @@ public override bool Equals([NotNullWhen(true)] object? obj)
// method ptrs don't match, go down long path
//
if (_methodBase == null || d._methodBase == null || !(_methodBase is MethodInfo) || !(d._methodBase is MethodInfo))
- return Delegate.InternalEqualMethodHandles(this, d);
+ return InternalEqualMethodHandles(this, d);
else
return _methodBase.Equals(d._methodBase);
}
diff --git a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/Eventing/NativeRuntimeEventSource.PortableThreadPool.NativeSinks.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/Eventing/NativeRuntimeEventSource.PortableThreadPool.NativeSinks.CoreCLR.cs
index cbf6e4665e78ce..c618f1d5203e4e 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/Eventing/NativeRuntimeEventSource.PortableThreadPool.NativeSinks.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/Eventing/NativeRuntimeEventSource.PortableThreadPool.NativeSinks.CoreCLR.cs
@@ -34,7 +34,7 @@ internal sealed partial class NativeRuntimeEventSource : EventSource
[NonEvent]
[LibraryImport(RuntimeHelpers.QCall)]
- internal static partial void LogThreadPoolWorkerThreadAdjustmentAdjustment(double AverageThroughput, uint NewWorkerThreadCount, NativeRuntimeEventSource.ThreadAdjustmentReasonMap Reason, ushort ClrInstanceID);
+ internal static partial void LogThreadPoolWorkerThreadAdjustmentAdjustment(double AverageThroughput, uint NewWorkerThreadCount, ThreadAdjustmentReasonMap Reason, ushort ClrInstanceID);
[NonEvent]
[LibraryImport(RuntimeHelpers.QCall)]
diff --git a/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs
index 20c7159380959e..d59ad132ef59ee 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs
@@ -17,13 +17,14 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
+using System.Runtime.Versioning;
namespace System
{
/// Specifies the behavior for a forced garbage collection.
public enum GCCollectionMode
{
- /// The default setting for this enumeration, which is currently .
+ /// The default setting for this enumeration, which is currently .
Default = 0,
/// Forces the garbage collection to occur immediately.
@@ -352,8 +353,8 @@ public static long GetTotalMemory(bool forceFullCollection)
float diff;
do
{
- GC.WaitForPendingFinalizers();
- GC.Collect();
+ WaitForPendingFinalizers();
+ Collect();
size = newSize;
newSize = GetTotalMemory();
diff = ((float)(newSize - size)) / size;
@@ -640,8 +641,8 @@ internal enum EnableNoGCRegionCallbackStatus
/// Register a callback to be invoked when we allocated a certain amount of memory in the no GC region.
/// The total size of the no GC region. Must be a number > 0 or an ArgumentOutOfRangeException will be thrown.
/// The callback to be executed when we allocated a certain amount of memory in the no GC region..
- /// The argument is less than or equal to 0.
- /// The argument is null.
+ /// The argument is less than or equal to 0.
+ /// The argument is null.
/// The GC is not currently under a NoGC region.
/// -or-
/// Another callback is already registered.
@@ -907,7 +908,7 @@ internal enum RefreshMemoryStatus
/// If the hard limit is invalid. This can happen, for example, with negative heap hard limit percentages."
///
///
- [System.Runtime.Versioning.RequiresPreviewFeaturesAttribute("RefreshMemoryLimit is in preview.")]
+ [RequiresPreviewFeatures("RefreshMemoryLimit is in preview.")]
public static void RefreshMemoryLimit()
{
ulong heapHardLimit = (AppContext.GetData("GCHeapHardLimit") as ulong?) ?? ulong.MaxValue;
diff --git a/src/coreclr/System.Private.CoreLib/src/System/IO/FileLoadException.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/IO/FileLoadException.CoreCLR.cs
index 4933f9189f133b..439689ca9adc26 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/IO/FileLoadException.CoreCLR.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/IO/FileLoadException.CoreCLR.cs
@@ -23,7 +23,7 @@ internal static string FormatFileLoadExceptionMessage(string? fileName, int hRes
GetFileLoadExceptionMessage(hResult, new StringHandleOnStack(ref format));
string? message = null;
- if (hResult == System.HResults.COR_E_BADEXEFORMAT)
+ if (hResult == HResults.COR_E_BADEXEFORMAT)
message = SR.Arg_BadImageFormatException;
else
GetMessageForHR(hResult, new StringHandleOnStack(ref message));
diff --git a/src/coreclr/System.Private.CoreLib/src/System/MulticastDelegate.cs b/src/coreclr/System.Private.CoreLib/src/System/MulticastDelegate.cs
index 5410a6c2460732..038d8db6084119 100644
--- a/src/coreclr/System.Private.CoreLib/src/System/MulticastDelegate.cs
+++ b/src/coreclr/System.Private.CoreLib/src/System/MulticastDelegate.cs
@@ -5,6 +5,7 @@
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
+using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
@@ -43,7 +44,7 @@ internal bool IsUnmanagedFunctionPtr()
internal bool InvocationListLogicallyNull()
{
- return (_invocationList == null) || (_invocationList is LoaderAllocator) || (_invocationList is System.Reflection.Emit.DynamicResolver);
+ return (_invocationList == null) || (_invocationList is LoaderAllocator) || (_invocationList is DynamicResolver);
}
[Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
@@ -59,7 +60,7 @@ public sealed override bool Equals([NotNullWhen(true)] object? obj)
{
if (obj == null)
return false;
- if (object.ReferenceEquals(this, obj))
+ if (ReferenceEquals(this, obj))
return true;
if (!InternalEqualTypes(this, obj))
return false;
@@ -158,7 +159,7 @@ private bool InvocationListEquals(MulticastDelegate d)
private static bool TrySetSlot(object?[] a, int index, object o)
{
- if (a[index] == null && System.Threading.Interlocked.CompareExchange
@@ -96,7 +96,7 @@ The .NET Foundation licenses this file to you under the MIT license.
-
+
@@ -119,12 +119,12 @@ The .NET Foundation licenses this file to you under the MIT license.
-
-
+
+
-
+
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
index 9ce8ef00756dd6..e11fac5806808d 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
@@ -214,12 +214,11 @@ The .NET Foundation licenses this file to you under the MIT license.
-
-
+
@@ -230,6 +229,7 @@ The .NET Foundation licenses this file to you under the MIT license.
+
diff --git a/src/coreclr/nativeaot/Directory.Build.props b/src/coreclr/nativeaot/Directory.Build.props
index 76c5cb9eecbb72..dce8e37c32fe38 100644
--- a/src/coreclr/nativeaot/Directory.Build.props
+++ b/src/coreclr/nativeaot/Directory.Build.props
@@ -65,8 +65,7 @@
FEATURE_OBJCMARSHAL;$(DefineConstants)
- false
- true
+ true
FEATURE_PERFTRACING;$(DefineConstants)
diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/RuntimeTypeHandle.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/RuntimeTypeHandle.cs
index 85f880035e904b..8ecb99bc49e584 100644
--- a/src/coreclr/nativeaot/Runtime.Base/src/System/RuntimeTypeHandle.cs
+++ b/src/coreclr/nativeaot/Runtime.Base/src/System/RuntimeTypeHandle.cs
@@ -18,6 +18,6 @@ public class Type
[StructLayout(LayoutKind.Sequential)]
public struct RuntimeTypeHandle
{
- private EETypePtr _pEEType;
+ private IntPtr _value;
}
}
diff --git a/src/coreclr/nativeaot/Runtime/AsmOffsets.h b/src/coreclr/nativeaot/Runtime/AsmOffsets.h
index 203fee38bf15ff..30540742974b45 100644
--- a/src/coreclr/nativeaot/Runtime/AsmOffsets.h
+++ b/src/coreclr/nativeaot/Runtime/AsmOffsets.h
@@ -72,16 +72,6 @@ ASM_OFFSET( 10, 20, InterfaceDispatchCache, m_rgEntries)
ASM_SIZEOF( 8, 10, InterfaceDispatchCacheEntry)
#endif
-#ifdef FEATURE_DYNAMIC_CODE
-ASM_OFFSET( 0, 0, CallDescrData, pSrc)
-ASM_OFFSET( 4, 8, CallDescrData, numStackSlots)
-ASM_OFFSET( 8, C, CallDescrData, fpReturnSize)
-ASM_OFFSET( C, 10, CallDescrData, pArgumentRegisters)
-ASM_OFFSET( 10, 18, CallDescrData, pFloatArgumentRegisters)
-ASM_OFFSET( 14, 20, CallDescrData, pTarget)
-ASM_OFFSET( 18, 28, CallDescrData, pReturnBuffer)
-#endif
-
// Undefine macros that are only used in this header for convenience.
#undef ASM_OFFSET
#undef ASM_SIZEOF
diff --git a/src/coreclr/nativeaot/Runtime/AsmOffsetsVerify.cpp b/src/coreclr/nativeaot/Runtime/AsmOffsetsVerify.cpp
index 489d10aa9b9b87..705e198aaaca32 100644
--- a/src/coreclr/nativeaot/Runtime/AsmOffsetsVerify.cpp
+++ b/src/coreclr/nativeaot/Runtime/AsmOffsetsVerify.cpp
@@ -16,7 +16,6 @@
#include "RuntimeInstance.h"
#include "CachedInterfaceDispatch.h"
#include "shash.h"
-#include "CallDescr.h"
class AsmOffsets
{
diff --git a/src/coreclr/nativeaot/Runtime/CMakeLists.txt b/src/coreclr/nativeaot/Runtime/CMakeLists.txt
index e836c3f2d391f1..864ad7972b48a8 100644
--- a/src/coreclr/nativeaot/Runtime/CMakeLists.txt
+++ b/src/coreclr/nativeaot/Runtime/CMakeLists.txt
@@ -196,7 +196,6 @@ endif (CLR_CMAKE_TARGET_ARCH_AMD64 AND CLR_CMAKE_TARGET_WIN32)
list(APPEND RUNTIME_SOURCES_ARCH_ASM
${ARCH_SOURCES_DIR}/AllocFast.${ASM_SUFFIX}
- ${ARCH_SOURCES_DIR}/CallDescrWorker.${ASM_SUFFIX}
${ARCH_SOURCES_DIR}/ExceptionHandling.${ASM_SUFFIX}
${ARCH_SOURCES_DIR}/GcProbe.${ASM_SUFFIX}
${ARCH_SOURCES_DIR}/Interlocked.${ASM_SUFFIX}
diff --git a/src/coreclr/nativeaot/Runtime/CallDescr.h b/src/coreclr/nativeaot/Runtime/CallDescr.h
deleted file mode 100644
index 946b96d2c8e7c9..00000000000000
--- a/src/coreclr/nativeaot/Runtime/CallDescr.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-struct CallDescrData
-{
- uint8_t* pSrc;
- int numStackSlots;
- int fpReturnSize;
- uint8_t* pArgumentRegisters;
- uint8_t* pFloatArgumentRegisters;
- void* pTarget;
- void* pReturnBuffer;
-};
diff --git a/src/coreclr/nativeaot/Runtime/ICodeManager.h b/src/coreclr/nativeaot/Runtime/ICodeManager.h
index 4205c62c4de080..b21aa3fde6be71 100644
--- a/src/coreclr/nativeaot/Runtime/ICodeManager.h
+++ b/src/coreclr/nativeaot/Runtime/ICodeManager.h
@@ -172,6 +172,8 @@ enum UnwindStackFrameFlags
// If this is a reverse P/Invoke frame, do not continue the unwind
// after extracting the saved transition frame.
USFF_StopUnwindOnTransitionFrame = 1,
+ // Registers not containing GC roots can be omitted.
+ USFF_GcUnwind = 2,
};
class ICodeManager
diff --git a/src/coreclr/nativeaot/Runtime/IntrinsicConstants.h b/src/coreclr/nativeaot/Runtime/IntrinsicConstants.h
index 67ba547488e960..41ec8dec9c3d02 100644
--- a/src/coreclr/nativeaot/Runtime/IntrinsicConstants.h
+++ b/src/coreclr/nativeaot/Runtime/IntrinsicConstants.h
@@ -34,6 +34,10 @@ enum XArchIntrinsicConstants
XArchIntrinsicConstants_Avx512dq_vl = 0x400000,
XArchIntrinsicConstants_Avx512Vbmi = 0x800000,
XArchIntrinsicConstants_Avx512Vbmi_vl = 0x1000000,
+ XArchIntrinsicConstants_Serialize = 0x2000000,
+ XArchIntrinsicConstants_VectorT128 = 0x4000000,
+ XArchIntrinsicConstants_VectorT256 = 0x8000000,
+ XArchIntrinsicConstants_VectorT512 = 0x10000000,
};
#endif //HOST_X86 || HOST_AMD64
@@ -49,6 +53,7 @@ enum ARM64IntrinsicConstants
ARM64IntrinsicConstants_Sha256 = 0x0040,
ARM64IntrinsicConstants_Atomics = 0x0080,
ARM64IntrinsicConstants_Rcpc = 0x0100,
+ ARM64IntrinsicConstants_VectorT128 = 0x0200,
};
// Bit position for the ARM64IntrinsicConstants_Atomics flags, to be used with tbz / tbnz instructions
diff --git a/src/coreclr/nativeaot/Runtime/MiscHelpers.cpp b/src/coreclr/nativeaot/Runtime/MiscHelpers.cpp
index e073885514555f..da9a5c4b97618f 100644
--- a/src/coreclr/nativeaot/Runtime/MiscHelpers.cpp
+++ b/src/coreclr/nativeaot/Runtime/MiscHelpers.cpp
@@ -38,6 +38,7 @@
#include "GCMemoryHelpers.h"
#include "GCMemoryHelpers.inl"
#include "yieldprocessornormalized.h"
+#include "RhConfig.h"
COOP_PINVOKE_HELPER(void, RhDebugBreak, ())
{
@@ -120,16 +121,6 @@ COOP_PINVOKE_HELPER(HANDLE, RhGetOSModuleFromPointer, (PTR_VOID pPointerVal))
return NULL;
}
-COOP_PINVOKE_HELPER(HANDLE, RhGetOSModuleFromEEType, (MethodTable * pEEType))
-{
- return pEEType->GetTypeManagerPtr()->AsTypeManager()->GetOsModuleHandle();
-}
-
-COOP_PINVOKE_HELPER(TypeManagerHandle, RhGetModuleFromEEType, (MethodTable * pEEType))
-{
- return *pEEType->GetTypeManagerPtr();
-}
-
COOP_PINVOKE_HELPER(FC_BOOL_RET, RhFindBlob, (TypeManagerHandle *pTypeManagerHandle, uint32_t blobId, uint8_t ** ppbBlob, uint32_t * pcbBlob))
{
TypeManagerHandle typeManagerHandle = *pTypeManagerHandle;
@@ -349,18 +340,6 @@ COOP_PINVOKE_HELPER(uint8_t *, RhGetCodeTarget, (uint8_t * pCodeOrg))
return pCodeOrg;
}
-// Get the universal transition thunk. If the universal transition stub is called through
-// the normal PE static linkage model, a jump stub would be used which may interfere with
-// the custom calling convention of the universal transition thunk. So instead, a special
-// api just for getting the thunk address is needed.
-// TODO: On ARM this may still result in a jump stub that trashes R12. Determine if anything
-// needs to be done about that when we implement the stub for ARM.
-extern "C" void RhpUniversalTransition();
-COOP_PINVOKE_HELPER(void*, RhGetUniversalTransitionThunk, ())
-{
- return (void*)RhpUniversalTransition;
-}
-
extern CrstStatic g_ThunkPoolLock;
EXTERN_C NATIVEAOT_API void __cdecl RhpAcquireThunkPoolLock()
@@ -422,6 +401,13 @@ COOP_PINVOKE_HELPER(int32_t, RhGetProcessCpuCount, ())
return PalGetProcessCpuCount();
}
+COOP_PINVOKE_HELPER(uint32_t, RhGetKnobValues, (char *** pResultKeys, char *** pResultValues))
+{
+ *pResultKeys = g_pRhConfig->GetKnobNames();
+ *pResultValues = g_pRhConfig->GetKnobValues();
+ return g_pRhConfig->GetKnobCount();
+}
+
#if defined(TARGET_X86) || defined(TARGET_AMD64)
EXTERN_C NATIVEAOT_API void __cdecl RhCpuIdEx(int* cpuInfo, int functionId, int subFunctionId)
{
diff --git a/src/coreclr/nativeaot/Runtime/PalRedhawk.h b/src/coreclr/nativeaot/Runtime/PalRedhawk.h
index a718812f23ddce..c30d7d05ec3dbb 100644
--- a/src/coreclr/nativeaot/Runtime/PalRedhawk.h
+++ b/src/coreclr/nativeaot/Runtime/PalRedhawk.h
@@ -752,8 +752,6 @@ REDHAWK_PALIMPORT uint32_t REDHAWK_PALAPI PalEventUnregister(REGHANDLE arg1);
REDHAWK_PALIMPORT uint32_t REDHAWK_PALAPI PalEventWrite(REGHANDLE arg1, const EVENT_DESCRIPTOR * arg2, uint32_t arg3, EVENT_DATA_DESCRIPTOR * arg4);
#endif
-REDHAWK_PALIMPORT _Ret_maybenull_ void* REDHAWK_PALAPI PalSetWerDataBuffer(_In_ void* pNewBuffer);
-
REDHAWK_PALIMPORT UInt32_BOOL REDHAWK_PALAPI PalAllocateThunksFromTemplate(_In_ HANDLE hTemplateModule, uint32_t templateRva, size_t templateSize, _Outptr_result_bytebuffer_(templateSize) void** newThunksOut);
REDHAWK_PALIMPORT UInt32_BOOL REDHAWK_PALAPI PalFreeThunksFromTemplate(_In_ void *pBaseAddress);
diff --git a/src/coreclr/nativeaot/Runtime/RhConfig.cpp b/src/coreclr/nativeaot/Runtime/RhConfig.cpp
index 0b965c18994f86..506cf750672bfa 100644
--- a/src/coreclr/nativeaot/Runtime/RhConfig.cpp
+++ b/src/coreclr/nativeaot/Runtime/RhConfig.cpp
@@ -120,14 +120,8 @@ bool RhConfig::Environment::TryGetStringValue(const char* name, char** value)
return true;
}
-struct CompilerEmbeddedSettingsBlob
-{
- uint32_t Size;
- char Data[1];
-};
-
-extern "C" CompilerEmbeddedSettingsBlob g_compilerEmbeddedSettingsBlob;
-extern "C" CompilerEmbeddedSettingsBlob g_compilerEmbeddedKnobsBlob;
+extern "C" RhConfig::Config g_compilerEmbeddedSettingsBlob;
+extern "C" RhConfig::Config g_compilerEmbeddedKnobsBlob;
bool RhConfig::ReadConfigValue(_In_z_ const char *name, uint64_t* pValue, bool decimal)
{
@@ -136,7 +130,7 @@ bool RhConfig::ReadConfigValue(_In_z_ const char *name, uint64_t* pValue, bool d
// Check the embedded configuration
const char *embeddedValue = nullptr;
- if (GetEmbeddedVariable(&g_embeddedSettings, &g_compilerEmbeddedSettingsBlob, name, true, &embeddedValue))
+ if (GetEmbeddedVariable(&g_compilerEmbeddedSettingsBlob, name, true, &embeddedValue))
{
*pValue = strtoull(embeddedValue, NULL, decimal ? 10 : 16);
return true;
@@ -148,7 +142,7 @@ bool RhConfig::ReadConfigValue(_In_z_ const char *name, uint64_t* pValue, bool d
bool RhConfig::ReadKnobUInt64Value(_In_z_ const char *name, uint64_t* pValue)
{
const char *embeddedValue = nullptr;
- if (GetEmbeddedVariable(&g_embeddedKnobs, &g_compilerEmbeddedKnobsBlob, name, false, &embeddedValue))
+ if (GetEmbeddedVariable(&g_compilerEmbeddedKnobsBlob, name, false, &embeddedValue))
{
*pValue = strtoull(embeddedValue, NULL, 10);
return true;
@@ -160,7 +154,7 @@ bool RhConfig::ReadKnobUInt64Value(_In_z_ const char *name, uint64_t* pValue)
bool RhConfig::ReadKnobBooleanValue(_In_z_ const char *name, bool* pValue)
{
const char *embeddedValue = nullptr;
- if (GetEmbeddedVariable(&g_embeddedKnobs, &g_compilerEmbeddedKnobsBlob, name, false, &embeddedValue))
+ if (GetEmbeddedVariable(&g_compilerEmbeddedKnobsBlob, name, false, &embeddedValue))
{
*pValue = strcmp(embeddedValue, "true") == 0;
return true;
@@ -169,29 +163,30 @@ bool RhConfig::ReadKnobBooleanValue(_In_z_ const char *name, bool* pValue)
return false;
}
-bool RhConfig::GetEmbeddedVariable(void *volatile * embeddedSettings, void* compilerEmbeddedSettingsBlob, _In_z_ const char* configName, bool caseSensitive, _Out_ const char** configValue)
+char** RhConfig::GetKnobNames()
{
- // Read the config if we haven't yet
- if (*embeddedSettings == NULL)
- {
- ReadEmbeddedSettings(embeddedSettings, compilerEmbeddedSettingsBlob);
- }
+ return g_compilerEmbeddedKnobsBlob.GetKeys();
+}
- // Config wasn't read or reading failed
- if (*embeddedSettings == CONFIG_INI_NOT_AVAIL)
- {
- return false;
- }
+char** RhConfig::GetKnobValues()
+{
+ return g_compilerEmbeddedKnobsBlob.GetValues();
+}
- const ConfigPair* configPairs = (const ConfigPair*)*embeddedSettings;
+uint32_t RhConfig::GetKnobCount()
+{
+ return g_compilerEmbeddedKnobsBlob.GetCount();
+}
+bool RhConfig::GetEmbeddedVariable(Config* config, _In_z_ const char* configName, bool caseSensitive, _Out_ const char** configValue)
+{
// Find the first name which matches
- for (uint32_t iSettings = 0; iSettings < ((CompilerEmbeddedSettingsBlob*)compilerEmbeddedSettingsBlob)->Size; iSettings++)
+ for (uint32_t iSettings = 0; iSettings < config->GetCount(); iSettings++)
{
- if ((caseSensitive && strcmp(configName, configPairs[iSettings].Key) == 0)
- || (!caseSensitive && _stricmp(configName, configPairs[iSettings].Key) == 0))
+ if ((caseSensitive && strcmp(configName, config->GetKeyAt(iSettings)) == 0)
+ || (!caseSensitive && _stricmp(configName, config->GetKeyAt(iSettings)) == 0))
{
- *configValue = configPairs[iSettings].Value;
+ *configValue = config->GetValueAt(iSettings);
return true;
}
}
@@ -200,107 +195,4 @@ bool RhConfig::GetEmbeddedVariable(void *volatile * embeddedSettings, void* comp
return false;
}
-void RhConfig::ReadEmbeddedSettings(void *volatile * embeddedSettings, void* compilerEmbeddedSettingsBlob)
-{
- if (*embeddedSettings == NULL)
- {
- uint32_t size = ((CompilerEmbeddedSettingsBlob*)compilerEmbeddedSettingsBlob)->Size;
- char* data = ((CompilerEmbeddedSettingsBlob*)compilerEmbeddedSettingsBlob)->Data;
-
- //if reading the file contents failed set embeddedSettings to CONFIG_INI_NOT_AVAIL
- if (size == 0)
- {
- //only set if another thread hasn't initialized the buffer yet, otherwise ignore and let the first setter win
- PalInterlockedCompareExchangePointer(embeddedSettings, CONFIG_INI_NOT_AVAIL, NULL);
-
- return;
- }
-
- ConfigPair* iniBuff = new (nothrow) ConfigPair[size];
- if (iniBuff == NULL)
- {
- //only set if another thread hasn't initialized the buffer yet, otherwise ignore and let the first setter win
- PalInterlockedCompareExchangePointer(embeddedSettings, CONFIG_INI_NOT_AVAIL, NULL);
-
- return;
- }
-
- uint32_t iBuff = 0;
- uint32_t iIniBuff = 0;
- char* currLine;
-
- //while we haven't reached the max number of config pairs, or the end of the file, read the next line
- while (iBuff < size)
- {
- currLine = &data[iBuff];
-
- //find the end of the line
- while ((data[iBuff] != '\0') && (iBuff < size))
- iBuff++;
-
- //parse the line
- //only increment iIniBuff if the parsing succeeded otherwise reuse the config struct
- if (ParseConfigLine(&iniBuff[iIniBuff], currLine))
- {
- iIniBuff++;
- }
-
- //advance to the next line;
- iBuff++;
- }
-
- //if another thread initialized first let the first setter win
- //delete the iniBuff to avoid leaking memory
- if (PalInterlockedCompareExchangePointer(embeddedSettings, iniBuff, NULL) != NULL)
- {
- delete[] iniBuff;
- }
- }
-
- return;
-}
-
-//Parses one line of config and populates values in the passed in configPair
-//returns: true if the parsing was successful, false if the parsing failed.
-//NOTE: if the method fails configPair is left in an uninitialized state
-bool RhConfig::ParseConfigLine(_Out_ ConfigPair* configPair, _In_z_ const char * line)
-{
- uint32_t iLine = 0;
- uint32_t iKey = 0;
- uint32_t iVal = 0;
-
- //while we haven't reached the end of the key signalled by '=', or the end of the line, or the key maxlen
- while (line[iLine] != '=' && line[iLine] != '\0' && iKey < CONFIG_KEY_MAXLEN)
- {
- configPair->Key[iKey++] = line[iLine++];
- }
-
- //if the current char is not '=' we reached the key maxlen, or the line ended return false
- if (line[iLine] != '=')
- {
- return FALSE;
- }
-
- configPair->Key[iKey] = '\0';
-
- //increment to start of the value
- iLine++;
-
- //while we haven't reached the end of the line, or val maxlen
- while (line[iLine] != '\0' && iVal < CONFIG_VAL_MAXLEN)
- {
- configPair->Value[iVal++] = line[iLine++];
- }
-
- //if the current char is not '\0' we didn't reach the end of the line return false
- if (line[iLine] != '\0')
- {
- return FALSE;
- }
-
- configPair->Value[iVal] = '\0';
-
- return TRUE;
-}
-
#endif
diff --git a/src/coreclr/nativeaot/Runtime/RhConfig.h b/src/coreclr/nativeaot/Runtime/RhConfig.h
index a3cd83493cab96..59d1d37fc15546 100644
--- a/src/coreclr/nativeaot/Runtime/RhConfig.h
+++ b/src/coreclr/nativeaot/Runtime/RhConfig.h
@@ -11,6 +11,8 @@
// Values can also be embedded in the compiled binary.
//
+#ifndef RHCONFIG_H
+#define RHCONFIG_H
#ifndef DACCESS_COMPILE
@@ -18,26 +20,20 @@
class RhConfig
{
-
-#define CONFIG_INI_NOT_AVAIL (void*)0x1 //signal for ini file failed to load
-#define CONFIG_KEY_MAXLEN 50 //arbitrary max length of config keys increase if needed
#define CONFIG_VAL_MAXLEN 16 //64 bit uint in hex
-private:
- struct ConfigPair
+public:
+ struct Config
{
+ uint32_t m_count;
+ char* m_first[];
public:
- char Key[CONFIG_KEY_MAXLEN + 1]; //maxlen + null terminator
- char Value[CONFIG_VAL_MAXLEN + 1]; //maxlen + null terminator
+ uint32_t GetCount() { return m_count; }
+ char* GetKeyAt(int32_t index) { return m_first[index]; }
+ char* GetValueAt(int32_t index) { return m_first[m_count + index]; }
+ char** GetKeys() { return m_first; }
+ char** GetValues() { return &m_first[m_count]; }
};
- // g_embeddedSettings is a buffer of ConfigPair structs embedded in the compiled binary.
- //
- //NOTE: g_embeddedSettings is only set in ReadEmbeddedSettings and must be set atomically only once
- // using PalInterlockedCompareExchangePointer to avoid races when initializing
- void* volatile g_embeddedSettings = NULL;
- void* volatile g_embeddedKnobs = NULL;
-
-public:
class Environment
{
public: // static
@@ -52,6 +48,10 @@ class RhConfig
bool ReadKnobUInt64Value(_In_z_ const char* wszName, uint64_t* pValue);
bool ReadKnobBooleanValue(_In_z_ const char* wszName, bool* pValue);
+ char** GetKnobNames();
+ char** GetKnobValues();
+ uint32_t GetKnobCount();
+
#define DEFINE_VALUE_ACCESSOR(_name, defaultVal) \
uint64_t Get##_name() \
{ \
@@ -99,16 +99,9 @@ class RhConfig
#define CONFIG_FILE_MAXLEN RCV_Count * sizeof(ConfigPair) + 2000
private:
- //Parses one line of config and populates values in the passed in configPair
- //returns: true if the parsing was successful, false if the parsing failed.
- //NOTE: if the method fails configPair is left in an uninitialized state
- bool ParseConfigLine(_Out_ ConfigPair* configPair, _In_z_ const char * line);
-
- void ReadEmbeddedSettings(void *volatile * embeddedSettings, void* compilerEmbeddedSettingsBlob);
-
// Gets a pointer to the embedded configuration value. Memory is held by the callee.
// Returns true if the variable was found, false otherwise
- bool GetEmbeddedVariable(void *volatile * embeddedSettings, void* compilerEmbeddedSettingsBlob, _In_z_ const char* configName, bool caseSensitive, _Out_ const char** configValue);
+ bool GetEmbeddedVariable(Config* config, _In_z_ const char* configName, bool caseSensitive, _Out_ const char** configValue);
uint32_t m_uiConfigValuesRead;
uint64_t m_uiConfigValues[RCV_Count];
@@ -117,3 +110,5 @@ class RhConfig
extern RhConfig * g_pRhConfig;
#endif //!DACCESS_COMPILE
+
+#endif // RHCONFIG_H
diff --git a/src/coreclr/nativeaot/Runtime/RuntimeInstance.cpp b/src/coreclr/nativeaot/Runtime/RuntimeInstance.cpp
index 146c15aeff192c..2d1a6971b10fb8 100644
--- a/src/coreclr/nativeaot/Runtime/RuntimeInstance.cpp
+++ b/src/coreclr/nativeaot/Runtime/RuntimeInstance.cpp
@@ -35,14 +35,6 @@ bool ShouldHijackForGcStress(uintptr_t CallsiteIP, HijackType ht);
#include "shash.inl"
-#ifndef DACCESS_COMPILE
-COOP_PINVOKE_HELPER(uint8_t *, RhSetErrorInfoBuffer, (uint8_t * pNewBuffer))
-{
- return (uint8_t *) PalSetWerDataBuffer(pNewBuffer);
-}
-#endif // DACCESS_COMPILE
-
-
ThreadStore * RuntimeInstance::GetThreadStore()
{
return m_pThreadStore;
diff --git a/src/coreclr/nativeaot/Runtime/StackFrameIterator.cpp b/src/coreclr/nativeaot/Runtime/StackFrameIterator.cpp
index 3dc6e98dfeb76d..f4a19246e0137d 100644
--- a/src/coreclr/nativeaot/Runtime/StackFrameIterator.cpp
+++ b/src/coreclr/nativeaot/Runtime/StackFrameIterator.cpp
@@ -44,9 +44,6 @@ GVAL_IMPL_INIT(PTR_VOID, g_ReturnFromUniversalTransitionAddr, PointerToReturnFro
EXTERN_C PTR_VOID PointerToReturnFromUniversalTransition_DebugStepTailCall;
GVAL_IMPL_INIT(PTR_VOID, g_ReturnFromUniversalTransition_DebugStepTailCallAddr, PointerToReturnFromUniversalTransition_DebugStepTailCall);
-
-EXTERN_C PTR_VOID PointerToReturnFromCallDescrThunk;
-GVAL_IMPL_INIT(PTR_VOID, g_ReturnFromCallDescrThunkAddr, PointerToReturnFromCallDescrThunk);
#endif
#ifdef TARGET_X86
@@ -1200,130 +1197,6 @@ void StackFrameIterator::UnwindUniversalTransitionThunk()
#define STACK_ALIGN_SIZE 4
#endif
-#ifdef TARGET_AMD64
-struct CALL_DESCR_CONTEXT
-{
- uintptr_t Rbp;
- uintptr_t Rsi;
- uintptr_t Rbx;
- uintptr_t IP;
-};
-#elif defined(TARGET_ARM)
-struct CALL_DESCR_CONTEXT
-{
- uintptr_t R4;
- uintptr_t R5;
- uintptr_t R7;
- uintptr_t IP;
-};
-#elif defined(TARGET_ARM64)
-struct CALL_DESCR_CONTEXT
-{
- uintptr_t FP;
- uintptr_t IP;
- uintptr_t X19;
- uintptr_t X20;
-};
-#elif defined(TARGET_X86)
-struct CALL_DESCR_CONTEXT
-{
- uintptr_t Rbx;
- uintptr_t Rbp;
- uintptr_t IP;
-};
-#elif defined (TARGET_WASM)
-struct CALL_DESCR_CONTEXT
-{
- uintptr_t IP;
-};
-#else
-#error NYI - For this arch
-#endif
-
-typedef DPTR(CALL_DESCR_CONTEXT) PTR_CALL_DESCR_CONTEXT;
-
-void StackFrameIterator::UnwindCallDescrThunk()
-{
- ASSERT((m_dwFlags & MethodStateCalculated) == 0);
-
-#if defined(USE_PORTABLE_HELPERS) // @TODO: Corresponding helper code is only defined in assembly code
- return;
-#else // defined(USE_PORTABLE_HELPERS)
- ASSERT(CategorizeUnadjustedReturnAddress(m_ControlPC) == InCallDescrThunk);
-
- uintptr_t newSP;
-#ifdef TARGET_AMD64
- // RBP points to the SP that we want to capture. (This arrangement allows for
- // the arguments from this function to be loaded into memory with an adjustment
- // to SP, like an alloca
- newSP = *(PTR_UIntNative)m_RegDisplay.pRbp;
-
- PTR_CALL_DESCR_CONTEXT pContext = (PTR_CALL_DESCR_CONTEXT)newSP;
-
- m_RegDisplay.pRbp = PTR_TO_MEMBER(CALL_DESCR_CONTEXT, pContext, Rbp);
- m_RegDisplay.pRsi = PTR_TO_MEMBER(CALL_DESCR_CONTEXT, pContext, Rsi);
- m_RegDisplay.pRbx = PTR_TO_MEMBER(CALL_DESCR_CONTEXT, pContext, Rbx);
-
- // And adjust SP to be the state that it should be in just after returning from
- // the CallDescrFunction
- newSP += sizeof(CALL_DESCR_CONTEXT);
-#elif defined(TARGET_ARM)
- // R7 points to the SP that we want to capture. (This arrangement allows for
- // the arguments from this function to be loaded into memory with an adjustment
- // to SP, like an alloca
- newSP = *(PTR_UIntNative)m_RegDisplay.pR7;
- PTR_CALL_DESCR_CONTEXT pContext = (PTR_CALL_DESCR_CONTEXT)newSP;
-
- m_RegDisplay.pR4 = PTR_TO_MEMBER(CALL_DESCR_CONTEXT, pContext, R4);
- m_RegDisplay.pR5 = PTR_TO_MEMBER(CALL_DESCR_CONTEXT, pContext, R5);
- m_RegDisplay.pR7 = PTR_TO_MEMBER(CALL_DESCR_CONTEXT, pContext, R7);
-
- // And adjust SP to be the state that it should be in just after returning from
- // the CallDescrFunction
- newSP += sizeof(CALL_DESCR_CONTEXT);
-
-#elif defined(TARGET_ARM64)
- // pFP points to the SP that we want to capture. (This arrangement allows for
- // the arguments from this function to be loaded into memory with an adjustment
- // to SP, like an alloca
- newSP = *(PTR_UIntNative)m_RegDisplay.pFP;
- PTR_CALL_DESCR_CONTEXT pContext = (PTR_CALL_DESCR_CONTEXT)newSP;
-
- m_RegDisplay.pX19 = PTR_TO_MEMBER(CALL_DESCR_CONTEXT, pContext, X19);
- m_RegDisplay.pX20 = PTR_TO_MEMBER(CALL_DESCR_CONTEXT, pContext, X20);
-
- // And adjust SP to be the state that it should be in just after returning from
- // the CallDescrFunction
- newSP += sizeof(CALL_DESCR_CONTEXT);
-
-#elif defined(TARGET_X86)
- // RBP points to the SP that we want to capture. (This arrangement allows for
- // the arguments from this function to be loaded into memory with an adjustment
- // to SP, like an alloca
- newSP = *(PTR_UIntNative)m_RegDisplay.pRbp;
-
- PTR_CALL_DESCR_CONTEXT pContext = (PTR_CALL_DESCR_CONTEXT)(newSP - offsetof(CALL_DESCR_CONTEXT, Rbp));
-
- m_RegDisplay.pRbp = PTR_TO_MEMBER(CALL_DESCR_CONTEXT, pContext, Rbp);
- m_RegDisplay.pRbx = PTR_TO_MEMBER(CALL_DESCR_CONTEXT, pContext, Rbx);
-
- // And adjust SP to be the state that it should be in just after returning from
- // the CallDescrFunction
- newSP += sizeof(CALL_DESCR_CONTEXT) - offsetof(CALL_DESCR_CONTEXT, Rbp);
-
-#else
- PORTABILITY_ASSERT("UnwindCallDescrThunk");
- PTR_CALL_DESCR_CONTEXT pContext = NULL;
-#endif
-
- m_RegDisplay.SetAddrOfIP(PTR_TO_MEMBER(CALL_DESCR_CONTEXT, pContext, IP));
- m_RegDisplay.SetIP(pContext->IP);
- m_RegDisplay.SetSP(newSP);
- SetControlPC(dac_cast(pContext->IP));
-
-#endif // defined(USE_PORTABLE_HELPERS)
-}
-
void StackFrameIterator::UnwindThrowSiteThunk()
{
ASSERT((m_dwFlags & MethodStateCalculated) == 0);
@@ -1442,6 +1315,11 @@ void StackFrameIterator::NextInternal()
unwindFlags |= USFF_StopUnwindOnTransitionFrame;
}
+ if ((m_dwFlags & GcStackWalkFlags) == GcStackWalkFlags)
+ {
+ unwindFlags |= USFF_GcUnwind;
+ }
+
FAILFAST_OR_DAC_FAIL(GetCodeManager()->UnwindStackFrame(&m_methodInfo, unwindFlags, &m_RegDisplay,
&m_pPreviousTransitionFrame));
@@ -1654,11 +1532,7 @@ void StackFrameIterator::UnwindNonEHThunkSequence()
{
ASSERT(m_pConservativeStackRangeLowerBound == NULL);
- if (category == InCallDescrThunk)
- {
- UnwindCallDescrThunk();
- }
- else if (category == InUniversalTransitionThunk)
+ if (category == InUniversalTransitionThunk)
{
UnwindUniversalTransitionThunk();
ASSERT(m_pConservativeStackRangeLowerBound != NULL);
@@ -1851,7 +1725,6 @@ bool StackFrameIterator::IsNonEHThunk(ReturnAddressCategory category)
default:
return false;
case InUniversalTransitionThunk:
- case InCallDescrThunk:
return true;
}
}
@@ -1921,11 +1794,7 @@ StackFrameIterator::ReturnAddressCategory StackFrameIterator::CategorizeUnadjust
#else // defined(USE_PORTABLE_HELPERS)
#if defined(FEATURE_DYNAMIC_CODE)
- if (EQUALS_RETURN_ADDRESS(returnAddress, ReturnFromCallDescrThunk))
- {
- return InCallDescrThunk;
- }
- else if (EQUALS_RETURN_ADDRESS(returnAddress, ReturnFromUniversalTransition) ||
+ if (EQUALS_RETURN_ADDRESS(returnAddress, ReturnFromUniversalTransition) ||
EQUALS_RETURN_ADDRESS(returnAddress, ReturnFromUniversalTransition_DebugStepTailCall))
{
return InUniversalTransitionThunk;
diff --git a/src/coreclr/nativeaot/Runtime/StackFrameIterator.h b/src/coreclr/nativeaot/Runtime/StackFrameIterator.h
index 9551e4caeed497..5ea7676cf51e8f 100644
--- a/src/coreclr/nativeaot/Runtime/StackFrameIterator.h
+++ b/src/coreclr/nativeaot/Runtime/StackFrameIterator.h
@@ -79,10 +79,6 @@ class StackFrameIterator
// NOTE: This function always publishes a non-NULL conservative stack range lower bound.
void UnwindUniversalTransitionThunk();
- // If our control PC indicates that we're in the call descr thunk that we use to call an arbitrary managed
- // function with an arbitrary signature from a normal managed function handle the stack walk specially.
- void UnwindCallDescrThunk();
-
void EnterInitialInvalidState(Thread * pThreadToWalk);
void InternalInit(Thread * pThreadToWalk, PTR_PInvokeTransitionFrame pFrame, uint32_t dwFlags); // GC stackwalk
@@ -115,7 +111,6 @@ class StackFrameIterator
InThrowSiteThunk,
InFuncletInvokeThunk,
InFilterFuncletInvokeThunk,
- InCallDescrThunk,
InUniversalTransitionThunk,
};
diff --git a/src/coreclr/nativeaot/Runtime/amd64/CallDescrWorker.S b/src/coreclr/nativeaot/Runtime/amd64/CallDescrWorker.S
deleted file mode 100644
index 483d4b5f9ac8cc..00000000000000
--- a/src/coreclr/nativeaot/Runtime/amd64/CallDescrWorker.S
+++ /dev/null
@@ -1,13 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-.intel_syntax noprefix
-#include
-
-NESTED_ENTRY RhCallDescrWorker, _TEXT, NoHandler
-
- EXPORT_POINTER_TO_ADDRESS PointerToReturnFromCallDescrThunk
-
- // UNIXTODO: Implement this function
- int 3
-NESTED_END RhCallDescrWorker, _TEXT
diff --git a/src/coreclr/nativeaot/Runtime/amd64/CallDescrWorker.asm b/src/coreclr/nativeaot/Runtime/amd64/CallDescrWorker.asm
deleted file mode 100644
index 3f4ded05d9918e..00000000000000
--- a/src/coreclr/nativeaot/Runtime/amd64/CallDescrWorker.asm
+++ /dev/null
@@ -1,105 +0,0 @@
-;; Licensed to the .NET Foundation under one or more agreements.
-;; The .NET Foundation licenses this file to you under the MIT license.
-
-include AsmMacros.inc
-
-
-;;;;;;;;;;;;;;;;;;;;;;; CallingConventionConverter Thunks Helpers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;extern "C" void RhCallDescrWorker(CallDescrData * pCallDescrData);
-
- NESTED_ENTRY RhCallDescrWorker, _TEXT
-
- push_nonvol_reg rbx ; save nonvolatile registers
- push_nonvol_reg rsi ;
- push_nonvol_reg rbp ;
- set_frame rbp, 0 ; set frame pointer
-
- END_PROLOGUE
-
- mov rbx, rcx ; save pCallDescrData in rbx
-
- mov ecx, dword ptr [rbx + OFFSETOF__CallDescrData__numStackSlots]
-
- test ecx, 1
- jz StackAligned
- push rax
-StackAligned:
-
- mov rsi, [rbx + OFFSETOF__CallDescrData__pSrc] ; set source argument list address
- lea rsi, [rsi + 8 * rcx]
-
-StackCopyLoop: ; copy the arguments to stack top-down to carefully probe for sufficient
- ; stack space
- sub rsi, 8
- push qword ptr [rsi]
- dec ecx
- jnz StackCopyLoop
-
- ;
- ; N.B. All four argument registers are loaded regardless of the actual number
- ; of arguments.
- ;
-
- mov rax, [rbx + OFFSETOF__CallDescrData__pFloatArgumentRegisters] ; get floating pointer arg registers pointer
-
- mov rcx, 0[rsp] ; load first four argument registers
- mov rdx, 8[rsp] ;
- mov r8, 10h[rsp] ;
- mov r9, 18h[rsp] ;
- test rax, rax ;
- jz DoCall ;
- movdqa xmm0, [rax + 00h] ; load floating point registers if they are used
- movdqa xmm1, [rax + 10h] ;
- movdqa xmm2, [rax + 20h] ;
- movdqa xmm3, [rax + 30h] ;
-DoCall:
- call qword ptr [rbx + OFFSETOF__CallDescrData__pTarget] ; call target function
-
- EXPORT_POINTER_TO_ADDRESS PointerToReturnFromCallDescrThunk
-
- ; Symbol used to identify thunk call to managed function so the special
- ; case unwinder can unwind through this function. Sadly we cannot directly
- ; export this symbol right now because it confuses DIA unwinder to believe
- ; it's the beginning of a new method, therefore we export the address
- ; of an auxiliary variable holding the address instead.
-
- ; Save FP return value
-
- mov ecx, dword ptr [rbx + OFFSETOF__CallDescrData__fpReturnSize]
- test ecx, ecx
- jz ReturnsInt
-
- cmp ecx, 4
- je ReturnsFloat
- cmp ecx, 8
- je ReturnsDouble
- ; unexpected
- jmp Epilog
-
-ReturnsInt:
- mov rbx, [rbx + OFFSETOF__CallDescrData__pReturnBuffer]
- mov [rbx], rax
-
-Epilog:
- lea rsp, 0[rbp] ; deallocate argument list
- pop rbp ; restore nonvolatile register
- pop rsi ;
- pop rbx ;
- ret
-
-ReturnsFloat:
-; Unlike desktop returnValue is a pointer to a return buffer, not the buffer itself
- mov rbx, [rbx + OFFSETOF__CallDescrData__pReturnBuffer]
- movss real4 ptr [rbx], xmm0
- jmp Epilog
-
-ReturnsDouble:
-; Unlike desktop returnValue is a pointer to a return buffer, not the buffer itself
- mov rbx, [rbx + OFFSETOF__CallDescrData__pReturnBuffer]
- movsd real8 ptr [rbx], xmm0
- jmp Epilog
-
- NESTED_END RhCallDescrWorker, _TEXT
-
-end
diff --git a/src/coreclr/nativeaot/Runtime/arm/CallDescrWorker.S b/src/coreclr/nativeaot/Runtime/arm/CallDescrWorker.S
deleted file mode 100644
index 53184d9b28b2a3..00000000000000
--- a/src/coreclr/nativeaot/Runtime/arm/CallDescrWorker.S
+++ /dev/null
@@ -1,20 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-.syntax unified
-.thumb
-
-#include // generated by the build from AsmOffsets.cpp
-#include
-
-// TODO: Implement Arm support
-
-NESTED_ENTRY RhCallDescrWorker, _TEXT, NoHandler
-LOCAL_LABEL(ReturnFromCallDescrThunk):
-
- EXPORT_POINTER_TO_ADDRESS PointerToReturnFromCallDescrThunk
-
- // UNIXTODO: Implement this function
- EMIT_BREAKPOINT
-NESTED_END RhCallDescrWorker, _TEXT
-
diff --git a/src/coreclr/nativeaot/Runtime/arm/CallDescrWorker.asm b/src/coreclr/nativeaot/Runtime/arm/CallDescrWorker.asm
deleted file mode 100644
index 7ee66320cb3325..00000000000000
--- a/src/coreclr/nativeaot/Runtime/arm/CallDescrWorker.asm
+++ /dev/null
@@ -1,128 +0,0 @@
-;; Licensed to the .NET Foundation under one or more agreements.
-;; The .NET Foundation licenses this file to you under the MIT license.
-
-#include "AsmMacros.h"
-
- TEXTAREA
-
-;;-----------------------------------------------------------------------------
-;; This helper routine enregisters the appropriate arguments and makes the
-;; actual call.
-;;-----------------------------------------------------------------------------
-;;void RhCallDescrWorker(CallDescrData * pCallDescrData);
- NESTED_ENTRY RhCallDescrWorker
- PROLOG_PUSH {r4,r5,r7,lr}
- PROLOG_STACK_SAVE r7
-
- mov r5,r0 ; save pCallDescrData in r5
-
- ldr r1, [r5,#OFFSETOF__CallDescrData__numStackSlots]
- cbz r1, Ldonestack
-
- ;; Add frame padding to ensure frame size is a multiple of 8 (a requirement of the OS ABI).
- ;; We push four registers (above) and numStackSlots arguments (below). If this comes to an odd number
- ;; of slots we must pad with another. This simplifies to "if the low bit of numStackSlots is set,
- ;; extend the stack another four bytes".
- lsls r2, r1, #2
- and r3, r2, #4
- sub sp, sp, r3
-
- ;; This loop copies numStackSlots words
- ;; from [pSrcEnd-4,pSrcEnd-8,...] to [sp-4,sp-8,...]
- ldr r0, [r5,#OFFSETOF__CallDescrData__pSrc]
- add r0,r0,r2
-Lstackloop
- ldr r2, [r0,#-4]!
- str r2, [sp,#-4]!
- subs r1, r1, #1
- bne Lstackloop
-Ldonestack
-
- ;; If FP arguments are supplied in registers (r3 != NULL) then initialize all of them from the pointer
- ;; given in r3. Do not use "it" since it faults in floating point even when the instruction is not executed.
- ldr r3, [r5,#OFFSETOF__CallDescrData__pFloatArgumentRegisters]
- cbz r3, LNoFloatingPoint
- vldm r3, {s0-s15}
-LNoFloatingPoint
-
- ;; Copy [pArgumentRegisters, ..., pArgumentRegisters + 12]
- ;; into r0, ..., r3
-
- ldr r4, [r5,#OFFSETOF__CallDescrData__pArgumentRegisters]
- ldm r4, {r0-r3}
-
- CHECK_STACK_ALIGNMENT
-
- ;; call pTarget
- ;; Note that remoting expect target in r4.
- ldr r4, [r5,#OFFSETOF__CallDescrData__pTarget]
- blx r4
-
- EXPORT_POINTER_TO_ADDRESS PointerToReturnFromCallDescrThunk
-
- ;; Symbol used to identify thunk call to managed function so the special
- ;; case unwinder can unwind through this function. Sadly we cannot directly
- ;; export this symbol right now because it confuses DIA unwinder to believe
- ;; it's the beginning of a new method, therefore we export the address
- ;; of an auxiliary variable holding the address instead.
-
- ldr r3, [r5,#OFFSETOF__CallDescrData__fpReturnSize]
-
- ;; Save FP return value if appropriate
- cbz r3, LFloatingPointReturnDone
-
- ;; Float return case
- ;; Do not use "it" since it faults in floating point even when the instruction is not executed.
- cmp r3, #4
- bne LNoFloatReturn
- vmov r0, s0
- b LFloatingPointReturnDone
-LNoFloatReturn
-
- ;; Double return case
- ;; Do not use "it" since it faults in floating point even when the instruction is not executed.
- cmp r3, #8
- bne LNoDoubleReturn
- vmov r0, r1, s0, s1
- b LFloatingPointReturnDone
-LNoDoubleReturn
-; Unlike desktop returnValue is a pointer to a return buffer, not the buffer itself
- ldr r2, [r5, #OFFSETOF__CallDescrData__pReturnBuffer]
-
- cmp r3, #16
- bne LNoFloatHFAReturn
- vstm r2, {s0-s3}
- b LReturnDone
-LNoFloatHFAReturn
-
- cmp r3, #32
- bne LNoDoubleHFAReturn
- vstm r2, {d0-d3}
- b LReturnDone
-LNoDoubleHFAReturn
-
- EMIT_BREAKPOINT ; Unreachable
-
-LFloatingPointReturnDone
-
-; Unlike desktop returnValue is a pointer to a return buffer, not the buffer itself
- ldr r5, [r5, #OFFSETOF__CallDescrData__pReturnBuffer]
-
- ;; Save return value into retbuf
- str r0, [r5, #(0)]
- str r1, [r5, #(4)]
-
-LReturnDone
-
-#ifdef _DEBUG
- ;; trash the floating point registers to ensure that the HFA return values
- ;; won't survive by accident
- vldm sp, {d0-d3}
-#endif
-
- EPILOG_STACK_RESTORE r7
- EPILOG_POP {r4,r5,r7,pc}
-
- NESTED_END RhCallDescrWorker
-
- END
diff --git a/src/coreclr/nativeaot/Runtime/arm64/CallDescrWorker.S b/src/coreclr/nativeaot/Runtime/arm64/CallDescrWorker.S
deleted file mode 100644
index fa24f81393ac81..00000000000000
--- a/src/coreclr/nativeaot/Runtime/arm64/CallDescrWorker.S
+++ /dev/null
@@ -1,140 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include
-#include "AsmOffsets.inc"
-
-//-----------------------------------------------------------------------------
-// This helper routine enregisters the appropriate arguments and makes the
-// actual call.
-//
-// INPUT: x0: pointer to CallDescrData struct
-//
-//-----------------------------------------------------------------------------
-//void RhCallDescrWorker(CallDescrData * pCallDescrData);
- NESTED_ENTRY RhCallDescrWorker, _TEXT, NoHandler
-
- PROLOG_SAVE_REG_PAIR_INDEXED fp, lr, -32
- PROLOG_SAVE_REG_PAIR x19, x20, 16
-
- // Save the value of SP before we start pushing any arguments
- mov x20, sp
-
- mov x19, x0 // save pCallDescrData in x19
-
- ldr w1, [x19, #OFFSETOF__CallDescrData__numStackSlots]
- cbz w1, Ldonestack
-
- // Add frame padding to ensure frame size is a multiple of 16 (a requirement of the OS ABI).
- // We push two registers (above) and numStackSlots arguments (below). If this comes to an odd number
- // of slots we must pad with another. This simplifies to "if the low bit of numStackSlots is set,
- // extend the stack another eight bytes".
- ldr x0, [x19, #OFFSETOF__CallDescrData__pSrc]
- add x0, x0, x1, lsl #3 // pSrcEnd=pSrc+8*numStackSlots
- ands x2, x1, #1
- beq Lstackloop
-
- // This loop copies numStackSlots words
- // from [pSrcEnd-8,pSrcEnd-16,...] to [sp-8,sp-16,...]
-
- // Pad and store one stack slot as number of slots are odd
- ldr x4, [x0,#-8]!
- str x4, [sp,#-16]!
- subs x1, x1, #1
- beq Ldonestack
-Lstackloop:
- ldp x2, x4, [x0,#-16]!
- stp x2, x4, [sp,#-16]!
- subs x1, x1, #2
- bne Lstackloop
-Ldonestack:
-
- // If FP arguments are supplied in registers (x9 != NULL) then initialize all of them from the pointer
- // given in x9.
- ldr x9, [x19, #OFFSETOF__CallDescrData__pFloatArgumentRegisters]
- cbz x9, LNoFloatingPoint
- ldp d0, d1, [x9]
- ldp d2, d3, [x9, #16]
- ldp d4, d5, [x9, #32]
- ldp d6, d7, [x9, #48]
-LNoFloatingPoint:
-
- // Copy [pArgumentRegisters, ..., pArgumentRegisters + 64]
- // into x0, ..., x7, x8
-
- ldr x9, [x19, #OFFSETOF__CallDescrData__pArgumentRegisters]
- ldp x0, x1, [x9]
- ldp x2, x3, [x9, #16]
- ldp x4, x5, [x9, #32]
- ldp x6, x7, [x9, #48]
- ldr x8, [x9, #64]
-
- // call pTarget
- ldr x9, [x19, #OFFSETOF__CallDescrData__pTarget]
- blr x9
-
- EXPORT_POINTER_TO_ADDRESS PointerToReturnFromCallDescrThunk
-
- // Symbol used to identify thunk call to managed function so the special
- // case unwinder can unwind through this function. Sadly we cannot directly
- // export this symbol right now because it confuses DIA unwinder to believe
- // it's the beginning of a new method, therefore we export the address
- // of an auxiliary variable holding the address instead.
-
- ldr w3, [x19, #OFFSETOF__CallDescrData__fpReturnSize]
-
- // Unlike desktop returnValue is a pointer to a return buffer, not the buffer itself
- ldr x19, [x19, #OFFSETOF__CallDescrData__pReturnBuffer]
-
- // Int return case
- cbz w3, LIntReturn
-
- // Float return case
- cmp w3, #4
- beq LFloatOrDoubleReturn
-
- // Double return case
- cmp w3, #8
- bne LCheckHFAReturn
-
-LFloatOrDoubleReturn:
- str d0, [x19]
- b LReturnDone
-
-LCheckHFAReturn:
- cmp w3, #16
- beq LFloatOrDoubleHFAReturn
- cmp w3, #32
- beq LFloatOrDoubleHFAReturn
- b LNoHFAReturn
-
-LFloatOrDoubleHFAReturn:
- //Single/Double HFAReturn return case
- stp d0, d1, [x19, #00]
- stp d2, d3, [x19, #16]
- b LReturnDone
-
-LNoHFAReturn:
-
- EMIT_BREAKPOINT // Unreachable
-
-LIntReturn:
- // Save return value(s) into retbuf for int
- stp x0, x1, [x19]
-
-LReturnDone:
-
-#ifdef _DEBUG
- // Trash the floating point registers to ensure that the HFA return values
- // won't survive by accident
- ldp d0, d1, [sp]
- ldp d2, d3, [sp, #16]
-#endif
- // Restore the value of SP
- mov sp, x20
-
- EPILOG_RESTORE_REG_PAIR x19, x20, 16
- EPILOG_RESTORE_REG_PAIR_INDEXED fp, lr, 32
- EPILOG_RETURN
-
- NESTED_END RhCallDescrWorker
diff --git a/src/coreclr/nativeaot/Runtime/arm64/CallDescrWorker.asm b/src/coreclr/nativeaot/Runtime/arm64/CallDescrWorker.asm
deleted file mode 100644
index 09eef6d781ebf4..00000000000000
--- a/src/coreclr/nativeaot/Runtime/arm64/CallDescrWorker.asm
+++ /dev/null
@@ -1,143 +0,0 @@
-;; Licensed to the .NET Foundation under one or more agreements.
-;; The .NET Foundation licenses this file to you under the MIT license.
-
-#include "AsmMacros.h"
-
- TEXTAREA
-
-;;-----------------------------------------------------------------------------
-;; This helper routine enregisters the appropriate arguments and makes the
-;; actual call.
-;;
-;; INPUT: x0: pointer to CallDescrData struct
-;;
-;;-----------------------------------------------------------------------------
-;;void RhCallDescrWorker(CallDescrData * pCallDescrData);
- NESTED_ENTRY RhCallDescrWorker
-
- PROLOG_SAVE_REG_PAIR fp, lr, #-32!
- PROLOG_SAVE_REG_PAIR x19, x20, #16
-
- ;; Save the value of SP before we start pushing any arguments
- mov x20, sp
-
- mov x19, x0 ; save pCallDescrData in x19
-
- ldr w1, [x19, #OFFSETOF__CallDescrData__numStackSlots]
- cbz w1, Ldonestack
-
- ;; Add frame padding to ensure frame size is a multiple of 16 (a requirement of the OS ABI).
- ;; We push two registers (above) and numStackSlots arguments (below). If this comes to an odd number
- ;; of slots we must pad with another. This simplifies to "if the low bit of numStackSlots is set,
- ;; extend the stack another eight bytes".
- ldr x0, [x19, #OFFSETOF__CallDescrData__pSrc]
- add x0, x0, x1 lsl #3 ; pSrcEnd=pSrc+8*numStackSlots
- ands x2, x1, #1
- beq Lstackloop
-
- ;; This loop copies numStackSlots words
- ;; from [pSrcEnd-8,pSrcEnd-16,...] to [sp-8,sp-16,...]
-
- ;; Pad and store one stack slot as number of slots are odd
- ldr x4, [x0,#-8]!
- str x4, [sp,#-16]!
- subs x1, x1, #1
- beq Ldonestack
-Lstackloop
- ldp x2, x4, [x0,#-16]!
- stp x2, x4, [sp,#-16]!
- subs x1, x1, #2
- bne Lstackloop
-Ldonestack
-
- ;; If FP arguments are supplied in registers (x9 != NULL) then initialize all of them from the pointer
- ;; given in x9.
- ldr x9, [x19, #OFFSETOF__CallDescrData__pFloatArgumentRegisters]
- cbz x9, LNoFloatingPoint
- ldp d0, d1, [x9]
- ldp d2, d3, [x9, #16]
- ldp d4, d5, [x9, #32]
- ldp d6, d7, [x9, #48]
-LNoFloatingPoint
-
- ;; Copy [pArgumentRegisters, ..., pArgumentRegisters + 64]
- ;; into x0, ..., x7, x8
-
- ldr x9, [x19, #OFFSETOF__CallDescrData__pArgumentRegisters]
- ldp x0, x1, [x9]
- ldp x2, x3, [x9, #16]
- ldp x4, x5, [x9, #32]
- ldp x6, x7, [x9, #48]
- ldr x8, [x9, #64]
-
- ;; call pTarget
- ldr x9, [x19, #OFFSETOF__CallDescrData__pTarget]
- blr x9
-
- EXPORT_POINTER_TO_ADDRESS PointerToReturnFromCallDescrThunk
-
- ;; Symbol used to identify thunk call to managed function so the special
- ;; case unwinder can unwind through this function. Sadly we cannot directly
- ;; export this symbol right now because it confuses DIA unwinder to believe
- ;; it's the beginning of a new method, therefore we export the address
- ;; of an auxiliary variable holding the address instead.
-
- ldr w3, [x19, #OFFSETOF__CallDescrData__fpReturnSize]
-
- ;; Unlike desktop returnValue is a pointer to a return buffer, not the buffer itself
- ldr x19, [x19, #OFFSETOF__CallDescrData__pReturnBuffer]
-
- ;; Int return case
- cbz w3, LIntReturn
-
- ;; Float return case
- cmp w3, #4
- beq LFloatOrDoubleReturn
-
- ;; Double return case
- cmp w3, #8
- bne LCheckHFAReturn
-
-LFloatOrDoubleReturn
- str d0, [x19]
- b LReturnDone
-
-LCheckHFAReturn
- cmp w3, #16
- beq LFloatOrDoubleHFAReturn
- cmp w3, #32
- beq LFloatOrDoubleHFAReturn
- b LNoHFAReturn
-
-LFloatOrDoubleHFAReturn
- ;;Single/Double HFAReturn return case
- stp d0, d1, [x19, #00]
- stp d2, d3, [x19, #16]
- b LReturnDone
-
-LNoHFAReturn
-
- EMIT_BREAKPOINT ; Unreachable
-
-LIntReturn
- ;; Save return value(s) into retbuf for int
- stp x0, x1, [x19]
-
-LReturnDone
-
-#ifdef _DEBUG
- ;; Trash the floating point registers to ensure that the HFA return values
- ;; won't survive by accident
- ldp d0, d1, [sp]
- ldp d2, d3, [sp, #16]
-#endif
- ;; Restore the value of SP
- mov sp, x20
-
- EPILOG_RESTORE_REG_PAIR x19, x20, #16
- EPILOG_RESTORE_REG_PAIR fp, lr, #32!
- EPILOG_RETURN
-
- NESTED_END RhCallDescrWorker
-
- END
diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.cpp b/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.cpp
index 9bb8d088a8d99b..25272643d18a30 100644
--- a/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.cpp
+++ b/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.cpp
@@ -1,6 +1,24 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+#include
+
+#ifdef __APPLE__
+#include
+#endif
+
+#ifdef __NetBSD__
+#include
+#include
+#include
+#include
+#endif
+
+#ifdef __FreeBSD__
+#include
+#include
+#endif
+
#include
#ifdef ENABLE_PERFTRACING
@@ -13,6 +31,7 @@
bool aot_ipc_get_process_id_disambiguation_key(uint32_t process_id, uint64_t *key);
+// Consider moving this code to shared library code. See https://github.com/dotnet/runtime/issues/87069
bool
aot_ipc_get_process_id_disambiguation_key(
uint32_t process_id,
@@ -26,7 +45,54 @@ aot_ipc_get_process_id_disambiguation_key(
*key = 0;
// Mono implementation, restricted just to Unix
-#ifdef TARGET_UNIX
+#if defined (__APPLE__) || defined (__FreeBSD__)
+ // On OS X, we return the process start time expressed in Unix time (the number of seconds
+ // since the start of the Unix epoch).
+ struct kinfo_proc info = {};
+ size_t size = sizeof (info);
+ int mib [4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_id };
+
+ const int result_sysctl = sysctl (mib, sizeof(mib)/sizeof(*mib), &info, &size, NULL, 0);
+ if (result_sysctl == 0) {
+#if defined (__APPLE__)
+ struct timeval proc_starttime = info.kp_proc.p_starttime;
+#else // __FreeBSD__
+ struct timeval proc_starttime = info.ki_start;
+#endif
+ long seconds_since_epoch = proc_starttime.tv_sec;
+ *key = seconds_since_epoch;
+ return true;
+ } else {
+ EP_ASSERT (!"Failed to get start time of a process.");
+ return false;
+ }
+#elif defined (__NetBSD__)
+ // On NetBSD, we return the process start time expressed in Unix time (the number of seconds
+ // since the start of the Unix epoch).
+ kvm_t *kd;
+ int cnt;
+ struct kinfo_proc2 *info;
+
+ kd = kvm_open (NULL, NULL, NULL, KVM_NO_FILES, "kvm_open");
+ if (!kd) {
+ EP_ASSERT (!"Failed to get start time of a process.");
+ return false;
+ }
+
+ info = kvm_getproc2 (kd, KERN_PROC_PID, process_id, sizeof (struct kinfo_proc2), &cnt);
+ if (!info || cnt < 1) {
+ kvm_close (kd);
+ EP_ASSERT (!"Failed to get start time of a process.");
+ return false;
+ }
+
+ kvm_close (kd);
+
+ long seconds_since_epoch = info->p_ustart_sec;
+ *key = seconds_since_epoch;
+
+ return true;
+#elif defined (__linux__)
// Here we read /proc//stat file to get the start time for the process.
// We return this value (which is expressed in jiffies since boot time).
diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.h b/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.h
index aaea67334eb0f4..9a56a52060042c 100644
--- a/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.h
+++ b/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.h
@@ -13,6 +13,8 @@
#include
#include
+#include
+
#undef DS_LOG_ALWAYS_0
#define DS_LOG_ALWAYS_0(msg) do {} while (0)
@@ -127,8 +129,10 @@ ds_rt_config_value_get_enable (void)
{
STATIC_CONTRACT_NOTHROW;
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
- // TODO: EventPipe Configuration values - RhConfig?
+ bool value;
+ if (RhConfig::Environment::TryGetBooleanValue("EnableDiagnostics", &value))
+ return value;
+
return true;
}
@@ -137,8 +141,12 @@ inline
ep_char8_t *
ds_rt_config_value_get_ports (void)
{
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
- // TODO: EventPipe Configuration values - RhConfig?
+ STATIC_CONTRACT_NOTHROW;
+
+ char* value;
+ if (RhConfig::Environment::TryGetStringValue("DiagnosticPorts", &value))
+ return (ep_char8_t*)value;
+
return nullptr;
}
@@ -148,8 +156,14 @@ uint32_t
ds_rt_config_value_get_default_port_suspend (void)
{
STATIC_CONTRACT_NOTHROW;
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
- // TODO: EventPipe Configuration values - RhConfig?
+
+ uint64_t value;
+ if (RhConfig::Environment::TryGetIntegerValue("DefaultDiagnosticPortSuspend", &value))
+ {
+ EP_ASSERT(value <= UINT32_MAX);
+ return static_cast(value);
+ }
+
return 0;
}
@@ -281,10 +295,15 @@ ds_rt_server_log_pause_message (void)
{
STATIC_CONTRACT_NOTHROW;
- const char diagPortsName[] = "DOTNET_DiagnosticPorts";
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
- // TODO: Cannot find nocache versions of RhConfig
- // PalDebugBreak();
+ ep_char8_t * ports = ds_rt_config_value_get_ports ();
+ uint32_t port_suspended = ds_rt_config_value_get_default_port_suspend ();
+
+ printf ("The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a Diagnostic Port.\n");
+ printf ("DOTNET_DiagnosticPorts=\"%s\"\n", ports == nullptr ? "" : ports);
+ printf ("DOTNET_DefaultDiagnosticPortSuspend=%d\n", port_suspended);
+ fflush (stdout);
+
+ ep_rt_utf8_string_free (ports);
}
#endif /* ENABLE_PERFTRACING */
diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.cpp b/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.cpp
index c629f2b86c5eb6..f7793b4065f535 100644
--- a/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.cpp
+++ b/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.cpp
@@ -90,13 +90,22 @@ ep_rt_aot_entrypoint_assembly_name_get_utf8 (void)
{
// shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
// TODO: Implement EventPipe assembly name - return filename in nativeaot?
- PalDebugBreak();
-
- // fallback to the empty string if we can't get assembly info, e.g., if the runtime is
- // suspended before an assembly is loaded.
return reinterpret_cast("");
}
+const ep_char8_t *
+ep_rt_aot_diagnostics_command_line_get (void)
+{
+ // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
+ // TODO: revisit commandline for AOT
+#ifdef TARGET_WINDOWS
+ const ep_char16_t* command_line = reinterpret_cast(::GetCommandLineW());
+ return ep_rt_utf16_to_utf8_string(command_line, -1);
+#else
+ return "";
+#endif
+}
+
uint32_t
ep_rt_aot_atomic_inc_uint32_t (volatile uint32_t *value)
{
diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h b/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h
index d17566514a379f..2687fc8f35ed50 100644
--- a/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h
+++ b/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h
@@ -20,6 +20,7 @@
#include "rhassert.h"
#include
+#include
#ifdef TARGET_UNIX
#define sprintf_s snprintf
@@ -47,6 +48,9 @@
#undef EP_ALIGN_UP
#define EP_ALIGN_UP(val,align) _rt_aot_align_up(val,align)
+#define _TEXT(s) #s
+#define STRINGIFY(s) _TEXT(s)
+
#ifdef TARGET_UNIX
extern pthread_key_t eventpipe_tls_key;
extern __thread EventPipeThreadHolder* eventpipe_tls_instance;
@@ -88,12 +92,11 @@ ep_rt_entrypoint_assembly_name_get_utf8 (void)
static
const ep_char8_t *
-ep_rt_runtime_version_get_utf8 (void) {
+ep_rt_runtime_version_get_utf8 (void)
+{
STATIC_CONTRACT_NOTHROW;
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
- // TODO: Find a way to use CoreCLR runtime_version.h here if a more exact version is needed
- return reinterpret_cast("8.0.0");
+ return reinterpret_cast(STRINGIFY(RuntimeProductVersion));
}
/*
@@ -1388,10 +1391,7 @@ ep_rt_utf8_to_utf16le_string (
// Shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
// Implementation would just use strlen and malloc to make a new buffer, and would then copy the string chars one by one.
// Assumes that only ASCII is used for ep_char8_t
- size_t len_utf8 = strlen(str);
- if (len_utf8 == 0)
- return NULL;
-
+ size_t len_utf8 = strlen(str);
ep_char16_t *str_utf16 = reinterpret_cast(malloc ((len_utf8 + 1) * sizeof (ep_char16_t)));
if (!str_utf16)
return NULL;
@@ -1511,16 +1511,9 @@ static
const ep_char8_t *
ep_rt_diagnostics_command_line_get (void)
{
-
STATIC_CONTRACT_NOTHROW;
-
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
- // TODO: revisit commandline for AOT
- // return reinterpret_cast(::GetCommandLineA());
-
- extern ep_char8_t *volatile _ep_rt_aot_diagnostics_cmd_line;
- ep_char8_t *old_cmd_line = _ep_rt_aot_diagnostics_cmd_line;
- return _ep_rt_aot_diagnostics_cmd_line;
+ extern const ep_char8_t * ep_rt_aot_diagnostics_command_line_get (void);
+ return ep_rt_aot_diagnostics_command_line_get();
}
/*
diff --git a/src/coreclr/nativeaot/Runtime/i386/CallDescrWorker.asm b/src/coreclr/nativeaot/Runtime/i386/CallDescrWorker.asm
deleted file mode 100644
index 481cba1d898863..00000000000000
--- a/src/coreclr/nativeaot/Runtime/i386/CallDescrWorker.asm
+++ /dev/null
@@ -1,96 +0,0 @@
-;; Licensed to the .NET Foundation under one or more agreements.
-;; The .NET Foundation licenses this file to you under the MIT license.
-
- .586
- .model flat
- option casemap:none
- .code
-
-include AsmMacros.inc
-
-ifdef FEATURE_DYNAMIC_CODE
-;;;;;;;;;;;;;;;;;;;;;;; CallingConventionConverter Thunks Helpers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;------------------------------------------------------------------------------
-; This helper routine enregisters the appropriate arguments and makes the
-; actual call.
-;------------------------------------------------------------------------------
-; void __fastcall CallDescrWorker(CallDescrWorkerParams * pParams)
-FASTCALL_FUNC RhCallDescrWorker, 4
- push ebp
- mov ebp, esp
- push ebx
- mov ebx, ecx
-
- mov ecx, [ebx + OFFSETOF__CallDescrData__numStackSlots]
- mov eax, [ebx + OFFSETOF__CallDescrData__pSrc] ; copy the stack
- test ecx, ecx
- jz donestack
- lea eax, [eax + 4 * ecx - 4] ; last argument
- push dword ptr [eax]
- dec ecx
- jz donestack
- sub eax, 4
- push dword ptr [eax]
- dec ecx
- jz donestack
-stackloop:
- sub eax, 4
- push dword ptr [eax]
- dec ecx
- jnz stackloop
-donestack:
-
- ; now we must push each field of the ArgumentRegister structure
- mov eax, [ebx + OFFSETOF__CallDescrData__pArgumentRegisters]
- mov edx, dword ptr [eax]
- mov ecx, dword ptr [eax + 4]
- mov eax,[ebx + OFFSETOF__CallDescrData__pTarget]
- call eax
-
- EXPORT_POINTER_TO_ADDRESS _PointerToReturnFromCallDescrThunk
-
- ; Symbol used to identify thunk call to managed function so the special
- ; case unwinder can unwind through this function. Sadly we cannot directly
- ; export this symbol right now because it confuses DIA unwinder to believe
- ; it's the beginning of a new method, therefore we export the address
- ; by means of an auxiliary variable.
-
- ; Save FP return value if necessary
- mov ecx, [ebx + OFFSETOF__CallDescrData__fpReturnSize]
- cmp ecx, 0
- je ReturnsInt
-
- cmp ecx, 4
- je ReturnsFloat
- cmp ecx, 8
- je ReturnsDouble
- ; unexpected
- jmp Epilog
-
-ReturnsInt:
-; Unlike desktop returnValue is a pointer to a return buffer, not the buffer itself
- mov ebx, [ebx + OFFSETOF__CallDescrData__pReturnBuffer]
- mov [ebx], eax
- mov [ebx + 4], edx
-
-Epilog:
- pop ebx
- pop ebp
- retn
-
-ReturnsFloat:
- mov ebx, [ebx + OFFSETOF__CallDescrData__pReturnBuffer]
- fstp dword ptr [ebx] ; Spill the Float return value
- jmp Epilog
-
-ReturnsDouble:
- mov ebx, [ebx + OFFSETOF__CallDescrData__pReturnBuffer]
- fstp qword ptr [ebx] ; Spill the Double return value
- jmp Epilog
-
-FASTCALL_ENDFUNC
-
-endif
-
-end
diff --git a/src/coreclr/nativeaot/Runtime/portable.cpp b/src/coreclr/nativeaot/Runtime/portable.cpp
index c8f43790085b9e..25eb9485fde57c 100644
--- a/src/coreclr/nativeaot/Runtime/portable.cpp
+++ b/src/coreclr/nativeaot/Runtime/portable.cpp
@@ -394,12 +394,6 @@ void * ReturnFromUniversalTransition_DebugStepTailCall;
#endif // USE_PORTABLE_HELPERS
-// @TODO Implement CallDescrThunk
-EXTERN_C void * ReturnFromCallDescrThunk;
-#ifdef USE_PORTABLE_HELPERS
-void * ReturnFromCallDescrThunk;
-#endif
-
#if defined(USE_PORTABLE_HELPERS)
//
// Return address hijacking
@@ -462,14 +456,6 @@ COOP_PINVOKE_HELPER(int64_t, RhpLockCmpXchg64, (int64_t * location, int64_t valu
return PalInterlockedCompareExchange64(location, value, comparand);
}
-#endif // USE_PORTABLE_HELPERS
-
-COOP_PINVOKE_HELPER(void, RhpMemoryBarrier, ())
-{
- PalMemoryBarrier();
-}
-
-#if defined(USE_PORTABLE_HELPERS)
EXTERN_C NATIVEAOT_API void* __cdecl RhAllocateThunksMapping()
{
return NULL;
@@ -516,11 +502,6 @@ COOP_PINVOKE_HELPER(int, RhpGetThunkBlockSize, ())
return 0;
}
-COOP_PINVOKE_HELPER(void, RhCallDescrWorker, (void * callDescr))
-{
- ASSERT_UNCONDITIONALLY("NYI");
-}
-
COOP_PINVOKE_HELPER(void *, RhGetCommonStubAddress, ())
{
ASSERT_UNCONDITIONALLY("NYI");
diff --git a/src/coreclr/nativeaot/Runtime/startup.cpp b/src/coreclr/nativeaot/Runtime/startup.cpp
index a178a11d102fae..58740157c49609 100644
--- a/src/coreclr/nativeaot/Runtime/startup.cpp
+++ b/src/coreclr/nativeaot/Runtime/startup.cpp
@@ -197,51 +197,59 @@ bool DetectCPUFeatures()
{
__cpuid(cpuidInfo, 0x00000001);
- if (((cpuidInfo[CPUID_EDX] & (1 << 25)) != 0) && ((cpuidInfo[CPUID_EDX] & (1 << 26)) != 0)) // SSE & SSE2
+ const int requiredBaselineEdxFlags = (1 << 25) // SSE
+ | (1 << 26); // SSE2
+
+ if ((cpuidInfo[CPUID_EDX] & requiredBaselineEdxFlags) == requiredBaselineEdxFlags)
{
- if ((cpuidInfo[CPUID_ECX] & (1 << 25)) != 0) // AESNI
+ g_cpuFeatures |= XArchIntrinsicConstants_VectorT128;
+
+ if ((cpuidInfo[CPUID_ECX] & (1 << 25)) != 0) // AESNI
{
g_cpuFeatures |= XArchIntrinsicConstants_Aes;
}
- if ((cpuidInfo[CPUID_ECX] & (1 << 1)) != 0) // PCLMULQDQ
+ if ((cpuidInfo[CPUID_ECX] & (1 << 1)) != 0) // PCLMULQDQ
{
g_cpuFeatures |= XArchIntrinsicConstants_Pclmulqdq;
}
- if ((cpuidInfo[CPUID_ECX] & (1 << 0)) != 0) // SSE3
+ if ((cpuidInfo[CPUID_ECX] & (1 << 0)) != 0) // SSE3
{
g_cpuFeatures |= XArchIntrinsicConstants_Sse3;
- if ((cpuidInfo[CPUID_ECX] & (1 << 9)) != 0) // SSSE3
+ if ((cpuidInfo[CPUID_ECX] & (1 << 9)) != 0) // SSSE3
{
g_cpuFeatures |= XArchIntrinsicConstants_Ssse3;
- if ((cpuidInfo[CPUID_ECX] & (1 << 19)) != 0) // SSE4.1
+ if ((cpuidInfo[CPUID_ECX] & (1 << 19)) != 0) // SSE4.1
{
g_cpuFeatures |= XArchIntrinsicConstants_Sse41;
- if ((cpuidInfo[CPUID_ECX] & (1 << 20)) != 0) // SSE4.2
+ if ((cpuidInfo[CPUID_ECX] & (1 << 20)) != 0) // SSE4.2
{
g_cpuFeatures |= XArchIntrinsicConstants_Sse42;
- if ((cpuidInfo[CPUID_ECX] & (1 << 22)) != 0) // MOVBE
+ if ((cpuidInfo[CPUID_ECX] & (1 << 22)) != 0) // MOVBE
{
g_cpuFeatures |= XArchIntrinsicConstants_Movbe;
}
- if ((cpuidInfo[CPUID_ECX] & (1 << 23)) != 0) // POPCNT
+ if ((cpuidInfo[CPUID_ECX] & (1 << 23)) != 0) // POPCNT
{
g_cpuFeatures |= XArchIntrinsicConstants_Popcnt;
}
- if (((cpuidInfo[CPUID_ECX] & (1 << 27)) != 0) && ((cpuidInfo[CPUID_ECX] & (1 << 28)) != 0)) // OSXSAVE & AVX
+ const int requiredAvxEcxFlags = (1 << 27) // OSXSAVE
+ | (1 << 28); // AVX
+
+ if ((cpuidInfo[CPUID_ECX] & requiredAvxEcxFlags) == requiredAvxEcxFlags)
{
- if (PalIsAvxEnabled() && (xmmYmmStateSupport() == 1))
+ if (PalIsAvxEnabled() && (xmmYmmStateSupport() == 1)) // XGETBV == 11
{
g_cpuFeatures |= XArchIntrinsicConstants_Avx;
- if ((cpuidInfo[CPUID_ECX] & (1 << 12)) != 0) // FMA
+ if ((cpuidInfo[CPUID_ECX] & (1 << 12)) != 0) // FMA
{
g_cpuFeatures |= XArchIntrinsicConstants_Fma;
}
@@ -250,66 +258,69 @@ bool DetectCPUFeatures()
{
__cpuidex(cpuidInfo, 0x00000007, 0x00000000);
- if ((cpuidInfo[CPUID_EBX] & (1 << 5)) != 0) // AVX2
+ if ((cpuidInfo[CPUID_EBX] & (1 << 5)) != 0) // AVX2
{
g_cpuFeatures |= XArchIntrinsicConstants_Avx2;
+ g_cpuFeatures |= XArchIntrinsicConstants_VectorT256;
- __cpuidex(cpuidInfo, 0x00000007, 0x00000001);
- if ((cpuidInfo[CPUID_EAX] & (1 << 4)) != 0) // AVX-VNNI
+ if (PalIsAvx512Enabled() && (avx512StateSupport() == 1)) // XGETBV XRC0[7:5] == 111
{
- g_cpuFeatures |= XArchIntrinsicConstants_AvxVnni;
- }
-
- if (PalIsAvx512Enabled() && (avx512StateSupport() == 1)) // XGETBV XRC0[7:5] == 111
- {
- if ((cpuidInfo[CPUID_EBX] & (1 << 16)) != 0) // AVX512F
+ if ((cpuidInfo[CPUID_EBX] & (1 << 16)) != 0) // AVX512F
{
g_cpuFeatures |= XArchIntrinsicConstants_Avx512f;
+ g_cpuFeatures |= XArchIntrinsicConstants_VectorT512;
bool isAVX512_VLSupported = false;
- if ((cpuidInfo[CPUID_EBX] & (1 << 31)) != 0) // AVX512VL
+ if ((cpuidInfo[CPUID_EBX] & (1 << 31)) != 0) // AVX512VL
{
g_cpuFeatures |= XArchIntrinsicConstants_Avx512f_vl;
isAVX512_VLSupported = true;
}
- if ((cpuidInfo[CPUID_EBX] & (1 << 30)) != 0) // AVX512BW
+ if ((cpuidInfo[CPUID_EBX] & (1 << 30)) != 0) // AVX512BW
{
g_cpuFeatures |= XArchIntrinsicConstants_Avx512bw;
- if (isAVX512_VLSupported)
+ if (isAVX512_VLSupported) // AVX512BW_VL
{
g_cpuFeatures |= XArchIntrinsicConstants_Avx512bw_vl;
}
}
- if ((cpuidInfo[CPUID_EBX] & (1 << 28)) != 0) // AVX512CD
+ if ((cpuidInfo[CPUID_EBX] & (1 << 28)) != 0) // AVX512CD
{
g_cpuFeatures |= XArchIntrinsicConstants_Avx512cd;
- if (isAVX512_VLSupported)
+ if (isAVX512_VLSupported) // AVX512CD_VL
{
g_cpuFeatures |= XArchIntrinsicConstants_Avx512cd_vl;
}
}
- if ((cpuidInfo[CPUID_EBX] & (1 << 17)) != 0) // AVX512DQ
+ if ((cpuidInfo[CPUID_EBX] & (1 << 17)) != 0) // AVX512DQ
{
g_cpuFeatures |= XArchIntrinsicConstants_Avx512dq;
- if (isAVX512_VLSupported)
+ if (isAVX512_VLSupported) // AVX512DQ_VL
{
g_cpuFeatures |= XArchIntrinsicConstants_Avx512dq_vl;
}
}
- if ((cpuidInfo[CPUID_ECX] & (1 << 1)) != 0) // AVX512VBMI
+ if ((cpuidInfo[CPUID_ECX] & (1 << 1)) != 0) // AVX512VBMI
{
g_cpuFeatures |= XArchIntrinsicConstants_Avx512Vbmi;
- if (isAVX512_VLSupported)
+ if (isAVX512_VLSupported) // AVX512VBMI_VL
{
g_cpuFeatures |= XArchIntrinsicConstants_Avx512Vbmi_vl;
}
}
}
}
+
+ __cpuidex(cpuidInfo, 0x00000007, 0x00000001);
+
+ if ((cpuidInfo[CPUID_EAX] & (1 << 4)) != 0) // AVX-VNNI
+ {
+ g_cpuFeatures |= XArchIntrinsicConstants_AvxVnni;
+ }
}
}
}
@@ -333,6 +344,11 @@ bool DetectCPUFeatures()
{
g_cpuFeatures |= XArchIntrinsicConstants_Bmi2;
}
+
+ if ((cpuidInfo[CPUID_EDX] & (1 << 14)) != 0)
+ {
+ g_cpuFeatures |= XArchIntrinsicConstants_Serialize; // SERIALIZE
+ }
}
}
diff --git a/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp b/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp
index a856be48f4ab8c..bbe70ae48cd6c0 100644
--- a/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp
+++ b/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp
@@ -892,12 +892,6 @@ REDHAWK_PALEXPORT void PalFlushInstructionCache(_In_ void* pAddress, size_t size
#endif
}
-REDHAWK_PALEXPORT _Ret_maybenull_ void* REDHAWK_PALAPI PalSetWerDataBuffer(_In_ void* pNewBuffer)
-{
- static void* pBuffer;
- return PalInterlockedExchangePointer(&pBuffer, pNewBuffer);
-}
-
extern "C" HANDLE GetCurrentProcess()
{
return (HANDLE)-1;
@@ -1446,7 +1440,7 @@ REDHAWK_PALEXPORT void REDHAWK_PALAPI PAL_GetCpuCapabilityFlags(int* flags)
#endif
#ifdef HWCAP_ASIMD
if (hwCap & HWCAP_ASIMD)
- *flags |= ARM64IntrinsicConstants_AdvSimd;
+ *flags |= ARM64IntrinsicConstants_AdvSimd | ARM64IntrinsicConstants_VectorT128;
#endif
#ifdef HWCAP_ASIMDRDM
if (hwCap & HWCAP_ASIMDRDM)
@@ -1545,7 +1539,7 @@ REDHAWK_PALEXPORT void REDHAWK_PALAPI PAL_GetCpuCapabilityFlags(int* flags)
// Every ARM64 CPU should support SIMD and FP
// If the OS have no function to query for CPU capabilities we set just these
- *flags |= ARM64IntrinsicConstants_AdvSimd;
+ *flags |= ARM64IntrinsicConstants_AdvSimd | ARM64IntrinsicConstants_VectorT128;
#endif // HAVE_AUXV_HWCAP_H
}
#endif
diff --git a/src/coreclr/nativeaot/Runtime/windows/CoffNativeCodeManager.cpp b/src/coreclr/nativeaot/Runtime/windows/CoffNativeCodeManager.cpp
index 96cc1e3934ef45..cc409cf2167a16 100644
--- a/src/coreclr/nativeaot/Runtime/windows/CoffNativeCodeManager.cpp
+++ b/src/coreclr/nativeaot/Runtime/windows/CoffNativeCodeManager.cpp
@@ -590,9 +590,9 @@ bool CoffNativeCodeManager::UnwindStackFrame(MethodInfo * pMethodInfo,
#define WORDPTR PDWORD
#elif defined(TARGET_AMD64)
#define FOR_EACH_NONVOLATILE_REGISTER(F) \
- F(Rax, pRax) F(Rcx, pRcx) F(Rdx, pRdx) F(Rbx, pRbx) F(Rbp, pRbp) F(Rsi, pRsi) F(Rdi, pRdi) \
- F(R8, pR8) F(R9, pR9) F(R10, pR10) F(R11, pR11) F(R12, pR12) F(R13, pR13) F(R14, pR14) F(R15, pR15)
- #define WORDPTR PDWORD64
+ F(Rbx, pRbx) F(Rbp, pRbp) F(Rsi, pRsi) F(Rdi, pRdi) \
+ F(R12, pR12) F(R13, pR13) F(R14, pR14) F(R15, pR15)
+#define WORDPTR PDWORD64
#elif defined(TARGET_ARM64)
#define FOR_EACH_NONVOLATILE_REGISTER(F) \
F(X19, pX19) F(X20, pX20) F(X21, pX21) F(X22, pX22) F(X23, pX23) F(X24, pX24) \
@@ -612,7 +612,11 @@ bool CoffNativeCodeManager::UnwindStackFrame(MethodInfo * pMethodInfo,
#if defined(TARGET_X86)
PORTABILITY_ASSERT("CoffNativeCodeManager::UnwindStackFrame");
#elif defined(TARGET_AMD64)
- memcpy(&context.Xmm6, pRegisterSet->Xmm, sizeof(pRegisterSet->Xmm));
+
+ if (!(flags & USFF_GcUnwind))
+ {
+ memcpy(&context.Xmm6, pRegisterSet->Xmm, sizeof(pRegisterSet->Xmm));
+ }
context.Rsp = pRegisterSet->SP;
context.Rip = pRegisterSet->IP;
@@ -634,10 +638,16 @@ bool CoffNativeCodeManager::UnwindStackFrame(MethodInfo * pMethodInfo,
pRegisterSet->pIP = PTR_PCODE(pRegisterSet->SP - sizeof(TADDR));
- memcpy(pRegisterSet->Xmm, &context.Xmm6, sizeof(pRegisterSet->Xmm));
+ if (!(flags & USFF_GcUnwind))
+ {
+ memcpy(pRegisterSet->Xmm, &context.Xmm6, sizeof(pRegisterSet->Xmm));
+ }
#elif defined(TARGET_ARM64)
- for (int i = 8; i < 16; i++)
- context.V[i].Low = pRegisterSet->D[i - 8];
+ if (!(flags & USFF_GcUnwind))
+ {
+ for (int i = 8; i < 16; i++)
+ context.V[i].Low = pRegisterSet->D[i - 8];
+ }
context.Sp = pRegisterSet->SP;
context.Pc = pRegisterSet->IP;
@@ -659,8 +669,11 @@ bool CoffNativeCodeManager::UnwindStackFrame(MethodInfo * pMethodInfo,
pRegisterSet->pIP = contextPointers.Lr;
- for (int i = 8; i < 16; i++)
- pRegisterSet->D[i - 8] = context.V[i].Low;
+ if (!(flags & USFF_GcUnwind))
+ {
+ for (int i = 8; i < 16; i++)
+ pRegisterSet->D[i - 8] = context.V[i].Low;
+ }
#endif // defined(TARGET_X86)
FOR_EACH_NONVOLATILE_REGISTER(CONTEXT_TO_REGDISPLAY);
diff --git a/src/coreclr/nativeaot/Runtime/windows/PalRedhawkInline.h b/src/coreclr/nativeaot/Runtime/windows/PalRedhawkInline.h
index c6ed7d641a20bf..1d9f7bd1711d62 100644
--- a/src/coreclr/nativeaot/Runtime/windows/PalRedhawkInline.h
+++ b/src/coreclr/nativeaot/Runtime/windows/PalRedhawkInline.h
@@ -1,6 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+#if defined(HOST_ARM64)
+#include
+#endif
+
// Implementation of Redhawk PAL inline functions
EXTERN_C long __cdecl _InterlockedIncrement(long volatile *);
@@ -121,7 +125,6 @@ EXTERN_C void __faststorefence();
#pragma intrinsic(__faststorefence)
#define PalMemoryBarrier() __faststorefence()
-
#elif defined(HOST_ARM)
EXTERN_C void __yield(void);
@@ -130,11 +133,11 @@ EXTERN_C void __dmb(unsigned int _Type);
#pragma intrinsic(__dmb)
FORCEINLINE void PalYieldProcessor()
{
- __dmb(0xA /* _ARM_BARRIER_ISHST */);
+ __dmb(_ARM_BARRIER_ISHST);
__yield();
}
-#define PalMemoryBarrier() __dmb(0xF /* _ARM_BARRIER_SY */)
+#define PalMemoryBarrier() __dmb(_ARM_BARRIER_ISH)
#elif defined(HOST_ARM64)
@@ -144,11 +147,11 @@ EXTERN_C void __dmb(unsigned int _Type);
#pragma intrinsic(__dmb)
FORCEINLINE void PalYieldProcessor()
{
- __dmb(0xA /* _ARM64_BARRIER_ISHST */);
+ __dmb(_ARM64_BARRIER_ISHST);
__yield();
}
-#define PalMemoryBarrier() __dmb(0xF /* _ARM64_BARRIER_SY */)
+#define PalMemoryBarrier() __dmb(_ARM64_BARRIER_ISH)
#else
#error Unsupported architecture
diff --git a/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp b/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp
index c7b1f3e313fa39..6691df67ada460 100644
--- a/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp
+++ b/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp
@@ -769,12 +769,6 @@ REDHAWK_PALEXPORT void PalFlushInstructionCache(_In_ void* pAddress, size_t size
FlushInstructionCache(GetCurrentProcess(), pAddress, size);
}
-REDHAWK_PALEXPORT _Ret_maybenull_ void* REDHAWK_PALAPI PalSetWerDataBuffer(_In_ void* pNewBuffer)
-{
- static void* pBuffer;
- return InterlockedExchangePointer(&pBuffer, pNewBuffer);
-}
-
#if defined(HOST_ARM64)
#include "IntrinsicConstants.h"
@@ -796,7 +790,7 @@ REDHAWK_PALIMPORT void REDHAWK_PALAPI PAL_GetCpuCapabilityFlags(int* flags)
#endif
// FP and SIMD support are enabled by default
- *flags |= ARM64IntrinsicConstants_AdvSimd;
+ *flags |= ARM64IntrinsicConstants_AdvSimd | ARM64IntrinsicConstants_VectorT128;
if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE))
{
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs
index 9d46a80d656aac..39fda81c8a8388 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs
@@ -195,9 +195,9 @@ public static IntPtr GetPointerFromTypeHandle(RuntimeTypeHandle typeHandle)
return typeHandle.ToEETypePtr().RawValue;
}
- public static TypeManagerHandle GetModuleFromTypeHandle(RuntimeTypeHandle typeHandle)
+ public static unsafe TypeManagerHandle GetModuleFromTypeHandle(RuntimeTypeHandle typeHandle)
{
- return RuntimeImports.RhGetModuleFromEEType(GetPointerFromTypeHandle(typeHandle));
+ return typeHandle.ToMethodTable()->TypeManager;
}
public static RuntimeTypeHandle CreateRuntimeTypeHandle(IntPtr ldTokenResult)
@@ -817,21 +817,6 @@ public static string TryGetMethodDisplayStringFromIp(IntPtr ip)
private static volatile ReflectionExecutionDomainCallbacks s_reflectionExecutionDomainCallbacks;
private static TypeLoaderCallbacks s_typeLoaderCallbacks;
- public static void ReportUnhandledException(Exception exception)
- {
- RuntimeExceptionHelpers.ReportUnhandledException(exception);
- }
-
- public static unsafe RuntimeTypeHandle GetRuntimeTypeHandleFromObjectReference(object obj)
- {
- return new RuntimeTypeHandle(obj.GetEETypePtr());
- }
-
- public static IntPtr GetUniversalTransitionThunk()
- {
- return RuntimeImports.RhGetUniversalTransitionThunk();
- }
-
public static object CreateThunksHeap(IntPtr commonStubAddress)
{
object newHeap = RuntimeImports.RhCreateThunksHeap(commonStubAddress);
@@ -868,22 +853,6 @@ public static int GetThunkSize()
return RuntimeImports.RhGetThunkSize();
}
- [DebuggerStepThrough]
- /* TEMP workaround due to bug 149078 */
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static void CallDescrWorker(IntPtr callDescr)
- {
- RuntimeImports.RhCallDescrWorker(callDescr);
- }
-
- [DebuggerStepThrough]
- /* TEMP workaround due to bug 149078 */
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static void CallDescrWorkerNative(IntPtr callDescr)
- {
- RuntimeImports.RhCallDescrWorkerNative(callDescr);
- }
-
public static Delegate CreateObjectArrayDelegate(Type delegateType, Func invoker)
{
return Delegate.CreateObjectArrayDelegate(delegateType, invoker);
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/AppContext.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/AppContext.NativeAot.cs
index 830ae290d5a2c9..535eb123ddf0f3 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/AppContext.NativeAot.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/AppContext.NativeAot.cs
@@ -1,13 +1,30 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Collections.Generic;
using System.Runtime;
using System.Runtime.ExceptionServices;
+using System.Text;
namespace System
{
public static partial class AppContext
{
+ private static unsafe Dictionary InitializeDataStore()
+ {
+ uint count = RuntimeImports.RhGetKnobValues(out byte** keys, out byte** values);
+
+ var dataStore = new Dictionary((int)count);
+ for (int i = 0; i < count; i++)
+ {
+ dataStore.Add(
+ Encoding.UTF8.GetString(keys[i], string.strlen(keys[i])),
+ Encoding.UTF8.GetString(values[i], string.strlen(values[i])));
+ }
+
+ return dataStore;
+ }
+
[RuntimeExport("OnFirstChanceException")]
internal static void OnFirstChanceException(object e)
{
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Attribute.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Attribute.NativeAot.cs
index f7604612b5ad5e..fe6505f24c9c90 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Attribute.NativeAot.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Attribute.NativeAot.cs
@@ -121,7 +121,7 @@ private static Attribute OneOrNull(IEnumerable results)
return null;
CustomAttributeData result = enumerator.Current;
if (enumerator.MoveNext())
- throw new AmbiguousMatchException();
+ throw ThrowHelper.GetAmbiguousMatchException(result);
return result.Instantiate();
}
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.cs
index 301fe25f6fa389..6288b58c405217 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.cs
@@ -112,11 +112,10 @@ public void CopyTo(MemberInfo[] array, int startIndex)
// Assuming the policy says it's ok to ignore the ambiguity, we're to resolve in favor of the member
// declared by the most derived type. Since QueriedMemberLists are sorted in order of decreasing derivation,
// that means we let the first match win - unless, of course, they're both the "most derived member".
- if (match.DeclaringType.Equals(challenger.DeclaringType))
- throw new AmbiguousMatchException();
-
- if (!_policies.OkToIgnoreAmbiguity(match, challenger))
- throw new AmbiguousMatchException();
+ // If they're not from same type, we throw if the policy doesn't allow ambiguity.
+ if (match.DeclaringType.Equals(challenger.DeclaringType) ||
+ !_policies.OkToIgnoreAmbiguity(match, challenger))
+ throw ThrowHelper.GetAmbiguousMatchException(match);
}
else
{
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ThunkedApis.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ThunkedApis.cs
index 3e0765205c6373..99858e0bbaa784 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ThunkedApis.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ThunkedApis.cs
@@ -199,7 +199,7 @@ public sealed override Type[] GetGenericArguments()
if (ns != null && !ns.Equals(ifc.Namespace))
continue;
if (match != null)
- throw new AmbiguousMatchException();
+ throw ThrowHelper.GetAmbiguousMatchException(match);
match = ifc;
}
return match;
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeThinMethodParameterInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeThinMethodParameterInfo.cs
index b1c543238de156..a93368402a4bc2 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeThinMethodParameterInfo.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeThinMethodParameterInfo.cs
@@ -62,8 +62,7 @@ public sealed override bool HasDefaultValue
{
get
{
- // Compat: returning "true" makes no sense but this is how it's always been.
- return true;
+ return false;
}
}
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.BindingFlags.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.BindingFlags.cs
index dcb0ed3e093320..35ae4a96ea7c28 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.BindingFlags.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.BindingFlags.cs
@@ -155,9 +155,10 @@ protected sealed override PropertyInfo GetPropertyImpl(string name, BindingFlags
if (types == null || types.Length == 0)
{
// no arguments
+ PropertyInfo firstCandidate = candidates[0];
+
if (candidates.Count == 1)
{
- PropertyInfo firstCandidate = candidates[0];
if (returnType is not null && !returnType.IsEquivalentTo(firstCandidate.PropertyType))
return null;
return firstCandidate;
@@ -165,8 +166,10 @@ protected sealed override PropertyInfo GetPropertyImpl(string name, BindingFlags
else
{
if (returnType is null)
+ {
// if we are here we have no args or property type to select over and we have more than one property with that name
- throw new AmbiguousMatchException();
+ throw ThrowHelper.GetAmbiguousMatchException(firstCandidate);
+ }
}
}
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Com.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Com.cs
index 17e1bdb85ddfcb..1ac3410c8afa04 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Com.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.Com.cs
@@ -50,6 +50,7 @@ public static IntPtr CreateAggregatedObject(IntPtr pOuter, T o) where T : not
[SupportedOSPlatform("windows")]
[EditorBrowsable(EditorBrowsableState.Never)]
+ [return: NotNullIfNotNull(nameof(o))]
public static object? CreateWrapperOfType(object? o, Type t)
{
throw new NotSupportedException(SR.PlatformNotSupported_ComInterop);
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs
index 61f8c38b6cb93b..68b50d5bb966ee 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs
@@ -351,9 +351,6 @@ internal static unsafe object IsInstanceOf(EETypePtr pTargetType, object obj)
[RuntimeImport(RuntimeLibrary, "RhBoxAny")]
internal static extern unsafe object RhBoxAny(ref byte pData, MethodTable* pEEType);
- internal static unsafe object RhBoxAny(ref byte pData, EETypePtr pEEType)
- => RhBoxAny(ref pData, pEEType.ToPointer());
-
[MethodImpl(MethodImplOptions.InternalCall)]
[RuntimeImport(RuntimeLibrary, "RhNewObject")]
internal static extern unsafe object RhNewObject(MethodTable* pEEType);
@@ -473,8 +470,6 @@ internal static unsafe int RhCompatibleReentrantWaitAny(bool alertable, int time
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[RuntimeImport(RuntimeLibrary, "RhResolveDispatchOnType")]
- // For my life cannot figure out the ordering of modifiers this is expecting.
-#pragma warning disable IDE0036
internal static extern unsafe IntPtr RhResolveDispatchOnType(EETypePtr instanceType, EETypePtr interfaceType, ushort slot, EETypePtr* pGenericContext);
internal static unsafe IntPtr RhResolveDispatchOnType(EETypePtr instanceType, EETypePtr interfaceType, ushort slot)
@@ -554,16 +549,12 @@ internal static IntPtr RhGetModuleSection(TypeManagerHandle module, ReadyToRunSe
internal static extern uint RhGetLoadedOSModules(IntPtr[] resultArray);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- [RuntimeImport(RuntimeLibrary, "RhGetOSModuleFromPointer")]
- internal static extern IntPtr RhGetOSModuleFromPointer(IntPtr pointerVal);
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- [RuntimeImport(RuntimeLibrary, "RhGetModuleFromEEType")]
- internal static extern TypeManagerHandle RhGetModuleFromEEType(IntPtr pEEType);
+ [RuntimeImport(RuntimeLibrary, "RhGetKnobValues")]
+ internal static extern unsafe uint RhGetKnobValues(out byte** keyArray, out byte** valueArray);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- [RuntimeImport(RuntimeLibrary, "RhGetOSModuleFromEEType")]
- internal static extern IntPtr RhGetOSModuleFromEEType(IntPtr pEEType);
+ [RuntimeImport(RuntimeLibrary, "RhGetOSModuleFromPointer")]
+ internal static extern IntPtr RhGetOSModuleFromPointer(IntPtr pointerVal);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[RuntimeImport(RuntimeLibrary, "RhGetThreadStaticStorage")]
@@ -616,11 +607,6 @@ internal static IntPtr RhGetModuleSection(TypeManagerHandle module, ReadyToRunSe
internal static extern unsafe int RhGetModuleFileName(IntPtr moduleHandle, out char* moduleName);
#endif
- // returns the previous value.
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- [RuntimeImport(RuntimeLibrary, "RhSetErrorInfoBuffer")]
- internal static extern unsafe void* RhSetErrorInfoBuffer(void* pNewBuffer);
-
//
// StackTrace helper
//
@@ -645,21 +631,6 @@ internal static IntPtr RhGetModuleSection(TypeManagerHandle module, ReadyToRunSe
[RuntimeImport(RuntimeLibrary, "RhSetThreadExitCallback")]
internal static extern unsafe void RhSetThreadExitCallback(delegate* unmanaged pCallback);
- // Functions involved in thunks from managed to managed functions (Universal transition transitions
- // from an arbitrary method call into a defined function, and CallDescrWorker goes the other way.
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- [RuntimeImport(RuntimeLibrary, "RhGetUniversalTransitionThunk")]
- internal static extern IntPtr RhGetUniversalTransitionThunk();
-
- // For Managed to Managed calls
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- [RuntimeImport(RuntimeLibrary, "RhCallDescrWorker")]
- internal static extern void RhCallDescrWorker(IntPtr callDescr);
-
- // For Managed to Native calls
- [LibraryImport(RuntimeLibrary, EntryPoint = "RhCallDescrWorker")]
- internal static partial void RhCallDescrWorkerNative(IntPtr callDescr);
-
// Moves memory from smem to dmem. Size must be a positive value.
// This copy uses an intrinsic to be safe for copying arbitrary bits of
// heap memory
@@ -791,10 +762,6 @@ internal static unsafe partial void RhEventPipeInternal_WriteEventData(
[RuntimeImport(RuntimeLibrary, "RhpCheckedXchg")]
internal static extern object InterlockedExchange([NotNullIfNotNull(nameof(value))] ref object? location1, object? value);
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- [RuntimeImport(RuntimeLibrary, "RhpMemoryBarrier")]
- internal static extern void MemoryBarrier();
-
[Intrinsic]
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[RuntimeImport(RuntimeLibrary, "acos")]
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs
index 3a9e422c9558e9..e9c15296ccd88f 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs
@@ -16,10 +16,7 @@ namespace System
[StructLayout(LayoutKind.Sequential)]
public unsafe struct RuntimeTypeHandle : IEquatable, ISerializable
{
- //
- // Caution: There can be and are multiple MethodTable for the "same" type (e.g. int[]). That means
- // you can't use the raw IntPtr value for comparisons.
- //
+ private IntPtr _value;
internal RuntimeTypeHandle(EETypePtr pEEType)
: this(pEEType.RawValue)
@@ -123,7 +120,5 @@ internal bool IsNull
return _value == new IntPtr(0);
}
}
-
- private IntPtr _value;
}
}
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Interlocked.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Interlocked.cs
index 56f16cbcfbbe4c..f8a5e61ecbb65c 100644
--- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Interlocked.cs
+++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Interlocked.cs
@@ -4,9 +4,6 @@
using System.Runtime;
using System.Runtime.CompilerServices;
using System.Diagnostics.CodeAnalysis;
-using System.Runtime.Versioning;
-
-using Internal.Runtime.CompilerServices;
namespace System.Threading
{
@@ -26,22 +23,6 @@ public static long CompareExchange(ref long location1, long value, long comparan
return RuntimeImports.InterlockedCompareExchange(ref location1, value, comparand);
}
- [Intrinsic]
- public static unsafe float CompareExchange(ref float location1, float value, float comparand)
- {
- float ret;
- *(int*)&ret = CompareExchange(ref Unsafe.As(ref location1), *(int*)&value, *(int*)&comparand);
- return ret;
- }
-
- [Intrinsic]
- public static unsafe double CompareExchange(ref double location1, double value, double comparand)
- {
- double ret;
- *(long*)&ret = CompareExchange(ref Unsafe.As(ref location1), *(long*)&value, *(long*)&comparand);
- return ret;
- }
-
[Intrinsic]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NotNullIfNotNull(nameof(location1))]
@@ -87,22 +68,6 @@ public static long Exchange(ref long location1, long value)
return oldValue;
}
- [Intrinsic]
- public static unsafe float Exchange(ref float location1, float value)
- {
- float ret;
- *(int*)&ret = Exchange(ref Unsafe.As(ref location1), *(int*)&value);
- return ret;
- }
-
- [Intrinsic]
- public static unsafe double Exchange(ref double location1, double value)
- {
- double ret;
- *(long*)&ret = Exchange(ref Unsafe.As(ref location1), *(long*)&value);
- return ret;
- }
-
[Intrinsic]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: NotNullIfNotNull(nameof(location1))]
@@ -196,14 +161,6 @@ private static long ExchangeAdd(ref long location1, long value)
#endregion
- #region MemoryBarrier
- [Intrinsic]
- public static void MemoryBarrier()
- {
- RuntimeImports.MemoryBarrier();
- }
- #endregion
-
#region Read
public static long Read(ref long location)
{
diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MappingTables.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MappingTables.cs
index 1da045804d9251..8f1a187c6fc0a0 100644
--- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MappingTables.cs
+++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MappingTables.cs
@@ -743,7 +743,7 @@ private static FunctionPointersToOffsets ComputeLdftnReverseLookup_InvokeMap(Nat
continue;
entryParser.SkipInteger(); // entryMethodHandleOrNameAndSigRaw
- entryParser.SkipInteger(); // entryDeclaringTypeRaw
+ RuntimeTypeHandle declaringTypeHandle = externalReferences.GetRuntimeTypeHandleFromIndex(entryParser.GetUnsigned());
IntPtr entryMethodEntrypoint = externalReferences.GetFunctionPointerFromIndex(entryParser.GetUnsigned());
functionPointers.Add(new FunctionPointerOffsetPair(entryMethodEntrypoint, parserOffset));
@@ -752,17 +752,21 @@ private static FunctionPointersToOffsets ComputeLdftnReverseLookup_InvokeMap(Nat
// stack trace resolution - the reverse LdFtn lookup internally used by the reflection
// method resolution will work off an IP address on the stack which is an address
// within the actual method, not the stub.
- IntPtr targetAddress = RuntimeAugments.GetCodeTarget(entryMethodEntrypoint);
- if (targetAddress != IntPtr.Zero && targetAddress != entryMethodEntrypoint)
+ if (RuntimeAugments.IsValueType(declaringTypeHandle))
{
- functionPointers.Add(new FunctionPointerOffsetPair(targetAddress, parserOffset));
- }
- IntPtr targetAddress2;
- if (TypeLoaderEnvironment.TryGetTargetOfUnboxingAndInstantiatingStub(entryMethodEntrypoint, out targetAddress2) &&
- targetAddress2 != entryMethodEntrypoint &&
- targetAddress2 != targetAddress)
- {
- functionPointers.Add(new FunctionPointerOffsetPair(targetAddress2, parserOffset));
+ IntPtr targetAddress = RuntimeAugments.GetCodeTarget(entryMethodEntrypoint);
+ if (targetAddress != IntPtr.Zero && targetAddress != entryMethodEntrypoint)
+ {
+ functionPointers.Add(new FunctionPointerOffsetPair(targetAddress, parserOffset));
+ }
+
+ IntPtr targetAddress2;
+ if (TypeLoaderEnvironment.TryGetTargetOfUnboxingAndInstantiatingStub(entryMethodEntrypoint, out targetAddress2) &&
+ targetAddress2 != entryMethodEntrypoint &&
+ targetAddress2 != targetAddress)
+ {
+ functionPointers.Add(new FunctionPointerOffsetPair(targetAddress2, parserOffset));
+ }
}
}
diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.cs
index dd3f3dac45b191..bd6c07a99e2651 100644
--- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.cs
+++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.cs
@@ -84,7 +84,7 @@ public sealed override bool Bind(RuntimeAssemblyName refName, bool cacheMissedLo
{
if (foundMatch)
{
- exception = new AmbiguousMatchException();
+ exception = new AmbiguousMatchException(SR.Format(SR.AmbiguousMatchException_Assembly, refName.FullName));
return false;
}
diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Resources/Strings.resx b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Resources/Strings.resx
index 949e8adc2fbadc..cddf33a5bca989 100644
--- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Resources/Strings.resx
+++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Resources/Strings.resx
@@ -1,17 +1,17 @@
-
@@ -129,4 +129,7 @@
Cannot load assembly '{0}'. The assembly exists but its version {1} is lower than the requested version {2}.
+
+ Ambiguous match found for assembly '{0}'.
+
diff --git a/src/coreclr/nativeaot/Test.CoreLib/src/System/Runtime/RuntimeImports.cs b/src/coreclr/nativeaot/Test.CoreLib/src/System/Runtime/RuntimeImports.cs
index bd1681f250dfa6..5232ab073a6ca8 100644
--- a/src/coreclr/nativeaot/Test.CoreLib/src/System/Runtime/RuntimeImports.cs
+++ b/src/coreclr/nativeaot/Test.CoreLib/src/System/Runtime/RuntimeImports.cs
@@ -103,10 +103,6 @@ internal static unsafe Array RhNewArray(EETypePtr pEEType, int length)
[RuntimeImport(RuntimeLibrary, "RhpLockCmpXchg64")]
internal static extern long InterlockedCompareExchange(ref long location1, long value, long comparand);
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- [RuntimeImport(RuntimeLibrary, "RhpMemoryBarrier")]
- internal static extern void MemoryBarrier();
-
// Moves memory from smem to dmem. Size must be a positive value.
// This copy uses an intrinsic to be safe for copying arbitrary bits of
// heap memory
diff --git a/src/coreclr/nativeaot/Test.CoreLib/src/System/RuntimeTypeHandle.cs b/src/coreclr/nativeaot/Test.CoreLib/src/System/RuntimeTypeHandle.cs
index d921e27015b73c..f0401dc09e07a9 100644
--- a/src/coreclr/nativeaot/Test.CoreLib/src/System/RuntimeTypeHandle.cs
+++ b/src/coreclr/nativeaot/Test.CoreLib/src/System/RuntimeTypeHandle.cs
@@ -10,17 +10,17 @@ namespace System
[StructLayout(LayoutKind.Sequential)]
public struct RuntimeTypeHandle
{
- private EETypePtr _pEEType;
+ private IntPtr _value;
- internal RuntimeTypeHandle(EETypePtr pEEType)
+ internal RuntimeTypeHandle(IntPtr value)
{
- _pEEType = pEEType;
+ _value = value;
}
[Intrinsic]
internal static unsafe IntPtr ToIntPtr(RuntimeTypeHandle handle)
{
- return (IntPtr)handle._pEEType.ToPointer();
+ return handle._value;
}
}
}
@@ -32,7 +32,7 @@ internal static class LdTokenHelpers
{
private static RuntimeTypeHandle GetRuntimeTypeHandle(IntPtr pEEType)
{
- return new RuntimeTypeHandle(new EETypePtr(pEEType));
+ return new RuntimeTypeHandle(pEEType);
}
}
}
diff --git a/src/coreclr/nativeaot/Test.CoreLib/src/System/Threading/Interlocked.cs b/src/coreclr/nativeaot/Test.CoreLib/src/System/Threading/Interlocked.cs
index 34d02ffca1d6dc..58decc90318c1e 100644
--- a/src/coreclr/nativeaot/Test.CoreLib/src/System/Threading/Interlocked.cs
+++ b/src/coreclr/nativeaot/Test.CoreLib/src/System/Threading/Interlocked.cs
@@ -31,9 +31,6 @@ public static long CompareExchange(ref long location1, long value, long comparan
}
[Intrinsic]
- public static void MemoryBarrier()
- {
- RuntimeImports.MemoryBarrier();
- }
+ public static void MemoryBarrier() => MemoryBarrier();
}
}
diff --git a/src/coreclr/nativeaot/docs/optimizing.md b/src/coreclr/nativeaot/docs/optimizing.md
index 9f2c9ae70d12a8..9a90eb97c21286 100644
--- a/src/coreclr/nativeaot/docs/optimizing.md
+++ b/src/coreclr/nativeaot/docs/optimizing.md
@@ -40,4 +40,5 @@ Since `PublishTrimmed` is implied to be true with Native AOT, some framework fea
* `Speed`: when generating optimized code, favor code execution speed.
* `Size`: when generating optimized code, favor smaller code size.
* ``: By default, the compiler targets the minimum instruction set supported by the target OS and architecture. This option allows targeting newer instruction sets for better performance. The native binary will require the instruction sets to be supported by the hardware in order to run. For example, `avx2,bmi2,fma,pclmul,popcnt,aes` will produce binary that takes advantage of instruction sets that are typically present on current Intel and AMD processors. Run `ilc --help` for the full list of available instruction sets. `ilc` can be executed from the NativeAOT package in your local nuget cache e.g. `%USERPROFILE%\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\8.0.0-...\tools\ilc.exe` on Windows or `~/.nuget/packages/runtime.linux-arm64.microsoft.dotnet.ilcompiler/8.0.0-.../tools/ilc` on Linux.
+* ``: By default, the compiler targets the a `Vector` size of `16` or `32` bytes, depending on the underlying instruction sets supported. This option allows specifying a different maximum bit width. For example, if by default on x64 hardware `Vector` will be 16-bytes. However, if `AVX2` is targeted then `Vector` will automatically grow to be 32-bytes instead, setting `128` would keep the size as 16-bytes. Alternatively, even if `AVX512F` is targeted then by default `Vector` will not grow larger than 32-bytes, setting `512` would allow it to grow to 64-bytes.
diff --git a/src/coreclr/pal/src/misc/jitsupport.cpp b/src/coreclr/pal/src/misc/jitsupport.cpp
index f7ca5c36e71217..30426290043514 100644
--- a/src/coreclr/pal/src/misc/jitsupport.cpp
+++ b/src/coreclr/pal/src/misc/jitsupport.cpp
@@ -235,7 +235,10 @@ PAL_GetJitCpuCapabilityFlags(CORJIT_FLAGS *flags)
#endif
#ifdef HWCAP_ASIMD
if (hwCap & HWCAP_ASIMD)
+ {
flags->Set(InstructionSet_AdvSimd);
+ flags->Set(InstructionSet_VectorT128);
+ }
#endif
#ifdef HWCAP_ASIMDRDM
if (hwCap & HWCAP_ASIMDRDM)
@@ -292,6 +295,7 @@ PAL_GetJitCpuCapabilityFlags(CORJIT_FLAGS *flags)
// Set baseline flags if OS has not exposed mechanism for us to determine CPU capabilities
flags->Set(InstructionSet_ArmBase);
flags->Set(InstructionSet_AdvSimd);
+ flags->Set(InstructionSet_VectorT128);
// flags->Set(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_FP);
#endif // HAVE_AUXV_HWCAP_H
}
diff --git a/src/coreclr/scripts/superpmi-collect.proj b/src/coreclr/scripts/superpmi-collect.proj
index a7a465b4639bb2..490836a21cc014 100644
--- a/src/coreclr/scripts/superpmi-collect.proj
+++ b/src/coreclr/scripts/superpmi-collect.proj
@@ -72,19 +72,19 @@
-
+
%HELIX_WORKITEM_PAYLOAD%\binaries
-
+
$HELIX_WORKITEM_PAYLOAD/binaries
-
+
%HELIX_WORKITEM_PAYLOAD%\performance
-
+
$HELIX_WORKITEM_PAYLOAD/performance
@@ -130,12 +130,12 @@
-
+
$(Python) $(SuperPMIDirectory)$(FileSeparatorChar)superpmi.py collect --clean -log_level DEBUG --$(CollectionType) $(PmiArguments) -assemblies $(AssembliesDirectoryOnHelix) -arch $(Architecture) -build_type $(BuildConfig) -core_root $(SuperPMIDirectory)
2:00
-
+
$(Python) $(SuperPMIDirectory)$(FileSeparatorChar)superpmi_benchmarks.py -performance_directory $(PerformanceDirectory) -superpmi_directory $(SuperPMIDirectory) -core_root $(SuperPMIDirectory) -arch $(Architecture) $(RunArguments)
3:00
@@ -174,7 +174,7 @@
-
+
@@ -182,8 +182,15 @@
-
+
30
+ src\benchmarks\micro\MicroBenchmarks.csproj
+ MicroBenchmarks.dll
+
+
+ 30
+ src/benchmarks/micro/MicroBenchmarks.csproj
+ MicroBenchmarks.dll
@@ -217,8 +224,24 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
$(CollectionName).$(CollectionType).%(HelixWorkItem.PartitionId).$(MchFileTag)
$(AssembliesPayload)$(FileSeparatorChar)%(HelixWorkItem.CollectAssemblies)
@@ -232,9 +255,19 @@
$(CollectionName).$(CollectionType).%(HelixWorkItem.Index).$(MchFileTag)
$(WorkItemDirectory)
- $(WorkItemCommand) -partition_count $(PartitionCount) -partition_index %(HelixWorkItem.Index) -output_mch_path $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).mch -log_file $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).log
+ $(WorkItemCommand) -partition_count $(PartitionCount) -partition_index %(HelixWorkItem.Index) -benchmark_path $(BenchmarkPath) -benchmark_binary $(BenchmarkBinary) -output_mch_path $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).mch -log_file $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).log
$(WorkItemTimeout)
%(OutputFileName).mch;%(OutputFileName).mch.mct;%(OutputFileName).log
+
+
+
+ $(CollectionName).$(CollectionType).%(HelixWorkItem.Index).$(MchFileTag)
+ $(WorkItemDirectory)
+ $(WorkItemCommand) -partition_count 1 -partition_index 0 -benchmark_path %(HelixWorkItem.BenchmarkPath) -benchmark_binary %(HelixWorkItem.BenchmarkBinary) -output_mch_path $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).mch -log_file $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).log
+ $(WorkItemTimeout)
+ %(OutputFileName).mch;%(OutputFileName).mch.mct;%(OutputFileName).log
+
+
diff --git a/src/coreclr/scripts/superpmi_benchmarks.py b/src/coreclr/scripts/superpmi_benchmarks.py
index 7a09f47c8fd198..8b78a0099c4ddc 100644
--- a/src/coreclr/scripts/superpmi_benchmarks.py
+++ b/src/coreclr/scripts/superpmi_benchmarks.py
@@ -8,8 +8,9 @@
#
# Notes:
#
-# Script to perform the superpmi collection while executing the Microbenchmarks present
-# in https://github.com/dotnet/performance/tree/master/src/benchmarks/micro.
+# Script to perform the superpmi collection while executing the Microbenchmarks in
+# https://github.com/dotnet/performance/tree/master/src/benchmarks/micro and real-world in
+# in https://github.com/dotnet/performance/tree/master/src/benchmarks/real-world
import argparse
import re
@@ -34,6 +35,8 @@
parser.add_argument("-partition_count", help="Total number of partitions")
parser.add_argument("-partition_index", help="Partition index to do the collection for")
parser.add_argument("-arch", help="Architecture")
+parser.add_argument("-benchmark_path", help="Benchmark's csproj path in dotnet/performance repo")
+parser.add_argument("-benchmark_binary", help="Benchmark binary to execute")
parser.add_argument("--tiered_compilation", action="store_true", help="Sets DOTNET_TieredCompilation=1 when doing collections.")
parser.add_argument("--tiered_pgo", action="store_true", help="Sets DOTNET_TieredCompilation=1 and DOTNET_TieredPGO=1 when doing collections.")
@@ -90,6 +93,16 @@ def setup_args(args):
lambda arch: arch.lower() in ["x86", "x64", "arm", "arm64"],
"Unable to set arch")
+ coreclr_args.verify(args,
+ "benchmark_path",
+ lambda unused: True,
+ "Unable to set benchmark_path")
+
+ coreclr_args.verify(args,
+ "benchmark_binary",
+ lambda unused: True,
+ "Unable to set benchmark_binary")
+
coreclr_args.verify(args,
"tiered_compilation",
lambda unused: True,
@@ -123,9 +136,8 @@ def make_executable(file_name):
(stat.S_IROTH | stat.S_IXOTH))
run_command(["ls", "-l", file_name])
-
def build_and_run(coreclr_args, output_mch_name):
- """Build the microbenchmarks and run them under "superpmi collect"
+ """Build the microbenchmarks/real-world and run them under "superpmi collect"
Args:
coreclr_args (CoreClrArguments): Arguments use to drive
@@ -139,13 +151,15 @@ def build_and_run(coreclr_args, output_mch_name):
log_file = coreclr_args.log_file
partition_count = coreclr_args.partition_count
partition_index = coreclr_args.partition_index
+ benchmark_path = coreclr_args.benchmark_path
+ benchmark_binary = coreclr_args.benchmark_binary
dotnet_directory = os.path.join(performance_directory, "tools", "dotnet", arch)
dotnet_exe = os.path.join(dotnet_directory, "dotnet")
artifacts_directory = os.path.join(performance_directory, "artifacts")
artifacts_packages_directory = os.path.join(artifacts_directory, "packages")
- project_file = os.path.join(performance_directory, "src", "benchmarks", "micro", "MicroBenchmarks.csproj")
- benchmarks_dll = os.path.join(artifacts_directory, "MicroBenchmarks.dll")
+ project_file = os.path.join(performance_directory, benchmark_path)
+ benchmarks_dll = os.path.join(artifacts_directory, benchmark_binary)
# Workaround https://github.com/dotnet/sdk/issues/23430
project_file = os.path.realpath(project_file)
@@ -153,11 +167,11 @@ def build_and_run(coreclr_args, output_mch_name):
if is_windows:
shim_name = "%JitName%"
corerun_exe = "CoreRun.exe"
- script_name = "run_microbenchmarks.bat"
+ script_name = "run_benchmarks.bat"
else:
shim_name = "$JitName"
corerun_exe = "corerun"
- script_name = "run_microbenchmarks.sh"
+ script_name = "run_benchmarks.sh"
make_executable(dotnet_exe)
@@ -192,11 +206,25 @@ def build_and_run(coreclr_args, output_mch_name):
"--framework", "net8.0", "--no-restore", "/p:NuGetPackageRoot=" + artifacts_packages_directory,
"-o", artifacts_directory], _exit_on_fail=True)
- # Disable ReadyToRun so we always JIT R2R methods and collect them
- collection_command = f"{dotnet_exe} {benchmarks_dll} --filter \"*\" --corerun {os.path.join(core_root, corerun_exe)} --partition-count {partition_count} " \
- f"--partition-index {partition_index} --envVars DOTNET_JitName:{shim_name} " \
- " DOTNET_ZapDisable:1 DOTNET_ReadyToRun:0 " \
- "--iterationCount 1 --warmupCount 0 --invocationCount 1 --unrollFactor 1 --strategy ColdStart --logBuildOutput"
+ if benchmark_binary.lower().startswith("microbenchmarks"):
+ # Disable ReadyToRun so we always JIT R2R methods and collect them
+ collection_command = f"{dotnet_exe} {benchmarks_dll} --filter \"*\" --corerun {os.path.join(core_root, corerun_exe)} --partition-count {partition_count} " \
+ f"--partition-index {partition_index} --envVars DOTNET_JitName:{shim_name} " \
+ " DOTNET_ZapDisable:1 DOTNET_ReadyToRun:0 " \
+ "--iterationCount 1 --warmupCount 0 --invocationCount 1 --unrollFactor 1 --strategy ColdStart --logBuildOutput"
+ elif benchmark_binary.lower().startswith("demobenchmarks"):
+ # Disable ReadyToRun so we always JIT R2R methods and collect them
+ collection_command = f"{dotnet_exe} {benchmarks_dll} -f *CollisionBatcherTaskBenchmarks.* *GroupedCollisionTesterBenchmarks.* *GatherScatterBenchmarks.* " \
+ " *OneBodyConstraintBenchmarks.* *TwoBodyConstraintBenchmarks.* *ThreeBodyConstraintBenchmarks.* *FourBodyConstraintBenchmarks.* " \
+ " *SweepBenchmarks.* *ShapeRayBenchmarks.* *ShapePileBenchmark.* *RagdollTubeBenchmark.* " \
+ f" --corerun {os.path.join(core_root, corerun_exe)} --envVars DOTNET_JitName:{shim_name} " \
+ " DOTNET_ZapDisable:1 DOTNET_ReadyToRun:0 " \
+ "--iterationCount 1 --warmupCount 0 --invocationCount 1 --unrollFactor 1 --strategy ColdStart --logBuildOutput"
+ else:
+ # Disable ReadyToRun so we always JIT R2R methods and collect them
+ collection_command = f"{dotnet_exe} {benchmarks_dll} --filter \"*\" --corerun {os.path.join(core_root, corerun_exe)} --envVars DOTNET_JitName:{shim_name} " \
+ " DOTNET_ZapDisable:1 DOTNET_ReadyToRun:0 " \
+ "--iterationCount 1 --warmupCount 0 --invocationCount 1 --unrollFactor 1 --strategy ColdStart --logBuildOutput"
# Generate the execution script in Temp location
with TempDir() as temp_location:
diff --git a/src/coreclr/scripts/superpmi_collect_setup.py b/src/coreclr/scripts/superpmi_collect_setup.py
index 84240c90418f73..f93cd287e15161 100644
--- a/src/coreclr/scripts/superpmi_collect_setup.py
+++ b/src/coreclr/scripts/superpmi_collect_setup.py
@@ -376,8 +376,8 @@ def partition_files(src_directory, dst_directory, max_size, exclude_directories=
index += 1
-def setup_microbenchmark(workitem_directory, arch):
- """ Perform setup of microbenchmarks
+def setup_benchmark(workitem_directory, arch):
+ """ Perform setup of microbenchmarks/realworld
Args:
workitem_directory (string): Path to work
@@ -485,9 +485,9 @@ def main(main_args):
print('Copying {} -> {}'.format(coreclr_args.core_root_directory, core_root_dst_directory))
copy_directory(coreclr_args.core_root_directory, core_root_dst_directory, verbose_output=True, match_func=acceptable_copy)
- if coreclr_args.collection_name == "benchmarks":
- # Setup microbenchmarks
- setup_microbenchmark(workitem_payload_directory, arch)
+ if coreclr_args.collection_name == "benchmarks" or coreclr_args.collection_name == "realworld":
+ # Setup benchmarks
+ setup_benchmark(workitem_payload_directory, arch)
else:
# Setup for pmi/crossgen2 runs
diff --git a/src/coreclr/scripts/superpmi_diffs_setup.py b/src/coreclr/scripts/superpmi_diffs_setup.py
index db12452de8d86e..c54de696ccd972 100644
--- a/src/coreclr/scripts/superpmi_diffs_setup.py
+++ b/src/coreclr/scripts/superpmi_diffs_setup.py
@@ -171,7 +171,6 @@ def build_jit_analyze(coreclr_args, source_directory, jit_analyze_build_director
# The RID catalog is here: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog.
# Windows x64 => win-x64
# Windows x86 => win-x86
- # Windows arm32 => win-arm
# Windows arm64 => win-arm64
# Linux x64 => linux-x64
# Linux arm32 => linux-arm
diff --git a/src/coreclr/tools/Common/Compiler/DependencyAnalysis/EmbeddedDataContainerNode.cs b/src/coreclr/tools/Common/Compiler/DependencyAnalysis/EmbeddedDataContainerNode.cs
index 3aa40631fb3fae..a43b776bddc929 100644
--- a/src/coreclr/tools/Common/Compiler/DependencyAnalysis/EmbeddedDataContainerNode.cs
+++ b/src/coreclr/tools/Common/Compiler/DependencyAnalysis/EmbeddedDataContainerNode.cs
@@ -1,33 +1,33 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using Internal.Text;
+
namespace ILCompiler.DependencyAnalysis
{
///
/// Represents a node that contains a set of embedded objects. The main function is
/// to serve as a base class, providing symbol name boundaries and node ordering.
///
- public abstract class EmbeddedDataContainerNode : ObjectNode
+ public abstract class EmbeddedDataContainerNode : ObjectNode, ISymbolDefinitionNode
{
- private ObjectAndOffsetSymbolNode _startSymbol;
- private ObjectAndOffsetSymbolNode _endSymbol;
- private string _startSymbolMangledName;
-
- public ObjectAndOffsetSymbolNode StartSymbol => _startSymbol;
- public ObjectAndOffsetSymbolNode EndSymbol => _endSymbol;
+ private string _mangledName;
- protected EmbeddedDataContainerNode(string startSymbolMangledName, string endSymbolMangledName)
+ protected EmbeddedDataContainerNode(string mangledName)
{
- _startSymbolMangledName = startSymbolMangledName;
- _startSymbol = new ObjectAndOffsetSymbolNode(this, 0, startSymbolMangledName, true);
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, endSymbolMangledName, true);
+ _mangledName = mangledName;
}
+ public int Offset => 0;
+
public override int ClassCode => -1410622237;
+ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
+ => sb.Append(nameMangler.CompilationUnitPrefix).Append(_mangledName);
+
public override int CompareToImpl(ISortableNode other, CompilerComparer comparer)
{
- return _startSymbolMangledName.CompareTo(((EmbeddedDataContainerNode)other)._startSymbolMangledName);
+ return _mangledName.CompareTo(((EmbeddedDataContainerNode)other)._mangledName);
}
}
}
diff --git a/src/coreclr/tools/Common/Compiler/DependencyAnalysis/ObjectAndOffsetSymbolNode.cs b/src/coreclr/tools/Common/Compiler/DependencyAnalysis/ObjectAndOffsetSymbolNode.cs
deleted file mode 100644
index 0f15706ea685c8..00000000000000
--- a/src/coreclr/tools/Common/Compiler/DependencyAnalysis/ObjectAndOffsetSymbolNode.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-using System;
-using System.Collections.Generic;
-
-using ILCompiler.DependencyAnalysisFramework;
-
-using Internal.Text;
-
-namespace ILCompiler.DependencyAnalysis
-{
- public class ObjectAndOffsetSymbolNode : DependencyNodeCore, ISymbolDefinitionNode
- {
- private ObjectNode _object;
- private int _offset;
- private Utf8String _name;
- private bool _includeCompilationUnitPrefix;
-
- public ObjectAndOffsetSymbolNode(ObjectNode obj, int offset, Utf8String name, bool includeCompilationUnitPrefix)
- {
- _object = obj;
- _offset = offset;
- _name = name;
- _includeCompilationUnitPrefix = includeCompilationUnitPrefix;
- }
-
- protected override string GetName(NodeFactory factory) => $"Symbol {_name} at offset {_offset.ToStringInvariant()}";
-
- public override bool HasConditionalStaticDependencies => false;
- public override bool HasDynamicDependencies => false;
- public override bool InterestingForDynamicDependencyAnalysis => false;
- public override bool StaticDependenciesAreComputed => true;
-
- public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
- {
- if (_includeCompilationUnitPrefix)
- sb.Append(nameMangler.CompilationUnitPrefix);
- sb.Append(_name);
- }
-
- int ISymbolNode.Offset => 0;
- int ISymbolDefinitionNode.Offset => _offset;
- public bool RepresentsIndirectionCell => false;
-
- public void SetSymbolOffset(int offset)
- {
- _offset = offset;
- }
-
- public ObjectNode Target => _object;
-
- public override IEnumerable GetStaticDependencies(NodeFactory factory)
- {
- return new DependencyListEntry[] { new DependencyListEntry(_object, "ObjectAndOffsetDependency") };
- }
-
- public override IEnumerable GetConditionalStaticDependencies(NodeFactory factory) => null;
- public override IEnumerable SearchDynamicDependencies(List> markedNodes, int firstNode, NodeFactory factory) => null;
- }
-}
diff --git a/src/coreclr/tools/Common/Compiler/InstructionSetSupport.cs b/src/coreclr/tools/Common/Compiler/InstructionSetSupport.cs
index 6d124bda4673c6..46528387fec8ca 100644
--- a/src/coreclr/tools/Common/Compiler/InstructionSetSupport.cs
+++ b/src/coreclr/tools/Common/Compiler/InstructionSetSupport.cs
@@ -96,18 +96,37 @@ public SimdVectorLength GetVectorTSimdVector()
{
if ((_targetArchitecture == TargetArchitecture.X64) || (_targetArchitecture == TargetArchitecture.X86))
{
- Debug.Assert(InstructionSet.X64_AVX2 == InstructionSet.X86_AVX2);
- Debug.Assert(InstructionSet.X64_SSE2 == InstructionSet.X86_SSE2);
- if (IsInstructionSetSupported(InstructionSet.X86_AVX2))
+ Debug.Assert(InstructionSet.X64_VectorT128 == InstructionSet.X86_VectorT128);
+ Debug.Assert(InstructionSet.X64_VectorT256 == InstructionSet.X86_VectorT256);
+ Debug.Assert(InstructionSet.X64_VectorT512 == InstructionSet.X86_VectorT512);
+
+ // TODO-XArch: Add support for 512-bit Vector
+ Debug.Assert(!IsInstructionSetSupported(InstructionSet.X64_VectorT512));
+
+ if (IsInstructionSetSupported(InstructionSet.X64_VectorT256))
+ {
+ Debug.Assert(!IsInstructionSetSupported(InstructionSet.X64_VectorT128));
return SimdVectorLength.Vector256Bit;
- else if (IsInstructionSetExplicitlyUnsupported(InstructionSet.X86_AVX2) && IsInstructionSetSupported(InstructionSet.X64_SSE2))
+ }
+ else if (IsInstructionSetSupported(InstructionSet.X64_VectorT128))
+ {
return SimdVectorLength.Vector128Bit;
+ }
else
+ {
return SimdVectorLength.None;
+ }
}
else if (_targetArchitecture == TargetArchitecture.ARM64)
{
- return SimdVectorLength.Vector128Bit;
+ if (IsInstructionSetSupported(InstructionSet.ARM64_VectorT128))
+ {
+ return SimdVectorLength.Vector128Bit;
+ }
+ else
+ {
+ return SimdVectorLength.None;
+ }
}
else if (_targetArchitecture == TargetArchitecture.ARM)
{
@@ -183,15 +202,24 @@ public static InstructionSetFlags GetNonSpecifiableInstructionSetsForArch(Target
return s_nonSpecifiableInstructionSets[architecture];
}
- private readonly SortedSet _supportedInstructionSets = new SortedSet();
- private readonly SortedSet _unsupportedInstructionSets = new SortedSet();
+ private readonly SortedSet _supportedInstructionSets;
+ private readonly SortedSet _unsupportedInstructionSets;
private readonly TargetArchitecture _architecture;
public InstructionSetSupportBuilder(TargetArchitecture architecture)
{
+ _supportedInstructionSets = new SortedSet();
+ _unsupportedInstructionSets = new SortedSet();
_architecture = architecture;
}
+ public InstructionSetSupportBuilder(InstructionSetSupportBuilder other)
+ {
+ _supportedInstructionSets = new SortedSet(other._supportedInstructionSets);
+ _unsupportedInstructionSets = new SortedSet(other._unsupportedInstructionSets);
+ _architecture = other._architecture;
+ }
+
///
/// Add a supported instruction set to the specified list.
///
@@ -245,9 +273,10 @@ public bool RemoveInstructionSetSupport(string instructionSet)
/// Seal modifications to instruction set support
///
/// returns "false" if instruction set isn't valid on this architecture
- public bool ComputeInstructionSetFlags(out InstructionSetFlags supportedInstructionSets,
- out InstructionSetFlags unsupportedInstructionSets,
- Action invalidInstructionSetImplication)
+ public bool ComputeInstructionSetFlags(int maxVectorTBitWidth,
+ out InstructionSetFlags supportedInstructionSets,
+ out InstructionSetFlags unsupportedInstructionSets,
+ Action invalidInstructionSetImplication)
{
supportedInstructionSets = new InstructionSetFlags();
unsupportedInstructionSets = new InstructionSetFlags();
@@ -288,6 +317,51 @@ public bool ComputeInstructionSetFlags(out InstructionSetFlags supportedInstruct
}
}
+ switch (_architecture)
+ {
+ case TargetArchitecture.X64:
+ case TargetArchitecture.X86:
+ {
+ Debug.Assert(InstructionSet.X86_SSE2 == InstructionSet.X64_SSE2);
+ Debug.Assert(InstructionSet.X86_AVX2 == InstructionSet.X64_AVX2);
+ Debug.Assert(InstructionSet.X86_AVX512F == InstructionSet.X64_AVX512F);
+
+ Debug.Assert(InstructionSet.X86_VectorT128 == InstructionSet.X64_VectorT128);
+ Debug.Assert(InstructionSet.X86_VectorT256 == InstructionSet.X64_VectorT256);
+ Debug.Assert(InstructionSet.X86_VectorT512 == InstructionSet.X64_VectorT512);
+
+ // We only want one size supported for Vector and we want the other sizes explicitly
+ // unsupported to ensure we throw away the given methods if runtime picks a larger size
+
+ Debug.Assert(supportedInstructionSets.HasInstructionSet(InstructionSet.X86_SSE2));
+ Debug.Assert((maxVectorTBitWidth == 0) || (maxVectorTBitWidth >= 128));
+ supportedInstructionSets.AddInstructionSet(InstructionSet.X86_VectorT128);
+
+ if (supportedInstructionSets.HasInstructionSet(InstructionSet.X86_AVX2))
+ {
+ if ((maxVectorTBitWidth == 0) || (maxVectorTBitWidth >= 256))
+ {
+ supportedInstructionSets.RemoveInstructionSet(InstructionSet.X86_VectorT128);
+ supportedInstructionSets.AddInstructionSet(InstructionSet.X86_VectorT256);
+
+ unsupportedInstructionSets.AddInstructionSet(InstructionSet.X86_VectorT128);
+ unsupportedInstructionSets.AddInstructionSet(InstructionSet.X86_VectorT512);
+ }
+
+ // TODO-XArch: Add support for 512-bit Vector
+ }
+ break;
+ }
+
+ case TargetArchitecture.ARM64:
+ {
+ Debug.Assert(supportedInstructionSets.HasInstructionSet(InstructionSet.ARM64_AdvSimd));
+ Debug.Assert((maxVectorTBitWidth == 0) || (maxVectorTBitWidth >= 128));
+ supportedInstructionSets.AddInstructionSet(InstructionSet.ARM64_VectorT128);
+ break;
+ }
+ }
+
return true;
}
}
diff --git a/src/coreclr/tools/Common/InstructionSetHelpers.cs b/src/coreclr/tools/Common/InstructionSetHelpers.cs
index 8aa5705916dede..c969927e1531f7 100644
--- a/src/coreclr/tools/Common/InstructionSetHelpers.cs
+++ b/src/coreclr/tools/Common/InstructionSetHelpers.cs
@@ -11,7 +11,7 @@ namespace System.CommandLine
{
internal static partial class Helpers
{
- public static InstructionSetSupport ConfigureInstructionSetSupport(string instructionSet, TargetArchitecture targetArchitecture, TargetOS targetOS,
+ public static InstructionSetSupport ConfigureInstructionSetSupport(string instructionSet, int maxVectorTBitWidth, TargetArchitecture targetArchitecture, TargetOS targetOS,
string mustNotBeMessage, string invalidImplicationMessage)
{
InstructionSetSupportBuilder instructionSetSupportBuilder = new(targetArchitecture);
@@ -74,11 +74,16 @@ public static InstructionSetSupport ConfigureInstructionSetSupport(string instru
}
}
- instructionSetSupportBuilder.ComputeInstructionSetFlags(out var supportedInstructionSet, out var unsupportedInstructionSet,
+ instructionSetSupportBuilder.ComputeInstructionSetFlags(maxVectorTBitWidth, out var supportedInstructionSet, out var unsupportedInstructionSet,
(string specifiedInstructionSet, string impliedInstructionSet) =>
throw new CommandLineException(string.Format(invalidImplicationMessage, specifiedInstructionSet, impliedInstructionSet)));
- InstructionSetSupportBuilder optimisticInstructionSetSupportBuilder = new InstructionSetSupportBuilder(targetArchitecture);
+ // Due to expansion by implication, the optimistic set is most often a pure superset of the supported set
+ //
+ // However, there are some gaps in cases like Arm64 neon where none of the optimistic sets imply it. Likewise,
+ // the optimistic set would be missing the explicitly unsupported sets. So we effectively clone the list and
+ // tack on the additional optimistic bits after. This ensures the optimistic set remains an accurate superset
+ InstructionSetSupportBuilder optimisticInstructionSetSupportBuilder = new InstructionSetSupportBuilder(instructionSetSupportBuilder);
// Optimistically assume some instruction sets are present.
if (targetArchitecture == TargetArchitecture.X86 || targetArchitecture == TargetArchitecture.X64)
@@ -93,15 +98,38 @@ public static InstructionSetSupport ConfigureInstructionSetSupport(string instru
optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("movbe");
optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("popcnt");
optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("lzcnt");
+ optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("serialize");
// If AVX was enabled, we can opportunistically enable instruction sets which use the VEX encodings
Debug.Assert(InstructionSet.X64_AVX == InstructionSet.X86_AVX);
if (supportedInstructionSet.HasInstructionSet(InstructionSet.X64_AVX))
{
+ // TODO: Enable optimistic usage of AVX2 once we validate it doesn't break Vector usage
+ // optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("avx2");
+
+ if (supportedInstructionSet.HasInstructionSet(InstructionSet.X64_AVX2))
+ {
+ optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("avxvnni");
+ }
+
optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("fma");
optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("bmi");
optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("bmi2");
- optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("avxvnni");
+ }
+
+ Debug.Assert(InstructionSet.X64_AVX512F == InstructionSet.X86_AVX512F);
+ if (supportedInstructionSet.HasInstructionSet(InstructionSet.X64_AVX512F))
+ {
+ Debug.Assert(supportedInstructionSet.HasInstructionSet(InstructionSet.X64_AVX512F_VL));
+ Debug.Assert(supportedInstructionSet.HasInstructionSet(InstructionSet.X64_AVX512BW));
+ Debug.Assert(supportedInstructionSet.HasInstructionSet(InstructionSet.X64_AVX512BW_VL));
+ Debug.Assert(supportedInstructionSet.HasInstructionSet(InstructionSet.X64_AVX512CD));
+ Debug.Assert(supportedInstructionSet.HasInstructionSet(InstructionSet.X64_AVX512CD_VL));
+ Debug.Assert(supportedInstructionSet.HasInstructionSet(InstructionSet.X64_AVX512DQ));
+ Debug.Assert(supportedInstructionSet.HasInstructionSet(InstructionSet.X64_AVX512DQ_VL));
+
+ optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("avx512vbmi");
+ optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("avx512vbmi_vl");
}
}
else if (targetArchitecture == TargetArchitecture.ARM64)
@@ -111,9 +139,12 @@ public static InstructionSetSupport ConfigureInstructionSetSupport(string instru
optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("sha1");
optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("sha2");
optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("lse");
+ optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("dotprod");
+ optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("rdma");
+ optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("rcpc");
}
- optimisticInstructionSetSupportBuilder.ComputeInstructionSetFlags(out var optimisticInstructionSet, out _,
+ optimisticInstructionSetSupportBuilder.ComputeInstructionSetFlags(maxVectorTBitWidth, out var optimisticInstructionSet, out _,
(string specifiedInstructionSet, string impliedInstructionSet) => throw new NotSupportedException());
optimisticInstructionSet.Remove(unsupportedInstructionSet);
optimisticInstructionSet.Add(supportedInstructionSet);
diff --git a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs
index 0068f0be007764..32b60ecbcda7da 100644
--- a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs
+++ b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs
@@ -50,6 +50,9 @@ public enum ReadyToRunInstructionSet
Avx512DQ_VL=36,
Avx512Vbmi=37,
Avx512Vbmi_VL=38,
+ VectorT128=39,
+ VectorT256=40,
+ VectorT512=41,
}
}
diff --git a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs
index b387eedd89f2b7..f593808be32989 100644
--- a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs
+++ b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs
@@ -44,6 +44,7 @@ public static class ReadyToRunInstructionSetHelper
case InstructionSet.ARM64_Vector128: return null;
case InstructionSet.ARM64_Dczva: return null;
case InstructionSet.ARM64_Rcpc: return ReadyToRunInstructionSet.Rcpc;
+ case InstructionSet.ARM64_VectorT128: return ReadyToRunInstructionSet.VectorT128;
default: throw new Exception("Unknown instruction set");
}
@@ -114,6 +115,9 @@ public static class ReadyToRunInstructionSetHelper
case InstructionSet.X64_AVX512VBMI_X64: return ReadyToRunInstructionSet.Avx512Vbmi;
case InstructionSet.X64_AVX512VBMI_VL: return ReadyToRunInstructionSet.Avx512Vbmi_VL;
case InstructionSet.X64_AVX512VBMI_VL_X64: return ReadyToRunInstructionSet.Avx512Vbmi_VL;
+ case InstructionSet.X64_VectorT128: return ReadyToRunInstructionSet.VectorT128;
+ case InstructionSet.X64_VectorT256: return ReadyToRunInstructionSet.VectorT256;
+ case InstructionSet.X64_VectorT512: return ReadyToRunInstructionSet.VectorT512;
default: throw new Exception("Unknown instruction set");
}
@@ -184,6 +188,9 @@ public static class ReadyToRunInstructionSetHelper
case InstructionSet.X86_AVX512VBMI_X64: return null;
case InstructionSet.X86_AVX512VBMI_VL: return ReadyToRunInstructionSet.Avx512Vbmi_VL;
case InstructionSet.X86_AVX512VBMI_VL_X64: return null;
+ case InstructionSet.X86_VectorT128: return ReadyToRunInstructionSet.VectorT128;
+ case InstructionSet.X86_VectorT256: return ReadyToRunInstructionSet.VectorT256;
+ case InstructionSet.X86_VectorT512: return ReadyToRunInstructionSet.VectorT512;
default: throw new Exception("Unknown instruction set");
}
diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs b/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs
index df6c06206bf84d..f26abd68262391 100644
--- a/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs
+++ b/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs
@@ -15,7 +15,7 @@ namespace Internal.JitInterface
public enum InstructionSet
{
ILLEGAL = 0,
- NONE = 63,
+ NONE = 127,
ARM64_ArmBase = InstructionSet_ARM64.ArmBase,
ARM64_AdvSimd = InstructionSet_ARM64.AdvSimd,
ARM64_Aes = InstructionSet_ARM64.Aes,
@@ -29,6 +29,7 @@ public enum InstructionSet
ARM64_Vector128 = InstructionSet_ARM64.Vector128,
ARM64_Dczva = InstructionSet_ARM64.Dczva,
ARM64_Rcpc = InstructionSet_ARM64.Rcpc,
+ ARM64_VectorT128 = InstructionSet_ARM64.VectorT128,
ARM64_ArmBase_Arm64 = InstructionSet_ARM64.ArmBase_Arm64,
ARM64_AdvSimd_Arm64 = InstructionSet_ARM64.AdvSimd_Arm64,
ARM64_Aes_Arm64 = InstructionSet_ARM64.Aes_Arm64,
@@ -69,6 +70,9 @@ public enum InstructionSet
X64_AVX512DQ_VL = InstructionSet_X64.AVX512DQ_VL,
X64_AVX512VBMI = InstructionSet_X64.AVX512VBMI,
X64_AVX512VBMI_VL = InstructionSet_X64.AVX512VBMI_VL,
+ X64_VectorT128 = InstructionSet_X64.VectorT128,
+ X64_VectorT256 = InstructionSet_X64.VectorT256,
+ X64_VectorT512 = InstructionSet_X64.VectorT512,
X64_X86Base_X64 = InstructionSet_X64.X86Base_X64,
X64_SSE_X64 = InstructionSet_X64.SSE_X64,
X64_SSE2_X64 = InstructionSet_X64.SSE2_X64,
@@ -130,6 +134,9 @@ public enum InstructionSet
X86_AVX512DQ_VL = InstructionSet_X86.AVX512DQ_VL,
X86_AVX512VBMI = InstructionSet_X86.AVX512VBMI,
X86_AVX512VBMI_VL = InstructionSet_X86.AVX512VBMI_VL,
+ X86_VectorT128 = InstructionSet_X86.VectorT128,
+ X86_VectorT256 = InstructionSet_X86.VectorT256,
+ X86_VectorT512 = InstructionSet_X86.VectorT512,
X86_X86Base_X64 = InstructionSet_X86.X86Base_X64,
X86_SSE_X64 = InstructionSet_X86.SSE_X64,
X86_SSE2_X64 = InstructionSet_X86.SSE2_X64,
@@ -177,14 +184,15 @@ public enum InstructionSet_ARM64
Vector128 = 11,
Dczva = 12,
Rcpc = 13,
- ArmBase_Arm64 = 14,
- AdvSimd_Arm64 = 15,
- Aes_Arm64 = 16,
- Crc32_Arm64 = 17,
- Dp_Arm64 = 18,
- Rdm_Arm64 = 19,
- Sha1_Arm64 = 20,
- Sha256_Arm64 = 21,
+ VectorT128 = 14,
+ ArmBase_Arm64 = 15,
+ AdvSimd_Arm64 = 16,
+ Aes_Arm64 = 17,
+ Crc32_Arm64 = 18,
+ Dp_Arm64 = 19,
+ Rdm_Arm64 = 20,
+ Sha1_Arm64 = 21,
+ Sha256_Arm64 = 22,
}
public enum InstructionSet_X64
@@ -223,35 +231,38 @@ public enum InstructionSet_X64
AVX512DQ_VL = 30,
AVX512VBMI = 31,
AVX512VBMI_VL = 32,
- X86Base_X64 = 33,
- SSE_X64 = 34,
- SSE2_X64 = 35,
- SSE3_X64 = 36,
- SSSE3_X64 = 37,
- SSE41_X64 = 38,
- SSE42_X64 = 39,
- AVX_X64 = 40,
- AVX2_X64 = 41,
- AES_X64 = 42,
- BMI1_X64 = 43,
- BMI2_X64 = 44,
- FMA_X64 = 45,
- LZCNT_X64 = 46,
- PCLMULQDQ_X64 = 47,
- POPCNT_X64 = 48,
- AVXVNNI_X64 = 49,
- MOVBE_X64 = 50,
- X86Serialize_X64 = 51,
- AVX512F_X64 = 52,
- AVX512F_VL_X64 = 53,
- AVX512BW_X64 = 54,
- AVX512BW_VL_X64 = 55,
- AVX512CD_X64 = 56,
- AVX512CD_VL_X64 = 57,
- AVX512DQ_X64 = 58,
- AVX512DQ_VL_X64 = 59,
- AVX512VBMI_X64 = 60,
- AVX512VBMI_VL_X64 = 61,
+ VectorT128 = 33,
+ VectorT256 = 34,
+ VectorT512 = 35,
+ X86Base_X64 = 36,
+ SSE_X64 = 37,
+ SSE2_X64 = 38,
+ SSE3_X64 = 39,
+ SSSE3_X64 = 40,
+ SSE41_X64 = 41,
+ SSE42_X64 = 42,
+ AVX_X64 = 43,
+ AVX2_X64 = 44,
+ AES_X64 = 45,
+ BMI1_X64 = 46,
+ BMI2_X64 = 47,
+ FMA_X64 = 48,
+ LZCNT_X64 = 49,
+ PCLMULQDQ_X64 = 50,
+ POPCNT_X64 = 51,
+ AVXVNNI_X64 = 52,
+ MOVBE_X64 = 53,
+ X86Serialize_X64 = 54,
+ AVX512F_X64 = 55,
+ AVX512F_VL_X64 = 56,
+ AVX512BW_X64 = 57,
+ AVX512BW_VL_X64 = 58,
+ AVX512CD_X64 = 59,
+ AVX512CD_VL_X64 = 60,
+ AVX512DQ_X64 = 61,
+ AVX512DQ_VL_X64 = 62,
+ AVX512VBMI_X64 = 63,
+ AVX512VBMI_VL_X64 = 64,
}
public enum InstructionSet_X86
@@ -290,40 +301,43 @@ public enum InstructionSet_X86
AVX512DQ_VL = 30,
AVX512VBMI = 31,
AVX512VBMI_VL = 32,
- X86Base_X64 = 33,
- SSE_X64 = 34,
- SSE2_X64 = 35,
- SSE3_X64 = 36,
- SSSE3_X64 = 37,
- SSE41_X64 = 38,
- SSE42_X64 = 39,
- AVX_X64 = 40,
- AVX2_X64 = 41,
- AES_X64 = 42,
- BMI1_X64 = 43,
- BMI2_X64 = 44,
- FMA_X64 = 45,
- LZCNT_X64 = 46,
- PCLMULQDQ_X64 = 47,
- POPCNT_X64 = 48,
- AVXVNNI_X64 = 49,
- MOVBE_X64 = 50,
- X86Serialize_X64 = 51,
- AVX512F_X64 = 52,
- AVX512F_VL_X64 = 53,
- AVX512BW_X64 = 54,
- AVX512BW_VL_X64 = 55,
- AVX512CD_X64 = 56,
- AVX512CD_VL_X64 = 57,
- AVX512DQ_X64 = 58,
- AVX512DQ_VL_X64 = 59,
- AVX512VBMI_X64 = 60,
- AVX512VBMI_VL_X64 = 61,
+ VectorT128 = 33,
+ VectorT256 = 34,
+ VectorT512 = 35,
+ X86Base_X64 = 36,
+ SSE_X64 = 37,
+ SSE2_X64 = 38,
+ SSE3_X64 = 39,
+ SSSE3_X64 = 40,
+ SSE41_X64 = 41,
+ SSE42_X64 = 42,
+ AVX_X64 = 43,
+ AVX2_X64 = 44,
+ AES_X64 = 45,
+ BMI1_X64 = 46,
+ BMI2_X64 = 47,
+ FMA_X64 = 48,
+ LZCNT_X64 = 49,
+ PCLMULQDQ_X64 = 50,
+ POPCNT_X64 = 51,
+ AVXVNNI_X64 = 52,
+ MOVBE_X64 = 53,
+ X86Serialize_X64 = 54,
+ AVX512F_X64 = 55,
+ AVX512F_VL_X64 = 56,
+ AVX512BW_X64 = 57,
+ AVX512BW_VL_X64 = 58,
+ AVX512CD_X64 = 59,
+ AVX512CD_VL_X64 = 60,
+ AVX512DQ_X64 = 61,
+ AVX512DQ_VL_X64 = 62,
+ AVX512VBMI_X64 = 63,
+ AVX512VBMI_VL_X64 = 64,
}
public unsafe struct InstructionSetFlags : IEnumerable
{
- private const int FlagsFieldCount = 1;
+ private const int FlagsFieldCount = 2;
private const int BitsPerFlagsField = 64;
private fixed ulong _flags[FlagsFieldCount];
public IEnumerable ARM64Flags => this.Select((x) => (InstructionSet_ARM64)x);
@@ -527,6 +541,8 @@ public static InstructionSetFlags ExpandInstructionSetByImplicationHelper(Target
resultflags.AddInstructionSet(InstructionSet.ARM64_AdvSimd);
if (resultflags.HasInstructionSet(InstructionSet.ARM64_Vector128))
resultflags.AddInstructionSet(InstructionSet.ARM64_AdvSimd);
+ if (resultflags.HasInstructionSet(InstructionSet.ARM64_VectorT128))
+ resultflags.AddInstructionSet(InstructionSet.ARM64_AdvSimd);
break;
case TargetArchitecture.X64:
@@ -690,24 +706,46 @@ public static InstructionSetFlags ExpandInstructionSetByImplicationHelper(Target
resultflags.AddInstructionSet(InstructionSet.X64_X86Base);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
resultflags.AddInstructionSet(InstructionSet.X64_AVX2);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X64_FMA);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_VL))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_VL))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_VL))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512VBMI))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512VBMI_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512VBMI);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512VBMI_VL))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_VectorT128))
+ resultflags.AddInstructionSet(InstructionSet.X64_SSE2);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_VectorT256))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX2);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_VectorT512))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ_VL);
break;
case TargetArchitecture.X86:
@@ -755,24 +793,46 @@ public static InstructionSetFlags ExpandInstructionSetByImplicationHelper(Target
resultflags.AddInstructionSet(InstructionSet.X86_X86Base);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
resultflags.AddInstructionSet(InstructionSet.X86_AVX2);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X86_FMA);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F_VL))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512CD))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512CD_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512CD);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512CD_VL))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512F_VL);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512BW))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512BW_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512BW);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512BW_VL))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512F_VL);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512DQ))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512DQ_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512DQ);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512DQ_VL))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512F_VL);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512VBMI))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512BW);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512VBMI_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512VBMI);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512VBMI_VL))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512BW_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_VectorT128))
+ resultflags.AddInstructionSet(InstructionSet.X86_SSE2);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_VectorT256))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX2);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_VectorT512))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512BW_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512CD_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512DQ_VL);
break;
}
} while (!oldflags.Equals(resultflags));
@@ -830,6 +890,8 @@ private static InstructionSetFlags ExpandInstructionSetByReverseImplicationHelpe
resultflags.AddInstructionSet(InstructionSet.ARM64_Vector64);
if (resultflags.HasInstructionSet(InstructionSet.ARM64_AdvSimd))
resultflags.AddInstructionSet(InstructionSet.ARM64_Vector128);
+ if (resultflags.HasInstructionSet(InstructionSet.ARM64_AdvSimd))
+ resultflags.AddInstructionSet(InstructionSet.ARM64_VectorT128);
break;
case TargetArchitecture.X64:
@@ -935,24 +997,46 @@ private static InstructionSetFlags ExpandInstructionSetByReverseImplicationHelpe
resultflags.AddInstructionSet(InstructionSet.X64_X86Serialize);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX2))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_FMA))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512F_VL);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD_VL);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512CD_VL);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW_VL);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512BW_VL);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ_VL);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F_VL))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512DQ_VL);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512VBMI);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512VBMI))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512VBMI_VL);
if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_VL))
resultflags.AddInstructionSet(InstructionSet.X64_AVX512VBMI_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_SSE2))
+ resultflags.AddInstructionSet(InstructionSet.X64_VectorT128);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX2))
+ resultflags.AddInstructionSet(InstructionSet.X64_VectorT256);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X64_VectorT512);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512BW_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512CD_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512DQ_VL))
+ resultflags.AddInstructionSet(InstructionSet.X64_AVX512F);
break;
case TargetArchitecture.X86:
@@ -1000,24 +1084,46 @@ private static InstructionSetFlags ExpandInstructionSetByReverseImplicationHelpe
resultflags.AddInstructionSet(InstructionSet.X86_X86Serialize);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX2))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_FMA))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512F_VL);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512CD);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512CD))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512CD_VL);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F_VL))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512CD_VL);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512BW);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512BW))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512BW_VL);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F_VL))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512BW_VL);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512DQ);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512DQ))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512DQ_VL);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F_VL))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512DQ_VL);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512BW))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512VBMI);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512VBMI))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512VBMI_VL);
if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512BW_VL))
resultflags.AddInstructionSet(InstructionSet.X86_AVX512VBMI_VL);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_SSE2))
+ resultflags.AddInstructionSet(InstructionSet.X86_VectorT128);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX2))
+ resultflags.AddInstructionSet(InstructionSet.X86_VectorT256);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F))
+ resultflags.AddInstructionSet(InstructionSet.X86_VectorT512);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512BW_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512CD_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
+ if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512DQ_VL))
+ resultflags.AddInstructionSet(InstructionSet.X86_AVX512F);
break;
}
} while (!oldflags.Equals(resultflags));
@@ -1035,8 +1141,8 @@ private static InstructionSetFlags ExpandInstructionSetByReverseImplicationHelpe
{ ("x86-x64-v3", TargetArchitecture.X86), "x86-x64-v2 avx2 bmi bmi2 lzcnt movbe fma" },
{ ("skylake", TargetArchitecture.X64), "x86-x64-v3" },
{ ("skylake", TargetArchitecture.X86), "x86-x64-v3" },
- { ("x86-x64-v4", TargetArchitecture.X64), "x86-x64-v3 avx512f avx512f_vl avx512bw avx512bw_vl avx512cd avx512cd_vl" },
- { ("x86-x64-v4", TargetArchitecture.X86), "x86-x64-v3 avx512f avx512f_vl avx512bw avx512bw_vl avx512cd avx512cd_vl" },
+ { ("x86-x64-v4", TargetArchitecture.X64), "x86-x64-v3 avx512f avx512f_vl avx512bw avx512bw_vl avx512cd avx512cd_vl avx512dq avx512dq_vl" },
+ { ("x86-x64-v4", TargetArchitecture.X86), "x86-x64-v3 avx512f avx512f_vl avx512bw avx512bw_vl avx512cd avx512cd_vl avx512dq avx512dq_vl" },
{ ("armv8-a", TargetArchitecture.ARM64), "neon" },
{ ("armv8.1-a", TargetArchitecture.ARM64), "armv8-a lse crc rdma" },
{ ("armv8.2-a", TargetArchitecture.ARM64), "armv8.1-a" },
@@ -1088,6 +1194,7 @@ public static IEnumerable ArchitectureToValidInstructionSets
yield return new InstructionSetInfo("Vector128", "", InstructionSet.ARM64_Vector128, false);
yield return new InstructionSetInfo("Dczva", "", InstructionSet.ARM64_Dczva, false);
yield return new InstructionSetInfo("rcpc", "", InstructionSet.ARM64_Rcpc, true);
+ yield return new InstructionSetInfo("vectort128", "VectorT128", InstructionSet.ARM64_VectorT128, true);
break;
case TargetArchitecture.X64:
@@ -1123,6 +1230,9 @@ public static IEnumerable ArchitectureToValidInstructionSets
yield return new InstructionSetInfo("avx512dq_vl", "Avx512DQ_VL", InstructionSet.X64_AVX512DQ_VL, true);
yield return new InstructionSetInfo("avx512vbmi", "Avx512Vbmi", InstructionSet.X64_AVX512VBMI, true);
yield return new InstructionSetInfo("avx512vbmi_vl", "Avx512Vbmi_VL", InstructionSet.X64_AVX512VBMI_VL, true);
+ yield return new InstructionSetInfo("vectort128", "VectorT128", InstructionSet.X64_VectorT128, true);
+ yield return new InstructionSetInfo("vectort256", "VectorT256", InstructionSet.X64_VectorT256, true);
+ yield return new InstructionSetInfo("vectort512", "VectorT512", InstructionSet.X64_VectorT512, true);
break;
case TargetArchitecture.X86:
@@ -1158,6 +1268,9 @@ public static IEnumerable ArchitectureToValidInstructionSets
yield return new InstructionSetInfo("avx512dq_vl", "Avx512DQ_VL", InstructionSet.X86_AVX512DQ_VL, true);
yield return new InstructionSetInfo("avx512vbmi", "Avx512Vbmi", InstructionSet.X86_AVX512VBMI, true);
yield return new InstructionSetInfo("avx512vbmi_vl", "Avx512Vbmi_VL", InstructionSet.X86_AVX512VBMI_VL, true);
+ yield return new InstructionSetInfo("vectort128", "VectorT128", InstructionSet.X86_VectorT128, true);
+ yield return new InstructionSetInfo("vectort256", "VectorT256", InstructionSet.X86_VectorT256, true);
+ yield return new InstructionSetInfo("vectort512", "VectorT512", InstructionSet.X86_VectorT512, true);
break;
}
}
@@ -1432,6 +1545,9 @@ public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchite
else
{ return InstructionSet.ARM64_Sha256; }
+ case "VectorT128":
+ { return InstructionSet.ARM64_VectorT128; }
+
}
break;
@@ -1598,6 +1714,15 @@ public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchite
else
{ return InstructionSet.X64_AVX512VBMI; }
+ case "VectorT128":
+ { return InstructionSet.X64_VectorT128; }
+
+ case "VectorT256":
+ { return InstructionSet.X64_VectorT256; }
+
+ case "VectorT512":
+ { return InstructionSet.X64_VectorT512; }
+
}
break;
@@ -1692,6 +1817,15 @@ public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchite
else
{ return InstructionSet.X86_AVX512VBMI; }
+ case "VectorT128":
+ { return InstructionSet.X86_VectorT128; }
+
+ case "VectorT256":
+ { return InstructionSet.X86_VectorT256; }
+
+ case "VectorT512":
+ { return InstructionSet.X86_VectorT512; }
+
}
break;
diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs b/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs
index 71d8cd105dc60a..d2a792e25a0c18 100644
--- a/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs
+++ b/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs
@@ -1425,7 +1425,7 @@ public enum CorJitFlag : uint
CORJIT_FLAG_BBINSTR_IF_LOOPS = 32, // JIT must instrument current method if it has loops
CORJIT_FLAG_PUBLISH_SECRET_PARAM = 33, // JIT must place stub secret param into local 0. (used by IL stubs)
CORJIT_FLAG_UNUSED9 = 34,
- CORJIT_FLAG_SAMPLING_JIT_BACKGROUND = 35, // JIT is being invoked as a result of stack sampling for hot methods in the background
+ CORJIT_FLAG_UNUSED1 = 35,
CORJIT_FLAG_USE_PINVOKE_HELPERS = 36, // The JIT should use the PINVOKE_{BEGIN,END} helpers instead of emitting inline transitions
CORJIT_FLAG_REVERSE_PINVOKE = 37, // The JIT should insert REVERSE_PINVOKE_{ENTER,EXIT} helpers into method prolog/epilog
CORJIT_FLAG_TRACK_TRANSITIONS = 38, // The JIT should insert the helper variants that track transitions.
diff --git a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt
index d5f74271ed13fb..3c669e1ea95fea 100644
--- a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt
+++ b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt
@@ -57,7 +57,9 @@ instructionset ,X86 ,Avx512DQ , ,35 ,AVX512DQ
instructionset ,X86 ,Avx512DQ_VL , ,36 ,AVX512DQ_VL ,avx512dq_vl
instructionset ,X86 ,Avx512Vbmi , ,37 ,AVX512VBMI ,avx512vbmi
instructionset ,X86 ,Avx512Vbmi_VL , ,38 ,AVX512VBMI_VL ,avx512vbmi_vl
-
+instructionset ,X86 ,VectorT128 , ,39 ,VectorT128 ,vectort128
+instructionset ,X86 ,VectorT256 , ,40 ,VectorT256 ,vectort256
+instructionset ,X86 ,VectorT512 , ,41 ,VectorT512 ,vectort512
instructionset64bit,X86 ,X86Base
instructionset64bit,X86 ,SSE
@@ -115,15 +117,33 @@ implication ,X86 ,AVXVNNI ,AVX2
implication ,X86 ,MOVBE ,SSE42
implication ,X86 ,X86Serialize ,X86Base
implication ,X86 ,AVX512F ,AVX2
+implication ,X86 ,AVX512F ,FMA
implication ,X86 ,AVX512F_VL ,AVX512F
implication ,X86 ,AVX512CD ,AVX512F
+implication ,X86 ,AVX512CD_VL ,AVX512CD
implication ,X86 ,AVX512CD_VL ,AVX512F_VL
implication ,X86 ,AVX512BW ,AVX512F
+implication ,X86 ,AVX512BW_VL ,AVX512BW
implication ,X86 ,AVX512BW_VL ,AVX512F_VL
implication ,X86 ,AVX512DQ ,AVX512F
+implication ,X86 ,AVX512DQ_VL ,AVX512DQ
implication ,X86 ,AVX512DQ_VL ,AVX512F_VL
implication ,X86 ,AVX512VBMI ,AVX512BW
+implication ,X86 ,AVX512VBMI_VL ,AVX512VBMI
implication ,X86 ,AVX512VBMI_VL ,AVX512BW_VL
+implication ,X86 ,VectorT128 ,SSE2
+implication ,X86 ,VectorT256 ,AVX2
+implication ,X86 ,VectorT512 ,AVX512F
+
+; While the AVX-512 ISAs can be individually lit-up, they really
+; need F, BW, CD, DQ, and VL to be fully functional without adding
+; significant complexity into the JIT. Additionally, unlike AVX/AVX2
+; there was never really any hardware that didn't provide all 5 at
+; once, with the notable exception being Knight's Landing which
+; provided a similar but not quite the same feature.
+implication ,X86 ,AVX512F ,AVX512BW_VL
+implication ,X86 ,AVX512F ,AVX512CD_VL
+implication ,X86 ,AVX512F ,AVX512DQ_VL
; Definition of X64 instruction sets
definearch ,X64 ,64Bit ,X64, X64
@@ -133,19 +153,20 @@ copyinstructionsets,X86 ,X64
; Definition of Arm64 instruction sets
definearch ,ARM64 ,64Bit ,Arm64, Arm64
-instructionset ,ARM64 ,ArmBase , ,16 ,ArmBase ,base
-instructionset ,ARM64 ,AdvSimd , ,17 ,AdvSimd ,neon
-instructionset ,ARM64 ,Aes , ,9 ,Aes ,aes
-instructionset ,ARM64 ,Crc32 , ,18 ,Crc32 ,crc
-instructionset ,ARM64 ,Dp , ,23 ,Dp ,dotprod
-instructionset ,ARM64 ,Rdm , ,24 ,Rdm ,rdma
-instructionset ,ARM64 ,Sha1 , ,19 ,Sha1 ,sha1
-instructionset ,ARM64 ,Sha256 , ,20 ,Sha256 ,sha2
-instructionset ,ARM64 , ,Atomics ,21 ,Atomics ,lse
-instructionset ,ARM64 , , , ,Vector64 ,
-instructionset ,ARM64 , , , ,Vector128,
-instructionset ,ARM64 , , , ,Dczva ,
-instructionset ,ARM64 , ,Rcpc ,26 ,Rcpc ,rcpc
+instructionset ,ARM64 ,ArmBase , ,16 ,ArmBase ,base
+instructionset ,ARM64 ,AdvSimd , ,17 ,AdvSimd ,neon
+instructionset ,ARM64 ,Aes , ,9 ,Aes ,aes
+instructionset ,ARM64 ,Crc32 , ,18 ,Crc32 ,crc
+instructionset ,ARM64 ,Dp , ,23 ,Dp ,dotprod
+instructionset ,ARM64 ,Rdm , ,24 ,Rdm ,rdma
+instructionset ,ARM64 ,Sha1 , ,19 ,Sha1 ,sha1
+instructionset ,ARM64 ,Sha256 , ,20 ,Sha256 ,sha2
+instructionset ,ARM64 , ,Atomics ,21 ,Atomics ,lse
+instructionset ,ARM64 , , , ,Vector64 ,
+instructionset ,ARM64 , , , ,Vector128 ,
+instructionset ,ARM64 , , , ,Dczva ,
+instructionset ,ARM64 , ,Rcpc ,26 ,Rcpc ,rcpc
+instructionset ,ARM64 ,VectorT128 , ,39 ,VectorT128 ,vectort128
instructionset64bit,ARM64 ,ArmBase
instructionset64bit,ARM64 ,AdvSimd
@@ -159,16 +180,16 @@ instructionset64bit,ARM64 ,Sha256
vectorinstructionset,ARM64,Vector64
vectorinstructionset,ARM64,Vector128
-implication ,ARM64 ,AdvSimd ,ArmBase
-implication ,ARM64 ,Aes ,ArmBase
-implication ,ARM64 ,Crc32 ,ArmBase
-implication ,ARM64 ,Dp ,AdvSimd
-implication ,ARM64 ,Rdm ,AdvSimd
-implication ,ARM64 ,Sha1 ,ArmBase
-implication ,ARM64 ,Sha256 ,ArmBase
-implication ,ARM64 ,Vector64 ,AdvSimd
-implication ,ARM64 ,Vector128 ,AdvSimd
-
+implication ,ARM64 ,AdvSimd ,ArmBase
+implication ,ARM64 ,Aes ,ArmBase
+implication ,ARM64 ,Crc32 ,ArmBase
+implication ,ARM64 ,Dp ,AdvSimd
+implication ,ARM64 ,Rdm ,AdvSimd
+implication ,ARM64 ,Sha1 ,ArmBase
+implication ,ARM64 ,Sha256 ,ArmBase
+implication ,ARM64 ,Vector64 ,AdvSimd
+implication ,ARM64 ,Vector128 ,AdvSimd
+implication ,ARM64 ,VectorT128 ,AdvSimd
; ,name and aliases ,archs ,lower baselines included by implication
;
@@ -176,7 +197,7 @@ instructionsetgroup ,x86-x64 ,X64 X86 ,sse2
instructionsetgroup ,x86-x64-v2 ,X64 X86 ,sse4.2 popcnt
instructionsetgroup ,x86-x64-v3 ,X64 X86 ,x86-x64-v2 avx2 bmi bmi2 lzcnt movbe fma
instructionsetgroup ,skylake ,X64 X86 ,x86-x64-v3
-instructionsetgroup ,x86-x64-v4 ,X64 X86 ,x86-x64-v3 avx512f avx512f_vl avx512bw avx512bw_vl avx512cd avx512cd_vl
+instructionsetgroup ,x86-x64-v4 ,X64 X86 ,x86-x64-v3 avx512f avx512f_vl avx512bw avx512bw_vl avx512cd avx512cd_vl avx512dq avx512dq_vl
instructionsetgroup ,armv8-a ,ARM64 ,neon
instructionsetgroup ,armv8.1-a ,ARM64 ,armv8-a lse crc rdma
diff --git a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs
index 4547b91e2fdc70..3ce3bf5a795dbd 100644
--- a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs
+++ b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs
@@ -95,7 +95,7 @@ public InstructionSetImplication(string architecture, InstructionSetImplication
private Dictionary _64BitVariantArchitectureManagedNameSuffix = new Dictionary();
// This represents the number of flags fields we currently track
- private const int FlagsFieldCount = 1;
+ private const int FlagsFieldCount = 2;
private void ArchitectureEncountered(string arch)
{
diff --git a/src/coreclr/tools/Common/TypeSystem/Common/DefType.FieldLayout.cs b/src/coreclr/tools/Common/TypeSystem/Common/DefType.FieldLayout.cs
index 99305804f53519..fb4cd6bf17157f 100644
--- a/src/coreclr/tools/Common/TypeSystem/Common/DefType.FieldLayout.cs
+++ b/src/coreclr/tools/Common/TypeSystem/Common/DefType.FieldLayout.cs
@@ -73,6 +73,11 @@ private static class FieldLayoutFlags
/// True if the type transitively has an Int128 in it or is an Int128
///
public const int IsInt128OrHasInt128Fields = 0x800;
+
+ ///
+ /// True if the type transitively has a Vector in it or is Vector
+ ///
+ public const int IsVectorTOrHasVectorTFields = 0x1000;
}
private sealed class StaticBlockInfo
@@ -153,6 +158,21 @@ public virtual bool IsInt128OrHasInt128Fields
}
}
+ ///
+ /// Is a type Vector or transitively have any fields of a type Vector.
+ ///
+ public virtual bool IsVectorTOrHasVectorTFields
+ {
+ get
+ {
+ if (!_fieldLayoutFlags.HasFlags(FieldLayoutFlags.ComputedInstanceTypeLayout))
+ {
+ ComputeInstanceLayout(InstanceLayoutKind.TypeAndFields);
+ }
+ return _fieldLayoutFlags.HasFlags(FieldLayoutFlags.IsVectorTOrHasVectorTFields);
+ }
+ }
+
///
/// The number of bytes required to hold a field of this type
///
@@ -451,6 +471,10 @@ public void ComputeInstanceLayout(InstanceLayoutKind layoutKind)
{
_fieldLayoutFlags.AddFlags(FieldLayoutFlags.IsInt128OrHasInt128Fields);
}
+ if (computedLayout.IsVectorTOrHasVectorTFields)
+ {
+ _fieldLayoutFlags.AddFlags(FieldLayoutFlags.IsVectorTOrHasVectorTFields);
+ }
if (computedLayout.Offsets != null)
{
diff --git a/src/coreclr/tools/Common/TypeSystem/Common/FieldLayoutAlgorithm.cs b/src/coreclr/tools/Common/TypeSystem/Common/FieldLayoutAlgorithm.cs
index 53388c915b85d8..31a46ec47f6416 100644
--- a/src/coreclr/tools/Common/TypeSystem/Common/FieldLayoutAlgorithm.cs
+++ b/src/coreclr/tools/Common/TypeSystem/Common/FieldLayoutAlgorithm.cs
@@ -84,6 +84,7 @@ public struct ComputedInstanceFieldLayout
public bool LayoutAbiStable; // Is the layout stable such that it can safely be used in function calling conventions
public bool IsAutoLayoutOrHasAutoLayoutFields;
public bool IsInt128OrHasInt128Fields;
+ public bool IsVectorTOrHasVectorTFields;
///
/// If Offsets is non-null, then all field based layout is complete.
diff --git a/src/coreclr/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs b/src/coreclr/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs
index 0fc9064fb00a81..d56bfa19bbf210 100644
--- a/src/coreclr/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs
+++ b/src/coreclr/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs
@@ -110,6 +110,7 @@ out instanceByteSizeAndAlignment
LayoutAbiStable = true,
IsAutoLayoutOrHasAutoLayoutFields = false,
IsInt128OrHasInt128Fields = false,
+ IsVectorTOrHasVectorTFields = false,
};
if (numInstanceFields > 0)
@@ -211,7 +212,7 @@ public override ComputedStaticFieldLayout ComputeStaticFieldLayout(DefType defTy
}
ref StaticsBlock block = ref GetStaticsBlockForField(ref result, field);
- SizeAndAlignment sizeAndAlignment = ComputeFieldSizeAndAlignment(fieldType, hasLayout: false, context.Target.DefaultPackingSize, out bool _, out bool _, out bool _);
+ SizeAndAlignment sizeAndAlignment = ComputeFieldSizeAndAlignment(fieldType, hasLayout: false, context.Target.DefaultPackingSize, out bool _, out bool _, out bool _, out bool _);
block.Size = LayoutInt.AlignUp(block.Size, sizeAndAlignment.Alignment, context.Target);
result.Offsets[index] = new FieldAndOffset(field, block.Size);
@@ -303,18 +304,27 @@ protected ComputedInstanceFieldLayout ComputeExplicitFieldLayout(MetadataType ty
int fieldOrdinal = 0;
bool layoutAbiStable = true;
bool hasAutoLayoutField = false;
- bool hasInt128Field = type.BaseType == null ? false : type.BaseType.IsInt128OrHasInt128Fields;
+ bool hasInt128Field = false;
+ bool hasVectorTField = false;
+
+ if (type.BaseType is not null)
+ {
+ hasInt128Field = type.BaseType.IsInt128OrHasInt128Fields;
+ hasVectorTField = type.BaseType.IsVectorTOrHasVectorTFields;
+ }
foreach (var fieldAndOffset in layoutMetadata.Offsets)
{
TypeDesc fieldType = fieldAndOffset.Field.FieldType;
- var fieldSizeAndAlignment = ComputeFieldSizeAndAlignment(fieldType.UnderlyingType, hasLayout: true, packingSize, out bool fieldLayoutAbiStable, out bool fieldHasAutoLayout, out bool fieldHasInt128Field);
+ var fieldSizeAndAlignment = ComputeFieldSizeAndAlignment(fieldType.UnderlyingType, hasLayout: true, packingSize, out bool fieldLayoutAbiStable, out bool fieldHasAutoLayout, out bool fieldHasInt128Field, out bool fieldHasVectorTField);
if (!fieldLayoutAbiStable)
layoutAbiStable = false;
if (fieldHasAutoLayout)
hasAutoLayoutField = true;
if (fieldHasInt128Field)
hasInt128Field = true;
+ if (fieldHasVectorTField)
+ hasVectorTField = true;
largestAlignmentRequired = LayoutInt.Max(fieldSizeAndAlignment.Alignment, largestAlignmentRequired);
@@ -367,6 +377,7 @@ protected ComputedInstanceFieldLayout ComputeExplicitFieldLayout(MetadataType ty
{
IsAutoLayoutOrHasAutoLayoutFields = hasAutoLayoutField,
IsInt128OrHasInt128Fields = hasInt128Field,
+ IsVectorTOrHasVectorTFields = hasVectorTField,
};
computedLayout.FieldAlignment = instanceSizeAndAlignment.Alignment;
computedLayout.FieldSize = instanceSizeAndAlignment.Size;
@@ -402,20 +413,29 @@ protected ComputedInstanceFieldLayout ComputeSequentialFieldLayout(MetadataType
int packingSize = ComputePackingSize(type, layoutMetadata);
bool layoutAbiStable = true;
bool hasAutoLayoutField = false;
- bool hasInt128Field = type.BaseType == null ? false : type.BaseType.IsInt128OrHasInt128Fields;
+ bool hasInt128Field = false;
+ bool hasVectorTField = false;
+
+ if (type.BaseType is not null)
+ {
+ hasInt128Field = type.BaseType.IsInt128OrHasInt128Fields;
+ hasVectorTField = type.BaseType.IsVectorTOrHasVectorTFields;
+ }
foreach (var field in type.GetFields())
{
if (field.IsStatic)
continue;
- var fieldSizeAndAlignment = ComputeFieldSizeAndAlignment(field.FieldType.UnderlyingType, hasLayout: true, packingSize, out bool fieldLayoutAbiStable, out bool fieldHasAutoLayout, out bool fieldHasInt128Field);
+ var fieldSizeAndAlignment = ComputeFieldSizeAndAlignment(field.FieldType.UnderlyingType, hasLayout: true, packingSize, out bool fieldLayoutAbiStable, out bool fieldHasAutoLayout, out bool fieldHasInt128Field, out bool fieldHasVectorTField);
if (!fieldLayoutAbiStable)
layoutAbiStable = false;
if (fieldHasAutoLayout)
hasAutoLayoutField = true;
if (fieldHasInt128Field)
hasInt128Field = true;
+ if (fieldHasVectorTField)
+ hasVectorTField = true;
largestAlignmentRequirement = LayoutInt.Max(fieldSizeAndAlignment.Alignment, largestAlignmentRequirement);
@@ -443,6 +463,7 @@ protected ComputedInstanceFieldLayout ComputeSequentialFieldLayout(MetadataType
{
IsAutoLayoutOrHasAutoLayoutFields = hasAutoLayoutField,
IsInt128OrHasInt128Fields = hasInt128Field,
+ IsVectorTOrHasVectorTFields = hasVectorTField,
};
computedLayout.FieldAlignment = instanceSizeAndAlignment.Alignment;
computedLayout.FieldSize = instanceSizeAndAlignment.Size;
@@ -517,6 +538,7 @@ protected ComputedInstanceFieldLayout ComputeAutoFieldLayout(MetadataType type,
int instanceGCPointerFieldsCount = 0;
int[] instanceNonGCPointerFieldsCount = new int[maxLog2Size + 1];
bool hasInt128Field = false;
+ bool hasVectorTField = false;
foreach (var field in type.GetFields())
{
@@ -531,6 +553,8 @@ protected ComputedInstanceFieldLayout ComputeAutoFieldLayout(MetadataType type,
instanceValueClassFieldCount++;
if (((DefType)fieldType).IsInt128OrHasInt128Fields)
hasInt128Field = true;
+ if (((DefType)fieldType).IsVectorTOrHasVectorTFields)
+ hasVectorTField = true;
}
else if (fieldType.IsGCPointer)
{
@@ -540,7 +564,7 @@ protected ComputedInstanceFieldLayout ComputeAutoFieldLayout(MetadataType type,
{
Debug.Assert(fieldType.IsPrimitive || fieldType.IsPointer || fieldType.IsFunctionPointer || fieldType.IsEnum || fieldType.IsByRef);
- var fieldSizeAndAlignment = ComputeFieldSizeAndAlignment(fieldType, hasLayout, packingSize, out bool _, out bool _, out bool _);
+ var fieldSizeAndAlignment = ComputeFieldSizeAndAlignment(fieldType, hasLayout, packingSize, out bool _, out bool _, out bool _, out bool _);
instanceNonGCPointerFieldsCount[CalculateLog2(fieldSizeAndAlignment.Size.AsInt)]++;
}
}
@@ -577,7 +601,7 @@ protected ComputedInstanceFieldLayout ComputeAutoFieldLayout(MetadataType type,
TypeDesc fieldType = field.FieldType;
- var fieldSizeAndAlignment = ComputeFieldSizeAndAlignment(fieldType, hasLayout, packingSize, out bool fieldLayoutAbiStable, out bool _, out bool _);
+ var fieldSizeAndAlignment = ComputeFieldSizeAndAlignment(fieldType, hasLayout, packingSize, out bool fieldLayoutAbiStable, out bool _, out bool _, out bool _);
if (!fieldLayoutAbiStable)
layoutAbiStable = false;
@@ -747,7 +771,7 @@ protected ComputedInstanceFieldLayout ComputeAutoFieldLayout(MetadataType type,
for (int i = 0; i < instanceValueClassFieldsArr.Length; i++)
{
// Align the cumulative field offset to the indeterminate value
- var fieldSizeAndAlignment = ComputeFieldSizeAndAlignment(instanceValueClassFieldsArr[i].FieldType, hasLayout, packingSize, out bool fieldLayoutAbiStable, out bool _, out bool _);
+ var fieldSizeAndAlignment = ComputeFieldSizeAndAlignment(instanceValueClassFieldsArr[i].FieldType, hasLayout, packingSize, out bool fieldLayoutAbiStable, out bool _, out bool _, out bool _);
if (!fieldLayoutAbiStable)
layoutAbiStable = false;
@@ -804,6 +828,7 @@ protected ComputedInstanceFieldLayout ComputeAutoFieldLayout(MetadataType type,
{
IsAutoLayoutOrHasAutoLayoutFields = true,
IsInt128OrHasInt128Fields = hasInt128Field,
+ IsVectorTOrHasVectorTFields = hasVectorTField,
};
computedLayout.FieldAlignment = instanceSizeAndAlignment.Alignment;
computedLayout.FieldSize = instanceSizeAndAlignment.Size;
@@ -817,7 +842,7 @@ protected ComputedInstanceFieldLayout ComputeAutoFieldLayout(MetadataType type,
private static void PlaceInstanceField(FieldDesc field, bool hasLayout, int packingSize, FieldAndOffset[] offsets, ref LayoutInt instanceFieldPos, ref int fieldOrdinal, LayoutInt offsetBias)
{
- var fieldSizeAndAlignment = ComputeFieldSizeAndAlignment(field.FieldType, hasLayout, packingSize, out bool _, out bool _, out bool _);
+ var fieldSizeAndAlignment = ComputeFieldSizeAndAlignment(field.FieldType, hasLayout, packingSize, out bool _, out bool _, out bool _, out bool _);
instanceFieldPos = AlignUpInstanceFieldOffset(instanceFieldPos, fieldSizeAndAlignment.Alignment, field.Context.Target);
offsets[fieldOrdinal] = new FieldAndOffset(field, instanceFieldPos + offsetBias);
@@ -877,12 +902,13 @@ public LayoutInt CalculateFieldBaseOffset(MetadataType type, bool requiresAlign8
return cumulativeInstanceFieldPos;
}
- private static SizeAndAlignment ComputeFieldSizeAndAlignment(TypeDesc fieldType, bool hasLayout, int packingSize, out bool layoutAbiStable, out bool fieldTypeHasAutoLayout, out bool fieldTypeHasInt128Field)
+ private static SizeAndAlignment ComputeFieldSizeAndAlignment(TypeDesc fieldType, bool hasLayout, int packingSize, out bool layoutAbiStable, out bool fieldTypeHasAutoLayout, out bool fieldTypeHasInt128Field, out bool fieldTypeHasVectorTField)
{
SizeAndAlignment result;
layoutAbiStable = true;
fieldTypeHasAutoLayout = true;
fieldTypeHasInt128Field = false;
+ fieldTypeHasVectorTField = false;
if (fieldType.IsDefType)
{
@@ -894,6 +920,7 @@ private static SizeAndAlignment ComputeFieldSizeAndAlignment(TypeDesc fieldType,
layoutAbiStable = defType.LayoutAbiStable;
fieldTypeHasAutoLayout = defType.IsAutoLayoutOrHasAutoLayoutFields;
fieldTypeHasInt128Field = defType.IsInt128OrHasInt128Fields;
+ fieldTypeHasVectorTField = defType.IsVectorTOrHasVectorTFields;
}
else
{
diff --git a/src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs b/src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs
index cb80143d94250d..3aa6ca2db11a16 100644
--- a/src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs
+++ b/src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs
@@ -422,6 +422,12 @@ internal static MarshallerKind GetMarshallerKind(
return MarshallerKind.Invalid;
}
+ if (!isField && ((DefType)type).IsVectorTOrHasVectorTFields)
+ {
+ // Vector types or structs that contain them cannot be passed by value
+ return MarshallerKind.Invalid;
+ }
+
if (MarshalUtils.IsBlittableType(type))
{
if (nativeType != NativeTypeKind.Default && nativeType != NativeTypeKind.Struct)
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler.Tests/ILCompiler.Compiler.Tests.csproj b/src/coreclr/tools/aot/ILCompiler.Compiler.Tests/ILCompiler.Compiler.Tests.csproj
index 3ddbde70bd2f08..4512bbfd88e7d0 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler.Tests/ILCompiler.Compiler.Tests.csproj
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler.Tests/ILCompiler.Compiler.Tests.csproj
@@ -17,7 +17,6 @@
-
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerGeneratedInteropStubManager.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerGeneratedInteropStubManager.cs
index b56ca367618e9a..16cb8dcc6e8bb8 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerGeneratedInteropStubManager.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerGeneratedInteropStubManager.cs
@@ -32,10 +32,10 @@ public sealed override PInvokeILProvider CreatePInvokeILProvider()
public sealed override void AddToReadyToRunHeader(ReadyToRunHeaderNode header, NodeFactory nodeFactory, ExternalReferencesTableNode commonFixupsTableNode)
{
var delegateMapNode = new DelegateMarshallingStubMapNode(commonFixupsTableNode, _interopStateManager);
- header.Add(MetadataManager.BlobIdToReadyToRunSection(ReflectionMapBlob.DelegateMarshallingStubMap), delegateMapNode, delegateMapNode, delegateMapNode.EndSymbol);
+ header.Add(MetadataManager.BlobIdToReadyToRunSection(ReflectionMapBlob.DelegateMarshallingStubMap), delegateMapNode);
var structMapNode = new StructMarshallingStubMapNode(commonFixupsTableNode, _interopStateManager);
- header.Add(MetadataManager.BlobIdToReadyToRunSection(ReflectionMapBlob.StructMarshallingStubMap), structMapNode, structMapNode, structMapNode.EndSymbol);
+ header.Add(MetadataManager.BlobIdToReadyToRunSection(ReflectionMapBlob.StructMarshallingStubMap), structMapNode);
}
}
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ReflectionMarker.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ReflectionMarker.cs
index d32757d162d80b..c2132ce7aa6d1f 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ReflectionMarker.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ReflectionMarker.cs
@@ -239,30 +239,24 @@ private void ReportWarningsForReflectionAccess(in MessageOrigin origin, TypeSyst
// This is because reflection access is actually problematic on all members which are in a "requires" scope
// so for example even instance methods. See for example https://github.com/dotnet/linker/issues/3140 - it's possible
// to call a method on a "null" instance via reflection.
- if (_logger.ShouldSuppressAnalysisWarningsForRequires(entity, DiagnosticUtilities.RequiresUnreferencedCodeAttribute, out CustomAttributeValue? requiresAttribute))
- {
- if (!ShouldSkipWarningsForOverride(entity, accessKind))
+ if (_logger.ShouldSuppressAnalysisWarningsForRequires(entity, DiagnosticUtilities.RequiresUnreferencedCodeAttribute, out CustomAttributeValue? requiresAttribute) &&
+ ShouldProduceRequiresWarningForReflectionAccess(entity, accessKind))
ReportRequires(origin, entity, DiagnosticUtilities.RequiresUnreferencedCodeAttribute, requiresAttribute.Value);
- }
- if (_logger.ShouldSuppressAnalysisWarningsForRequires(entity, DiagnosticUtilities.RequiresAssemblyFilesAttribute, out requiresAttribute))
- {
- if (!ShouldSkipWarningsForOverride(entity, accessKind))
+ if (_logger.ShouldSuppressAnalysisWarningsForRequires(entity, DiagnosticUtilities.RequiresAssemblyFilesAttribute, out requiresAttribute) &&
+ ShouldProduceRequiresWarningForReflectionAccess(entity, accessKind))
ReportRequires(origin, entity, DiagnosticUtilities.RequiresAssemblyFilesAttribute, requiresAttribute.Value);
- }
- if (_logger.ShouldSuppressAnalysisWarningsForRequires(entity, DiagnosticUtilities.RequiresDynamicCodeAttribute, out requiresAttribute))
- {
- if (!ShouldSkipWarningsForOverride(entity, accessKind))
+ if (_logger.ShouldSuppressAnalysisWarningsForRequires(entity, DiagnosticUtilities.RequiresDynamicCodeAttribute, out requiresAttribute) &&
+ ShouldProduceRequiresWarningForReflectionAccess(entity, accessKind))
ReportRequires(origin, entity, DiagnosticUtilities.RequiresDynamicCodeAttribute, requiresAttribute.Value);
- }
// Below is about accessing DAM annotated members, so only RUC is applicable as a suppression scope
if (_logger.ShouldSuppressAnalysisWarningsForRequires(origin.MemberDefinition, DiagnosticUtilities.RequiresUnreferencedCodeAttribute))
return;
bool isReflectionAccessCoveredByDAM = Annotations.ShouldWarnWhenAccessedForReflection(entity);
- if (isReflectionAccessCoveredByDAM && !ShouldSkipWarningsForOverride(entity, accessKind))
+ if (isReflectionAccessCoveredByDAM && ShouldProduceRequiresWarningForReflectionAccess(entity, accessKind))
{
if (entity is MethodDesc)
_logger.LogWarning(origin, DiagnosticId.DynamicallyAccessedMembersMethodAccessedViaReflection, entity.GetDisplayName());
@@ -273,16 +267,16 @@ private void ReportWarningsForReflectionAccess(in MessageOrigin origin, TypeSyst
// We decided to not warn on reflection access to compiler-generated methods:
// https://github.com/dotnet/runtime/issues/85042
- // All override methods should have the same annotations as their base methods
- // (else we will produce warning IL2046 or IL2092 or some other warning).
- // When marking override methods via DynamicallyAccessedMembers, we should only issue a warning for the base method.
- // PERF: Avoid precomputing this as this method is relatively expensive. Only call it once we're about to produce a warning.
- static bool ShouldSkipWarningsForOverride(TypeSystemEntity entity, AccessKind accessKind)
+ static bool ShouldProduceRequiresWarningForReflectionAccess(TypeSystemEntity entity, AccessKind accessKind)
{
- if (accessKind != AccessKind.DynamicallyAccessedMembersMark || entity is not MethodDesc method || !method.IsVirtual)
- return false;
+ bool isCompilerGenerated = CompilerGeneratedState.IsNestedFunctionOrStateMachineMember(entity);
- return MetadataVirtualMethodAlgorithm.FindSlotDefiningMethodForVirtualMethod(method) != method;
+ // Compiler generated code accessed via a token is considered a "hard" reference
+ // even though we also have to treat it as reflection access.
+ // So we need to enforce RUC check/warn in this case.
+ bool forceRequiresWarning = accessKind == AccessKind.TokenAccess;
+
+ return !isCompilerGenerated || forceRequiresWarning;
}
}
@@ -319,7 +313,8 @@ static bool IsDeclaredWithinType(TypeSystemEntity member, TypeDesc type)
// causing problems is pretty low.
bool isReflectionAccessCoveredByRUC = _logger.ShouldSuppressAnalysisWarningsForRequires(entity, DiagnosticUtilities.RequiresUnreferencedCodeAttribute, out CustomAttributeValue? requiresUnreferencedCodeAttribute);
- if (isReflectionAccessCoveredByRUC && !ShouldSkipWarningsForOverride(entity))
+ bool isCompilerGenerated = CompilerGeneratedState.IsNestedFunctionOrStateMachineMember(entity);
+ if (isReflectionAccessCoveredByRUC && !isCompilerGenerated)
{
var id = reportOnMember ? DiagnosticId.DynamicallyAccessedMembersOnTypeReferencesMemberWithRequiresUnreferencedCode : DiagnosticId.DynamicallyAccessedMembersOnTypeReferencesMemberOnBaseWithRequiresUnreferencedCode;
_logger.LogWarning(origin, id, _typeHierarchyDataFlowOrigin.GetDisplayName(),
@@ -329,7 +324,7 @@ static bool IsDeclaredWithinType(TypeSystemEntity member, TypeDesc type)
}
bool isReflectionAccessCoveredByDAM = Annotations.ShouldWarnWhenAccessedForReflection(entity);
- if (isReflectionAccessCoveredByDAM && !ShouldSkipWarningsForOverride(entity))
+ if (isReflectionAccessCoveredByDAM && !isCompilerGenerated)
{
var id = reportOnMember ? DiagnosticId.DynamicallyAccessedMembersOnTypeReferencesMemberWithDynamicallyAccessedMembers : DiagnosticId.DynamicallyAccessedMembersOnTypeReferencesMemberOnBaseWithDynamicallyAccessedMembers;
_logger.LogWarning(origin, id, _typeHierarchyDataFlowOrigin.GetDisplayName(), entity.GetDisplayName());
@@ -337,17 +332,6 @@ static bool IsDeclaredWithinType(TypeSystemEntity member, TypeDesc type)
// We decided to not warn on reflection access to compiler-generated methods:
// https://github.com/dotnet/runtime/issues/85042
-
- // All override methods should have the same annotations as their base methods
- // (else we will produce warning IL2046 or IL2092 or some other warning).
- // When marking override methods via DynamicallyAccessedMembers, we should only issue a warning for the base method.
- static bool ShouldSkipWarningsForOverride(TypeSystemEntity entity)
- {
- if (entity is not MethodDesc method || !method.IsVirtual)
- return false;
-
- return MetadataVirtualMethodAlgorithm.FindSlotDefiningMethodForVirtualMethod(method) != method;
- }
}
private void ReportRequires(in MessageOrigin origin, TypeSystemEntity entity, string requiresAttributeName, in CustomAttributeValue requiresAttribute)
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayMapNode.cs
index 6bf674b28296a4..f8207e8454f9c5 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayMapNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayMapNode.cs
@@ -12,18 +12,17 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a hash table of array types generated into the image.
///
- internal sealed class ArrayMapNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class ArrayMapNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
- private ExternalReferencesTableNode _externalReferences;
+ private readonly ExternalReferencesTableNode _externalReferences;
+ private int? _size;
public ArrayMapNode(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__array_type_map_End", true);
_externalReferences = externalReferences;
}
- public ISymbolDefinitionNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -68,9 +67,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] hashTableBytes = writer.Save();
- _endSymbol.SetSymbolOffset(hashTableBytes.Length);
+ _size = hashTableBytes.Length;
- return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs
index 2e75de7ead91e9..f63dab431e7190 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs
@@ -5,24 +5,22 @@
namespace ILCompiler.DependencyAnalysis
{
- public interface IHasStartSymbol
- {
- ObjectAndOffsetSymbolNode StartSymbol { get; }
- }
-
///
/// Represents an array of nodes. The contents of this node will be emitted
/// by placing a starting symbol, followed by contents of nodes (optionally
/// sorted using provided comparer), followed by ending symbol.
///
- public class ArrayOfEmbeddedDataNode : EmbeddedDataContainerNode, IHasStartSymbol
+ public class ArrayOfEmbeddedDataNode : EmbeddedDataContainerNode, INodeWithSize
where TEmbedded : EmbeddedObjectNode
{
+ private int? _size;
private HashSet _nestedNodes = new HashSet();
private List _nestedNodesList = new List();
private IComparer _sorter;
- public ArrayOfEmbeddedDataNode(string startSymbolMangledName, string endSymbolMangledName, IComparer nodeSorter) : base(startSymbolMangledName, endSymbolMangledName)
+ int INodeWithSize.Size => _size.Value;
+
+ public ArrayOfEmbeddedDataNode(string mangledName, IComparer nodeSorter) : base(mangledName)
{
_sorter = nodeSorter;
}
@@ -35,11 +33,10 @@ public void AddEmbeddedObject(TEmbedded symbol)
{
_nestedNodesList.Add(symbol);
}
- symbol.ContainingNode = this;
}
}
- protected override string GetName(NodeFactory factory) => $"Region {StartSymbol.GetMangledName(factory.NameMangler)}";
+ protected override string GetName(NodeFactory factory) => $"Region {this.GetMangledName(factory.NameMangler)}";
public override ObjectNodeSection GetSection(NodeFactory factory) => ObjectNodeSection.DataSection;
public override bool IsShareable => false;
@@ -84,12 +81,11 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly)
if (_sorter != null)
_nestedNodesList.Sort(_sorter);
- builder.AddSymbol(StartSymbol);
+ builder.AddSymbol(this);
GetElementDataForNodes(ref builder, factory, relocsOnly);
- EndSymbol.SetSymbolOffset(builder.CountBytes);
- builder.AddSymbol(EndSymbol);
+ _size = builder.CountBytes;
ObjectData objData = builder.ToObjectData();
return objData;
@@ -100,15 +96,6 @@ public override bool ShouldSkipEmittingObjectNode(NodeFactory factory)
return _nestedNodesList.Count == 0;
}
- protected override DependencyList ComputeNonRelocationBasedDependencies(NodeFactory factory)
- {
- DependencyList dependencies = new DependencyList();
- dependencies.Add(StartSymbol, "StartSymbol");
- dependencies.Add(EndSymbol, "EndSymbol");
-
- return dependencies;
- }
-
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
public override int ClassCode => (int)ObjectNodeOrder.ArrayOfEmbeddedDataNode;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayOfEmbeddedPointersNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayOfEmbeddedPointersNode.cs
index ba9e73eccfbfee..a2bc613dcbd4f6 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayOfEmbeddedPointersNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayOfEmbeddedPointersNode.cs
@@ -24,13 +24,12 @@ public sealed class ArrayOfEmbeddedPointersNode : ArrayOfEmbeddedDataNo
///
public delegate void OnMarkedDelegate(EmbeddedPointerIndirectionNode embeddedObject);
- public ArrayOfEmbeddedPointersNode(string startSymbolMangledName, string endSymbolMangledName, IComparer nodeSorter)
+ public ArrayOfEmbeddedPointersNode(string mangledName, IComparer nodeSorter)
: base(
- startSymbolMangledName,
- endSymbolMangledName,
+ mangledName,
nodeSorter != null ? new PointerIndirectionNodeComparer(nodeSorter) : null)
{
- _startSymbolMangledName = startSymbolMangledName;
+ _startSymbolMangledName = mangledName;
}
public EmbeddedObjectNode NewNode(TTarget target)
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayOfFrozenObjectsNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayOfFrozenObjectsNode.cs
index a83b93447fa67e..e6ca20b6507d27 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayOfFrozenObjectsNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ArrayOfFrozenObjectsNode.cs
@@ -8,15 +8,10 @@
namespace ILCompiler.DependencyAnalysis
{
- public class ArrayOfFrozenObjectsNode : DehydratableObjectNode, ISymbolDefinitionNode
+ public class ArrayOfFrozenObjectsNode : DehydratableObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private readonly ObjectAndOffsetSymbolNode _endSymbol;
- public ISymbolNode EndSymbol => _endSymbol;
-
- public ArrayOfFrozenObjectsNode()
- {
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__FrozenSegmentEnd", true);
- }
+ private int? _size;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
=> sb.Append(nameMangler.CompilationUnitPrefix).Append("__FrozenSegmentStart");
@@ -61,8 +56,7 @@ protected override ObjectData GetDehydratableData(NodeFactory factory, bool relo
AlignNextObject(ref builder, factory);
builder.EmitZeroPointer();
- _endSymbol.SetSymbolOffset(builder.CountBytes);
- builder.AddSymbol(_endSymbol);
+ _size = builder.CountBytes;
return builder.ToObjectData();
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ByRefTypeMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ByRefTypeMapNode.cs
index 8adf1643302b73..b1a97f9d5bf7f1 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ByRefTypeMapNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ByRefTypeMapNode.cs
@@ -11,18 +11,17 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a hash table of ByRef types generated into the image.
///
- internal sealed class ByRefTypeMapNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class ByRefTypeMapNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private readonly ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private readonly ExternalReferencesTableNode _externalReferences;
public ByRefTypeMapNode(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__byref_type_map_End", true);
_externalReferences = externalReferences;
}
- public ISymbolDefinitionNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -62,9 +61,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] hashTableBytes = writer.Save();
- _endSymbol.SetSymbolOffset(hashTableBytes.Length);
+ _size = hashTableBytes.Length;
- return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ClassConstructorContextMap.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ClassConstructorContextMap.cs
index 2f84a816e0fffb..ec0e162367693f 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ClassConstructorContextMap.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ClassConstructorContextMap.cs
@@ -11,18 +11,17 @@
namespace ILCompiler.DependencyAnalysis
{
- internal sealed class ClassConstructorContextMap : ObjectNode, ISymbolDefinitionNode
+ internal sealed class ClassConstructorContextMap : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
public ClassConstructorContextMap(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__type_to_cctorContext_map_End", true);
_externalReferences = externalReferences;
}
- public ISymbolDefinitionNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -74,9 +73,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] hashTableBytes = writer.Save();
- _endSymbol.SetSymbolOffset(hashTableBytes.Length);
+ _size = hashTableBytes.Length;
- return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DehydratedDataNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DehydratedDataNode.cs
index fcaf3c4ea9a3be..4e526961690e17 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DehydratedDataNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DehydratedDataNode.cs
@@ -28,14 +28,9 @@ namespace ILCompiler.DependencyAnalysis
/// * Generate N bytes of zeros.
/// * Generate a relocation to Nth entry in the lookup table that supplements the dehydrated stream.
///
- internal sealed class DehydratedDataNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class DehydratedDataNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
-
- public DehydratedDataNode()
- {
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__dehydrated_data_End", true);
- }
+ private int? _size;
public override bool IsShareable => false;
@@ -47,7 +42,7 @@ public DehydratedDataNode()
public int Offset => 0;
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -87,7 +82,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
if (firstSymbol != null)
builder.EmitReloc(firstSymbol, RelocType.IMAGE_REL_BASED_RELPTR32, -firstSymbol.Offset);
else
- return new ObjectData(Array.Empty(), Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(Array.Empty(), Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
// Sort the reloc targets and create reloc lookup table.
KeyValuePair[] relocSort = new List>(relocOccurences).ToArray();
@@ -312,8 +307,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
dehydratedSegmentPosition += o.Data.Length;
}
- _endSymbol.SetSymbolOffset(builder.CountBytes);
- builder.AddSymbol(_endSymbol);
+ _size = builder.CountBytes;
// Dehydrated data is followed by the reloc lookup table.
for (int i = 0; i < relocSort.Length; i++)
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DelegateMarshallingStubMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DelegateMarshallingStubMapNode.cs
index 1176f0e1bf4a5a..2111f081a697d9 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DelegateMarshallingStubMapNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DelegateMarshallingStubMapNode.cs
@@ -12,20 +12,19 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a hash table of delegate marshalling stub types generated into the image.
///
- internal sealed class DelegateMarshallingStubMapNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class DelegateMarshallingStubMapNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private readonly ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private readonly ExternalReferencesTableNode _externalReferences;
private readonly InteropStateManager _interopStateManager;
public DelegateMarshallingStubMapNode(ExternalReferencesTableNode externalReferences, InteropStateManager interopStateManager)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__delegate_marshalling_stub_map_End", true);
_externalReferences = externalReferences;
_interopStateManager = interopStateManager;
}
- public ISymbolDefinitionNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -71,9 +70,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] hashTableBytes = writer.Save();
- _endSymbol.SetSymbolOffset(hashTableBytes.Length);
+ _size = hashTableBytes.Length;
- return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs
index 511f91cbb56f22..33b7594383c49a 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs
@@ -16,8 +16,6 @@ public abstract class EmbeddedObjectNode : SortableDependencyNode
private int _offset;
private int _index;
- public IHasStartSymbol ContainingNode { get; set; }
-
public EmbeddedObjectNode()
{
_offset = InvalidOffset;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExactMethodInstantiationsNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExactMethodInstantiationsNode.cs
index 3d52e0a3a9c22a..46d38a7b9857b1 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExactMethodInstantiationsNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExactMethodInstantiationsNode.cs
@@ -13,14 +13,13 @@ namespace ILCompiler.DependencyAnalysis
///
/// Hashtable of all exact (non-canonical) generic method instantiations compiled in the module.
///
- public sealed class ExactMethodInstantiationsNode : ObjectNode, ISymbolDefinitionNode
+ public sealed class ExactMethodInstantiationsNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
public ExactMethodInstantiationsNode(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__exact_method_instantiations_End", true);
_externalReferences = externalReferences;
}
@@ -29,7 +28,7 @@ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
sb.Append(nameMangler.CompilationUnitPrefix).Append("__exact_method_instantiations");
}
- public ISymbolDefinitionNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public int Offset => 0;
public override bool IsShareable => false;
public override ObjectNodeSection GetSection(NodeFactory factory) => _externalReferences.GetSection(factory);
@@ -99,9 +98,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] streamBytes = nativeWriter.Save();
- _endSymbol.SetSymbolOffset(streamBytes.Length);
+ _size = streamBytes.Length;
- return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
public static void GetExactMethodInstantiationDependenciesForMethod(ref DependencyList dependencies, NodeFactory factory, MethodDesc method)
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExternalReferencesTableNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExternalReferencesTableNode.cs
index 3c2c3d29289724..86e2d14a0f3c29 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExternalReferencesTableNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExternalReferencesTableNode.cs
@@ -13,9 +13,9 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a node that points to various symbols and can be sequentially addressed.
///
- public sealed class ExternalReferencesTableNode : ObjectNode, ISymbolDefinitionNode
+ public sealed class ExternalReferencesTableNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private readonly ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private readonly string _blobName;
private readonly NodeFactory _nodeFactory;
@@ -25,11 +25,10 @@ public sealed class ExternalReferencesTableNode : ObjectNode, ISymbolDefinitionN
public ExternalReferencesTableNode(string blobName, NodeFactory nodeFactory)
{
_blobName = blobName;
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__external_" + blobName + "_references_End", true);
_nodeFactory = nodeFactory;
}
- public ISymbolDefinitionNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -103,10 +102,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
}
}
- _endSymbol.SetSymbolOffset(builder.CountBytes);
+ _size = builder.CountBytes;
builder.AddSymbol(this);
- builder.AddSymbol(_endSymbol);
return builder.ToObjectData();
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FunctionPointerMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FunctionPointerMapNode.cs
index f2651f9069f1bf..979b8d4ef618a7 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FunctionPointerMapNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/FunctionPointerMapNode.cs
@@ -12,18 +12,17 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a hash table of function pointer types generated into the image.
///
- internal sealed class FunctionPointerMapNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class FunctionPointerMapNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private readonly ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private readonly ExternalReferencesTableNode _externalReferences;
public FunctionPointerMapNode(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__fnptr_type_map_End", true);
_externalReferences = externalReferences;
}
- public ISymbolDefinitionNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -71,9 +70,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] hashTableBytes = writer.Save();
- _endSymbol.SetSymbolOffset(hashTableBytes.Length);
+ _size = hashTableBytes.Length;
- return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericMethodsHashtableNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericMethodsHashtableNode.cs
index 9e69b3d98d6770..aeae01fa7cd2c6 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericMethodsHashtableNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericMethodsHashtableNode.cs
@@ -13,14 +13,13 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a hashtable of all compiled generic method instantiations
///
- public sealed class GenericMethodsHashtableNode : ObjectNode, ISymbolDefinitionNode
+ public sealed class GenericMethodsHashtableNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
public GenericMethodsHashtableNode(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__generic_methods_hashtable_End", true);
_externalReferences = externalReferences;
}
@@ -29,7 +28,7 @@ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
sb.Append(nameMangler.CompilationUnitPrefix).Append("__generic_methods_hashtable");
}
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public int Offset => 0;
public override bool IsShareable => false;
public override ObjectNodeSection GetSection(NodeFactory factory) => _externalReferences.GetSection(factory);
@@ -92,9 +91,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] streamBytes = nativeWriter.Save();
- _endSymbol.SetSymbolOffset(streamBytes.Length);
+ _size = streamBytes.Length;
- return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
public static void GetGenericMethodsHashtableDependenciesForMethod(ref DependencyList dependencies, NodeFactory factory, MethodDesc method)
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericMethodsTemplateMap.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericMethodsTemplateMap.cs
index 971c81d1ef89db..6230518cf2b258 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericMethodsTemplateMap.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericMethodsTemplateMap.cs
@@ -13,14 +13,13 @@ namespace ILCompiler.DependencyAnalysis
///
/// Hashtable of all generic method templates used by the TypeLoader at runtime
///
- public sealed class GenericMethodsTemplateMap : ObjectNode, ISymbolDefinitionNode
+ public sealed class GenericMethodsTemplateMap : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
public GenericMethodsTemplateMap(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__GenericMethodsTemplateMap_End", true);
_externalReferences = externalReferences;
}
@@ -29,7 +28,7 @@ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
sb.Append(nameMangler.CompilationUnitPrefix).Append("__GenericMethodsTemplateMap");
}
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public int Offset => 0;
public override bool IsShareable => false;
public override ObjectNodeSection GetSection(NodeFactory factory) => _externalReferences.GetSection(factory);
@@ -73,9 +72,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] streamBytes = nativeWriter.Save();
- _endSymbol.SetSymbolOffset(streamBytes.Length);
+ _size = streamBytes.Length;
- return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
public static void GetTemplateMethodDependencies(ref DependencyList dependencies, NodeFactory factory, MethodDesc method)
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericTypesHashtableNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericTypesHashtableNode.cs
index c1f06e34ef5a3d..fa1a70b3544acc 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericTypesHashtableNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericTypesHashtableNode.cs
@@ -12,14 +12,13 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a hashtable of all compiled generic type instantiations
///
- public sealed class GenericTypesHashtableNode : ObjectNode, ISymbolDefinitionNode
+ public sealed class GenericTypesHashtableNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
public GenericTypesHashtableNode(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__generic_types_hashtable_End", true);
_externalReferences = externalReferences;
}
@@ -28,7 +27,7 @@ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
sb.Append(nameMangler.CompilationUnitPrefix).Append("__generic_types_hashtable");
}
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public int Offset => 0;
public override bool IsShareable => false;
public override ObjectNodeSection GetSection(NodeFactory factory) => _externalReferences.GetSection(factory);
@@ -68,9 +67,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] streamBytes = nativeWriter.Save();
- _endSymbol.SetSymbolOffset(streamBytes.Length);
+ _size = streamBytes.Length;
- return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericTypesTemplateMap.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericTypesTemplateMap.cs
index 9a329b0a74140d..80f44e60948d45 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericTypesTemplateMap.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericTypesTemplateMap.cs
@@ -13,14 +13,13 @@ namespace ILCompiler.DependencyAnalysis
///
/// Hashtable of all generic type templates used by the TypeLoader at runtime
///
- public sealed class GenericTypesTemplateMap : ObjectNode, ISymbolDefinitionNode
+ public sealed class GenericTypesTemplateMap : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
public GenericTypesTemplateMap(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__GenericTypesTemplateMap_End", true);
_externalReferences = externalReferences;
}
@@ -29,7 +28,7 @@ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
sb.Append(nameMangler.CompilationUnitPrefix).Append("__GenericTypesTemplateMap");
}
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public int Offset => 0;
public override bool IsShareable => false;
public override ObjectNodeSection GetSection(NodeFactory factory) => _externalReferences.GetSection(factory);
@@ -68,9 +67,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] streamBytes = nativeWriter.Save();
- _endSymbol.SetSymbolOffset(streamBytes.Length);
+ _size = streamBytes.Length;
- return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
public static void GetTemplateTypeDependencies(ref DependencyList dependencies, NodeFactory factory, TypeDesc type)
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericVirtualMethodTableNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericVirtualMethodTableNode.cs
index c1847c5d06f5f4..7769b2b6a60872 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericVirtualMethodTableNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericVirtualMethodTableNode.cs
@@ -14,15 +14,14 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a map of generic virtual method implementations.
///
- public sealed class GenericVirtualMethodTableNode : ObjectNode, ISymbolDefinitionNode
+ public sealed class GenericVirtualMethodTableNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
private Dictionary> _gvmImplementations;
public GenericVirtualMethodTableNode(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__gvm_table_End", true);
_externalReferences = externalReferences;
_gvmImplementations = new Dictionary>();
}
@@ -32,7 +31,7 @@ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
sb.Append(nameMangler.CompilationUnitPrefix).Append("__gvm_table");
}
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public int Offset => 0;
public override bool IsShareable => false;
public override ObjectNodeSection GetSection(NodeFactory factory) => _externalReferences.GetSection(factory);
@@ -135,9 +134,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] streamBytes = nativeFormatWriter.Save();
- _endSymbol.SetSymbolOffset(streamBytes.Length);
+ _size = streamBytes.Length;
- return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceGenericVirtualMethodTableNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceGenericVirtualMethodTableNode.cs
index b5855ce04e43d2..74de063bbd706d 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceGenericVirtualMethodTableNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceGenericVirtualMethodTableNode.cs
@@ -15,16 +15,15 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a map between reflection metadata and generated method bodies.
///
- public sealed class InterfaceGenericVirtualMethodTableNode : ObjectNode, ISymbolDefinitionNode
+ public sealed class InterfaceGenericVirtualMethodTableNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
private Dictionary> _interfaceGvmSlots;
private Dictionary>> _interfaceImpls;
public InterfaceGenericVirtualMethodTableNode(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__interface_gvm_table_End", true);
_externalReferences = externalReferences;
_interfaceGvmSlots = new Dictionary>();
_interfaceImpls = new Dictionary>>();
@@ -34,7 +33,7 @@ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
sb.Append(nameMangler.CompilationUnitPrefix).Append("__interface_gvm_table");
}
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public int Offset => 0;
public override bool IsShareable => false;
public override ObjectNodeSection GetSection(NodeFactory factory) => _externalReferences.GetSection(factory);
@@ -225,9 +224,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] streamBytes = nativeFormatWriter.Save();
- _endSymbol.SetSymbolOffset(streamBytes.Length);
+ _size = streamBytes.Length;
- return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(streamBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/MetadataNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/MetadataNode.cs
index d17ecfb8126d8b..ad84d1bd81ed6a 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/MetadataNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/MetadataNode.cs
@@ -11,16 +11,11 @@ namespace ILCompiler.DependencyAnalysis
/// Represents a blob of native metadata describing assemblies, the types in them, and their members.
/// The data is used at runtime to e.g. support reflection.
///
- public sealed class MetadataNode : ObjectNode, ISymbolDefinitionNode
+ public sealed class MetadataNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
- public MetadataNode()
- {
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__embedded_metadata_End", true);
- }
-
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -42,7 +37,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
return new ObjectData(Array.Empty(), Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
byte[] blob = factory.MetadataManager.GetMetadataBlob(factory);
- _endSymbol.SetSymbolOffset(blob.Length);
+ _size = blob.Length;
return new ObjectData(
blob,
@@ -50,8 +45,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
1,
new ISymbolDefinitionNode[]
{
- this,
- _endSymbol
+ this
});
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ModuleInitializerListNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ModuleInitializerListNode.cs
index fe53861e70ca44..185274addeb0d9 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ModuleInitializerListNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ModuleInitializerListNode.cs
@@ -10,16 +10,11 @@
namespace ILCompiler.DependencyAnalysis
{
- internal sealed class ModuleInitializerListNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class ModuleInitializerListNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private readonly ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
- public ModuleInitializerListNode()
- {
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__module_initializers_End", true);
- }
-
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -137,7 +132,6 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
ObjectDataBuilder builder = new ObjectDataBuilder(factory, relocsOnly);
builder.RequireInitialAlignment(factory.Target.PointerSize);
builder.AddSymbol(this);
- builder.AddSymbol(_endSymbol);
foreach (var module in sortedModules)
{
@@ -150,7 +144,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
var result = builder.ToObjectData();
- _endSymbol.SetSymbolOffset(result.Data.Length);
+ _size = result.Data.Length;
return result;
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NativeLayoutInfoNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NativeLayoutInfoNode.cs
index e9bc60848daf05..95e73168567505 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NativeLayoutInfoNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NativeLayoutInfoNode.cs
@@ -12,9 +12,9 @@ namespace ILCompiler.DependencyAnalysis
///
/// Native layout info blob.
///
- public sealed class NativeLayoutInfoNode : ObjectNode, ISymbolDefinitionNode
+ public sealed class NativeLayoutInfoNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
private ExternalReferencesTableNode _staticsReferences;
@@ -29,7 +29,6 @@ public sealed class NativeLayoutInfoNode : ObjectNode, ISymbolDefinitionNode
public NativeLayoutInfoNode(ExternalReferencesTableNode externalReferences, ExternalReferencesTableNode staticsReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__nativelayoutinfo_End", true);
_externalReferences = externalReferences;
_staticsReferences = staticsReferences;
@@ -45,7 +44,7 @@ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
sb.Append(nameMangler.CompilationUnitPrefix).Append("__nativelayoutinfo");
}
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public int Offset => 0;
public override bool IsShareable => false;
public override ObjectNodeSection GetSection(NodeFactory factory) => _externalReferences.GetSection(factory);
@@ -87,9 +86,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
SaveNativeLayoutInfoWriter(factory);
- _endSymbol.SetSymbolOffset(_writerSavedBytes.Length);
+ _size = _writerSavedBytes.Length;
- return new ObjectData(_writerSavedBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(_writerSavedBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NodeFactory.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NodeFactory.cs
index 53b44d32b142c7..5d734957ff6e75 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NodeFactory.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NodeFactory.cs
@@ -1250,18 +1250,15 @@ public string GetSymbolAlternateName(ISymbolNode node)
}
public ArrayOfEmbeddedPointersNode GCStaticsRegion = new ArrayOfEmbeddedPointersNode(
- "__GCStaticRegionStart",
- "__GCStaticRegionEnd",
+ "__GCStaticRegion",
new SortableDependencyNode.ObjectNodeComparer(CompilerComparer.Instance));
public ArrayOfEmbeddedDataNode ThreadStaticsRegion = new ArrayOfEmbeddedDataNode(
- "__ThreadStaticRegionStart",
- "__ThreadStaticRegionEnd",
+ "__ThreadStaticRegion",
new SortableDependencyNode.EmbeddedObjectNodeComparer(CompilerComparer.Instance));
public ArrayOfEmbeddedPointersNode EagerCctorTable = new ArrayOfEmbeddedPointersNode(
- "__EagerCctorStart",
- "__EagerCctorEnd",
+ "__EagerCctor",
null);
public ArrayOfFrozenObjectsNode FrozenSegmentRegion = new ArrayOfFrozenObjectsNode();
@@ -1296,18 +1293,18 @@ public virtual void AttachToDependencyGraph(DependencyAnalyzerBase
graph.AddRoot(_inlinedThreadStatiscNode, "Inlined threadstatics are used if present");
}
- ReadyToRunHeader.Add(ReadyToRunSectionType.GCStaticRegion, GCStaticsRegion, GCStaticsRegion.StartSymbol, GCStaticsRegion.EndSymbol);
- ReadyToRunHeader.Add(ReadyToRunSectionType.ThreadStaticRegion, ThreadStaticsRegion, ThreadStaticsRegion.StartSymbol, ThreadStaticsRegion.EndSymbol);
- ReadyToRunHeader.Add(ReadyToRunSectionType.EagerCctor, EagerCctorTable, EagerCctorTable.StartSymbol, EagerCctorTable.EndSymbol);
- ReadyToRunHeader.Add(ReadyToRunSectionType.TypeManagerIndirection, TypeManagerIndirection, TypeManagerIndirection);
- ReadyToRunHeader.Add(ReadyToRunSectionType.FrozenObjectRegion, FrozenSegmentRegion, FrozenSegmentRegion, FrozenSegmentRegion.EndSymbol);
- ReadyToRunHeader.Add(ReadyToRunSectionType.ModuleInitializerList, ModuleInitializerList, ModuleInitializerList, ModuleInitializerList.EndSymbol);
+ ReadyToRunHeader.Add(ReadyToRunSectionType.GCStaticRegion, GCStaticsRegion);
+ ReadyToRunHeader.Add(ReadyToRunSectionType.ThreadStaticRegion, ThreadStaticsRegion);
+ ReadyToRunHeader.Add(ReadyToRunSectionType.EagerCctor, EagerCctorTable);
+ ReadyToRunHeader.Add(ReadyToRunSectionType.TypeManagerIndirection, TypeManagerIndirection);
+ ReadyToRunHeader.Add(ReadyToRunSectionType.FrozenObjectRegion, FrozenSegmentRegion);
+ ReadyToRunHeader.Add(ReadyToRunSectionType.ModuleInitializerList, ModuleInitializerList);
var commonFixupsTableNode = new ExternalReferencesTableNode("CommonFixupsTable", this);
InteropStubManager.AddToReadyToRunHeader(ReadyToRunHeader, this, commonFixupsTableNode);
MetadataManager.AddToReadyToRunHeader(ReadyToRunHeader, this, commonFixupsTableNode);
MetadataManager.AttachToDependencyGraph(graph);
- ReadyToRunHeader.Add(MetadataManager.BlobIdToReadyToRunSection(ReflectionMapBlob.CommonFixupsTable), commonFixupsTableNode, commonFixupsTableNode, commonFixupsTableNode.EndSymbol);
+ ReadyToRunHeader.Add(MetadataManager.BlobIdToReadyToRunSection(ReflectionMapBlob.CommonFixupsTable), commonFixupsTableNode);
}
protected struct MethodKey : IEquatable
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/PointerTypeMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/PointerTypeMapNode.cs
index 497c1f58092cb0..bf2ecfb4c71616 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/PointerTypeMapNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/PointerTypeMapNode.cs
@@ -11,18 +11,17 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a hash table of pointer types generated into the image.
///
- internal sealed class PointerTypeMapNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class PointerTypeMapNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private readonly ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private readonly ExternalReferencesTableNode _externalReferences;
public PointerTypeMapNode(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__ptr_type_map_End", true);
_externalReferences = externalReferences;
}
- public ISymbolDefinitionNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -62,9 +61,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] hashTableBytes = writer.Save();
- _endSymbol.SetSymbolOffset(hashTableBytes.Length);
+ _size = hashTableBytes.Length;
- return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReadyToRunHeaderNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReadyToRunHeaderNode.cs
index 199b5a1e342dd6..e92c6804bbef2b 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReadyToRunHeaderNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReadyToRunHeaderNode.cs
@@ -5,7 +5,8 @@
using Internal.Runtime;
using Internal.Text;
-using Internal.TypeSystem;
+
+using Debug = System.Diagnostics.Debug;
namespace ILCompiler.DependencyAnalysis
{
@@ -13,25 +14,21 @@ public class ReadyToRunHeaderNode : ObjectNode, ISymbolDefinitionNode
{
private struct HeaderItem
{
- public HeaderItem(ReadyToRunSectionType id, ObjectNode node, ISymbolNode startSymbol, ISymbolNode endSymbol)
+ public HeaderItem(ReadyToRunSectionType id, ObjectNode node)
{
Id = id;
Node = node;
- StartSymbol = startSymbol;
- EndSymbol = endSymbol;
}
public readonly ReadyToRunSectionType Id;
public readonly ObjectNode Node;
- public readonly ISymbolNode StartSymbol;
- public readonly ISymbolNode EndSymbol;
}
private List _items = new List();
- public void Add(ReadyToRunSectionType id, ObjectNode node, ISymbolNode startSymbol, ISymbolNode endSymbol = null)
+ public void Add(ReadyToRunSectionType id, T node) where T : ObjectNode, ISymbolDefinitionNode
{
- _items.Add(new HeaderItem(id, node, startSymbol, endSymbol));
+ _items.Add(new HeaderItem(id, node));
}
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
@@ -93,17 +90,17 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
builder.EmitInt((int)item.Id);
ModuleInfoFlags flags = 0;
- if (item.EndSymbol != null)
+ if (item.Node is INodeWithSize)
{
flags |= ModuleInfoFlags.HasEndPointer;
}
builder.EmitInt((int)flags);
- builder.EmitPointerReloc(item.StartSymbol);
+ builder.EmitPointerReloc((ISymbolNode)item.Node);
- if (item.EndSymbol != null)
+ if (!relocsOnly && item.Node is INodeWithSize nodeWithSize)
{
- builder.EmitPointerReloc(item.EndSymbol);
+ builder.EmitPointerReloc((ISymbolNode)item.Node, nodeWithSize.Size);
}
else
{
@@ -117,6 +114,12 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
return builder.ToObjectData();
}
- public override int ClassCode => -534800244;
+ protected internal override int Phase => (int)ObjectNodePhase.Late;
+ public override int ClassCode => 0x7db08464;
+ }
+
+ public interface INodeWithSize
+ {
+ public int Size { get; }
}
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReflectionFieldMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReflectionFieldMapNode.cs
index 3044fd4d979d07..8ea831f1efdb8f 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReflectionFieldMapNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReflectionFieldMapNode.cs
@@ -14,18 +14,17 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a map between reflection metadata and native field offsets.
///
- internal sealed class ReflectionFieldMapNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class ReflectionFieldMapNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
public ReflectionFieldMapNode(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__field_to_offset_map_End", true);
_externalReferences = externalReferences;
}
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -183,9 +182,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] hashTableBytes = writer.Save();
- _endSymbol.SetSymbolOffset(hashTableBytes.Length);
+ _size = hashTableBytes.Length;
- return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReflectionInvokeMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReflectionInvokeMapNode.cs
index 171a3f83ac227e..b46f2303c20f03 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReflectionInvokeMapNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReflectionInvokeMapNode.cs
@@ -15,24 +15,17 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a map between reflection metadata and generated method bodies.
///
- internal sealed class ReflectionInvokeMapNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class ReflectionInvokeMapNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
public ReflectionInvokeMapNode(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__method_to_entrypoint_map_End", true);
_externalReferences = externalReferences;
}
- public ISymbolNode EndSymbol
- {
- get
- {
- return _endSymbol;
- }
- }
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -240,9 +233,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] hashTableBytes = writer.Save();
- _endSymbol.SetSymbolOffset(hashTableBytes.Length);
+ _size = hashTableBytes.Length;
- return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReflectionVirtualInvokeMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReflectionVirtualInvokeMapNode.cs
index e28f18387bf954..9e62841554db2f 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReflectionVirtualInvokeMapNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReflectionVirtualInvokeMapNode.cs
@@ -17,14 +17,13 @@ namespace ILCompiler.DependencyAnalysis
/// Represents a map containing the necessary information needed to resolve
/// a virtual method target called through reflection.
///
- internal sealed class ReflectionVirtualInvokeMapNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class ReflectionVirtualInvokeMapNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
public ReflectionVirtualInvokeMapNode(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__VirtualInvokeMap_End", true);
_externalReferences = externalReferences;
}
@@ -33,7 +32,7 @@ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
sb.Append(nameMangler.CompilationUnitPrefix).Append("__VirtualInvokeMap");
}
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public int Offset => 0;
public override bool IsShareable => false;
public override ObjectNodeSection GetSection(NodeFactory factory) => _externalReferences.GetSection(factory);
@@ -207,9 +206,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] hashTableBytes = writer.Save();
- _endSymbol.SetSymbolOffset(hashTableBytes.Length);
+ _size = hashTableBytes.Length;
- return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ResourceDataNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ResourceDataNode.cs
index 903d4c21ffb9e1..6248fbd8c806c9 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ResourceDataNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ResourceDataNode.cs
@@ -18,21 +18,17 @@ namespace ILCompiler.DependencyAnalysis
/// Resources are simply copied from the inputs and concatenated into this blob.
/// All format information is provided by
///
- internal sealed class ResourceDataNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class ResourceDataNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
+ private int? _size;
+
///
/// Resource index information generated while extracting resources into the data blob
///
private List _indexData;
private int _totalLength;
- public ResourceDataNode()
- {
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__embedded_resourcedata_End", true);
- }
-
- private ObjectAndOffsetSymbolNode _endSymbol;
- public ISymbolDefinitionNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public override bool IsShareable => false;
@@ -62,8 +58,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
1,
new ISymbolDefinitionNode[]
{
- this,
- EndSymbol
+ this
});
}
@@ -141,7 +136,7 @@ private byte[] GenerateResourceBlob(NodeFactory factory)
currentPos += resourceData.Length;
}
- _endSymbol.SetSymbolOffset(resourceBlob.Length);
+ _size = resourceBlob.Length;
return resourceBlob;
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ResourceIndexNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ResourceIndexNode.cs
index 21504fd1e0e48e..6d312258a7ded0 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ResourceIndexNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ResourceIndexNode.cs
@@ -11,19 +11,18 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a hash table of resources within the resource blob in the image.
///
- internal sealed class ResourceIndexNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class ResourceIndexNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
private ResourceDataNode _resourceDataNode;
public ResourceIndexNode(ResourceDataNode resourceDataNode)
{
_resourceDataNode = resourceDataNode;
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__embedded_resourceindex_End", true);
}
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
- public ISymbolDefinitionNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public override bool IsShareable => false;
@@ -53,8 +52,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
1,
new ISymbolDefinitionNode[]
{
- this,
- EndSymbol
+ this
});
}
@@ -90,7 +88,7 @@ private byte[] GenerateIndexBlob(NodeFactory factory)
}
byte[] blob = nativeWriter.Save();
- _endSymbol.SetSymbolOffset(blob.Length);
+ _size = blob.Length;
return blob;
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StackTraceMethodMappingNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StackTraceMethodMappingNode.cs
index 9a277122333f42..2a7fb40f17c359 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StackTraceMethodMappingNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StackTraceMethodMappingNode.cs
@@ -10,15 +10,11 @@ namespace ILCompiler.DependencyAnalysis
///
/// BlobIdStackTraceMethodRvaToTokenMapping - list of 8-byte pairs (method RVA-method token)
///
- public sealed class StackTraceMethodMappingNode : ObjectNode, ISymbolDefinitionNode
+ public sealed class StackTraceMethodMappingNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- public StackTraceMethodMappingNode()
- {
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "_stacktrace_methodRVA_to_token_mapping_End", true);
- }
+ private int? _size;
- private ObjectAndOffsetSymbolNode _endSymbol;
- public ISymbolDefinitionNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public override bool IsShareable => false;
@@ -50,7 +46,6 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
ObjectDataBuilder objData = new ObjectDataBuilder(factory, relocsOnly);
objData.RequireInitialPointerAlignment();
objData.AddSymbol(this);
- objData.AddSymbol(_endSymbol);
foreach (var mappingEntry in factory.MetadataManager.GetStackTraceMapping(factory))
{
@@ -58,7 +53,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
objData.EmitInt(mappingEntry.MetadataHandle);
}
- _endSymbol.SetSymbolOffset(objData.CountBytes);
+ _size = objData.CountBytes;
return objData.ToObjectData();
}
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StaticsInfoHashtableNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StaticsInfoHashtableNode.cs
index bfa05c4dd69b0b..4a1d8d94f3e90e 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StaticsInfoHashtableNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StaticsInfoHashtableNode.cs
@@ -13,20 +13,19 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a hashtable with information about all statics regions for all compiled generic types.
///
- internal sealed class StaticsInfoHashtableNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class StaticsInfoHashtableNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
private ExternalReferencesTableNode _nativeStaticsReferences;
public StaticsInfoHashtableNode(ExternalReferencesTableNode externalReferences, ExternalReferencesTableNode nativeStaticsReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "_StaticsInfoHashtableNode_End", true);
_externalReferences = externalReferences;
_nativeStaticsReferences = nativeStaticsReferences;
}
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -108,9 +107,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] hashTableBytes = writer.Save();
- _endSymbol.SetSymbolOffset(hashTableBytes.Length);
+ _size = hashTableBytes.Length;
- return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StructMarshallingStubMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StructMarshallingStubMapNode.cs
index c2f5ddf791b9e8..ed0c278aa11504 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StructMarshallingStubMapNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StructMarshallingStubMapNode.cs
@@ -14,20 +14,19 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a hash table of struct marshalling stub types generated into the image.
///
- internal sealed class StructMarshallingStubMapNode : ObjectNode, ISymbolDefinitionNode
+ internal sealed class StructMarshallingStubMapNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private readonly ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private readonly ExternalReferencesTableNode _externalReferences;
private readonly InteropStateManager _interopStateManager;
public StructMarshallingStubMapNode(ExternalReferencesTableNode externalReferences, InteropStateManager interopStateManager)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__struct_marshalling_stub_map_End", true);
_externalReferences = externalReferences;
_interopStateManager = interopStateManager;
}
- public ISymbolDefinitionNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -115,9 +114,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] hashTableBytes = writer.Save();
- _endSymbol.SetSymbolOffset(hashTableBytes.Length);
+ _size = hashTableBytes.Length;
- return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeMetadataMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeMetadataMapNode.cs
index 2c638a08bbdfe2..a23f5e4540dfaf 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeMetadataMapNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeMetadataMapNode.cs
@@ -11,18 +11,17 @@ namespace ILCompiler.DependencyAnalysis
///
/// Represents a map between EETypes and metadata records within the .
///
- public sealed class TypeMetadataMapNode : ObjectNode, ISymbolDefinitionNode
+ public sealed class TypeMetadataMapNode : ObjectNode, ISymbolDefinitionNode, INodeWithSize
{
- private ObjectAndOffsetSymbolNode _endSymbol;
+ private int? _size;
private ExternalReferencesTableNode _externalReferences;
public TypeMetadataMapNode(ExternalReferencesTableNode externalReferences)
{
- _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__type_to_metadata_map_End", true);
_externalReferences = externalReferences;
}
- public ISymbolNode EndSymbol => _endSymbol;
+ int INodeWithSize.Size => _size.Value;
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
@@ -70,9 +69,9 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
byte[] hashTableBytes = writer.Save();
- _endSymbol.SetSymbolOffset(hashTableBytes.Length);
+ _size = hashTableBytes.Length;
- return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this, _endSymbol });
+ return new ObjectData(hashTableBytes, Array.Empty(), 1, new ISymbolDefinitionNode[] { this });
}
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/FeatureSwitchManager.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/FeatureSwitchManager.cs
index 7d406ce0be2963..a1dfaeca37930c 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/FeatureSwitchManager.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/FeatureSwitchManager.cs
@@ -28,7 +28,13 @@ public class FeatureSwitchManager : ILProvider
public FeatureSwitchManager(ILProvider nestedILProvider, Logger logger, IEnumerable> switchValues)
{
_nestedILProvider = nestedILProvider;
- _hashtable = new FeatureSwitchHashtable(logger, new Dictionary(switchValues));
+
+ // Last setting wins
+ var dictionary = new Dictionary();
+ foreach ((string name, bool value) in switchValues)
+ dictionary[name] = value;
+
+ _hashtable = new FeatureSwitchHashtable(logger, dictionary);
}
private BodySubstitution GetSubstitution(MethodDesc method)
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/HardwareIntrinsicHelpers.Aot.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/HardwareIntrinsicHelpers.Aot.cs
index 1411ca7b6c7941..cd7a616c0698b3 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/HardwareIntrinsicHelpers.Aot.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/HardwareIntrinsicHelpers.Aot.cs
@@ -111,6 +111,10 @@ private static class XArchIntrinsicConstants
public const int Avx512dq_vl = 0x400000;
public const int Avx512Vbmi = 0x800000;
public const int Avx512Vbmi_vl = 0x1000000;
+ public const int Serialize = 0x2000000;
+ public const int VectorT128 = 0x4000000;
+ public const int VectorT256 = 0x8000000;
+ public const int VectorT512 = 0x10000000;
public static int FromInstructionSet(InstructionSet instructionSet)
{
@@ -120,6 +124,7 @@ public static int FromInstructionSet(InstructionSet instructionSet)
return instructionSet switch
{
+ // Optional ISAs - only available via opt-in or opportunistic light-up
InstructionSet.X64_AES => Aes,
InstructionSet.X64_AES_X64 => Aes,
InstructionSet.X64_PCLMULQDQ => Pclmulqdq,
@@ -170,8 +175,10 @@ public static int FromInstructionSet(InstructionSet instructionSet)
InstructionSet.X64_AVX512VBMI_X64 => Avx512Vbmi,
InstructionSet.X64_AVX512VBMI_VL => Avx512Vbmi_vl,
InstructionSet.X64_AVX512VBMI_VL_X64 => Avx512Vbmi_vl,
+ InstructionSet.X64_X86Serialize => Serialize,
+ InstructionSet.X64_X86Serialize_X64 => Serialize,
- // SSE and SSE2 are baseline ISAs - they're always available
+ // Baseline ISAs - they're always available
InstructionSet.X64_SSE => 0,
InstructionSet.X64_SSE_X64 => 0,
InstructionSet.X64_SSE2 => 0,
@@ -180,6 +187,11 @@ public static int FromInstructionSet(InstructionSet instructionSet)
InstructionSet.X64_X86Base => 0,
InstructionSet.X64_X86Base_X64 => 0,
+ // Vector Sizes
+ InstructionSet.X64_VectorT128 => VectorT128,
+ InstructionSet.X64_VectorT256 => VectorT256,
+ InstructionSet.X64_VectorT512 => VectorT512,
+
_ => throw new NotSupportedException(((InstructionSet_X64)instructionSet).ToString())
};
}
@@ -196,13 +208,20 @@ private static class Arm64IntrinsicConstants
public const int Sha256 = 0x0040;
public const int Atomics = 0x0080;
public const int Rcpc = 0x0100;
+ public const int VectorT128 = 0x0200;
public static int FromInstructionSet(InstructionSet instructionSet)
{
return instructionSet switch
{
+
+ // Baseline ISAs - they're always available
+ InstructionSet.ARM64_ArmBase => 0,
+ InstructionSet.ARM64_ArmBase_Arm64 => 0,
InstructionSet.ARM64_AdvSimd => AdvSimd,
InstructionSet.ARM64_AdvSimd_Arm64 => AdvSimd,
+
+ // Optional ISAs - only available via opt-in or opportunistic light-up
InstructionSet.ARM64_Aes => Aes,
InstructionSet.ARM64_Aes_Arm64 => Aes,
InstructionSet.ARM64_Crc32 => Crc32,
@@ -218,8 +237,8 @@ public static int FromInstructionSet(InstructionSet instructionSet)
InstructionSet.ARM64_Atomics => Atomics,
InstructionSet.ARM64_Rcpc => Rcpc,
- InstructionSet.ARM64_ArmBase => 0,
- InstructionSet.ARM64_ArmBase_Arm64 => 0,
+ // Vector Sizes
+ InstructionSet.ARM64_VectorT128 => VectorT128,
_ => throw new NotSupportedException(((InstructionSet_ARM64)instructionSet).ToString())
};
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MetadataManager.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MetadataManager.cs
index 10d7ae4edf0335..26dc3ff32e73cc 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MetadataManager.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MetadataManager.cs
@@ -122,83 +122,83 @@ internal static ReadyToRunSectionType BlobIdToReadyToRunSection(ReflectionMapBlo
public virtual void AddToReadyToRunHeader(ReadyToRunHeaderNode header, NodeFactory nodeFactory, ExternalReferencesTableNode commonFixupsTableNode)
{
var metadataNode = new MetadataNode();
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.EmbeddedMetadata), metadataNode, metadataNode, metadataNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.EmbeddedMetadata), metadataNode);
var nativeReferencesTableNode = new ExternalReferencesTableNode("NativeReferences", nodeFactory);
var nativeStaticsTableNode = new ExternalReferencesTableNode("NativeStatics", nodeFactory);
var resourceDataNode = new ResourceDataNode();
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.BlobIdResourceData), resourceDataNode, resourceDataNode, resourceDataNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.BlobIdResourceData), resourceDataNode);
var resourceIndexNode = new ResourceIndexNode(resourceDataNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.BlobIdResourceIndex), resourceIndexNode, resourceIndexNode, resourceIndexNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.BlobIdResourceIndex), resourceIndexNode);
var typeMapNode = new TypeMetadataMapNode(commonFixupsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.TypeMap), typeMapNode, typeMapNode, typeMapNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.TypeMap), typeMapNode);
var cctorContextMapNode = new ClassConstructorContextMap(commonFixupsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.CCtorContextMap), cctorContextMapNode, cctorContextMapNode, cctorContextMapNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.CCtorContextMap), cctorContextMapNode);
var invokeMapNode = new ReflectionInvokeMapNode(commonFixupsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.InvokeMap), invokeMapNode, invokeMapNode, invokeMapNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.InvokeMap), invokeMapNode);
var arrayMapNode = new ArrayMapNode(commonFixupsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.ArrayMap), arrayMapNode, arrayMapNode, arrayMapNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.ArrayMap), arrayMapNode);
var byRefMapNode = new ByRefTypeMapNode(commonFixupsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.ByRefTypeMap), byRefMapNode, byRefMapNode, byRefMapNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.ByRefTypeMap), byRefMapNode);
var pointerMapNode = new PointerTypeMapNode(commonFixupsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.PointerTypeMap), pointerMapNode, pointerMapNode, pointerMapNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.PointerTypeMap), pointerMapNode);
var functionPointerMapNode = new FunctionPointerMapNode(commonFixupsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.FunctionPointerTypeMap), functionPointerMapNode, functionPointerMapNode, functionPointerMapNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.FunctionPointerTypeMap), functionPointerMapNode);
var fieldMapNode = new ReflectionFieldMapNode(commonFixupsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.FieldAccessMap), fieldMapNode, fieldMapNode, fieldMapNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.FieldAccessMap), fieldMapNode);
NativeLayoutInfo = new NativeLayoutInfoNode(nativeReferencesTableNode, nativeStaticsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.NativeLayoutInfo), NativeLayoutInfo, NativeLayoutInfo, NativeLayoutInfo.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.NativeLayoutInfo), NativeLayoutInfo);
var exactMethodInstantiations = new ExactMethodInstantiationsNode(nativeReferencesTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.ExactMethodInstantiationsHashtable), exactMethodInstantiations, exactMethodInstantiations, exactMethodInstantiations.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.ExactMethodInstantiationsHashtable), exactMethodInstantiations);
var genericsTypesHashtableNode = new GenericTypesHashtableNode(nativeReferencesTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.GenericsHashtable), genericsTypesHashtableNode, genericsTypesHashtableNode, genericsTypesHashtableNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.GenericsHashtable), genericsTypesHashtableNode);
var genericMethodsHashtableNode = new GenericMethodsHashtableNode(nativeReferencesTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.GenericMethodsHashtable), genericMethodsHashtableNode, genericMethodsHashtableNode, genericMethodsHashtableNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.GenericMethodsHashtable), genericMethodsHashtableNode);
var genericVirtualMethodTableNode = new GenericVirtualMethodTableNode(commonFixupsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.GenericVirtualMethodTable), genericVirtualMethodTableNode, genericVirtualMethodTableNode, genericVirtualMethodTableNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.GenericVirtualMethodTable), genericVirtualMethodTableNode);
var interfaceGenericVirtualMethodTableNode = new InterfaceGenericVirtualMethodTableNode(commonFixupsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.InterfaceGenericVirtualMethodTable), interfaceGenericVirtualMethodTableNode, interfaceGenericVirtualMethodTableNode, interfaceGenericVirtualMethodTableNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.InterfaceGenericVirtualMethodTable), interfaceGenericVirtualMethodTableNode);
var genericMethodsTemplatesMapNode = new GenericMethodsTemplateMap(commonFixupsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.GenericMethodsTemplateMap), genericMethodsTemplatesMapNode, genericMethodsTemplatesMapNode, genericMethodsTemplatesMapNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.GenericMethodsTemplateMap), genericMethodsTemplatesMapNode);
var genericTypesTemplatesMapNode = new GenericTypesTemplateMap(commonFixupsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.TypeTemplateMap), genericTypesTemplatesMapNode, genericTypesTemplatesMapNode, genericTypesTemplatesMapNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.TypeTemplateMap), genericTypesTemplatesMapNode);
var staticsInfoHashtableNode = new StaticsInfoHashtableNode(nativeReferencesTableNode, nativeStaticsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.StaticsInfoHashtable), staticsInfoHashtableNode, staticsInfoHashtableNode, staticsInfoHashtableNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.StaticsInfoHashtable), staticsInfoHashtableNode);
var virtualInvokeMapNode = new ReflectionVirtualInvokeMapNode(commonFixupsTableNode);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.VirtualInvokeMap), virtualInvokeMapNode, virtualInvokeMapNode, virtualInvokeMapNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.VirtualInvokeMap), virtualInvokeMapNode);
var stackTraceMethodMappingNode = new StackTraceMethodMappingNode();
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.BlobIdStackTraceMethodRvaToTokenMapping), stackTraceMethodMappingNode, stackTraceMethodMappingNode, stackTraceMethodMappingNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.BlobIdStackTraceMethodRvaToTokenMapping), stackTraceMethodMappingNode);
// The external references tables should go last
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.NativeReferences), nativeReferencesTableNode, nativeReferencesTableNode, nativeReferencesTableNode.EndSymbol);
- header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.NativeStatics), nativeStaticsTableNode, nativeStaticsTableNode, nativeStaticsTableNode.EndSymbol);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.NativeReferences), nativeReferencesTableNode);
+ header.Add(BlobIdToReadyToRunSection(ReflectionMapBlob.NativeStatics), nativeStaticsTableNode);
if (IsDataDehydrated)
{
var dehydratedDataNode = new DehydratedDataNode();
- header.Add(ReadyToRunSectionType.DehydratedData, dehydratedDataNode, dehydratedDataNode, dehydratedDataNode.EndSymbol);
+ header.Add(ReadyToRunSectionType.DehydratedData, dehydratedDataNode);
}
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RuntimeConfigurationRootProvider.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RuntimeConfigurationRootProvider.cs
index 122067c0587103..de64f9eb277ce2 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RuntimeConfigurationRootProvider.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RuntimeConfigurationRootProvider.cs
@@ -2,6 +2,11 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
+using System.Text;
+
+using ILCompiler.DependencyAnalysis;
+
+using Internal.Text;
namespace ILCompiler
{
@@ -11,47 +16,115 @@ namespace ILCompiler
///
public class RuntimeConfigurationRootProvider : ICompilationRootProvider
{
- private readonly IEnumerable _runtimeOptions;
+ private readonly string _blobName;
+ private readonly IReadOnlyCollection _runtimeOptions;
- public RuntimeConfigurationRootProvider(IEnumerable runtimeOptions)
+ public RuntimeConfigurationRootProvider(string blobName, IReadOnlyCollection runtimeOptions)
{
+ _blobName = blobName;
_runtimeOptions = runtimeOptions;
}
void ICompilationRootProvider.AddCompilationRoots(IRootingServiceProvider rootProvider)
{
- rootProvider.RootReadOnlyDataBlob(GetRuntimeOptionsBlob(), 4, "Runtime configuration information", "g_compilerEmbeddedSettingsBlob");
+ rootProvider.AddCompilationRoot(new RuntimeConfigurationBlobNode(_blobName, _runtimeOptions), "Runtime configuration");
}
- protected byte[] GetRuntimeOptionsBlob()
+ private sealed class RuntimeConfigurationBlobNode : ObjectNode, ISymbolDefinitionNode
{
- const int HeaderSize = 4;
+ private readonly string _blobName;
+ private readonly IReadOnlyCollection _runtimeOptions;
+
+ public RuntimeConfigurationBlobNode(string blobName, IReadOnlyCollection runtimeOptions)
+ {
+ _blobName = blobName;
+ _runtimeOptions = runtimeOptions;
+ }
- ArrayBuilder options = default(ArrayBuilder);
+ public int Offset => 0;
- // Reserve space for the header
- options.ZeroExtend(HeaderSize);
+ public override bool IsShareable => false;
- foreach (string option in _runtimeOptions)
- {
- byte[] optionBytes = System.Text.Encoding.ASCII.GetBytes(option);
- options.Append(optionBytes);
+ public override int ClassCode => 7864454;
- // Emit a null to separate the next option
- options.Add(0);
+ public override bool StaticDependenciesAreComputed => true;
+
+ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
+ {
+ sb.Append(_blobName);
}
- byte[] result = options.ToArray();
+ public override ObjectNodeSection GetSection(NodeFactory factory) =>
+ factory.Target.IsWindows ? ObjectNodeSection.ReadOnlyDataSection : ObjectNodeSection.DataSection;
+
+ protected override string GetName(NodeFactory factory) => this.GetMangledName(factory.NameMangler);
+
+ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
+ {
+ var builder = new ObjectDataBuilder(factory.TypeSystemContext.Target, relocsOnly);
+ builder.AddSymbol(this);
- int length = options.Count - HeaderSize;
+ var settings = new Dictionary();
- // Encode the size of the blob into the header
- result[0] = (byte)length;
- result[1] = (byte)(length >> 8);
- result[2] = (byte)(length >> 0x10);
- result[3] = (byte)(length >> 0x18);
+ // Put values in a dictionary - we expect many "true" strings, for example.
+ var valueDict = new Dictionary();
+ int valueIndex = 0;
+ foreach (string line in _runtimeOptions)
+ {
+ int indexOfEquals = line.IndexOf("=");
+ if (indexOfEquals > 0)
+ {
+ string key = line.Substring(0, indexOfEquals);
+ string value = line.Substring(indexOfEquals + 1);
- return result;
+ if (!valueDict.TryGetValue(value, out ISymbolNode valueNode))
+ {
+ valueNode = factory.ReadOnlyDataBlob(
+ new Utf8String(_blobName + "_value_" + valueIndex++),
+ Utf8NullTerminatedBytes(value),
+ alignment: 1);
+ valueDict.Add(value, valueNode);
+ }
+
+ settings[key] = valueNode;
+ }
+ }
+
+ // The format is:
+ // * Number of entries (T)
+ // * N times pointer to key
+ // * N times pointer to value
+ builder.EmitNaturalInt(settings.Count);
+
+ int i = 0;
+ foreach (string key in settings.Keys)
+ {
+ ISymbolNode node = factory.ReadOnlyDataBlob(
+ new Utf8String(_blobName + "_key_" + i++),
+ Utf8NullTerminatedBytes(key),
+ alignment: 1);
+ builder.EmitPointerReloc(node);
+ }
+
+ foreach (ISymbolNode value in settings.Values)
+ {
+ builder.EmitPointerReloc(value);
+ }
+
+ static byte[] Utf8NullTerminatedBytes(string s)
+ {
+ byte[] result = new byte[Encoding.UTF8.GetByteCount(s) + 1];
+ Encoding.UTF8.GetBytes(s, result);
+ return result;
+ }
+
+ return builder.ToObjectData();
+ }
+
+ public override int CompareToImpl(ISortableNode other, CompilerComparer comparer)
+ {
+ return _blobName.CompareTo(((RuntimeConfigurationBlobNode)other)._blobName);
+ }
}
}
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RuntimeKnobsRootProvider.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RuntimeKnobsRootProvider.cs
deleted file mode 100644
index db1d0236a1556e..00000000000000
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RuntimeKnobsRootProvider.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Collections.Generic;
-
-namespace ILCompiler
-{
- ///
- /// A root provider that provides a runtime configuration blob that influences runtime behaviors.
- /// See RhConfigValues.h for allowed values.
- ///
- public class RuntimeKnobsRootProvider : ICompilationRootProvider
- {
- private readonly IEnumerable _runtimeKnobs;
-
- public RuntimeKnobsRootProvider(IEnumerable runtimeKnobs)
- {
- _runtimeKnobs = runtimeKnobs;
- }
-
- void ICompilationRootProvider.AddCompilationRoots(IRootingServiceProvider rootProvider)
- {
- rootProvider.RootReadOnlyDataBlob(GetRuntimeKnobsBlob(), 4, "Runtime configuration knobs", "g_compilerEmbeddedKnobsBlob");
- }
-
- protected byte[] GetRuntimeKnobsBlob()
- {
- const int HeaderSize = 4;
-
- ArrayBuilder options = default(ArrayBuilder);
-
- // Reserve space for the header
- options.ZeroExtend(HeaderSize);
-
- foreach (string option in _runtimeKnobs)
- {
- byte[] optionBytes = System.Text.Encoding.UTF8.GetBytes(option);
- options.Append(optionBytes);
-
- // Emit a null to separate the next option
- options.Add(0);
- }
-
- byte[] result = options.ToArray();
-
- int length = options.Count - HeaderSize;
-
- // Encode the size of the blob into the header
- result[0] = (byte)length;
- result[1] = (byte)(length >> 8);
- result[2] = (byte)(length >> 0x10);
- result[3] = (byte)(length >> 0x18);
-
- return result;
- }
- }
-}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/VectorOfTFieldLayoutAlgorithm.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/VectorOfTFieldLayoutAlgorithm.cs
index 1a1eef14d55820..cfa4dc2524815b 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/VectorOfTFieldLayoutAlgorithm.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/VectorOfTFieldLayoutAlgorithm.cs
@@ -25,6 +25,7 @@ public override ComputedInstanceFieldLayout ComputeInstanceLayout(DefType defTyp
TargetDetails targetDetails = defType.Context.Target;
ComputedInstanceFieldLayout layoutFromMetadata = _fallbackAlgorithm.ComputeInstanceLayout(defType, layoutKind);
+ layoutFromMetadata.IsVectorTOrHasVectorTFields = true;
LayoutInt instanceFieldSize;
@@ -53,6 +54,7 @@ public override ComputedInstanceFieldLayout ComputeInstanceLayout(DefType defTyp
FieldAlignment = layoutFromMetadata.FieldAlignment,
FieldSize = instanceFieldSize,
Offsets = layoutFromMetadata.Offsets,
+ IsVectorTOrHasVectorTFields = true,
};
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs
index bda68c3c44d141..8ea05d0f37b189 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs
@@ -929,12 +929,32 @@ private void ImportLdToken(int token)
nextBasicBlock = _basicBlocks[_currentOffset + 5];
if (nextBasicBlock == null)
{
+ // We expect pattern:
+ //
+ // ldtoken Foo
+ // call GetTypeFromHandle
+ // ldtoken Bar
+ // call GetTypeFromHandle
+ // call Equals
+ //
+ // We check for both ldtoken cases
if ((ILOpcode)_ilBytes[_currentOffset + 5] == ILOpcode.call)
{
methodToken = ReadILTokenAt(_currentOffset + 6);
method = (MethodDesc)_methodIL.GetObject(methodToken);
isTypeEquals = IsTypeEquals(method);
}
+ else if ((ILOpcode)_ilBytes[_currentOffset + 5] == ILOpcode.ldtoken
+ && _basicBlocks[_currentOffset + 10] == null
+ && (ILOpcode)_ilBytes[_currentOffset + 10] == ILOpcode.call
+ && methodToken == ReadILTokenAt(_currentOffset + 11)
+ && _basicBlocks[_currentOffset + 15] == null
+ && (ILOpcode)_ilBytes[_currentOffset + 15] == ILOpcode.call)
+ {
+ methodToken = ReadILTokenAt(_currentOffset + 16);
+ method = (MethodDesc)_methodIL.GetObject(methodToken);
+ isTypeEquals = IsTypeEquals(method);
+ }
}
}
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/IL/Stubs/StartupCode/AppContextInitializerMethod.Sorting.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/IL/Stubs/StartupCode/AppContextInitializerMethod.Sorting.cs
deleted file mode 100644
index 27d6287aef7e73..00000000000000
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/IL/Stubs/StartupCode/AppContextInitializerMethod.Sorting.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using Internal.TypeSystem;
-
-using Debug = System.Diagnostics.Debug;
-
-namespace Internal.IL.Stubs.StartupCode
-{
- public partial class AppContextInitializerMethod
- {
- protected override int ClassCode => 15749517;
-
- protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
- {
- // Should be a singleton
- Debug.Assert(this == other);
- return 0;
- }
- }
-}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/IL/Stubs/StartupCode/AppContextInitializerMethod.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/IL/Stubs/StartupCode/AppContextInitializerMethod.cs
deleted file mode 100644
index 92d9eccdaee950..00000000000000
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/IL/Stubs/StartupCode/AppContextInitializerMethod.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Collections.Generic;
-
-using Internal.TypeSystem;
-
-namespace Internal.IL.Stubs.StartupCode
-{
- public sealed partial class AppContextInitializerMethod : ILStubMethod
- {
- private TypeDesc _owningType;
- private MethodSignature _signature;
- private IReadOnlyCollection> _switches;
-
- public AppContextInitializerMethod(TypeDesc owningType, IEnumerable args)
- {
- _owningType = owningType;
- var switches = new List>();
-
- foreach (string s in args)
- {
- int index = s.IndexOf('=');
- if (index <= 0)
- throw new ArgumentException($"String '{s}' in unexpected format. Expected 'Key=Value'");
- switches.Add(KeyValuePair.Create(s.Substring(0, index), s.Substring(index + 1)));
- }
-
- _switches = switches;
- }
-
- public override TypeSystemContext Context
- {
- get
- {
- return _owningType.Context;
- }
- }
-
- public override TypeDesc OwningType
- {
- get
- {
- return _owningType;
- }
- }
-
- public override string Name
- {
- get
- {
- return "SetAppContextSwitches";
- }
- }
-
- public override string DiagnosticName
- {
- get
- {
- return "SetAppContextSwitches";
- }
- }
-
- public override MethodIL EmitIL()
- {
- ILEmitter emitter = new ILEmitter();
- ILCodeStream codeStream = emitter.NewCodeStream();
-
- MetadataType appContextType = Context.SystemModule.GetKnownType("System", "AppContext");
- MethodDesc setDataMethod = appContextType.GetKnownMethod("SetData", null);
- ILToken setDataToken = emitter.NewToken(setDataMethod);
-
- foreach (KeyValuePair keyValue in _switches)
- {
- codeStream.Emit(ILOpcode.ldstr, emitter.NewToken(keyValue.Key));
- codeStream.Emit(ILOpcode.ldstr, emitter.NewToken(keyValue.Value));
- codeStream.Emit(ILOpcode.call, setDataToken);
- }
-
- codeStream.Emit(ILOpcode.ret);
-
- return emitter.Link(this);
- }
-
- public override MethodSignature Signature
- {
- get
- {
- _signature ??= new MethodSignature(MethodSignatureFlags.Static, 0,
- Context.GetWellKnownType(WellKnownType.Void),
- TypeDesc.EmptyTypes);
-
- return _signature;
- }
- }
- }
-}
diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj b/src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj
index 724df1c41ccfcc..e0bce1b1eb82c7 100644
--- a/src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj
+++ b/src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj
@@ -284,7 +284,6 @@
-
@@ -579,7 +578,6 @@
-
@@ -624,8 +622,6 @@
-
-
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs
index 36c558a19f5983..801bd7dbe2ccbd 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs
@@ -10,24 +10,19 @@
namespace ILCompiler.DependencyAnalysis
{
- public interface IHasStartSymbol
- {
- ObjectAndOffsetSymbolNode StartSymbol { get; }
- }
-
///
/// Represents an array of nodes. The contents of this node will be emitted
/// by placing a starting symbol, followed by contents of nodes (optionally
/// sorted using provided comparer), followed by ending symbol.
///
- public class ArrayOfEmbeddedDataNode : EmbeddedDataContainerNode, IHasStartSymbol
+ public class ArrayOfEmbeddedDataNode : EmbeddedDataContainerNode
where TEmbedded : EmbeddedObjectNode
{
private HashSet _nestedNodes = new HashSet();
private List _nestedNodesList = new List();
private IComparer _sorter;
- public ArrayOfEmbeddedDataNode(string startSymbolMangledName, string endSymbolMangledName, IComparer nodeSorter) : base(startSymbolMangledName, endSymbolMangledName)
+ public ArrayOfEmbeddedDataNode(string mangledName, IComparer nodeSorter) : base(mangledName)
{
_sorter = nodeSorter;
}
@@ -40,11 +35,10 @@ public void AddEmbeddedObject(TEmbedded symbol)
{
_nestedNodesList.Add(symbol);
}
- symbol.ContainingNode = this;
}
}
- protected override string GetName(NodeFactory factory) => $"Region {StartSymbol.GetMangledName(factory.NameMangler)}";
+ protected override string GetName(NodeFactory factory) => $"Region {this.GetMangledName(factory.NameMangler)}";
public override ObjectNodeSection GetSection(NodeFactory factory) => ObjectNodeSection.DataSection;
public override bool IsShareable => false;
@@ -89,13 +83,10 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly)
if (_sorter != null)
_nestedNodesList.MergeSort(_sorter);
- builder.AddSymbol(StartSymbol);
+ builder.AddSymbol(this);
GetElementDataForNodes(ref builder, factory, relocsOnly);
- EndSymbol.SetSymbolOffset(builder.CountBytes);
- builder.AddSymbol(EndSymbol);
-
ObjectData objData = builder.ToObjectData();
return objData;
}
@@ -105,15 +96,6 @@ public override bool ShouldSkipEmittingObjectNode(NodeFactory factory)
return _nestedNodesList.Count == 0;
}
- protected override DependencyList ComputeNonRelocationBasedDependencies(NodeFactory factory)
- {
- DependencyList dependencies = new DependencyList();
- dependencies.Add(StartSymbol, "StartSymbol");
- dependencies.Add(EndSymbol, "EndSymbol");
-
- return dependencies;
- }
-
protected internal override int Phase => (int)ObjectNodePhase.Ordered;
public override int ClassCode => (int)ObjectNodeOrder.ArrayOfEmbeddedDataNode;
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedPointersNode.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedPointersNode.cs
index 8fba1bae53a39c..aae7ccddd7e5fd 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedPointersNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ArrayOfEmbeddedPointersNode.cs
@@ -30,13 +30,12 @@ public sealed class ArrayOfEmbeddedPointersNode : ArrayOfEmbeddedDataNo
///
public delegate void OnMarkedDelegate(EmbeddedPointerIndirectionNode embeddedObject);
- public ArrayOfEmbeddedPointersNode(string startSymbolMangledName, string endSymbolMangledName, IComparer> nodeSorter)
+ public ArrayOfEmbeddedPointersNode(string mangledName, IComparer> nodeSorter)
: base(
- startSymbolMangledName,
- endSymbolMangledName,
+ mangledName,
nodeSorter)
{
- _startSymbolMangledName = startSymbolMangledName;
+ _startSymbolMangledName = mangledName;
}
public EmbeddedObjectNode NewNode(TTarget target)
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs
index 511f91cbb56f22..33b7594383c49a 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs
@@ -16,8 +16,6 @@ public abstract class EmbeddedObjectNode : SortableDependencyNode
private int _offset;
private int _index;
- public IHasStartSymbol ContainingNode { get; set; }
-
public EmbeddedObjectNode()
{
_offset = InvalidOffset;
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionNode.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionNode.cs
index b0020b0ec001c7..45dc3fb4e240ab 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionNode.cs
@@ -12,7 +12,7 @@ public class ImportSectionNode : EmbeddedObjectNode
{
private class ImportTable : ArrayOfEmbeddedDataNode
{
- public ImportTable(string startSymbol, string endSymbol) : base(startSymbol, endSymbol, nodeSorter: new EmbeddedObjectNodeComparer(CompilerComparer.Instance)) {}
+ public ImportTable(string symbol) : base(symbol, nodeSorter: new EmbeddedObjectNodeComparer(CompilerComparer.Instance)) {}
public override bool ShouldSkipEmittingObjectNode(NodeFactory factory) => false;
@@ -44,8 +44,8 @@ public ImportSectionNode(string name, ReadyToRunImportSectionType importType, Re
_emitPrecode = emitPrecode;
_emitGCRefMap = emitGCRefMap;
- _imports = new ImportTable(_name + "_ImportBegin", _name + "_ImportEnd");
- _signatures = new ArrayOfEmbeddedPointersNode(_name + "_SigBegin", _name + "_SigEnd", new EmbeddedObjectNodeComparer(CompilerComparer.Instance));
+ _imports = new ImportTable(_name + "_ImportBegin");
+ _signatures = new ArrayOfEmbeddedPointersNode(_name + "_SigBegin", new EmbeddedObjectNodeComparer(CompilerComparer.Instance));
_signatureList = new List();
_gcRefMap = _emitGCRefMap ? new GCRefMapNode(this) : null;
}
@@ -101,7 +101,7 @@ public override void EncodeData(ref ObjectDataBuilder dataBuilder, NodeFactory f
{
if (!_imports.ShouldSkipEmittingObjectNode(factory))
{
- dataBuilder.EmitReloc(_imports.StartSymbol, RelocType.IMAGE_REL_BASED_ADDR32NB, 0);
+ dataBuilder.EmitReloc(_imports, RelocType.IMAGE_REL_BASED_ADDR32NB, 0);
}
else
{
@@ -110,7 +110,7 @@ public override void EncodeData(ref ObjectDataBuilder dataBuilder, NodeFactory f
if (!relocsOnly)
{
- dataBuilder.EmitReloc(_imports.StartSymbol, RelocType.IMAGE_REL_SYMBOL_SIZE);
+ dataBuilder.EmitReloc(_imports, RelocType.IMAGE_REL_SYMBOL_SIZE);
dataBuilder.EmitShort((short)_flags);
dataBuilder.EmitByte((byte)_type);
dataBuilder.EmitByte(_entrySize);
@@ -118,7 +118,7 @@ public override void EncodeData(ref ObjectDataBuilder dataBuilder, NodeFactory f
if (!_signatures.ShouldSkipEmittingObjectNode(factory))
{
- dataBuilder.EmitReloc(_signatures.StartSymbol, RelocType.IMAGE_REL_BASED_ADDR32NB, 0);
+ dataBuilder.EmitReloc(_signatures, RelocType.IMAGE_REL_BASED_ADDR32NB, 0);
}
else
{
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionsTableNode.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionsTableNode.cs
index 61b5e394030dce..9163ac18784d5b 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionsTableNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportSectionsTableNode.cs
@@ -12,7 +12,7 @@ public class ImportSectionsTableNode : ArrayOfEmbeddedDataNode EncodeDataCore(NodeFactory factory)
yield return new GCInfoComponent(_methodNode, 0);
yield return new GCInfoComponent(_methodNode, _methodNode.Size);
// TODO: Is this correct?
- yield return new GCInfoComponent(factory.RuntimeFunctionsGCInfo.StartSymbol, this.OffsetFromBeginningOfArray);
+ yield return new GCInfoComponent(factory.RuntimeFunctionsGCInfo, this.OffsetFromBeginningOfArray);
}
else
{
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsGCInfoNode.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsGCInfoNode.cs
index 8d69be7c2d0d34..d65a01c827a303 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsGCInfoNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsGCInfoNode.cs
@@ -8,7 +8,7 @@ namespace ILCompiler.DependencyAnalysis.ReadyToRun
public class RuntimeFunctionsGCInfoNode : ArrayOfEmbeddedDataNode
{
public RuntimeFunctionsGCInfoNode()
- : base("RuntimeFunctionsGCInfo_Begin", "RuntimeFunctionsGCInfo_End", new EmbeddedObjectNodeComparer(CompilerComparer.Instance))
+ : base("RuntimeFunctionsGCInfo", new EmbeddedObjectNodeComparer(CompilerComparer.Instance))
{
}
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsTableNode.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsTableNode.cs
index 941f671c4d9a2b..d25829f7acdaa8 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsTableNode.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/RuntimeFunctionsTableNode.cs
@@ -126,7 +126,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
Debug.Assert(frameInfo.StartOffset != frameInfo.EndOffset);
runtimeFunctionsBuilder.EmitReloc(symbol, RelocType.IMAGE_REL_BASED_ADDR32NB, delta: frameInfo.EndOffset);
}
- runtimeFunctionsBuilder.EmitReloc(factory.RuntimeFunctionsGCInfo.StartSymbol, RelocType.IMAGE_REL_BASED_ADDR32NB, funcletOffsets[frameIndex]);
+ runtimeFunctionsBuilder.EmitReloc(factory.RuntimeFunctionsGCInfo, RelocType.IMAGE_REL_BASED_ADDR32NB, funcletOffsets[frameIndex]);
runtimeFunctionIndex++;
}
}
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypeFixupSignature.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypeFixupSignature.cs
index a0b9e801f2495d..e379651ff5e2cb 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypeFixupSignature.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypeFixupSignature.cs
@@ -36,14 +36,20 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
if (!relocsOnly)
{
+ ReadyToRunFixupKind fixupKind = _fixupKind;
dataBuilder.AddSymbol(this);
+ if ((fixupKind == ReadyToRunFixupKind.Verify_TypeLayout) && ((MetadataType)_typeDesc).IsVectorTOrHasVectorTFields)
+ {
+ fixupKind = ReadyToRunFixupKind.Check_TypeLayout;
+ }
+
IEcmaModule targetModule = factory.SignatureContext.GetTargetModule(_typeDesc);
- SignatureContext innerContext = dataBuilder.EmitFixup(factory, _fixupKind, targetModule, factory.SignatureContext);
+ SignatureContext innerContext = dataBuilder.EmitFixup(factory, fixupKind, targetModule, factory.SignatureContext);
dataBuilder.EmitTypeSignature(_typeDesc, innerContext);
- if ((_fixupKind == ReadyToRunFixupKind.Check_TypeLayout) ||
- (_fixupKind == ReadyToRunFixupKind.Verify_TypeLayout))
+ if ((fixupKind == ReadyToRunFixupKind.Check_TypeLayout) ||
+ (fixupKind == ReadyToRunFixupKind.Verify_TypeLayout))
{
EncodeTypeLayout(dataBuilder, _typeDesc);
}
@@ -92,7 +98,7 @@ private static void EncodeTypeLayout(ObjectDataSignatureBuilder dataBuilder, Typ
};
dataBuilder.EmitUInt((uint)hfaElementType);
}
-
+
if (alignment != pointerSize)
{
dataBuilder.EmitUInt((uint)alignment);
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs
index 5ab12a41e6150e..14dc927fc5555d 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRunCodegenNodeFactory.cs
@@ -742,7 +742,7 @@ public void AttachToDependencyGraph(DependencyAnalyzerBase graph, I
Header.Add(Internal.Runtime.ReadyToRunSectionType.InstanceMethodEntryPoints, InstanceEntryPointTable, InstanceEntryPointTable);
ImportSectionsTable = new ImportSectionsTableNode(this);
- Header.Add(Internal.Runtime.ReadyToRunSectionType.ImportSections, ImportSectionsTable, ImportSectionsTable.StartSymbol);
+ Header.Add(Internal.Runtime.ReadyToRunSectionType.ImportSections, ImportSectionsTable, ImportSectionsTable);
DebugInfoTable = new DebugInfoTableNode();
Header.Add(Internal.Runtime.ReadyToRunSectionType.DebugInfo, DebugInfoTable, DebugInfoTable);
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs
index 8b1b8d7c30e2e0..3644241dcf85b7 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs
@@ -475,12 +475,18 @@ private bool IsLayoutFixedInCurrentVersionBubbleInternal(TypeDesc type)
return true;
}
- if (!(type is MetadataType defType))
+ if (type is not MetadataType defType)
{
// Non metadata backed types have layout defined in all version bubbles
return true;
}
+ if (VectorOfTFieldLayoutAlgorithm.IsVectorOfTType(defType))
+ {
+ // Vector always needs a layout check
+ return false;
+ }
+
if (!NodeFactory.CompilationModuleGroup.VersionsWithModule(defType.Module))
{
// Valuetypes with non-versionable attribute are candidates for fixed layout. Reject the rest.
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs
index 6eed36223b0992..c6d40d4ee7b42b 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs
@@ -220,6 +220,7 @@ public override ComputedInstanceFieldLayout ComputeInstanceLayout(DefType type,
ByteCountAlignment = LayoutInt.Indeterminate,
Offsets = fieldsAndOffsets.ToArray(),
LayoutAbiStable = false,
+ IsVectorTOrHasVectorTFields = true,
};
return instanceLayout;
}
@@ -238,6 +239,7 @@ public override ComputedInstanceFieldLayout ComputeInstanceLayout(DefType type,
FieldSize = layoutFromSimilarIntrinsicVector.FieldSize,
Offsets = layoutFromMetadata.Offsets,
LayoutAbiStable = _vectorAbiIsStable,
+ IsVectorTOrHasVectorTFields = true,
};
#else
return new ComputedInstanceFieldLayout
@@ -248,6 +250,7 @@ public override ComputedInstanceFieldLayout ComputeInstanceLayout(DefType type,
FieldSize = layoutFromSimilarIntrinsicVector.FieldSize,
Offsets = layoutFromMetadata.Offsets,
LayoutAbiStable = _vectorAbiIsStable,
+ IsVectorTOrHasVectorTFields = true,
};
#endif
}
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
index 874104ecb86821..3bb44554265c6c 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
@@ -76,7 +76,6 @@
-
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs
index bb23738a4dc621..6744603dcb2288 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs
@@ -3128,7 +3128,7 @@ private bool getStringChar(CORINFO_OBJECT_STRUCT_* strObj, int index, ushort* va
{
return false;
}
-
+
private CORINFO_OBJECT_STRUCT_* getRuntimeTypePointer(CORINFO_CLASS_STRUCT_* cls)
{
return null;
diff --git a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/ILCompiler.TypeSystem.Tests.csproj b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/ILCompiler.TypeSystem.Tests.csproj
index 1f6b33ff18ba39..d62215c7901a56 100644
--- a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/ILCompiler.TypeSystem.Tests.csproj
+++ b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/ILCompiler.TypeSystem.Tests.csproj
@@ -20,7 +20,6 @@
-
diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
index 9e93415789c3c1..7e5f930584abfc 100644
--- a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
+++ b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
@@ -10,8 +10,10 @@
$(RuntimeBinDir)ilc-published/
- false
- false
+
+ false
+
+ false
true
$(ROOTFS_DIR)
true
diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs b/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs
index ff80a245bcea6f..574bfb78c461ca 100644
--- a/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs
+++ b/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs
@@ -88,8 +88,6 @@ internal sealed class ILCompilerRootCommand : RootCommand
new(new[] { "--methodbodyfolding" }, "Fold identical method bodies");
public Option InitAssemblies { get; } =
new(new[] { "--initassembly" }, Array.Empty, "Assembly(ies) with a library initializer");
- public Option AppContextSwitches { get; } =
- new(new[] { "--appcontextswitch" }, Array.Empty, "System.AppContext switches to set (format: 'Key=Value')");
public Option FeatureSwitches { get; } =
new(new[] { "--feature" }, Array.Empty, "Feature switches to apply (format: 'Namespace.Name=[true|false]'");
public Option RuntimeOptions { get; } =
@@ -114,6 +112,8 @@ internal sealed class ILCompilerRootCommand : RootCommand
}, true, "Maximum number of threads to use during compilation");
public Option InstructionSet { get; } =
new(new[] { "--instruction-set" }, "Instruction set to allow or disallow");
+ public Option MaxVectorTBitWidth { get; } =
+ new(new[] { "--max-vectort-bitwidth" }, "Maximum width, in bits, that Vector is allowed to be");
public Option Guard { get; } =
new(new[] { "--guard" }, "Enable mitigations. Options: 'cf': CFG (Control Flow Guard, Windows only)");
public Option Dehydrate { get; } =
@@ -207,12 +207,12 @@ public ILCompilerRootCommand(string[] args) : base(".NET Native IL Compiler")
AddOption(EmitStackTraceData);
AddOption(MethodBodyFolding);
AddOption(InitAssemblies);
- AddOption(AppContextSwitches);
AddOption(FeatureSwitches);
AddOption(RuntimeOptions);
AddOption(RuntimeKnobs);
AddOption(Parallelism);
AddOption(InstructionSet);
+ AddOption(MaxVectorTBitWidth);
AddOption(Guard);
AddOption(Dehydrate);
AddOption(PreinitStatics);
@@ -270,9 +270,11 @@ public ILCompilerRootCommand(string[] args) : base(".NET Native IL Compiler")
// + the original command line arguments
// + a rsp file that should work to directly run out of the zip file
+#pragma warning disable CA1861 // Avoid constant arrays as arguments. Only executed once during the execution of the program.
Helpers.MakeReproPackage(makeReproPath, context.ParseResult.GetValue(OutputFilePath), args, context.ParseResult,
inputOptions : new[] { "r", "reference", "m", "mibc", "rdxml", "directpinvokelist", "descriptor" },
outputOptions : new[] { "o", "out", "exportsfile" });
+#pragma warning restore CA1861 // Avoid constant arrays as arguments
}
context.ExitCode = new Program(this).Run();
diff --git a/src/coreclr/tools/aot/ILCompiler/Program.cs b/src/coreclr/tools/aot/ILCompiler/Program.cs
index 36493522a44041..f83ad617dda8d2 100644
--- a/src/coreclr/tools/aot/ILCompiler/Program.cs
+++ b/src/coreclr/tools/aot/ILCompiler/Program.cs
@@ -29,6 +29,7 @@ namespace ILCompiler
internal sealed class Program
{
private readonly ILCompilerRootCommand _command;
+ private static readonly char[] s_separator = new char[] { ',', ';', ' ' };
public Program(ILCompilerRootCommand command)
{
@@ -41,7 +42,7 @@ public Program(ILCompilerRootCommand command)
}
}
- private List CreateInitializerList(CompilerTypeSystemContext context)
+ private IReadOnlyCollection CreateInitializerList(CompilerTypeSystemContext context)
{
List assembliesWithInitializers = new List();
@@ -55,18 +56,7 @@ private List CreateInitializerList(CompilerTypeSystemContext context
var libraryInitializers = new LibraryInitializers(context, assembliesWithInitializers);
- List initializerList = new List(libraryInitializers.LibraryInitializerMethods);
-
- // If there are any AppContext switches the user wishes to enable, generate code that sets them.
- string[] appContextSwitches = Get(_command.AppContextSwitches);
- if (appContextSwitches.Length > 0)
- {
- MethodDesc appContextInitMethod = new Internal.IL.Stubs.StartupCode.AppContextInitializerMethod(
- context.GeneratedAssembly.GetGlobalModuleType(), appContextSwitches);
- initializerList.Add(appContextInitMethod);
- }
-
- return initializerList;
+ return libraryInitializers.LibraryInitializerMethods;
}
public int Run()
@@ -77,7 +67,7 @@ public int Run()
TargetArchitecture targetArchitecture = Get(_command.TargetArchitecture);
TargetOS targetOS = Get(_command.TargetOS);
- InstructionSetSupport instructionSetSupport = Helpers.ConfigureInstructionSetSupport(Get(_command.InstructionSet), targetArchitecture, targetOS,
+ InstructionSetSupport instructionSetSupport = Helpers.ConfigureInstructionSetSupport(Get(_command.InstructionSet), Get(_command.MaxVectorTBitWidth), targetArchitecture, targetOS,
"Unrecognized instruction set {0}", "Unsupported combination of instruction sets: {0}/{1}");
string systemModuleName = Get(_command.SystemModuleName);
@@ -208,6 +198,8 @@ public int Run()
compilationGroup = new SingleFileCompilationModuleGroup();
}
+ const string settingsBlobName = "g_compilerEmbeddedSettingsBlob";
+ const string knobsBlobName = "g_compilerEmbeddedKnobsBlob";
string[] runtimeOptions = Get(_command.RuntimeOptions);
string[] runtimeKnobs = Get(_command.RuntimeKnobs);
if (nativeLib)
@@ -215,8 +207,8 @@ public int Run()
// Set owning module of generated native library startup method to compiler generated module,
// to ensure the startup method is included in the object file during multimodule mode build
compilationRoots.Add(new NativeLibraryInitializerRootProvider(typeSystemContext.GeneratedAssembly, CreateInitializerList(typeSystemContext)));
- compilationRoots.Add(new RuntimeConfigurationRootProvider(runtimeOptions));
- compilationRoots.Add(new RuntimeKnobsRootProvider(runtimeKnobs));
+ compilationRoots.Add(new RuntimeConfigurationRootProvider(settingsBlobName, runtimeOptions));
+ compilationRoots.Add(new RuntimeConfigurationRootProvider(knobsBlobName, runtimeKnobs));
compilationRoots.Add(new ExpectedIsaFeaturesRootProvider(instructionSetSupport));
if (SplitExeInitialization)
{
@@ -226,8 +218,8 @@ public int Run()
else if (entrypointModule != null)
{
compilationRoots.Add(new MainMethodRootProvider(entrypointModule, CreateInitializerList(typeSystemContext), generateLibraryAndModuleInitializers: !SplitExeInitialization));
- compilationRoots.Add(new RuntimeConfigurationRootProvider(runtimeOptions));
- compilationRoots.Add(new RuntimeKnobsRootProvider(runtimeKnobs));
+ compilationRoots.Add(new RuntimeConfigurationRootProvider(settingsBlobName, runtimeOptions));
+ compilationRoots.Add(new RuntimeConfigurationRootProvider(knobsBlobName, runtimeKnobs));
compilationRoots.Add(new ExpectedIsaFeaturesRootProvider(instructionSetSupport));
if (SplitExeInitialization)
{
@@ -691,7 +683,7 @@ private static IEnumerable ProcessWarningCodes(IEnumerable warningC
{
foreach (string value in warningCodes)
{
- string[] values = value.Split(new char[] { ',', ';', ' ' }, StringSplitOptions.RemoveEmptyEntries);
+ string[] values = value.Split(s_separator, StringSplitOptions.RemoveEmptyEntries);
foreach (string id in values)
{
if (!id.StartsWith("IL", StringComparison.Ordinal) || !ushort.TryParse(id.AsSpan(2), out ushort code))
diff --git a/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj b/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj
index 26c34d3c5d4283..131ddbd3b22576 100644
--- a/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj
+++ b/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj
@@ -23,6 +23,7 @@
+
diff --git a/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs b/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs
index e3918372e42dc9..ef384a1abece68 100644
--- a/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs
+++ b/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs
@@ -23,6 +23,8 @@ internal class Crossgen2RootCommand : RootCommand
new(new[] { "--reference", "-r" }, result => Helpers.BuildPathDictionary(result.Tokens, false), true, SR.ReferenceFiles);
public Option InstructionSet { get; } =
new(new[] { "--instruction-set" }, SR.InstructionSets);
+ public Option MaxVectorTBitWidth { get; } =
+ new(new[] { "--max-vectort-bitwidth" }, SR.MaxVectorTBitWidths);
public Option MibcFilePaths { get; } =
new(new[] { "--mibc", "-m" }, Array.Empty, SR.MibcFiles);
public Option OutputFilePath { get; } =
@@ -193,6 +195,7 @@ public Crossgen2RootCommand(string[] args) : base(SR.Crossgen2BannerText)
AddOption(UnrootedInputFilePaths);
AddOption(ReferenceFilePaths);
AddOption(InstructionSet);
+ AddOption(MaxVectorTBitWidth);
AddOption(MibcFilePaths);
AddOption(OutputFilePath);
AddOption(CompositeRootPath);
diff --git a/src/coreclr/tools/aot/crossgen2/Program.cs b/src/coreclr/tools/aot/crossgen2/Program.cs
index 639e5551e96940..1d43fc8c7a9150 100644
--- a/src/coreclr/tools/aot/crossgen2/Program.cs
+++ b/src/coreclr/tools/aot/crossgen2/Program.cs
@@ -76,7 +76,7 @@ public int Run()
TargetArchitecture targetArchitecture = Get(_command.TargetArchitecture);
TargetOS targetOS = Get(_command.TargetOS);
- InstructionSetSupport instructionSetSupport = Helpers.ConfigureInstructionSetSupport(Get(_command.InstructionSet), targetArchitecture, targetOS,
+ InstructionSetSupport instructionSetSupport = Helpers.ConfigureInstructionSetSupport(Get(_command.InstructionSet), Get(_command.MaxVectorTBitWidth), targetArchitecture, targetOS,
SR.InstructionSetMustNotBe, SR.InstructionSetInvalidImplication);
SharedGenericsMode genericsMode = SharedGenericsMode.CanonicalReferenceTypes;
var targetDetails = new TargetDetails(targetArchitecture, targetOS, Crossgen2RootCommand.IsArmel ? TargetAbi.NativeAotArmel : TargetAbi.NativeAot, instructionSetSupport.GetVectorTSimdVector());
diff --git a/src/coreclr/tools/aot/crossgen2/Properties/Resources.resx b/src/coreclr/tools/aot/crossgen2/Properties/Resources.resx
index b899f77a8f1147..a737ea6aeb7706 100644
--- a/src/coreclr/tools/aot/crossgen2/Properties/Resources.resx
+++ b/src/coreclr/tools/aot/crossgen2/Properties/Resources.resx
@@ -180,6 +180,9 @@
Instruction set '{0}' implies support for instruction set '{1}'
+
+ The maximum width, in bits, for System.Numerics.Vector<T>. For example '128', '256', or '512'.
+
Input files without automatic rooting of all methods
diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
index 464aa2bc429075..ceeb4d63ad0c1e 100644
--- a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
+++ b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
@@ -8,7 +8,7 @@
false
true
- linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;freebsd-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64;win-arm
+ linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;freebsd-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64
$(PackageRID)
false
true
diff --git a/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj b/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
index c3d3fc03766719..ac3720d4f7e059 100644
--- a/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
+++ b/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
@@ -13,7 +13,7 @@
true
true
dotnet-pgo
- win-x64;win-x86;win-arm;osx-x64
+ win-x64;win-x86;osx-x64
$(OutputPath)
false
.NET Performance Guided Optimization Tool
diff --git a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
index aa491393c414bd..70378310e449a3 100644
--- a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
+++ b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
@@ -1221,8 +1221,6 @@ const char* CorJitFlagToString(CORJIT_FLAGS::CorJitFlag flag)
return "CORJIT_FLAG_BBINSTR_IF_LOOPS";
case CORJIT_FLAGS::CorJitFlag::CORJIT_FLAG_PUBLISH_SECRET_PARAM:
return "CORJIT_FLAG_PUBLISH_SECRET_PARAM";
- case CORJIT_FLAGS::CorJitFlag::CORJIT_FLAG_SAMPLING_JIT_BACKGROUND:
- return "CORJIT_FLAG_SAMPLING_JIT_BACKGROUND";
case CORJIT_FLAGS::CorJitFlag::CORJIT_FLAG_USE_PINVOKE_HELPERS:
return "CORJIT_FLAG_USE_PINVOKE_HELPERS";
case CORJIT_FLAGS::CorJitFlag::CORJIT_FLAG_REVERSE_PINVOKE:
diff --git a/src/coreclr/tools/superpmi/superpmi-shared/spmidumphelper.cpp b/src/coreclr/tools/superpmi/superpmi-shared/spmidumphelper.cpp
index d4dde380b7e236..46d05496066c7c 100644
--- a/src/coreclr/tools/superpmi/superpmi-shared/spmidumphelper.cpp
+++ b/src/coreclr/tools/superpmi/superpmi-shared/spmidumphelper.cpp
@@ -259,7 +259,6 @@ std::string SpmiDumpHelper::DumpJitFlags(unsigned long long flags)
AddFlag(BBINSTR_IF_LOOPS);
AddFlag(PUBLISH_SECRET_PARAM);
- AddFlag(SAMPLING_JIT_BACKGROUND);
AddFlag(USE_PINVOKE_HELPERS);
AddFlag(REVERSE_PINVOKE);
AddFlag(TRACK_TRANSITIONS);
diff --git a/src/coreclr/vm/CMakeLists.txt b/src/coreclr/vm/CMakeLists.txt
index fada96c3a4a290..bf6b91acbf4bd4 100644
--- a/src/coreclr/vm/CMakeLists.txt
+++ b/src/coreclr/vm/CMakeLists.txt
@@ -578,7 +578,6 @@ if(CLR_CMAKE_TARGET_WIN32)
dwreport.cpp
eventreporter.cpp
rtlfunctions.cpp
- stacksampler.cpp
)
list(APPEND VM_HEADERS_WKS
@@ -587,7 +586,6 @@ if(CLR_CMAKE_TARGET_WIN32)
dwreport.h
eventreporter.h
rtlfunctions.h
- stacksampler.h
)
# COM interop scenarios
diff --git a/src/coreclr/vm/ClrEtwAllMeta.lst b/src/coreclr/vm/ClrEtwAllMeta.lst
index 3c145a93bc1ab6..a4ea6e8a4cdb0a 100644
--- a/src/coreclr/vm/ClrEtwAllMeta.lst
+++ b/src/coreclr/vm/ClrEtwAllMeta.lst
@@ -190,7 +190,7 @@ nostack:Contention:::ContentionStop
nomac:Contention:::ContentionStop
nostack:Contention:::ContentionStop_V1
nomac:Contention:::ContentionStop_V1
-nomac:Contention:::LockCreated
+nomac:Contention:::ContentionLockCreated
##################
# StackWalk events
diff --git a/src/coreclr/vm/array.cpp b/src/coreclr/vm/array.cpp
index 54ecd0d7e7e7a3..aaa203491c5afa 100644
--- a/src/coreclr/vm/array.cpp
+++ b/src/coreclr/vm/array.cpp
@@ -665,7 +665,10 @@ MethodTable* Module::CreateArrayMethodTable(TypeHandle elemTypeHnd, CorElementTy
IDS_CLASSLOAD_VALUECLASSTOOLARGE);
}
- val_serie_item *val_item = &(pSeries->val_serie[-index]);
+ // pSeries->val_serie is a fixed sized array.
+ // Use pointer arithmetic instead of direct array access to avoid compilers, specifically GCC,
+ // to discover undefined behavior and generate unintended code when optimization is turned on.
+ val_serie_item *val_item = pSeries->val_serie - index;
val_item->set_val_serie_item (NumPtrs, (unsigned short)skip);
}
diff --git a/src/coreclr/vm/ceemain.cpp b/src/coreclr/vm/ceemain.cpp
index 162c0aa7bf9cc6..1fd898684cf1c1 100644
--- a/src/coreclr/vm/ceemain.cpp
+++ b/src/coreclr/vm/ceemain.cpp
@@ -170,10 +170,6 @@
#include "stringarraylist.h"
#include "stubhelpers.h"
-#ifdef FEATURE_STACK_SAMPLING
-#include "stacksampler.h"
-#endif
-
#ifdef FEATURE_COMINTEROP
#include "runtimecallablewrapper.h"
#include "mngstdinterfaces.h"
@@ -932,10 +928,6 @@ void EEStartupHelper()
SystemDomain::System()->DefaultDomain()->SetupSharedStatics();
-#ifdef FEATURE_STACK_SAMPLING
- StackSampler::Init();
-#endif
-
#ifdef FEATURE_MINIMETADATA_IN_TRIAGEDUMPS
// retrieve configured max size for the mini-metadata buffer (defaults to 64KB)
g_MiniMetaDataBuffMaxSize = CLRConfig::GetConfigValue(CLRConfig::INTERNAL_MiniMdBufferCapacity);
diff --git a/src/coreclr/vm/codeman.cpp b/src/coreclr/vm/codeman.cpp
index eba0c2cd1e88fb..51eec2b9dae9a2 100644
--- a/src/coreclr/vm/codeman.cpp
+++ b/src/coreclr/vm/codeman.cpp
@@ -1338,6 +1338,9 @@ void EEJitManager::SetCpuInfo()
CORJIT_FLAGS CPUCompileFlags;
+ // Get the maximum bitwidth of Vector, rounding down to the nearest multiple of 128-bits
+ uint32_t maxVectorTBitWidth = (CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_MaxVectorTBitWidth) / 128) * 128;
+
#if defined(TARGET_X86) || defined(TARGET_AMD64)
CPUCompileFlags.Set(InstructionSet_X86Base);
@@ -1347,84 +1350,6 @@ void EEJitManager::SetCpuInfo()
// AMD64 Architecture Programmer’s Manual. Volume 3
// For more information, please refer to the CPUID instruction in the respective manuals
- // We will set the following flags:
- // CORJIT_FLAG_USE_SSE2 is required
- // SSE - EDX bit 25
- // SSE2 - EDX bit 26
- // CORJIT_FLAG_USE_AES
- // CORJIT_FLAG_USE_SSE2
- // AES - ECX bit 25
- // CORJIT_FLAG_USE_PCLMULQDQ
- // CORJIT_FLAG_USE_SSE2
- // PCLMULQDQ - ECX bit 1
- // CORJIT_FLAG_USE_SSE3 if the following feature bits are set (input EAX of 1)
- // CORJIT_FLAG_USE_SSE2
- // SSE3 - ECX bit 0
- // CORJIT_FLAG_USE_SSSE3 if the following feature bits are set (input EAX of 1)
- // CORJIT_FLAG_USE_SSE3
- // SSSE3 - ECX bit 9
- // CORJIT_FLAG_USE_SSE41 if the following feature bits are set (input EAX of 1)
- // CORJIT_FLAG_USE_SSSE3
- // SSE4.1 - ECX bit 19
- // CORJIT_FLAG_USE_SSE42 if the following feature bits are set (input EAX of 1)
- // CORJIT_FLAG_USE_SSE41
- // SSE4.2 - ECX bit 20
- // CORJIT_FLAG_USE_MOVBE if the following feature bits are set (input EAX of 1)
- // CORJIT_FLAG_USE_SSE42
- // MOVBE - ECX bit 22
- // CORJIT_FLAG_USE_POPCNT if the following feature bits are set (input EAX of 1)
- // CORJIT_FLAG_USE_SSE42
- // POPCNT - ECX bit 23
- // CORJIT_FLAG_USE_AVX if the following feature bits are set (input EAX of 1), and xmmYmmStateSupport returns 1:
- // CORJIT_FLAG_USE_SSE42
- // OSXSAVE - ECX bit 27
- // AVX - ECX bit 28
- // XGETBV - XCR0[2:1] 11b
- // CORJIT_FLAG_USE_FMA if the following feature bits are set (input EAX of 1), and xmmYmmStateSupport returns 1:
- // CORJIT_FLAG_USE_AVX
- // FMA - ECX bit 12
- // CORJIT_FLAG_USE_AVX2 if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
- // CORJIT_FLAG_USE_AVX
- // AVX2 - EBX bit 5
- // CORJIT_FLAG_USE_AVXVNNI if the following feature bit is set (input EAX of 0x07 and input ECX of 1):
- // CORJIT_FLAG_USE_AVX2
- // AVXVNNI - EAX bit 4
- // CORJIT_FLAG_USE_AVX_512F if the following feature bit is set (input EAX of 0x07 and input ECX of 0), and avx512StateSupport returns 1:
- // CORJIT_FLAG_USE_AVX2
- // AVX512F - EBX bit 16
- // XGETBV - XRC0[7:5] 111b
- // CORJIT_FLAG_USE_AVX_512F_VL if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
- // CORJIT_FLAG_USE_AVX512F
- // AVX512VL - EBX bit 31
- // CORJIT_FLAG_USE_AVX_512BW if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
- // CORJIT_FLAG_USE_AVX512F
- // AVX512BW - EBX bit 30
- // CORJIT_FLAG_USE_AVX_512BW_VL if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
- // CORJIT_FLAG_USE_AVX512F_VL
- // CORJIT_FLAG_USE_AVX_512BW
- // CORJIT_FLAG_USE_AVX_512CD if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
- // CORJIT_FLAG_USE_AVX512F
- // AVX512CD - EBX bit 28
- // CORJIT_FLAG_USE_AVX_512CD_VL if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
- // CORJIT_FLAG_USE_AVX512F_VL
- // CORJIT_FLAG_USE_AVX_512CD
- // CORJIT_FLAG_USE_AVX_512DQ if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
- // CORJIT_FLAG_USE_AVX512F
- // AVX512DQ - EBX bit 7
- // CORJIT_FLAG_USE_AVX_512DQ_VL if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
- // CORJIT_FLAG_USE_AVX512F_VL
- // CORJIT_FLAG_USE_AVX_512DQ
- // CORJIT_FLAG_USE_AVX_512VBMI if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
- // CORJIT_FLAG_USE_AVX512F
- // AVX512VBMI - ECX bit 1
- // CORJIT_FLAG_USE_BMI1 if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
- // BMI1 - EBX bit 3
- // CORJIT_FLAG_USE_BMI2 if the following feature bit is set (input EAX of 0x07 and input ECX of 0):
- // BMI2 - EBX bit 8
- // CORJIT_FLAG_USE_LZCNT if the following feature bits are set (input EAX of 80000001H)
- // LZCNT - ECX bit 5
- // synchronously updating VM and JIT.
-
union XarchCpuInfo
{
struct {
@@ -1479,6 +1404,7 @@ void EEJitManager::SetCpuInfo()
CPUCompileFlags.Set(InstructionSet_SSE);
CPUCompileFlags.Set(InstructionSet_SSE2);
+ CPUCompileFlags.Set(InstructionSet_VectorT128);
if ((cpuidInfo[CPUID_ECX] & (1 << 25)) != 0) // AESNI
{
@@ -1516,9 +1442,12 @@ void EEJitManager::SetCpuInfo()
CPUCompileFlags.Set(InstructionSet_POPCNT);
}
- if (((cpuidInfo[CPUID_ECX] & (1 << 27)) != 0) && ((cpuidInfo[CPUID_ECX] & (1 << 28)) != 0)) // OSXSAVE & AVX
+ const int requiredAvxEcxFlags = (1 << 27) // OSXSAVE
+ | (1 << 28); // AVX
+
+ if ((cpuidInfo[CPUID_ECX] & requiredAvxEcxFlags) == requiredAvxEcxFlags)
{
- if(DoesOSSupportAVX() && (xmmYmmStateSupport() == 1)) // XGETBV == 11
+ if(DoesOSSupportAVX() && (xmmYmmStateSupport() == 1)) // XGETBV == 11
{
CPUCompileFlags.Set(InstructionSet_AVX);
@@ -1535,50 +1464,60 @@ void EEJitManager::SetCpuInfo()
{
CPUCompileFlags.Set(InstructionSet_AVX2);
- if (DoesOSSupportAVX512() && (avx512StateSupport() == 1)) // XGETBV XRC0[7:5] == 111
+ if ((maxVectorTBitWidth == 0) || (maxVectorTBitWidth >= 256))
+ {
+ // We allow 256-bit Vector by default
+ CPUCompileFlags.Clear(InstructionSet_VectorT128);
+ CPUCompileFlags.Set(InstructionSet_VectorT256);
+ }
+
+ if (DoesOSSupportAVX512() && (avx512StateSupport() == 1)) // XGETBV XRC0[7:5] == 111
{
- if ((cpuidInfo[CPUID_EBX] & (1 << 16)) != 0) // AVX512F
+ if ((cpuidInfo[CPUID_EBX] & (1 << 16)) != 0) // AVX512F
{
CPUCompileFlags.Set(InstructionSet_AVX512F);
+ // TODO-XArch: Add support for 512-bit Vector
+ assert(!CPUCompileFlags.IsSet(InstructionSet_VectorT512));
+
bool isAVX512_VLSupported = false;
- if ((cpuidInfo[CPUID_EBX] & (1 << 31)) != 0) // AVX512VL
+ if ((cpuidInfo[CPUID_EBX] & (1 << 31)) != 0) // AVX512VL
{
CPUCompileFlags.Set(InstructionSet_AVX512F_VL);
isAVX512_VLSupported = true;
}
- if ((cpuidInfo[CPUID_EBX] & (1 << 30)) != 0) // AVX512BW
+ if ((cpuidInfo[CPUID_EBX] & (1 << 30)) != 0) // AVX512BW
{
CPUCompileFlags.Set(InstructionSet_AVX512BW);
- if (isAVX512_VLSupported) // AVX512BW_VL
+ if (isAVX512_VLSupported) // AVX512BW_VL
{
CPUCompileFlags.Set(InstructionSet_AVX512BW_VL);
}
}
- if ((cpuidInfo[CPUID_EBX] & (1 << 28)) != 0) // AVX512CD
+ if ((cpuidInfo[CPUID_EBX] & (1 << 28)) != 0) // AVX512CD
{
CPUCompileFlags.Set(InstructionSet_AVX512CD);
- if (isAVX512_VLSupported) // AVX512CD_VL
+ if (isAVX512_VLSupported) // AVX512CD_VL
{
CPUCompileFlags.Set(InstructionSet_AVX512CD_VL);
}
}
- if ((cpuidInfo[CPUID_EBX] & (1 << 17)) != 0) // AVX512DQ
+ if ((cpuidInfo[CPUID_EBX] & (1 << 17)) != 0) // AVX512DQ
{
CPUCompileFlags.Set(InstructionSet_AVX512DQ);
- if (isAVX512_VLSupported) // AVX512DQ_VL
+ if (isAVX512_VLSupported) // AVX512DQ_VL
{
CPUCompileFlags.Set(InstructionSet_AVX512DQ_VL);
}
}
- if ((cpuidInfo[CPUID_ECX] & (1 << 1)) != 0) // AVX512VBMI
+ if ((cpuidInfo[CPUID_ECX] & (1 << 1)) != 0) // AVX512VBMI
{
CPUCompileFlags.Set(InstructionSet_AVX512VBMI);
- if (isAVX512_VLSupported) // AVX512VBMI_VL
+ if (isAVX512_VLSupported) // AVX512VBMI_VL
{
CPUCompileFlags.Set(InstructionSet_AVX512VBMI_VL);
}
@@ -1601,28 +1540,23 @@ void EEJitManager::SetCpuInfo()
}
}
- if (CLRConfig::GetConfigValue(CLRConfig::INTERNAL_SIMD16ByteOnly) != 0)
- {
- CPUCompileFlags.Clear(InstructionSet_AVX2);
- }
-
if (maxCpuId >= 0x07)
{
__cpuidex(cpuidInfo, 0x00000007, 0x00000000);
- if ((cpuidInfo[CPUID_EBX] & (1 << 3)) != 0) // BMI1
+ if ((cpuidInfo[CPUID_EBX] & (1 << 3)) != 0) // BMI1
{
CPUCompileFlags.Set(InstructionSet_BMI1);
}
- if ((cpuidInfo[CPUID_EBX] & (1 << 8)) != 0) // BMI2
+ if ((cpuidInfo[CPUID_EBX] & (1 << 8)) != 0) // BMI2
{
CPUCompileFlags.Set(InstructionSet_BMI2);
}
if ((cpuidInfo[CPUID_EDX] & (1 << 14)) != 0)
{
- CPUCompileFlags.Set(InstructionSet_X86Serialize); // SERIALIZE
+ CPUCompileFlags.Set(InstructionSet_X86Serialize); // SERIALIZE
}
}
@@ -1633,7 +1567,7 @@ void EEJitManager::SetCpuInfo()
{
__cpuid(cpuidInfo, 0x80000001);
- if ((cpuidInfo[CPUID_ECX] & (1 << 5)) != 0) // LZCNT
+ if ((cpuidInfo[CPUID_ECX] & (1 << 5)) != 0) // LZCNT
{
CPUCompileFlags.Set(InstructionSet_LZCNT);
}
@@ -1656,6 +1590,7 @@ void EEJitManager::SetCpuInfo()
// FP and SIMD support are enabled by default
CPUCompileFlags.Set(InstructionSet_ArmBase);
CPUCompileFlags.Set(InstructionSet_AdvSimd);
+ CPUCompileFlags.Set(InstructionSet_VectorT128);
// PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE (30)
if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE))
@@ -1867,7 +1802,6 @@ void EEJitManager::SetCpuInfo()
{
CPUCompileFlags.Clear(InstructionSet_X86Serialize);
}
-
#elif defined(TARGET_ARM64)
if (!CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableHWIntrinsic))
{
diff --git a/src/coreclr/vm/comutilnative.cpp b/src/coreclr/vm/comutilnative.cpp
index 6d457a40248503..f2985222815e20 100644
--- a/src/coreclr/vm/comutilnative.cpp
+++ b/src/coreclr/vm/comutilnative.cpp
@@ -1523,59 +1523,6 @@ FCIMPL3_IVV(INT64, COMInterlocked::CompareExchange64, INT64* location, INT64 val
}
FCIMPLEND
-FCIMPL2_IV(float,COMInterlocked::ExchangeFloat, float *location, float value)
-{
- FCALL_CONTRACT;
-
- if( NULL == location) {
- FCThrow(kNullReferenceException);
- }
-
- LONG ret = InterlockedExchange((LONG *) location, *(LONG*)&value);
- return *(float*)&ret;
-}
-FCIMPLEND
-
-FCIMPL2_IV(double,COMInterlocked::ExchangeDouble, double *location, double value)
-{
- FCALL_CONTRACT;
-
- if( NULL == location) {
- FCThrow(kNullReferenceException);
- }
-
-
- INT64 ret = InterlockedExchange64((INT64 *) location, *(INT64*)&value);
- return *(double*)&ret;
-}
-FCIMPLEND
-
-FCIMPL3_IVV(float,COMInterlocked::CompareExchangeFloat, float *location, float value, float comparand)
-{
- FCALL_CONTRACT;
-
- if( NULL == location) {
- FCThrow(kNullReferenceException);
- }
-
- LONG ret = (LONG)InterlockedCompareExchange((LONG*) location, *(LONG*)&value, *(LONG*)&comparand);
- return *(float*)&ret;
-}
-FCIMPLEND
-
-FCIMPL3_IVV(double,COMInterlocked::CompareExchangeDouble, double *location, double value, double comparand)
-{
- FCALL_CONTRACT;
-
- if( NULL == location) {
- FCThrow(kNullReferenceException);
- }
-
- INT64 ret = (INT64)InterlockedCompareExchange64((INT64*) location, *(INT64*)&value, *(INT64*)&comparand);
- return *(double*)&ret;
-}
-FCIMPLEND
-
FCIMPL2(LPVOID,COMInterlocked::ExchangeObject, LPVOID*location, LPVOID value)
{
FCALL_CONTRACT;
@@ -1637,24 +1584,6 @@ FCIMPL2_IV(INT64,COMInterlocked::ExchangeAdd64, INT64 *location, INT64 value)
}
FCIMPLEND
-FCIMPL0(void, COMInterlocked::FCMemoryBarrier)
-{
- FCALL_CONTRACT;
-
- MemoryBarrier();
- FC_GC_POLL();
-}
-FCIMPLEND
-
-FCIMPL0(void, COMInterlocked::FCMemoryBarrierLoad)
-{
- FCALL_CONTRACT;
-
- VolatileLoadBarrier();
- FC_GC_POLL();
-}
-FCIMPLEND
-
#include
extern "C" void QCALLTYPE Interlocked_MemoryBarrierProcessWide()
diff --git a/src/coreclr/vm/comutilnative.h b/src/coreclr/vm/comutilnative.h
index 0d6d3f8a5f95fe..37e19a14f6ec3a 100644
--- a/src/coreclr/vm/comutilnative.h
+++ b/src/coreclr/vm/comutilnative.h
@@ -227,17 +227,10 @@ class COMInterlocked
static FCDECL2_IV(INT64, Exchange64, INT64 *location, INT64 value);
static FCDECL3(INT32, CompareExchange, INT32* location, INT32 value, INT32 comparand);
static FCDECL3_IVV(INT64, CompareExchange64, INT64* location, INT64 value, INT64 comparand);
- static FCDECL2_IV(float, ExchangeFloat, float *location, float value);
- static FCDECL2_IV(double, ExchangeDouble, double *location, double value);
- static FCDECL3_IVV(float, CompareExchangeFloat, float *location, float value, float comparand);
- static FCDECL3_IVV(double, CompareExchangeDouble, double *location, double value, double comparand);
static FCDECL2(LPVOID, ExchangeObject, LPVOID* location, LPVOID value);
static FCDECL3(LPVOID, CompareExchangeObject, LPVOID* location, LPVOID value, LPVOID comparand);
static FCDECL2(INT32, ExchangeAdd32, INT32 *location, INT32 value);
static FCDECL2_IV(INT64, ExchangeAdd64, INT64 *location, INT64 value);
-
- static FCDECL0(void, FCMemoryBarrier);
- static FCDECL0(void, FCMemoryBarrierLoad);
};
extern "C" void QCALLTYPE Interlocked_MemoryBarrierProcessWide();
diff --git a/src/coreclr/vm/ecalllist.h b/src/coreclr/vm/ecalllist.h
index acda36bace331d..9fc399c31cd5a3 100644
--- a/src/coreclr/vm/ecalllist.h
+++ b/src/coreclr/vm/ecalllist.h
@@ -509,18 +509,12 @@ FCFuncEnd()
FCFuncStart(gInterlockedFuncs)
FCFuncElementSig("Exchange", &gsig_SM_RefInt_Int_RetInt, COMInterlocked::Exchange)
FCFuncElementSig("Exchange", &gsig_SM_RefLong_Long_RetLong, COMInterlocked::Exchange64)
- FCFuncElementSig("Exchange", &gsig_SM_RefDbl_Dbl_RetDbl, COMInterlocked::ExchangeDouble)
- FCFuncElementSig("Exchange", &gsig_SM_RefFlt_Flt_RetFlt, COMInterlocked::ExchangeFloat)
FCFuncElementSig("Exchange", &gsig_SM_RefObj_Obj_RetObj, COMInterlocked::ExchangeObject)
FCFuncElementSig("CompareExchange", &gsig_SM_RefInt_Int_Int_RetInt, COMInterlocked::CompareExchange)
FCFuncElementSig("CompareExchange", &gsig_SM_RefLong_Long_Long_RetLong, COMInterlocked::CompareExchange64)
- FCFuncElementSig("CompareExchange", &gsig_SM_RefDbl_Dbl_Dbl_RetDbl, COMInterlocked::CompareExchangeDouble)
- FCFuncElementSig("CompareExchange", &gsig_SM_RefFlt_Flt_Flt_RetFlt, COMInterlocked::CompareExchangeFloat)
FCFuncElementSig("CompareExchange", &gsig_SM_RefObj_Obj_Obj_RetObj, COMInterlocked::CompareExchangeObject)
FCFuncElementSig("ExchangeAdd", &gsig_SM_RefInt_Int_RetInt, COMInterlocked::ExchangeAdd32)
FCFuncElementSig("ExchangeAdd", &gsig_SM_RefLong_Long_RetLong, COMInterlocked::ExchangeAdd64)
- FCFuncElement("MemoryBarrier", COMInterlocked::FCMemoryBarrier)
- FCFuncElement("ReadMemoryBarrier", COMInterlocked::FCMemoryBarrierLoad)
FCFuncEnd()
FCFuncStart(gJitInfoFuncs)
diff --git a/src/coreclr/vm/i386/stublinkerx86.cpp b/src/coreclr/vm/i386/stublinkerx86.cpp
index 3203e4f4ce3717..fde6801c289b6d 100644
--- a/src/coreclr/vm/i386/stublinkerx86.cpp
+++ b/src/coreclr/vm/i386/stublinkerx86.cpp
@@ -4558,8 +4558,8 @@ VOID StubLinkerCPU::EmitArrayOpStub(const ArrayOpScript* pArrayOpScript)
for (SSIZE_T __i = 0; __i > cnt; __i--)
{
- HALF_SIZE_T skip = cur->val_serie[__i].skip;
- HALF_SIZE_T nptrs = cur->val_serie[__i].nptrs;
+ HALF_SIZE_T skip = (cur->val_serie + __i)->skip;
+ HALF_SIZE_T nptrs = (cur->val_serie + __i)->nptrs;
total += nptrs*sizeof (Object*);
do
{
diff --git a/src/coreclr/vm/interoputil.cpp b/src/coreclr/vm/interoputil.cpp
index 65710a5227be54..d2dc577b30cf71 100644
--- a/src/coreclr/vm/interoputil.cpp
+++ b/src/coreclr/vm/interoputil.cpp
@@ -3114,7 +3114,7 @@ void IUInvokeDispMethod(
// Validate that the target is valid for the specified type.
if (!IsComTargetValidForType(pRefClassObj, pTarget))
- COMPlusThrow(kTargetException, W("RFLCT.Targ_ITargMismatch"));
+ COMPlusThrow(kTargetException, W("RFLCT_Targ_ITargMismatch"));
// If the invoked type is an interface, make sure it is IDispatch based.
if (pInvokedMT->IsInterface())
diff --git a/src/coreclr/vm/invokeutil.cpp b/src/coreclr/vm/invokeutil.cpp
index ea2278e73e37c4..c4ba804a4c493f 100644
--- a/src/coreclr/vm/invokeutil.cpp
+++ b/src/coreclr/vm/invokeutil.cpp
@@ -681,7 +681,7 @@ void InvokeUtil::ValidateObjectTarget(FieldDesc *pField, TypeHandle enclosingTyp
return;
if (!pField->IsStatic() && !*target)
- COMPlusThrow(kTargetException,W("RFLCT.Targ_StatFldReqTarg"));
+ COMPlusThrow(kTargetException,W("RFLCT_Targ_StatFldReqTarg"));
// Verify that the object is of the proper type...
TypeHandle ty = (*target)->GetTypeHandle();
diff --git a/src/coreclr/vm/jitinterface.cpp b/src/coreclr/vm/jitinterface.cpp
index 85d904b566cdd5..15365a90216a84 100644
--- a/src/coreclr/vm/jitinterface.cpp
+++ b/src/coreclr/vm/jitinterface.cpp
@@ -1800,7 +1800,7 @@ uint32_t CEEInfo::getThreadLocalFieldInfo (CORINFO_FIELD_HANDLE field, bool isG
}
assert(typeIndex != TypeIDProvider::INVALID_TYPE_ID);
-
+
EE_TO_JIT_TRANSITION();
return typeIndex;
}
@@ -1830,9 +1830,9 @@ void CEEInfo::getThreadLocalStaticBlocksInfo (CORINFO_THREAD_STATIC_BLOCKS_INFO*
pInfo->offsetOfThreadStaticBlocks = CEEInfo::ThreadLocalOffset(&t_NonGCThreadStaticBlocks);
pInfo->offsetOfMaxThreadStaticBlocks = CEEInfo::ThreadLocalOffset(&t_NonGCMaxThreadStaticBlocks);
}
-
+
pInfo->offsetOfGCDataPointer = static_cast(PtrArray::GetDataOffset());
-
+
JIT_TO_EE_TRANSITION_LEAF();
}
#else
@@ -1864,7 +1864,7 @@ void CEEInfo::getThreadLocalStaticBlocksInfo (CORINFO_THREAD_STATIC_BLOCKS_INFO*
pInfo->offsetOfThreadStaticBlocks = 0;
pInfo->offsetOfMaxThreadStaticBlocks = 0;
pInfo->offsetOfGCDataPointer = 0;
-
+
JIT_TO_EE_TRANSITION_LEAF();
}
#endif // HOST_WINDOWS
@@ -12453,17 +12453,8 @@ CorJitResult invokeCompileMethodHelper(EEJitManager *jitMgr,
CorJitResult ret = CORJIT_SKIPPED; // Note that CORJIT_SKIPPED is an error exit status code
-#ifdef FEATURE_STACK_SAMPLING
- static ConfigDWORD s_stackSamplingEnabled;
- bool samplingEnabled = (s_stackSamplingEnabled.val(CLRConfig::UNSUPPORTED_StackSamplingEnabled) != 0);
-#endif
-
#if defined(ALLOW_SXS_JIT)
- if (FAILED(ret) && jitMgr->m_alternateJit
-#ifdef FEATURE_STACK_SAMPLING
- && (!samplingEnabled || (jitFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_SAMPLING_JIT_BACKGROUND)))
-#endif
- )
+ if (FAILED(ret) && jitMgr->m_alternateJit)
{
CORJIT_FLAGS altJitFlags = jitFlags;
altJitFlags.Set(CORJIT_FLAGS::CORJIT_FLAG_ALT_JIT);
@@ -12474,14 +12465,6 @@ CorJitResult invokeCompileMethodHelper(EEJitManager *jitMgr,
nativeEntry,
nativeSizeOfCode);
-#ifdef FEATURE_STACK_SAMPLING
- if (jitFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_SAMPLING_JIT_BACKGROUND))
- {
- // Don't bother with failures if we couldn't collect a trace.
- ret = CORJIT_OK;
- }
-#endif // FEATURE_STACK_SAMPLING
-
// If we failed to jit, then fall back to the primary Jit.
if (FAILED(ret))
{
@@ -13099,14 +13082,7 @@ PCODE UnsafeJitFunction(PrepareCodeConfig* config,
{
jitInfo.WriteCode(jitMgr);
#if defined(DEBUGGING_SUPPORTED)
- // Note: if we're only importing (ie, verifying/
- // checking to make sure we could JIT, but not actually generating code (
- // eg, for inlining), then DON'T TELL THE DEBUGGER about this.
- if (!flags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_MCJIT_BACKGROUND)
-#ifdef FEATURE_STACK_SAMPLING
- && !flags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_SAMPLING_JIT_BACKGROUND)
-#endif // FEATURE_STACK_SAMPLING
- )
+ if (!flags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_MCJIT_BACKGROUND))
{
//
// Notify the debugger that we have successfully jitted the function
diff --git a/src/coreclr/vm/methodtablebuilder.cpp b/src/coreclr/vm/methodtablebuilder.cpp
index 0349ca2684e990..45c585da6d2196 100644
--- a/src/coreclr/vm/methodtablebuilder.cpp
+++ b/src/coreclr/vm/methodtablebuilder.cpp
@@ -1135,6 +1135,7 @@ BOOL MethodTableBuilder::CheckIfSIMDAndUpdateSize()
LPCUTF8 className;
LPCUTF8 nameSpace;
+
if (FAILED(GetMDImport()->GetNameOfTypeDef(bmtInternal->pType->GetTypeDefToken(), &className, &nameSpace)))
return false;
@@ -1144,7 +1145,12 @@ BOOL MethodTableBuilder::CheckIfSIMDAndUpdateSize()
CORJIT_FLAGS CPUCompileFlags = ExecutionManager::GetEEJitManager()->GetCPUCompileFlags();
uint32_t numInstanceFieldBytes = 16;
- if (CPUCompileFlags.IsSet(InstructionSet_AVX2))
+ if (CPUCompileFlags.IsSet(InstructionSet_VectorT512))
+ {
+ // TODO-XARCH: The JIT needs to be updated to support 64-byte Vector
+ numInstanceFieldBytes = 32;
+ }
+ else if (CPUCompileFlags.IsSet(InstructionSet_VectorT256))
{
numInstanceFieldBytes = 32;
}
diff --git a/src/coreclr/vm/prestub.cpp b/src/coreclr/vm/prestub.cpp
index 29965fd0477a28..e555da0436607b 100644
--- a/src/coreclr/vm/prestub.cpp
+++ b/src/coreclr/vm/prestub.cpp
@@ -30,10 +30,6 @@
#include "clrtocomcall.h"
#endif
-#ifdef FEATURE_STACK_SAMPLING
-#include "stacksampler.h"
-#endif
-
#ifdef FEATURE_PERFMAP
#include "perfmap.h"
#endif
@@ -858,10 +854,6 @@ PCODE MethodDesc::JitCompileCodeLockedEventWrapper(PrepareCodeConfig* pConfig, J
}
-#ifdef FEATURE_STACK_SAMPLING
- StackSampler::RecordJittingInfo(this, flags);
-#endif // FEATURE_STACK_SAMPLING
-
#ifdef PROFILING_SUPPORTED
{
BEGIN_PROFILER_CALLBACK(CORProfilerTrackJITInfo());
diff --git a/src/coreclr/vm/riscv64/stubs.cpp b/src/coreclr/vm/riscv64/stubs.cpp
index 4c40d61acb26e2..612462e0184720 100644
--- a/src/coreclr/vm/riscv64/stubs.cpp
+++ b/src/coreclr/vm/riscv64/stubs.cpp
@@ -914,7 +914,7 @@ UMEntryThunk * UMEntryThunk::Decode(void *pCallback)
// stubs (see UMEntryThunkCode::Encode below) then we'll return NULL. Luckily in these scenarios our
// caller will perform a hash lookup on successful return to verify our result in case random unmanaged
// code happens to look like ours.
- if ((pCode->m_code[0] == 0x00009f97) && // auipc t6, 0
+ if ((pCode->m_code[0] == 0x00000f97) && // auipc t6, 0
(pCode->m_code[1] == 0x018fb383) && // ld t2, 24(t6)
(pCode->m_code[2] == 0x010fbf83) && // ld t6, 16(t6)
(pCode->m_code[3] == 0x000f8067)) // jalr x0, 0(t6)
@@ -934,7 +934,7 @@ void UMEntryThunkCode::Encode(UMEntryThunkCode *pEntryThunkCodeRX, BYTE* pTarget
// m_pTargetCode data
// m_pvSecretParam data
- m_code[0] = 0x00009f97; // auipc t6, 0
+ m_code[0] = 0x00000f97; // auipc t6, 0
m_code[1] = 0x018fb383; // ld t2, 24(t6)
m_code[2] = 0x010fbf83; // ld t6, 16(t6)
m_code[3] = 0x000f8067; // jalr x0, 0(t6)
diff --git a/src/coreclr/vm/riscv64/virtualcallstubcpu.hpp b/src/coreclr/vm/riscv64/virtualcallstubcpu.hpp
index 6edfec858bbd88..53a3c2c0ac9187 100644
--- a/src/coreclr/vm/riscv64/virtualcallstubcpu.hpp
+++ b/src/coreclr/vm/riscv64/virtualcallstubcpu.hpp
@@ -44,7 +44,7 @@ struct LookupHolder
// _resolveWorkerTarget
// _token
- _stub._entryPoint[0] = LOOKUP_STUB_FIRST_DWORD; // auipc t6, 0 //0x00000097
+ _stub._entryPoint[0] = LOOKUP_STUB_FIRST_DWORD; // auipc t6, 0 //0x00000f97
_stub._entryPoint[1] = 0x018fb383; //ld t2, 24(t6)
_stub._entryPoint[2] = 0x010fbf83; //ld t6, 16(t6)
_stub._entryPoint[3] = 0x000f8067; //jalr x0, t6, 0
@@ -226,7 +226,7 @@ struct ResolveHolder
_stub._resolveEntryPoint[n++] = 0x005e0333;
// auipc t0, 0
_stub._resolveEntryPoint[n++] = 0x00000297;
- // addi t0, t0, -16
+ // addi t0, t0, -12
_stub._resolveEntryPoint[n++] = 0xff428293;
// lw t6, 0(t0) #t6 = this._hashedToken
@@ -461,7 +461,7 @@ void VTableCallHolder::Initialize(unsigned slot)
*(DWORD*)p = 0x00036e03 | ((UINT32)dataOffset << 20); p += 4;
// add t4, t4, t3
*(DWORD*)p = 0x01ce8eb3; p += 4;
- // ld t4, offsetOfIndirection(t4)
+ // ld t4, 0(t4)
*(DWORD*)p = 0x000ebe83; p += 4;
}
else
@@ -485,7 +485,7 @@ void VTableCallHolder::Initialize(unsigned slot)
}
else
{
- // ld t4, offsetOfIndirection(t4)
+ // ld t4, offsetAfterIndirection(t4)
*(DWORD*)p = 0x000ebe83 | ((UINT32)offsetAfterIndirection << 20); p += 4;
}
diff --git a/src/coreclr/vm/stackingallocator.h b/src/coreclr/vm/stackingallocator.h
index a937bf942201a3..2753de73908b42 100644
--- a/src/coreclr/vm/stackingallocator.h
+++ b/src/coreclr/vm/stackingallocator.h
@@ -227,7 +227,7 @@ private :
Thread *pThread__ACQUIRE_STACKING_ALLOCATOR = GetThread(); \
StackingAllocator *stackingAllocatorName = pThread__ACQUIRE_STACKING_ALLOCATOR->m_stackLocalAllocator; \
bool allocatorOwner__ACQUIRE_STACKING_ALLOCATOR = false; \
- NewHolder heapAllocatedStackingBuffer__ACQUIRE_STACKING_ALLOCATOR; \
+ NewArrayHolder heapAllocatedStackingBuffer__ACQUIRE_STACKING_ALLOCATOR; \
\
if (stackingAllocatorName == NULL) \
{ \
@@ -237,10 +237,11 @@ private :
} \
else \
{\
- stackingAllocatorName = new (nothrow) StackingAllocator; \
- if (stackingAllocatorName == NULL) \
+ char *pBuffer__ACQUIRE_STACKING_ALLOCATOR = new (nothrow) char[sizeof(StackingAllocator)]; \
+ if (pBuffer__ACQUIRE_STACKING_ALLOCATOR == NULL) \
ThrowOutOfMemory(); \
- heapAllocatedStackingBuffer__ACQUIRE_STACKING_ALLOCATOR = stackingAllocatorName; \
+ heapAllocatedStackingBuffer__ACQUIRE_STACKING_ALLOCATOR = pBuffer__ACQUIRE_STACKING_ALLOCATOR; \
+ stackingAllocatorName = new (pBuffer__ACQUIRE_STACKING_ALLOCATOR) StackingAllocator; \
}\
allocatorOwner__ACQUIRE_STACKING_ALLOCATOR = true; \
} \
diff --git a/src/coreclr/vm/stacksampler.cpp b/src/coreclr/vm/stacksampler.cpp
deleted file mode 100644
index f49218e8590483..00000000000000
--- a/src/coreclr/vm/stacksampler.cpp
+++ /dev/null
@@ -1,433 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//
-// Summary:
-// --------
-//
-// StackSampler is intended to identify methods where the process is spending most of its time
-// and to re-JIT such methods in the background. Call these methods hot.
-//
-// Identifying hot methods:
-// ========================
-//
-// There is no easy way to tell at a given point in execution whether in the future an unseen
-// or un-hot method will become hot; So we track an evolving list of hot methods.
-//
-// We identify hot methods by suspending the runtime every "m" milliseconds. This operation
-// freezes all the threads. We now get a list of threads that are executing and walk their
-// stacks to get the managed method at the top of their stacks. The sampled list of methods
-// for each thread constitute a single sample. Once we obtain a sample, the threads are thawed.
-//
-// The more a method is present in samples, it is clear that the process is spending its time
-// in that method at several given points in time.
-//
-// We track this information on a per method basis, the count of its occurrences in each sample
-// using a hash map.
-//
-// Note:
-// =====
-// o Using the above technique we have only identified top methods at a given point in the execution.
-// The list of hot methods keeps evolving as we get more samples. Only at the process end can we
-// say that the evolving list of hot methods is THE list of hot methods for the whole process.
-// o Because we get the top managed method in the thread, this includes time spent by that method
-// in helper calls.
-// o If GC is in progress it has suspended the threads, and we would not be able to suspend the threads.
-//
-// Future Consideration:
-// =====================
-// We could track "trending" methods, as methods decay out so we can keep only "trending" variants
-// in the code manager and kick out "past" hot methods.
-//
-// Jitting in the background:
-// ==========================
-// Once we have the hot methods at a given point in time, we JIT them. The decision to JIT is configurable
-// by configuring the number of times a method is seen in samples before we would JIT it.
-// For example, if we are sampling every 10 msec and if we expect methods that spend at least 1 second
-// to be hot, then the number of times to see this method is roughly, 100, it is best to be conservative
-// with this number.
-//
-// Note that we JIT the evolving list of methods, without knowing ahead of time that the methods we JIT
-// will be the final top "n" hot methods due to the lack of knowledge of when the process will end.
-// This means we would over-JIT but this only yields results with false negatives.
-//
-// Currently we JIT in the background only once (with the current goal of getting a trace.)
-//
-// Note:
-// =====
-// o To run the JIT in the background, we try our best to JIT in the same app domain in which the original
-// JITting happened. But if we fail to acquire (ngen'ed method) or enter (unloaded domain) the original domain,
-// we then try to JIT it under the thread's app domain in which the method was last seen to be executing.
-//
-// o The JIT to use is configurable with DOTNET_AltJitName when DOTNET_StackSampling is enabled.
-//
-// o One use case is to collect traces as an .mc file from SuperPMI Shim JIT.
-//
-// Jitting parameters:
-// ==========================
-// The prestub tells us at JITting time using "RecordJittingInfo" to record the parameters used to JIT
-// originally. We use these parameters to JIT in the background when we decide to JIT the method.
-//
-
-
-#include "common.h"
-#include "corjit.h"
-#include "stacksampler.h"
-#include "threadsuspend.h"
-
-#ifdef FEATURE_STACK_SAMPLING
-
-// Global instance of the sampler
-StackSampler* g_pStackSampler = nullptr;
-
-// Create an instance of the stack sampler if sampling is enabled.
-void StackSampler::Init()
-{
- STANDARD_VM_CONTRACT;
-
- bool samplingEnabled = (CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_StackSamplingEnabled) != 0);
- if (samplingEnabled)
- {
- g_pStackSampler = new (nothrow) StackSampler();
- }
-}
-
-// ThreadProc for performing sampling and JITting.
-/* static */
-DWORD __stdcall StackSampler::SamplingThreadProc(void* arg)
-{
- WRAPPER_NO_CONTRACT;
-
- StackSampler* pThis = (StackSampler*) arg;
- pThis->ThreadProc();
- return 0;
-}
-
-// Constructor
-StackSampler::StackSampler()
- : m_crstJitInfo(CrstStackSampler, (CrstFlags)(CRST_UNSAFE_ANYMODE))
- , m_nSampleEvery(s_knDefaultSamplingIntervalMsec)
- , m_nSampleAfter(0)
- , m_nNumMethods(s_knDefaultNumMethods)
-{
- // When to start sampling after the thread launch.
- int nSampleAfter = CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_StackSamplingAfter);
- if (nSampleAfter != INT_MAX && nSampleAfter >= 0)
- {
- m_nSampleAfter = nSampleAfter;
- }
-
- // How frequently to sample.
- int nSampleEvery = CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_StackSamplingEvery);
- if (nSampleEvery != INT_MAX && nSampleEvery > 0)
- {
- m_nSampleEvery = nSampleEvery;
- }
-
- // Max number of methods to track.
- int nNumMethods = CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_StackSamplingNumMethods);
- if (nNumMethods != INT_MAX && nNumMethods > 0)
- {
- m_nNumMethods = nNumMethods;
- }
-
- // Launch the thread.
- m_pThread = SetupUnstartedThread();
- m_pThread->SetBackground(TRUE);
-
- // Passing "this" to the thread in the constructor.
- if (m_pThread->CreateNewThread(1*1024*1024, SamplingThreadProc, this))
- {
- m_pThread->StartThread();
- }
-}
-
-// Is "pMD" a good method, that is suitable for tracking as HOT and
-// JITting in the background.
-bool IsGoodMethodDesc(MethodDesc* pMD)
-{
- LIMITED_METHOD_CONTRACT;
- return !(pMD == nullptr || !pMD->IsIL() || pMD->IsUnboxingStub() || pMD->GetMethodTable()->Collectible());
-}
-
-//
-// An opportunity to record the parameters passed to the JIT at the time of JITting this method.
-/* static */
-void StackSampler::RecordJittingInfo(MethodDesc* pMD, CORJIT_FLAGS flags)
-{
- WRAPPER_NO_CONTRACT;
- if (g_pStackSampler == nullptr)
- {
- return;
- }
- // Skip if this is not a good method desc.
- if (!IsGoodMethodDesc(pMD))
- {
- return;
- }
- // Record in the hash map.
- g_pStackSampler->RecordJittingInfoInternal(pMD, flags);
-}
-
-void StackSampler::RecordJittingInfoInternal(MethodDesc* pMD, CORJIT_FLAGS flags)
-{
- JitInfoHashEntry entry(pMD, flags);
-
- // Record the domain in the hash map.
- {
- CrstHolder ch(&m_crstJitInfo);
- m_jitInfo.AddOrReplace(entry);
- }
-}
-
-// Stack walk callback data.
-struct WalkInfo
-{
- StackSampler* pThis;
-
- // The thread in which the walk is happening and the method is executing.
- // Used to obtain the app domain.
- Thread* pMdThread;
-};
-
-// Visitor for stack walk callback.
-StackWalkAction StackSampler::StackWalkCallback(CrawlFrame* pCf, VOID* data)
-{
- WRAPPER_NO_CONTRACT;
-
- WalkInfo* info = (WalkInfo*) data;
- return ((StackSampler*) info->pThis)->CrawlFrameVisitor(pCf, info->pMdThread);
-}
-
-// Stack walk visitor helper to maintain the hash map of method desc, their count
-// and the thread's domain in which the method is executing.
-StackWalkAction StackSampler::CrawlFrameVisitor(CrawlFrame* pCf, Thread* pMdThread)
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- MethodDesc* pMD = pCf->GetFunction();
-
- // Filter out methods we don't care about
- if (!IsGoodMethodDesc(pMD))
- {
- return SWA_CONTINUE;
- }
-
- // Lookup the method desc and obtain info.
- CountInfo info;
- m_countInfo.Lookup(pMD, &info);
-
- // Record the current domain ID of the method's thread, i.e.,
- // the method is last known to be executing.
- info.uCount++;
-
- // Put the info back.
- m_countInfo.AddOrReplace(CountInfoHashEntry(pMD, info));
-
- // We got the top good one, skip.
- return SWA_ABORT;
-}
-
-// Thread routine that suspends the runtime, walks the other threads' stacks to get the
-// top managed method. Restarts the runtime after samples are collected. Identifies top
-// methods from the samples and re-JITs them in the background.
-void StackSampler::ThreadProc()
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- // Complete the thread init.
- if (!m_pThread->HasStarted())
- {
- return;
- }
-
- // User asked us to sample after certain time.
- m_pThread->UserSleep(m_nSampleAfter);
-
- WalkInfo info = { this, nullptr };
-
- while (true)
- {
- EX_TRY
- {
- // Suspend the runtime.
- ThreadSuspend::SuspendEE(ThreadSuspend::SUSPEND_OTHER);
-
- // Walk all other threads.
- Thread* pThread = nullptr;
- while ((pThread = ThreadStore::GetThreadList(pThread)) != nullptr)
- {
- if (pThread == m_pThread)
- {
- continue;
- }
- // TODO: Detect if thread is suspended by user before we suspended and skip.
-
- info.pMdThread = pThread;
-
- // Walk the frames.
- pThread->StackWalkFrames(StackWalkCallback, &info, FUNCTIONSONLY | ALLOW_ASYNC_STACK_WALK);
- }
-
- // Restart the runtime.
- ThreadSuspend::RestartEE(FALSE, TRUE);
-
- // JIT the methods that frequently occur in samples.
- JitFrequentMethodsInSamples();
- }
- EX_CATCH
- {
- }
- EX_END_CATCH(SwallowAllExceptions);
-
- // User asked us to sample every few seconds.
- // TODO: Measure time to JIT using CycleTimer and subtract from the time we sleep every time.
- m_pThread->UserSleep(m_nSampleEvery);
- }
-}
-
-// Find the most frequent method in the samples and JIT them.
-void StackSampler::JitFrequentMethodsInSamples()
-{
- struct Count
- {
- MethodDesc* pMD;
- CountInfo info;
-
- static int __cdecl Decreasing(const void* e1, const void* e2)
- {
- return ((Count*) e2)->info.uCount - ((Count*) e1)->info.uCount;
- }
- };
-
- // We want to keep a max-heap of the top frequent methods in the samples.
- NewHolder freq(new (nothrow) Count[m_nNumMethods]);
-
- //
- // For each element in the samples, call it incoming, add to the "frequent" list
- // if the list has space to hold the incoming element.
- //
- // If the list doesn't have space, replace the min frequent element in the list
- // with the incoming element, if the latter is more frequent.
- //
- unsigned uLength = 0;
- for (CountInfoHash::Iterator iter = m_countInfo.Begin(), end = m_countInfo.End(); iter != end; iter++)
- {
- Count c = { (*iter).Key(), (*iter).Value() };
-
- // Is the list full? Drop the min element if incoming is more frequent.
- if (uLength == m_nNumMethods)
- {
- // Find the min element and the min index.
- unsigned uMinIndex = 0;
- unsigned uMin = freq[0].info.uCount;
- for (unsigned i = 1; i < uLength; ++i)
- {
- if (uMin > freq[i].info.uCount)
- {
- uMin = freq[i].info.uCount;
- uMinIndex = i;
- }
- }
- if (uMin < c.info.uCount)
- {
- freq[uMinIndex] = c;
- }
- }
- // List is not full, just add the incoming element.
- else
- {
- freq[uLength] = c;
- uLength++;
- }
- }
-
- // Sort by most frequent element first.
- qsort(freq, uLength, sizeof(Count), Count::Decreasing);
-
-#ifdef _DEBUG
- LOG((LF_JIT, LL_INFO100000, "-----------HOT METHODS-------\n"));
- for (unsigned i = 0; i < uLength; ++i)
- {
- // printf("%s:%s, %u\n", freq[i].pMD->GetMethodTable()->GetClass()->GetDebugClassName(), freq[i].pMD->GetName(), freq[i].info.uCount);
- LOG((LF_JIT, LL_INFO100000, "%s:%s, %u\n", freq[i].pMD->GetMethodTable()->GetClass()->GetDebugClassName(), freq[i].pMD->GetName(), freq[i].info.uCount));
- }
- LOG((LF_JIT, LL_INFO100000, "-----------------------------\n"));
-#endif
-
- // Do the JITting.
- for (unsigned i = 0; i < uLength; ++i)
- {
- // If not already JITted and the method is frequent enough to be important.
- if (!freq[i].info.fJitted && freq[i].info.uCount > s_knDefaultCountForImportance)
- {
- // Try to get the original app domain ID in which the method was JITTed, if not
- // use the app domain ID the method was last seen executing.
- JitAndCollectTrace(freq[i].pMD);
- }
- }
-}
-
-// Invoke the JIT for the method desc. Switch to the appropriate domain.
-void StackSampler::JitAndCollectTrace(MethodDesc* pMD)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_TRIGGERS;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- // Indicate to the JIT or the JIT interface that we are JITting
- // in the background for stack sampling.
- CORJIT_FLAGS flags(CORJIT_FLAGS::CORJIT_FLAG_SAMPLING_JIT_BACKGROUND);
-
- _ASSERTE(pMD->IsIL());
-
- EX_TRY
- {
- {
- GCX_PREEMP();
-
- COR_ILMETHOD_DECODER::DecoderStatus status;
- NewHolder pDecoder(
- new COR_ILMETHOD_DECODER(pMD->GetILHeader(),
- pMD->GetMDImport(),
- &status));
-
-#ifdef _DEBUG
- LOG((LF_JIT, LL_INFO100000, "Jitting the hot method desc using SuperPMI in the background thread -> "));
- LOG((LF_JIT, LL_INFO100000, "%s:%s\n", pMD->GetMethodTable()->GetClass()->GetDebugClassName(), pMD->GetName()));
-#endif
- NativeCodeVersion natCodeVer(pMD);
- PrepareCodeConfigBuffer cfgBuffer(natCodeVer);
- PCODE pCode = UnsafeJitFunction(cfgBuffer.GetConfig(), pDecoder, flags);
- }
-
- // Update that this method has been already JITted.
- CountInfo info;
- m_countInfo.Lookup(pMD, &info);
- info.fJitted = true;
- m_countInfo.AddOrReplace(CountInfoHashEntry(pMD, info));
- }
- EX_CATCH
- {
- }
- EX_END_CATCH(SwallowAllExceptions)
-
-}
-
-#endif // FEATURE_STACK_SAMPLING
diff --git a/src/coreclr/vm/stacksampler.h b/src/coreclr/vm/stacksampler.h
deleted file mode 100644
index d489d1366ad930..00000000000000
--- a/src/coreclr/vm/stacksampler.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-Module Name:
-
- StackSampler.h
-
---*/
-
-#ifndef __STACK_SAMPLER_H
-#define __STACK_SAMPLER_H
-#endif
-
-#ifdef FEATURE_STACK_SAMPLING
-
-class StackSampler
-{
-public:
- // Interface
- static void Init();
- static void RecordJittingInfo(MethodDesc* pMD, CORJIT_FLAGS flags);
-
-private:
-
- // Methods
- StackSampler();
- ~StackSampler();
-
- static DWORD __stdcall SamplingThreadProc(void* arg);
-
- static StackWalkAction StackWalkCallback(CrawlFrame* pCf, VOID* data);
-
- StackWalkAction CrawlFrameVisitor(CrawlFrame* pCf, Thread* pMdThread);
-
- void ThreadProc();
-
- void JitFrequentMethodsInSamples();
-
- void JitAndCollectTrace(MethodDesc* pMD);
-
- void RecordJittingInfoInternal(MethodDesc* pMD, CORJIT_FLAGS flags);
-
-
- // Constants
- static const int s_knDefaultSamplingIntervalMsec = 100;
- static const int s_knDefaultNumMethods = 32;
- static const int s_knDefaultCountForImportance = 0; // TODO: Set to some reasonable value.
-
- // Typedefs
- struct CountInfo;
- typedef MapSHash CountInfoHash;
- typedef CountInfoHash::element_t CountInfoHashEntry;
-
- typedef MapSHash JitInfoHash;
- typedef JitInfoHash::element_t JitInfoHashEntry;
-
- // Nested types
- struct CountInfo
- {
- unsigned uCount;
- bool fJitted;
- CountInfo() : uCount(0), fJitted(false) {}
- };
-
- // Fields
- Crst m_crstJitInfo;
- CountInfoHash m_countInfo;
- JitInfoHash m_jitInfo;
- Thread* m_pThread;
- unsigned m_nSampleEvery;
- unsigned m_nSampleAfter;
- unsigned m_nNumMethods;
-};
-#endif // FEATURE_STACK_SAMPLING
-
diff --git a/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/ILCompilerRIDs.props b/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/ILCompilerRIDs.props
index b7c6ca32c9f14e..1d51a78880ae2d 100644
--- a/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/ILCompilerRIDs.props
+++ b/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/ILCompilerRIDs.props
@@ -1,5 +1,7 @@
+
diff --git a/src/installer/pkg/projects/netcoreappRIDs.props b/src/installer/pkg/projects/netcoreappRIDs.props
index fbc6e4dc4c1a98..4c73b3dcb3c2b5 100644
--- a/src/installer/pkg/projects/netcoreappRIDs.props
+++ b/src/installer/pkg/projects/netcoreappRIDs.props
@@ -17,9 +17,6 @@
x86
-
- arm
-
arm64
diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props
index 14c9aa9b4213dc..3a961b3078c9d1 100644
--- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props
+++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props
@@ -250,6 +250,7 @@
+
diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj
index c28c6ea8fb53ca..f697e4d716a56c 100644
--- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj
+++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj
@@ -12,7 +12,7 @@
dotnet-crossgen2
crossgen2
- linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;freebsd-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64;win-arm
+ linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;freebsd-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64
false
tools/
true
@@ -85,9 +85,9 @@
$(TargetOSComponent)-$(TargetArchitecture)
-
+
- <_Crossgen2SymbolFilesToPackage Include="@(Reference->'$(CoreCLRArtifactsPath)PDB\%(FileName).pdb')" />
+ <_Crossgen2SymbolFilesToPackage Include="@(_CrossgenPublishFiles)" Condition="'%(Extension)' == '.pdb'" />
<_Crossgen2SymbolFilesToPackage Include="@(NativeRuntimeAsset->'$(CoreCLRArtifactsPdbDir)%(FileName).pdb')" Condition="'$(TargetOS)' == 'windows' and '%(FileName)' != 'crossgen2'" />
<_Crossgen2SymbolFilesToPackage Include="@(NativeRuntimeAsset->'$(CoreCLRArtifactsPath)%(FileName)%(Extension)$(SymbolsSuffix)')" Condition="'$(TargetOS)' != 'windows' and '%(FileName)' != 'crossgen2'" />
diff --git a/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.kn-IN.resx b/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.kn-IN.resx
index b0ec782f9a2a68..04130790681f41 100644
--- a/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.kn-IN.resx
+++ b/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.kn-IN.resx
@@ -118,6 +118,6 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- ನಮಸ್ಕಾರ
+ [kn-IN]
\ No newline at end of file
diff --git a/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.resx b/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.resx
index 81893ab57f0af6..0fad9b04a4938f 100644
--- a/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.resx
+++ b/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.resx
@@ -118,6 +118,6 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- Hello
+ [default]
\ No newline at end of file
diff --git a/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.ta-IN.resx b/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.ta-IN.resx
index b42699bbee2136..4acc307a1b73db 100644
--- a/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.ta-IN.resx
+++ b/src/installer/tests/Assets/TestProjects/LocalizedApp/Hello.ta-IN.resx
@@ -118,6 +118,6 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- வணக்கம்
+ [ta-IN]
\ No newline at end of file
diff --git a/src/installer/tests/Assets/TestUtils/TestProjects.targets b/src/installer/tests/Assets/TestUtils/TestProjects.targets
index 3aaec8fbd355aa..bb5740e9b240ec 100644
--- a/src/installer/tests/Assets/TestUtils/TestProjects.targets
+++ b/src/installer/tests/Assets/TestUtils/TestProjects.targets
@@ -15,7 +15,7 @@
LatestRuntimeFrameworkVersion="7.0.0"
RuntimeFrameworkName="Microsoft.NETCore.App"
RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.**RID**"
- RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;maccatalyst-x64;maccatalyst-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86"
+ RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;maccatalyst-x64;maccatalyst-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86"
TargetFramework="$(NetCoreAppCurrent)"
TargetingPackName="Microsoft.NETCore.App.Ref"
TargetingPackVersion="7.0.0"
@@ -25,7 +25,7 @@
ExcludedRuntimeIdentifiers="android"
AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**"
AppHostPackVersion="7.0.0"
- AppHostRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86"
+ AppHostRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86"
TargetFramework="$(NetCoreAppCurrent)"
Condition="'@(KnownAppHostPack)' == '' or !@(KnownAppHostPack->AnyHaveMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))" />
diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleLocalizedApp.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleLocalizedApp.cs
index 633dd4f266d402..13a1ad7e8aec1e 100644
--- a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleLocalizedApp.cs
+++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleLocalizedApp.cs
@@ -26,20 +26,12 @@ public void Bundled_Localized_App_Run_Succeeds()
var fixture = sharedTestState.TestFixture.Copy();
var singleFile = BundleSelfContainedApp(fixture);
- if (OperatingSystem.IsWindows())
- {
- // Set code page to output unicode characters.
- Command.Create("chcp 65001").Execute();
- }
-
Command.Create(singleFile)
.CaptureStdErr()
.CaptureStdOut()
.Execute()
- .Should()
- .Pass()
- .And
- .HaveStdOutContaining("\u0CA8\u0CAE\u0CB8\u0CCD\u0C95\u0CBE\u0CB0! \u0BB5\u0BA3\u0B95\u0BCD\u0B95\u0BAE\u0BCD! Hello!");
+ .Should().Pass()
+ .And.HaveStdOutContaining("[kn-IN]! [ta-IN]! [default]!");
}
public class SharedTestState : SharedTestStateBase, IDisposable
diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUsedWithSymbolicLinks.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUsedWithSymbolicLinks.cs
index 3b945dae016c89..53a4b3a1c94f19 100644
--- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUsedWithSymbolicLinks.cs
+++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUsedWithSymbolicLinks.cs
@@ -192,7 +192,6 @@ public void Put_app_directory_behind_symlink_and_use_dotnet()
}
[Fact]
- // If enabled, this tests will need to set the console code page to output unicode characters: Command.Create("chcp 65001").Execute();
[SkipOnPlatform(TestPlatforms.Windows, "Creating symbolic links requires administrative privilege on Windows, so skip test.")]
public void Put_satellite_assembly_behind_symlink()
{
@@ -219,7 +218,7 @@ public void Put_satellite_assembly_behind_symlink()
.CaptureStdOut()
.Execute()
.Should().Pass()
- .And.HaveStdOutContaining("\u0CA8\u0CAE\u0CB8\u0CCD\u0C95\u0CBE\u0CB0! \u0BB5\u0BA3\u0B95\u0BCD\u0B95\u0BAE\u0BCD! Hello!");
+ .And.HaveStdOutContaining("[kn-IN]! [ta-IN]! [default]!");
}
public class SharedTestState : IDisposable
diff --git a/src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Evp.DigestAlgs.cs b/src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Evp.DigestAlgs.cs
index 8ba0658735a297..d7325ca8e8574c 100644
--- a/src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Evp.DigestAlgs.cs
+++ b/src/libraries/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Evp.DigestAlgs.cs
@@ -47,12 +47,33 @@ internal static IntPtr EvpSha512() =>
internal static IntPtr HashAlgorithmToEvp(string hashAlgorithmId) => hashAlgorithmId switch
{
- nameof(HashAlgorithmName.SHA1) => EvpSha1(),
- nameof(HashAlgorithmName.SHA256) => EvpSha256(),
- nameof(HashAlgorithmName.SHA384) => EvpSha384(),
- nameof(HashAlgorithmName.SHA512) => EvpSha512(),
- nameof(HashAlgorithmName.MD5) => EvpMd5(),
+ HashAlgorithmNames.SHA1 => EvpSha1(),
+ HashAlgorithmNames.SHA256 => EvpSha256(),
+ HashAlgorithmNames.SHA384 => EvpSha384(),
+ HashAlgorithmNames.SHA512 => EvpSha512(),
+ HashAlgorithmNames.MD5 => EvpMd5(),
+ HashAlgorithmNames.SHA3_256 or HashAlgorithmNames.SHA3_384 or HashAlgorithmNames.SHA3_512 =>
+ throw new PlatformNotSupportedException(),
_ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId))
};
+
+ internal static bool HashAlgorithmSupported(string hashAlgorithmId)
+ {
+ switch (hashAlgorithmId)
+ {
+ case HashAlgorithmNames.SHA1:
+ case HashAlgorithmNames.SHA256:
+ case HashAlgorithmNames.SHA384:
+ case HashAlgorithmNames.SHA512:
+ case HashAlgorithmNames.MD5:
+ return true;
+ case HashAlgorithmNames.SHA3_256:
+ case HashAlgorithmNames.SHA3_384:
+ case HashAlgorithmNames.SHA3_512:
+ return false;
+ default:
+ throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId));
+ }
+ }
}
}
diff --git a/src/libraries/Common/src/Interop/Browser/Interop.Normalization.cs b/src/libraries/Common/src/Interop/Browser/Interop.Normalization.cs
deleted file mode 100644
index b55cf5307d704f..00000000000000
--- a/src/libraries/Common/src/Interop/Browser/Interop.Normalization.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Runtime.CompilerServices;
-using System.Text;
-
-internal static partial class Interop
-{
- internal static unsafe partial class JsGlobalization
- {
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- internal static extern unsafe int IsNormalized(NormalizationForm normalizationForm, in string source, out int exceptionalResult, out object result);
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- internal static extern unsafe int NormalizeString(NormalizationForm normalizationForm, in string source, char* dstBuffer, int dstBufferCapacity, out int exceptionalResult, out object result);
- }
-}
diff --git a/src/libraries/Common/src/Interop/Interop.Utils.cs b/src/libraries/Common/src/Interop/Interop.Utils.cs
index b7cd0665c96483..498236c4ac4608 100644
--- a/src/libraries/Common/src/Interop/Interop.Utils.cs
+++ b/src/libraries/Common/src/Interop/Interop.Utils.cs
@@ -12,7 +12,7 @@ internal static partial class Interop
/// increasing buffer until the size is big enough.
///
internal static bool CallStringMethod(
- SpanFunc interopCall,
+ SpanFunc interopCall,
TArg1 arg1, TArg2 arg2, TArg3 arg3,
out string? result)
{
@@ -20,19 +20,19 @@ internal static bool CallStringMethod(
const int MaxHeapSize = 1280; // max from previous version of the code, starting at 80 and doubling four times
Span buffer = stackalloc char[InitialSize];
- Interop.Globalization.ResultCode resultCode = interopCall(buffer, arg1, arg2, arg3);
+ Globalization.ResultCode resultCode = interopCall(buffer, arg1, arg2, arg3);
- if (resultCode == Interop.Globalization.ResultCode.Success)
+ if (resultCode == Globalization.ResultCode.Success)
{
result = buffer.Slice(0, buffer.IndexOf('\0')).ToString();
return true;
}
- if (resultCode == Interop.Globalization.ResultCode.InsufficientBuffer)
+ if (resultCode == Globalization.ResultCode.InsufficientBuffer)
{
// Increase the string size and try again
buffer = new char[MaxHeapSize];
- if (interopCall(buffer, arg1, arg2, arg3) == Interop.Globalization.ResultCode.Success)
+ if (interopCall(buffer, arg1, arg2, arg3) == Globalization.ResultCode.Success)
{
result = buffer.Slice(0, buffer.IndexOf('\0')).ToString();
return true;
diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.DigestAlgs.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.DigestAlgs.cs
index abaefab1dab6fc..dec9bdd84a5ddf 100644
--- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.DigestAlgs.cs
+++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EVP.DigestAlgs.cs
@@ -14,45 +14,128 @@ internal static partial class Crypto
private static volatile IntPtr s_evpSha256;
private static volatile IntPtr s_evpSha384;
private static volatile IntPtr s_evpSha512;
+ private static volatile IntPtr s_evpSha3_256;
+ private static volatile IntPtr s_evpSha3_384;
+ private static volatile IntPtr s_evpSha3_512;
+ private static volatile bool s_evpSha3_256Cached;
+ private static volatile bool s_evpSha3_384Cached;
+ private static volatile bool s_evpSha3_512Cached;
[LibraryImport(Libraries.CryptoNative)]
private static partial IntPtr CryptoNative_EvpMd5();
- internal static IntPtr EvpMd5() =>
+ private static IntPtr EvpMd5() =>
s_evpMd5 != IntPtr.Zero ? s_evpMd5 : (s_evpMd5 = CryptoNative_EvpMd5());
[LibraryImport(Libraries.CryptoNative)]
- internal static partial IntPtr CryptoNative_EvpSha1();
+ private static partial IntPtr CryptoNative_EvpSha1();
- internal static IntPtr EvpSha1() =>
+ private static IntPtr EvpSha1() =>
s_evpSha1 != IntPtr.Zero ? s_evpSha1 : (s_evpSha1 = CryptoNative_EvpSha1());
[LibraryImport(Libraries.CryptoNative)]
- internal static partial IntPtr CryptoNative_EvpSha256();
+ private static partial IntPtr CryptoNative_EvpSha256();
- internal static IntPtr EvpSha256() =>
+ private static IntPtr EvpSha256() =>
s_evpSha256 != IntPtr.Zero ? s_evpSha256 : (s_evpSha256 = CryptoNative_EvpSha256());
[LibraryImport(Libraries.CryptoNative)]
- internal static partial IntPtr CryptoNative_EvpSha384();
+ private static partial IntPtr CryptoNative_EvpSha384();
- internal static IntPtr EvpSha384() =>
+ private static IntPtr EvpSha384() =>
s_evpSha384 != IntPtr.Zero ? s_evpSha384 : (s_evpSha384 = CryptoNative_EvpSha384());
[LibraryImport(Libraries.CryptoNative)]
- internal static partial IntPtr CryptoNative_EvpSha512();
+ private static partial IntPtr CryptoNative_EvpSha512();
- internal static IntPtr EvpSha512() =>
+ private static IntPtr EvpSha512() =>
s_evpSha512 != IntPtr.Zero ? s_evpSha512 : (s_evpSha512 = CryptoNative_EvpSha512());
- internal static IntPtr HashAlgorithmToEvp(string hashAlgorithmId) => hashAlgorithmId switch
+ [LibraryImport(Libraries.CryptoNative)]
+ private static partial IntPtr CryptoNative_EvpSha3_256();
+
+ private static IntPtr EvpSha3_256()
+ {
+ if (!s_evpSha3_256Cached)
+ {
+ s_evpSha3_256 = CryptoNative_EvpSha3_256();
+ s_evpSha3_256Cached = true;
+ }
+
+ return s_evpSha3_256;
+ }
+
+ [LibraryImport(Libraries.CryptoNative)]
+ private static partial IntPtr CryptoNative_EvpSha3_384();
+
+ private static IntPtr EvpSha3_384()
+ {
+ if (!s_evpSha3_384Cached)
+ {
+ s_evpSha3_384 = CryptoNative_EvpSha3_384();
+ s_evpSha3_384Cached = true;
+ }
+
+ return s_evpSha3_384;
+ }
+
+ [LibraryImport(Libraries.CryptoNative)]
+ private static partial IntPtr CryptoNative_EvpSha3_512();
+
+ private static IntPtr EvpSha3_512()
+ {
+ if (!s_evpSha3_512Cached)
+ {
+ s_evpSha3_512 = CryptoNative_EvpSha3_512();
+ s_evpSha3_512Cached = true;
+ }
+
+ return s_evpSha3_512;
+ }
+
+
+ internal static IntPtr HashAlgorithmToEvp(string hashAlgorithmId)
+ {
+ switch (hashAlgorithmId)
+ {
+ case HashAlgorithmNames.SHA1: return EvpSha1();
+ case HashAlgorithmNames.SHA256: return EvpSha256();
+ case HashAlgorithmNames.SHA384: return EvpSha384();
+ case HashAlgorithmNames.SHA512: return EvpSha512();
+ case HashAlgorithmNames.SHA3_256:
+ IntPtr sha3_256 = EvpSha3_256();
+ return sha3_256 != 0 ? sha3_256 : throw new PlatformNotSupportedException();
+ case HashAlgorithmNames.SHA3_384:
+ IntPtr sha3_384 = EvpSha3_384();
+ return sha3_384 != 0 ? sha3_384 : throw new PlatformNotSupportedException();
+ case HashAlgorithmNames.SHA3_512:
+ IntPtr sha3_512 = EvpSha3_512();
+ return sha3_512 != 0 ? sha3_512 : throw new PlatformNotSupportedException();
+ case nameof(HashAlgorithmName.MD5): return EvpMd5();
+ default:
+ throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId));
+ };
+ }
+
+ internal static bool HashAlgorithmSupported(string hashAlgorithmId)
{
- nameof(HashAlgorithmName.SHA1) => EvpSha1(),
- nameof(HashAlgorithmName.SHA256) => EvpSha256(),
- nameof(HashAlgorithmName.SHA384) => EvpSha384(),
- nameof(HashAlgorithmName.SHA512) => EvpSha512(),
- nameof(HashAlgorithmName.MD5) => EvpMd5(),
- _ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId))
- };
+ switch (hashAlgorithmId)
+ {
+ case HashAlgorithmNames.SHA1:
+ case HashAlgorithmNames.SHA256:
+ case HashAlgorithmNames.SHA384:
+ case HashAlgorithmNames.SHA512:
+ case HashAlgorithmNames.MD5:
+ return true;
+ case HashAlgorithmNames.SHA3_256:
+ return EvpSha3_256() != 0;
+ case HashAlgorithmNames.SHA3_384:
+ return EvpSha3_384() != 0;
+ case HashAlgorithmNames.SHA3_512:
+ return EvpSha3_512() != 0;
+ default:
+ throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId));
+ }
+ }
}
}
diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs
index 14a6066eeb3b75..9cc01436b9138c 100644
--- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs
+++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs
@@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
+using System.Globalization;
using System.IO;
using System.Net;
using System.Net.Security;
@@ -84,16 +85,11 @@ private static bool DisableTlsResume
private static int GetCacheSize()
{
- int cacheSize = -1;
string? value = AppContext.GetData(TlsCacheSizeCtxName) as string ?? Environment.GetEnvironmentVariable(TlsCacheSizeEnvironmentVariable);
- try
+ if (!int.TryParse(value, CultureInfo.InvariantCulture, out int cacheSize))
{
- if (value != null)
- {
- cacheSize = int.Parse(value);
- }
+ cacheSize = -1;
}
- catch { };
return cacheSize;
}
diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs
index 483cfe04b23238..f7d82befca494a 100644
--- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs
+++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs
@@ -45,7 +45,7 @@ internal struct TRACE_ENABLE_INFO
public long MatchAllKeyword;
}
- [LibraryImport(Interop.Libraries.Advapi32)]
+ [LibraryImport(Libraries.Advapi32)]
internal static unsafe partial int EnumerateTraceGuidsEx(
TRACE_QUERY_INFO_CLASS TraceQueryInfoClass,
void* InBuffer,
diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs
index d66fe12d87a9bd..1c1438adb1d020 100644
--- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs
+++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs
@@ -32,7 +32,7 @@ internal static unsafe int EventWriteTransfer(
return HResult;
}
- [LibraryImport(Interop.Libraries.Advapi32, EntryPoint = "EventWriteTransfer")]
+ [LibraryImport(Libraries.Advapi32, EntryPoint = "EventWriteTransfer")]
private static unsafe partial int EventWriteTransfer_PInvoke(
long registrationHandle,
in EventDescriptor eventDescriptor,
diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_void.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_void.cs
index e61ce35a91f97a..02f7b03c5812ef 100644
--- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_void.cs
+++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_void.cs
@@ -9,7 +9,7 @@ internal static partial class Interop
{
internal static partial class Advapi32
{
- [LibraryImport(Interop.Libraries.Advapi32, SetLastError = true)]
+ [LibraryImport(Libraries.Advapi32, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static unsafe partial bool GetTokenInformation(
SafeTokenHandle TokenHandle,
diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCreateKeyEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCreateKeyEx.cs
index 9e5e420146e191..e7cde43076f554 100644
--- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCreateKeyEx.cs
+++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCreateKeyEx.cs
@@ -22,7 +22,7 @@ internal static partial int RegCreateKeyEx(
string? lpClass,
int dwOptions,
int samDesired,
- ref Interop.Kernel32.SECURITY_ATTRIBUTES secAttrs,
+ ref Kernel32.SECURITY_ATTRIBUTES secAttrs,
out SafeRegistryHandle hkResult,
out int lpdwDisposition);
}
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs
index aec34aeb523478..5f060292a666c7 100644
--- a/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs
@@ -13,6 +13,7 @@ internal static partial class BCrypt
internal static class BCryptAlgorithmCache
{
private static readonly ConcurrentDictionary<(string HashAlgorithmId, BCryptOpenAlgorithmProviderFlags Flags), (SafeBCryptAlgorithmHandle Handle, int HashSizeInBytes)> s_handles = new();
+ private static readonly ConcurrentDictionary<(string HashAlgorithmId, BCryptOpenAlgorithmProviderFlags Flags), bool> s_supported = new();
///
/// Returns a SafeBCryptAlgorithmHandle of the desired algorithm and flags. This is a shared handle so do not dispose it!
@@ -43,6 +44,42 @@ public static unsafe SafeBCryptAlgorithmHandle GetCachedBCryptAlgorithmHandle(st
}
}
}
+
+ public static unsafe bool IsBCryptAlgorithmSupported(string hashAlgorithmId, BCryptOpenAlgorithmProviderFlags flags)
+ {
+ var key = (hashAlgorithmId, flags);
+
+ if (s_supported.TryGetValue(key, out bool supported))
+ {
+ return supported;
+ }
+
+ NTSTATUS status = BCryptOpenAlgorithmProvider(
+ out SafeBCryptAlgorithmHandle handle,
+ key.hashAlgorithmId,
+ null,
+ key.flags);
+
+ bool isSupported = status == NTSTATUS.STATUS_SUCCESS;
+
+ if (s_supported.TryAdd(key, isSupported) && isSupported)
+ {
+ // It's a valid algorithm. Let's prime the handle cache while we are here. Presumably it's
+ // going to get used if we're asking if it's supported.
+ int hashSize = BCryptGetDWordProperty(handle, BCryptPropertyStrings.BCRYPT_HASH_LENGTH);
+ Debug.Assert(hashSize > 0);
+
+ if (s_handles.TryAdd(key, (handle, hashSize)))
+ {
+ // If we added the handle to the cache, don't dispose of it and return our answer.
+ return isSupported;
+ }
+ }
+
+ // Either the algorithm isn't supported or we don't need it for priming the cache, so Dispose.
+ handle.Dispose();
+ return isSupported;
+ }
}
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptAlgPseudoHandle.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptAlgPseudoHandle.cs
index 57c508bf709479..d0a4e878f2764a 100644
--- a/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptAlgPseudoHandle.cs
+++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptAlgPseudoHandle.cs
@@ -23,6 +23,12 @@ public enum BCryptAlgPseudoHandle : uint
BCRYPT_HMAC_SHA384_ALG_HANDLE = 0x000000c1,
BCRYPT_HMAC_SHA512_ALG_HANDLE = 0x000000d1,
BCRYPT_PBKDF2_ALG_HANDLE = 0x00000331,
+ BCRYPT_SHA3_256_ALG_HANDLE = 0x000003B1,
+ BCRYPT_SHA3_384_ALG_HANDLE = 0x000003C1,
+ BCRYPT_SHA3_512_ALG_HANDLE = 0x000003D1,
+ BCRYPT_HMAC_SHA3_256_ALG_HANDLE = 0x000003E1,
+ BCRYPT_HMAC_SHA3_384_ALG_HANDLE = 0x000003F1,
+ BCRYPT_HMAC_SHA3_512_ALG_HANDLE = 0x00000401,
}
internal static bool PseudoHandlesSupported { get; } =
diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CopyFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CopyFile.cs
index 001c7afc08a5ea..8fd8476677f482 100644
--- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CopyFile.cs
+++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CopyFile.cs
@@ -10,14 +10,14 @@ internal static partial class Kernel32
{
internal static int CopyFile(string src, string dst, bool failIfExists)
{
- int copyFlags = failIfExists ? Interop.Kernel32.FileOperations.COPY_FILE_FAIL_IF_EXISTS : 0;
+ int copyFlags = failIfExists ? FileOperations.COPY_FILE_FAIL_IF_EXISTS : 0;
int cancel = 0;
- if (!Interop.Kernel32.CopyFileEx(src, dst, IntPtr.Zero, IntPtr.Zero, ref cancel, copyFlags))
+ if (!CopyFileEx(src, dst, IntPtr.Zero, IntPtr.Zero, ref cancel, copyFlags))
{
return Marshal.GetLastPInvokeError();
}
- return Interop.Errors.ERROR_SUCCESS;
+ return Errors.ERROR_SUCCESS;
}
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs
index 0eac8ca5cff91f..c00eb8655478d8 100644
--- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs
+++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs
@@ -9,6 +9,6 @@ internal static partial class Kernel32
{
[LibraryImport(Libraries.Kernel32)]
[SuppressGCTransition]
- internal static unsafe partial Interop.BOOL FileTimeToSystemTime(ulong* lpFileTime, Interop.Kernel32.SYSTEMTIME* lpSystemTime);
+ internal static unsafe partial BOOL FileTimeToSystemTime(ulong* lpFileTime, SYSTEMTIME* lpSystemTime);
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfo.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfo.cs
index 7f4558d05ac7f1..ad9aa0da87ccba 100644
--- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfo.cs
+++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfo.cs
@@ -17,6 +17,6 @@ internal unsafe struct CPINFO
}
[LibraryImport(Libraries.Kernel32)]
- internal static unsafe partial Interop.BOOL GetCPInfo(uint codePage, CPINFO* lpCpInfo);
+ internal static unsafe partial BOOL GetCPInfo(uint codePage, CPINFO* lpCpInfo);
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcessorNumberEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcessorNumberEx.cs
index 4ca0d0eeb4f8f5..1224f926efc21a 100644
--- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcessorNumberEx.cs
+++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCurrentProcessorNumberEx.cs
@@ -8,7 +8,7 @@ internal static partial class Interop
{
internal static partial class Kernel32
{
- [StructLayoutAttribute(LayoutKind.Sequential)]
+ [StructLayout(LayoutKind.Sequential)]
internal struct PROCESSOR_NUMBER
{
public ushort Group;
diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTime.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTime.cs
index 9b80349ca1b609..a276d59314aa02 100644
--- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTime.cs
+++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetSystemTime.cs
@@ -9,6 +9,6 @@ internal static partial class Kernel32
{
[LibraryImport(Libraries.Kernel32)]
[SuppressGCTransition]
- internal static unsafe partial void GetSystemTime(Interop.Kernel32.SYSTEMTIME* lpSystemTime);
+ internal static unsafe partial void GetSystemTime(SYSTEMTIME* lpSystemTime);
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Globalization.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Globalization.cs
index 99e18caf50b1c4..ca34cca3a34599 100644
--- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Globalization.cs
+++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Globalization.cs
@@ -117,7 +117,7 @@ internal static unsafe partial bool IsNLSDefinedString(
int cchStr);
[LibraryImport("kernel32.dll")]
- internal static unsafe partial Interop.BOOL GetUserPreferredUILanguages(uint dwFlags, uint* pulNumLanguages, char* pwszLanguagesBuffer, uint* pcchLanguagesBuffer);
+ internal static unsafe partial BOOL GetUserPreferredUILanguages(uint dwFlags, uint* pulNumLanguages, char* pwszLanguagesBuffer, uint* pcchLanguagesBuffer);
[LibraryImport("kernel32.dll", StringMarshalling = StringMarshalling.Utf16)]
internal static unsafe partial int GetLocaleInfoEx(string lpLocaleName, uint LCType, void* lpLCData, int cchData);
diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OutputDebugString.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OutputDebugString.cs
index 0012b5de2899d7..684a575ecb9085 100644
--- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OutputDebugString.cs
+++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OutputDebugString.cs
@@ -7,7 +7,7 @@ internal static partial class Interop
{
internal static partial class Kernel32
{
- [LibraryImport(Interop.Libraries.Kernel32, EntryPoint = "OutputDebugStringW", StringMarshalling = StringMarshalling.Utf16)]
+ [LibraryImport(Libraries.Kernel32, EntryPoint = "OutputDebugStringW", StringMarshalling = StringMarshalling.Utf16)]
internal static partial void OutputDebugString(string message);
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs
index 9b267a480126c2..2cb594e3cdf9ad 100644
--- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs
+++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs
@@ -9,6 +9,6 @@ internal static partial class Kernel32
{
[LibraryImport(Libraries.Kernel32)]
[SuppressGCTransition]
- internal static unsafe partial Interop.BOOL SystemTimeToFileTime(Interop.Kernel32.SYSTEMTIME* lpSystemTime, ulong* lpFileTime);
+ internal static unsafe partial BOOL SystemTimeToFileTime(SYSTEMTIME* lpSystemTime, ulong* lpFileTime);
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs
index de38b9e0a96c42..b38ffdb2efe50c 100644
--- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs
+++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs
@@ -9,9 +9,9 @@ internal static partial class Interop
internal static partial class Kernel32
{
[LibraryImport(Libraries.Kernel32)]
- internal static unsafe partial Interop.BOOL TzSpecificLocalTimeToSystemTime(
+ internal static unsafe partial BOOL TzSpecificLocalTimeToSystemTime(
IntPtr lpTimeZoneInformation,
- Interop.Kernel32.SYSTEMTIME* lpLocalTime,
- Interop.Kernel32.SYSTEMTIME* lpUniversalTime);
+ SYSTEMTIME* lpLocalTime,
+ SYSTEMTIME* lpUniversalTime);
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtCreateFile.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtCreateFile.cs
index cc80f325702c3c..d1a07c14221ef9 100644
--- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtCreateFile.cs
+++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtCreateFile.cs
@@ -203,7 +203,7 @@ public enum CreateDisposition : uint
///
/// Open if exists or fail if doesn't exist. Equivalent to OPEN_EXISTING or
- /// .
+ /// .
///
///
/// TruncateExisting also uses Open and then manually truncates the file
@@ -214,25 +214,25 @@ public enum CreateDisposition : uint
///
/// Create if doesn't exist or fail if does exist. Equivalent to CREATE_NEW
- /// or .
+ /// or .
///
FILE_CREATE = 2,
///
/// Open if exists or create if doesn't exist. Equivalent to OPEN_ALWAYS or
- /// .
+ /// .
///
FILE_OPEN_IF = 3,
///
/// Open and overwrite if exists or fail if doesn't exist. Equivalent to
- /// TRUNCATE_EXISTING or .
+ /// TRUNCATE_EXISTING or .
///
FILE_OVERWRITE = 4,
///
/// Open and overwrite if exists or create if doesn't exist. Equivalent to
- /// CREATE_ALWAYS or .
+ /// CREATE_ALWAYS or .
///
FILE_OVERWRITE_IF = 5
}
diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CLSIDFromProgID.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CLSIDFromProgID.cs
index 5a9b58d6bd72de..cf2108ec6ab020 100644
--- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CLSIDFromProgID.cs
+++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CLSIDFromProgID.cs
@@ -8,7 +8,7 @@ internal static partial class Interop
{
internal static partial class Ole32
{
- [LibraryImport(Interop.Libraries.Ole32, StringMarshalling = StringMarshalling.Utf16)]
+ [LibraryImport(Libraries.Ole32, StringMarshalling = StringMarshalling.Utf16)]
internal static partial int CLSIDFromProgID(string lpszProgID, out Guid lpclsid);
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoCreateGuid.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoCreateGuid.cs
index 92b36a053dd533..ad8e77784cf8b2 100644
--- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoCreateGuid.cs
+++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoCreateGuid.cs
@@ -8,7 +8,7 @@ internal static partial class Interop
{
internal static partial class Ole32
{
- [LibraryImport(Interop.Libraries.Ole32)]
+ [LibraryImport(Libraries.Ole32)]
internal static partial int CoCreateGuid(out Guid guid);
}
}
diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetStandardMarshal.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetStandardMarshal.cs
index 11d26766d5063c..299c598e061671 100644
--- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetStandardMarshal.cs
+++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.CoGetStandardMarshal.cs
@@ -8,7 +8,7 @@ internal static partial class Interop
{
internal static partial class Ole32
{
- [LibraryImport(Interop.Libraries.Ole32)]
+ [LibraryImport(Libraries.Ole32)]
internal static partial int CoGetStandardMarshal(ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags, out IntPtr ppMarshal);
}
}
diff --git a/src/libraries/Common/src/System/Collections/Concurrent/MultiProducerMultiConsumerQueue.cs b/src/libraries/Common/src/System/Collections/Concurrent/MultiProducerMultiConsumerQueue.cs
index e9da29081a3180..4fac49a6dfb25f 100644
--- a/src/libraries/Common/src/System/Collections/Concurrent/MultiProducerMultiConsumerQueue.cs
+++ b/src/libraries/Common/src/System/Collections/Concurrent/MultiProducerMultiConsumerQueue.cs
@@ -15,21 +15,21 @@ internal sealed class MultiProducerMultiConsumerQueue : ConcurrentQueue, I
{
/// Enqueues an item into the queue.
/// The item to enqueue.
- void IProducerConsumerQueue.Enqueue(T item) { base.Enqueue(item); }
+ void IProducerConsumerQueue.Enqueue(T item) { Enqueue(item); }
/// Attempts to dequeue an item from the queue.
/// The dequeued item.
/// true if an item could be dequeued; otherwise, false.
- bool IProducerConsumerQueue.TryDequeue([MaybeNullWhen(false)] out T result) { return base.TryDequeue(out result); }
+ bool IProducerConsumerQueue.TryDequeue([MaybeNullWhen(false)] out T result) { return TryDequeue(out result); }
/// Gets whether the collection is currently empty.
- bool IProducerConsumerQueue.IsEmpty => base.IsEmpty;
+ bool IProducerConsumerQueue.IsEmpty => IsEmpty;
/// Gets the number of items in the collection.
- int IProducerConsumerQueue.Count => base.Count;
+ int IProducerConsumerQueue.Count => Count;
/// A thread-safe way to get the number of items in the collection. May synchronize access by locking the provided synchronization object.
/// ConcurrentQueue.Count is thread safe, no need to acquire the lock.
- int IProducerConsumerQueue.GetCountSafe(object syncObj) => base.Count;
+ int IProducerConsumerQueue.GetCountSafe(object syncObj) => Count;
}
}
diff --git a/src/libraries/Common/src/System/Diagnostics/DiagnosticsHelper.cs b/src/libraries/Common/src/System/Diagnostics/DiagnosticsHelper.cs
index 18f10c0d520d87..ce7f345b0ea9cd 100644
--- a/src/libraries/Common/src/System/Diagnostics/DiagnosticsHelper.cs
+++ b/src/libraries/Common/src/System/Diagnostics/DiagnosticsHelper.cs
@@ -32,7 +32,7 @@ internal static bool CompareTags(List>? sortedTags
}
int count = sortedTags.Count;
- int size = count / (sizeof(long) * 8) + 1;
+ int size = count / (sizeof(ulong) * 8) + 1;
BitMapper bitMapper = new BitMapper(size <= 100 ? stackalloc ulong[size] : new ulong[size]);
if (tags2 is ICollection> tagsCol)
@@ -124,15 +124,15 @@ public BitMapper(Span bitMap)
{
_bitMap = bitMap;
_bitMap.Clear();
- _maxIndex = bitMap.Length * sizeof(long) * 8;
+ _maxIndex = bitMap.Length * sizeof(ulong) * 8;
}
public int MaxIndex => _maxIndex;
private static void GetIndexAndMask(int index, out int bitIndex, out ulong mask)
{
- bitIndex = index >> 6;
- int bit = index & (sizeof(long) * 8 - 1);
+ bitIndex = index >> 6; // divide by 64 == (sizeof(ulong) * 8) bits
+ int bit = index & (sizeof(ulong) * 8 - 1);
mask = 1UL << bit;
}
diff --git a/src/libraries/Common/src/System/IO/PathInternal.cs b/src/libraries/Common/src/System/IO/PathInternal.cs
index c6ea2e2261805e..a07d5cafffde2a 100644
--- a/src/libraries/Common/src/System/IO/PathInternal.cs
+++ b/src/libraries/Common/src/System/IO/PathInternal.cs
@@ -128,7 +128,7 @@ internal static bool RemoveRelativeSegments(ReadOnlySpan path, int rootLen
// We treat "\.." , "\." and "\\" as a relative segment. We want to collapse the first separator past the root presuming
// the root actually ends in a separator. Otherwise the first segment for RemoveRelativeSegments
// in cases like "\\?\C:\.\" and "\\?\C:\..\", the first segment after the root will be ".\" and "..\" which is not considered as a relative segment and hence not be removed.
- if (PathInternal.IsDirectorySeparator(path[skip - 1]))
+ if (IsDirectorySeparator(path[skip - 1]))
skip--;
// Remove "//", "/./", and "/../" from the path by copying each character to the output,
@@ -143,18 +143,18 @@ internal static bool RemoveRelativeSegments(ReadOnlySpan path, int rootLen
{
char c = path[i];
- if (PathInternal.IsDirectorySeparator(c) && i + 1 < path.Length)
+ if (IsDirectorySeparator(c) && i + 1 < path.Length)
{
// Skip this character if it's a directory separator and if the next character is, too,
// e.g. "parent//child" => "parent/child"
- if (PathInternal.IsDirectorySeparator(path[i + 1]))
+ if (IsDirectorySeparator(path[i + 1]))
{
continue;
}
// Skip this character and the next if it's referring to the current directory,
// e.g. "parent/./child" => "parent/child"
- if ((i + 2 == path.Length || PathInternal.IsDirectorySeparator(path[i + 2])) &&
+ if ((i + 2 == path.Length || IsDirectorySeparator(path[i + 2])) &&
path[i + 1] == '.')
{
i++;
@@ -164,14 +164,14 @@ internal static bool RemoveRelativeSegments(ReadOnlySpan path, int rootLen
// Skip this character and the next two if it's referring to the parent directory,
// e.g. "parent/child/../grandchild" => "parent/grandchild"
if (i + 2 < path.Length &&
- (i + 3 == path.Length || PathInternal.IsDirectorySeparator(path[i + 3])) &&
+ (i + 3 == path.Length || IsDirectorySeparator(path[i + 3])) &&
path[i + 1] == '.' && path[i + 2] == '.')
{
// Unwind back to the last slash (and if there isn't one, clear out everything).
int s;
for (s = sb.Length - 1; s >= skip; s--)
{
- if (PathInternal.IsDirectorySeparator(sb[s]))
+ if (IsDirectorySeparator(sb[s]))
{
sb.Length = (i + 3 >= path.Length && s == skip) ? s + 1 : s; // to avoid removing the complete "\tmp\" segment in cases like \\?\C:\tmp\..\, C:\tmp\..
break;
@@ -188,9 +188,9 @@ internal static bool RemoveRelativeSegments(ReadOnlySpan path, int rootLen
}
// Normalize the directory separator if needed
- if (c != PathInternal.DirectorySeparatorChar && c == PathInternal.AltDirectorySeparatorChar)
+ if (c != DirectorySeparatorChar && c == AltDirectorySeparatorChar)
{
- c = PathInternal.DirectorySeparatorChar;
+ c = DirectorySeparatorChar;
flippedSeparator = true;
}
diff --git a/src/libraries/Common/src/System/Net/Http/X509ResourceClient.cs b/src/libraries/Common/src/System/Net/Http/X509ResourceClient.cs
index 5fe2b8ce402382..57538487800e1e 100644
--- a/src/libraries/Common/src/System/Net/Http/X509ResourceClient.cs
+++ b/src/libraries/Common/src/System/Net/Http/X509ResourceClient.cs
@@ -12,7 +12,7 @@ namespace System.Net.Http
{
internal static partial class X509ResourceClient
{
- private static readonly Func>? s_downloadBytes = CreateDownloadBytesFunc();
+ private static readonly Func>? s_downloadBytes = CreateDownloadBytesFunc();
static partial void ReportNoClient();
static partial void ReportNegativeTimeout();
@@ -24,18 +24,17 @@ internal static partial class X509ResourceClient
internal static byte[]? DownloadAsset(string uri, TimeSpan downloadTimeout)
{
- ValueTask task = DownloadAssetCore(uri, downloadTimeout, async: false);
+ Task task = DownloadAssetCore(uri, downloadTimeout, async: false);
Debug.Assert(task.IsCompletedSuccessfully);
return task.Result;
}
internal static Task DownloadAssetAsync(string uri, TimeSpan downloadTimeout)
{
- ValueTask task = DownloadAssetCore(uri, downloadTimeout, async: true);
- return task.AsTask();
+ return DownloadAssetCore(uri, downloadTimeout, async: true);
}
- private static async ValueTask DownloadAssetCore(string uri, TimeSpan downloadTimeout, bool async)
+ private static async Task DownloadAssetCore(string uri, TimeSpan downloadTimeout, bool async)
{
if (s_downloadBytes is null)
{
@@ -60,8 +59,12 @@ internal static partial class X509ResourceClient
try
{
- ret = await s_downloadBytes(uri, cts?.Token ?? default, async).ConfigureAwait(false);
- return ret;
+ Task task = s_downloadBytes(uri, cts?.Token ?? default, async);
+ await ((Task)task).ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
+ if (task.IsCompletedSuccessfully)
+ {
+ return task.Result;
+ }
}
catch { }
finally
@@ -74,7 +77,7 @@ internal static partial class X509ResourceClient
return null;
}
- private static Func>? CreateDownloadBytesFunc()
+ private static Func>? CreateDownloadBytesFunc()
{
try
{
diff --git a/src/libraries/Common/src/System/Security/Cryptography/HashOneShotHelpers.cs b/src/libraries/Common/src/System/Security/Cryptography/HashOneShotHelpers.cs
index debc16c329b1e5..f80e69c8bf53a8 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/HashOneShotHelpers.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/HashOneShotHelpers.cs
@@ -12,28 +12,18 @@ internal static class HashOneShotHelpers
{
internal static byte[] HashData(HashAlgorithmName hashAlgorithm, ReadOnlySpan source)
{
- if (hashAlgorithm == HashAlgorithmName.SHA256)
- {
- return SHA256.HashData(source);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA1)
- {
- return SHA1.HashData(source);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA512)
- {
- return SHA512.HashData(source);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA384)
- {
- return SHA384.HashData(source);
- }
- else if (Helpers.HasMD5 && hashAlgorithm == HashAlgorithmName.MD5)
- {
- return MD5.HashData(source);
- }
-
- throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
+ return hashAlgorithm.Name switch
+ {
+ HashAlgorithmNames.SHA256 => SHA256.HashData(source),
+ HashAlgorithmNames.SHA1 => SHA1.HashData(source),
+ HashAlgorithmNames.SHA512 => SHA512.HashData(source),
+ HashAlgorithmNames.SHA384 => SHA384.HashData(source),
+ HashAlgorithmNames.SHA3_256 => SHA3_256.HashData(source),
+ HashAlgorithmNames.SHA3_384 => SHA3_384.HashData(source),
+ HashAlgorithmNames.SHA3_512 => SHA3_512.HashData(source),
+ HashAlgorithmNames.MD5 when Helpers.HasMD5 => MD5.HashData(source),
+ _ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)),
+ };
}
internal static bool TryHashData(
@@ -42,54 +32,34 @@ internal static bool TryHashData(
Span destination,
out int bytesWritten)
{
- if (hashAlgorithm == HashAlgorithmName.SHA256)
- {
- return SHA256.TryHashData(source, destination, out bytesWritten);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA1)
- {
- return SHA1.TryHashData(source, destination, out bytesWritten);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA512)
- {
- return SHA512.TryHashData(source, destination, out bytesWritten);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA384)
- {
- return SHA384.TryHashData(source, destination, out bytesWritten);
- }
- else if (Helpers.HasMD5 && hashAlgorithm == HashAlgorithmName.MD5)
- {
- return MD5.TryHashData(source, destination, out bytesWritten);
- }
-
- throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
+ return hashAlgorithm.Name switch
+ {
+ HashAlgorithmNames.SHA256 => SHA256.TryHashData(source, destination, out bytesWritten),
+ HashAlgorithmNames.SHA1 => SHA1.TryHashData(source, destination, out bytesWritten),
+ HashAlgorithmNames.SHA512 => SHA512.TryHashData(source, destination, out bytesWritten),
+ HashAlgorithmNames.SHA384 => SHA384.TryHashData(source, destination, out bytesWritten),
+ HashAlgorithmNames.SHA3_256 => SHA3_256.TryHashData(source, destination, out bytesWritten),
+ HashAlgorithmNames.SHA3_384 => SHA3_384.TryHashData(source, destination, out bytesWritten),
+ HashAlgorithmNames.SHA3_512 => SHA3_512.TryHashData(source, destination, out bytesWritten),
+ HashAlgorithmNames.MD5 when Helpers.HasMD5 => MD5.TryHashData(source, destination, out bytesWritten),
+ _ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)),
+ };
}
internal static byte[] HashData(HashAlgorithmName hashAlgorithm, Stream source)
{
- if (hashAlgorithm == HashAlgorithmName.SHA256)
- {
- return SHA256.HashData(source);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA1)
- {
- return SHA1.HashData(source);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA512)
- {
- return SHA512.HashData(source);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA384)
- {
- return SHA384.HashData(source);
- }
- else if (Helpers.HasMD5 && hashAlgorithm == HashAlgorithmName.MD5)
- {
- return MD5.HashData(source);
- }
-
- throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
+ return hashAlgorithm.Name switch
+ {
+ HashAlgorithmNames.SHA256 => SHA256.HashData(source),
+ HashAlgorithmNames.SHA1 => SHA1.HashData(source),
+ HashAlgorithmNames.SHA512 => SHA512.HashData(source),
+ HashAlgorithmNames.SHA384 => SHA384.HashData(source),
+ HashAlgorithmNames.SHA3_256 => SHA3_256.HashData(source),
+ HashAlgorithmNames.SHA3_384 => SHA3_384.HashData(source),
+ HashAlgorithmNames.SHA3_512 => SHA3_512.HashData(source),
+ HashAlgorithmNames.MD5 when Helpers.HasMD5 => MD5.HashData(source),
+ _ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)),
+ };
}
internal static int MacData(
@@ -98,28 +68,18 @@ internal static int MacData(
ReadOnlySpan source,
Span destination)
{
- if (hashAlgorithm == HashAlgorithmName.SHA256)
- {
- return HMACSHA256.HashData(key, source, destination);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA1)
- {
- return HMACSHA1.HashData(key, source, destination);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA512)
- {
- return HMACSHA512.HashData(key, source, destination);
- }
- else if (hashAlgorithm == HashAlgorithmName.SHA384)
- {
- return HMACSHA384.HashData(key, source, destination);
- }
- else if (Helpers.HasMD5 && hashAlgorithm == HashAlgorithmName.MD5)
- {
- return HMACMD5.HashData(key, source, destination);
- }
-
- throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name));
+ return hashAlgorithm.Name switch
+ {
+ HashAlgorithmNames.SHA256 => HMACSHA256.HashData(key, source, destination),
+ HashAlgorithmNames.SHA1 => HMACSHA1.HashData(key, source, destination),
+ HashAlgorithmNames.SHA512 => HMACSHA512.HashData(key, source, destination),
+ HashAlgorithmNames.SHA384 => HMACSHA384.HashData(key, source, destination),
+ HashAlgorithmNames.SHA3_256 => HMACSHA3_256.HashData(key, source, destination),
+ HashAlgorithmNames.SHA3_384 => HMACSHA3_384.HashData(key, source, destination),
+ HashAlgorithmNames.SHA3_512 => HMACSHA3_512.HashData(key, source, destination),
+ HashAlgorithmNames.MD5 when Helpers.HasMD5 => HMACMD5.HashData(key, source, destination),
+ _ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)),
+ };
}
}
}
diff --git a/src/libraries/Common/src/System/Security/Cryptography/Oids.cs b/src/libraries/Common/src/System/Security/Cryptography/Oids.cs
index 40e761dab09d4c..b7364108222ad1 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/Oids.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/Oids.cs
@@ -24,6 +24,9 @@ internal static partial class Oids
internal const string RsaPkcs1Sha256 = "1.2.840.113549.1.1.11";
internal const string RsaPkcs1Sha384 = "1.2.840.113549.1.1.12";
internal const string RsaPkcs1Sha512 = "1.2.840.113549.1.1.13";
+ internal const string RsaPkcs1Sha3_256 = "2.16.840.1.101.3.4.3.14";
+ internal const string RsaPkcs1Sha3_384 = "2.16.840.1.101.3.4.3.15";
+ internal const string RsaPkcs1Sha3_512 = "2.16.840.1.101.3.4.3.16";
internal const string Esdh = "1.2.840.113549.1.9.16.3.5";
internal const string EcDiffieHellman = "1.3.132.1.12";
internal const string DiffieHellman = "1.2.840.10046.2.1";
@@ -65,6 +68,9 @@ internal static partial class Oids
internal const string Sha256 = "2.16.840.1.101.3.4.2.1";
internal const string Sha384 = "2.16.840.1.101.3.4.2.2";
internal const string Sha512 = "2.16.840.1.101.3.4.2.3";
+ internal const string Sha3_256 = "2.16.840.1.101.3.4.2.8";
+ internal const string Sha3_384 = "2.16.840.1.101.3.4.2.9";
+ internal const string Sha3_512 = "2.16.840.1.101.3.4.2.10";
// DSA CMS uses the combined signature+digest OID
internal const string DsaWithSha1 = "1.2.840.10040.4.3";
@@ -84,6 +90,10 @@ internal static partial class Oids
internal const string ECDsaWithSha384 = "1.2.840.10045.4.3.3";
internal const string ECDsaWithSha512 = "1.2.840.10045.4.3.4";
+ internal const string ECDsaWithSha3_256 = "2.16.840.1.101.3.4.3.10";
+ internal const string ECDsaWithSha3_384 = "2.16.840.1.101.3.4.3.11";
+ internal const string ECDsaWithSha3_512 = "2.16.840.1.101.3.4.3.12";
+
internal const string Mgf1 = "1.2.840.113549.1.1.8";
internal const string PSpecified = "1.2.840.113549.1.1.9";
diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs b/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs
index dc002fdfd59732..34ad612323f2d7 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs
@@ -873,6 +873,18 @@ private static void ValidatePadding(RSAEncryptionPadding padding)
{
throw PaddingModeNotSupported();
}
+
+ // If the hash algorithm is not supported by the platform, such as SHA3, then we don't support it for
+ // RSAOpenSsl, even if OpenSSL itself might support OAEP-SHA3. We use the platform's hashing in some
+ // places for RSA, regardless of what is implementing RSA. If RSAOpenSsl were used on macOS, then
+ // there would be some incongruence between what hashes OpenSSL supports and what macOS support. Signing
+ // for example, always uses the platform's implementation of hashing.
+ if (padding.Mode == RSAEncryptionPaddingMode.Oaep &&
+ padding.OaepHashAlgorithm.Name is string name &&
+ !HashProviderDispenser.HashSupported(name))
+ {
+ throw new PlatformNotSupportedException();
+ }
}
private static void ValidatePadding(RSASignaturePadding padding)
diff --git a/src/libraries/Common/src/System/Security/Cryptography/RsaPaddingProcessor.cs b/src/libraries/Common/src/System/Security/Cryptography/RsaPaddingProcessor.cs
index 4db95b2ff4d242..66256440b7e708 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/RsaPaddingProcessor.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/RsaPaddingProcessor.cs
@@ -44,41 +44,62 @@ internal static class RsaPaddingProcessor
0x40,
};
+ private static ReadOnlySpan DigestInfoSha3_256 => new byte[]
+ {
+ 0x30, 0x31, 0x30, 0x0D, 0x06, 0x09, 0x60, 0x86, 0x48,
+ 0x01, 0x65, 0x03, 0x04, 0x02, 0x08, 0x05, 0x00, 0x04,
+ 0x20,
+ };
+
+ private static ReadOnlySpan DigestInfoSha3_384 => new byte[]
+ {
+ 0x30, 0x41, 0x30, 0x0D, 0x06, 0x09, 0x60, 0x86, 0x48,
+ 0x01, 0x65, 0x03, 0x04, 0x02, 0x09, 0x05, 0x00, 0x04,
+ 0x30,
+ };
+
+ private static ReadOnlySpan DigestInfoSha3_512 => new byte[]
+ {
+ 0x30, 0x51, 0x30, 0x0D, 0x06, 0x09, 0x60, 0x86, 0x48,
+ 0x01, 0x65, 0x03, 0x04, 0x02, 0x0A, 0x05, 0x00, 0x04,
+ 0x40,
+ };
+
private static ReadOnlySpan EightZeros => new byte[8];
private static ReadOnlySpan GetDigestInfoForAlgorithm(
HashAlgorithmName hashAlgorithmName,
out int digestLengthInBytes)
{
- if (hashAlgorithmName == HashAlgorithmName.MD5)
- {
- digestLengthInBytes = MD5.HashSizeInBytes;
- return DigestInfoMD5;
- }
- else if (hashAlgorithmName == HashAlgorithmName.SHA1)
- {
- digestLengthInBytes = SHA1.HashSizeInBytes;
- return DigestInfoSha1;
- }
- else if (hashAlgorithmName == HashAlgorithmName.SHA256)
- {
- digestLengthInBytes = SHA256.HashSizeInBytes;
- return DigestInfoSha256;
- }
- else if (hashAlgorithmName == HashAlgorithmName.SHA384)
+ switch (hashAlgorithmName.Name)
{
- digestLengthInBytes = SHA384.HashSizeInBytes;
- return DigestInfoSha384;
- }
- else if (hashAlgorithmName == HashAlgorithmName.SHA512)
- {
- digestLengthInBytes = SHA512.HashSizeInBytes;
- return DigestInfoSha512;
- }
- else
- {
- Debug.Fail("Unknown digest algorithm");
- throw new CryptographicException();
+ case HashAlgorithmNames.MD5:
+ digestLengthInBytes = MD5.HashSizeInBytes;
+ return DigestInfoMD5;
+ case HashAlgorithmNames.SHA1:
+ digestLengthInBytes = SHA1.HashSizeInBytes;
+ return DigestInfoSha1;
+ case HashAlgorithmNames.SHA256:
+ digestLengthInBytes = SHA256.HashSizeInBytes;
+ return DigestInfoSha256;
+ case HashAlgorithmNames.SHA384:
+ digestLengthInBytes = SHA384.HashSizeInBytes;
+ return DigestInfoSha384;
+ case HashAlgorithmNames.SHA512:
+ digestLengthInBytes = SHA512.HashSizeInBytes;
+ return DigestInfoSha512;
+ case HashAlgorithmNames.SHA3_256:
+ digestLengthInBytes = SHA3_256.HashSizeInBytes;
+ return DigestInfoSha3_256;
+ case HashAlgorithmNames.SHA3_384:
+ digestLengthInBytes = SHA3_384.HashSizeInBytes;
+ return DigestInfoSha3_384;
+ case HashAlgorithmNames.SHA3_512:
+ digestLengthInBytes = SHA3_512.HashSizeInBytes;
+ return DigestInfoSha3_512;
+ default:
+ Debug.Fail("Unknown digest algorithm");
+ throw new CryptographicException();
}
}
diff --git a/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdf.cs b/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdf.cs
index 6598136dfe7a77..a9f37b0fb11a4e 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdf.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdf.cs
@@ -559,6 +559,26 @@ private static void CheckHashAlgorithm(HashAlgorithmName hashAlgorithm)
case HashAlgorithmNames.SHA384:
case HashAlgorithmNames.SHA512:
break;
+#if NET8_0_OR_GREATER
+ case HashAlgorithmNames.SHA3_256:
+ if (!HMACSHA3_256.IsSupported)
+ {
+ throw new PlatformNotSupportedException();
+ }
+ break;
+ case HashAlgorithmNames.SHA3_384:
+ if (!HMACSHA3_384.IsSupported)
+ {
+ throw new PlatformNotSupportedException();
+ }
+ break;
+ case HashAlgorithmNames.SHA3_512:
+ if (!HMACSHA3_512.IsSupported)
+ {
+ throw new PlatformNotSupportedException();
+ }
+ break;
+#endif
default:
throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmName));
}
diff --git a/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationCng.cs b/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationCng.cs
index ca8f72c61428aa..46143f15c86acc 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationCng.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationCng.cs
@@ -193,7 +193,7 @@ private static unsafe SafeBCryptKeyHandle CreateSymmetricKey(byte* symmetricKey,
private static int GetHashBlockSize(string hashAlgorithmName)
{
- // Block sizes per NIST FIPS pub 180-4.
+ // Block sizes per NIST FIPS pub 180-4 and FIPS 202.
switch (hashAlgorithmName)
{
case HashAlgorithmNames.SHA1:
@@ -202,6 +202,12 @@ private static int GetHashBlockSize(string hashAlgorithmName)
case HashAlgorithmNames.SHA384:
case HashAlgorithmNames.SHA512:
return 1024 / 8;
+ case HashAlgorithmNames.SHA3_256:
+ return 1088 / 8;
+ case HashAlgorithmNames.SHA3_384:
+ return 832 / 8;
+ case HashAlgorithmNames.SHA3_512:
+ return 576 / 8;
default:
Debug.Fail($"Unexpected hash algorithm '{hashAlgorithmName}'");
throw new CryptographicException();
diff --git a/src/libraries/Common/src/System/Threading/AsyncOverSyncWithIoCancellation.cs b/src/libraries/Common/src/System/Threading/AsyncOverSyncWithIoCancellation.cs
index ac13cb07903f06..9285def9f15d83 100644
--- a/src/libraries/Common/src/System/Threading/AsyncOverSyncWithIoCancellation.cs
+++ b/src/libraries/Common/src/System/Threading/AsyncOverSyncWithIoCancellation.cs
@@ -14,7 +14,7 @@ namespace System.Threading
///
/// Helper for performing asynchronous I/O on Windows implemented as queueing a work item that performs synchronous I/O, complete with cancellation support.
///
- internal sealed class AsyncOverSyncWithIoCancellation : IThreadPoolWorkItem, ICriticalNotifyCompletion
+ internal sealed class AsyncOverSyncWithIoCancellation
{
/// A thread handle for the current OS thread.
/// This is lazily-initialized for the current OS thread. We rely on finalization to clean up after it when the thread goes away.
@@ -32,23 +32,9 @@ internal sealed class AsyncOverSyncWithIoCancellation : IThreadPoolWorkItem, ICr
/// the callback wasn't and will never be invoked. If it's non-null, its completion represents the completion of the asynchronous callback.
///
private volatile Task? CallbackCompleted;
- /// The continuation object handed to this instance when used as an awaiter to scheduler work to the thread pool.
- private Action? _continuation;
-
- // awaitable / awaiter implementation that enables this instance to be awaited in order to queue
- // execution to the thread pool. This is purely a cost-saving measure in order to reuse this
- // object we already need as the queued work item.
- public AsyncOverSyncWithIoCancellation GetAwaiter() => this;
- public bool IsCompleted => false;
- public void GetResult() { }
- public void OnCompleted(Action continuation) => throw new NotSupportedException();
- public void UnsafeOnCompleted(Action continuation)
- {
- Debug.Assert(_continuation is null);
- _continuation = continuation;
- ThreadPool.UnsafeQueueUserWorkItem(this, preferLocal: true);
- }
- void IThreadPoolWorkItem.Execute() => _continuation!();
+
+ /// Prevent external instantiation.
+ private AsyncOverSyncWithIoCancellation() { }
/// Queues the invocation of to the thread pool.
/// The type of the state passed to .
@@ -65,27 +51,24 @@ public void UnsafeOnCompleted(Action continuation)
[AsyncMethodBuilder(typeof(PoolingAsyncValueTaskMethodBuilder))]
public static async ValueTask InvokeAsync(Action action, TState state, CancellationToken cancellationToken)
{
- // Create the work item state object. This is used to pass around state through various APIs,
- // while also serving double duty as the work item used to queue the operation to the thread pool.
- var workItem = new AsyncOverSyncWithIoCancellation();
-
- // Queue the work to the thread pool. This is implemented as a custom awaiter that queues the
- // awaiter itself to the thread pool.
- await workItem;
+ // Queue the work to complete asynchronously.
+ await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
// Register for cancellation, perform the work, and clean up. Even though we're in an async method, awaits _must not_ be used inside
// the using block, or else the I/O cancellation could both not work and negatively interact with I/O on another thread. The func
// _must_ be invoked on the same thread that invoked RegisterCancellation, with no intervening work.
- await using (workItem.RegisterCancellation(cancellationToken).ConfigureAwait(false))
+ SyncAsyncWorkItemRegistration reg = RegisterCancellation(cancellationToken);
+ try
{
- try
- {
- action(state);
- }
- catch (OperationCanceledException oce) when (cancellationToken.IsCancellationRequested && oce.CancellationToken != cancellationToken)
- {
- throw CreateAppropriateCancellationException(cancellationToken, oce);
- }
+ action(state);
+ }
+ catch (OperationCanceledException oce) when (cancellationToken.IsCancellationRequested && oce.CancellationToken != cancellationToken)
+ {
+ throw CreateAppropriateCancellationException(cancellationToken, oce);
+ }
+ finally
+ {
+ await reg.DisposeAsync().ConfigureAwait(false);
}
}
@@ -105,27 +88,24 @@ public static async ValueTask InvokeAsync(Action action, TState
[AsyncMethodBuilder(typeof(PoolingAsyncValueTaskMethodBuilder<>))]
public static async ValueTask InvokeAsync(Func func, TState state, CancellationToken cancellationToken)
{
- // Create the work item state object. This is used to pass around state through various APIs,
- // while also serving double duty as the work item used to queue the operation to the thread pool.
- var workItem = new AsyncOverSyncWithIoCancellation();
-
- // Queue the work to the thread pool. This is implemented as a custom awaiter that queues the
- // awaiter itself to the thread pool.
- await workItem;
+ // Queue the work to complete asynchronously.
+ await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
// Register for cancellation, perform the work, and clean up. Even though we're in an async method, awaits _must not_ be used inside
// the using block, or else the I/O cancellation could both not work and negatively interact with I/O on another thread. The func
// _must_ be invoked on the same thread that invoked RegisterCancellation, with no intervening work.
- await using (workItem.RegisterCancellation(cancellationToken).ConfigureAwait(false))
+ SyncAsyncWorkItemRegistration reg = RegisterCancellation(cancellationToken);
+ try
{
- try
- {
- return func(state);
- }
- catch (OperationCanceledException oce) when (cancellationToken.IsCancellationRequested && oce.CancellationToken != cancellationToken)
- {
- throw CreateAppropriateCancellationException(cancellationToken, oce);
- }
+ return func(state);
+ }
+ catch (OperationCanceledException oce) when (cancellationToken.IsCancellationRequested && oce.CancellationToken != cancellationToken)
+ {
+ throw CreateAppropriateCancellationException(cancellationToken, oce);
+ }
+ finally
+ {
+ await reg.DisposeAsync().ConfigureAwait(false);
}
}
@@ -145,7 +125,7 @@ private static OperationCanceledException CreateAppropriateCancellationException
return newOce;
}
- /// The struct IDisposable returned from in order to clean up after the registration.
+ /// The struct IDisposable returned from RegisterCancellation in order to clean up after the registration.
private struct SyncAsyncWorkItemRegistration : IDisposable, IAsyncDisposable
{
public AsyncOverSyncWithIoCancellation WorkItem;
@@ -201,44 +181,44 @@ public async ValueTask DisposeAsync()
/// Registers for cancellation with the specified token.
/// Upon cancellation being requested, the implementation will attempt to CancelSynchronousIo for the thread calling RegisterCancellation.
- private SyncAsyncWorkItemRegistration RegisterCancellation(CancellationToken cancellationToken)
- {
- // If the token can't be canceled, there's nothing to register.
- if (!cancellationToken.CanBeCanceled)
- {
- return default;
- }
+ private static SyncAsyncWorkItemRegistration RegisterCancellation(CancellationToken cancellationToken) =>
+ cancellationToken.CanBeCanceled ? RegisterCancellation(new AsyncOverSyncWithIoCancellation(), cancellationToken) :
+ default; // If the token can't be canceled, there's nothing to register.
+ /// Registers for cancellation with the specified token.
+ /// Upon cancellation being requested, the implementation will attempt to CancelSynchronousIo for the thread calling RegisterCancellation.
+ private static SyncAsyncWorkItemRegistration RegisterCancellation(AsyncOverSyncWithIoCancellation instance, CancellationToken cancellationToken)
+ {
// Get a handle for the current thread. This is stored and used to cancel the I/O on this thread
// in response to the cancellation token having cancellation requested. If the handle is invalid,
// which could happen if OpenThread fails, skip attempts at cancellation. The handle needs to be
// opened with THREAD_TERMINATE in order to be able to call CancelSynchronousIo.
- ThreadHandle = t_currentThreadHandle;
- if (ThreadHandle is null)
+ instance.ThreadHandle = t_currentThreadHandle;
+ if (instance.ThreadHandle is null)
{
- ThreadHandle = Interop.Kernel32.OpenThread(Interop.Kernel32.THREAD_TERMINATE, bInheritHandle: false, Interop.Kernel32.GetCurrentThreadId());
- if (ThreadHandle.IsInvalid)
+ instance.ThreadHandle = Interop.Kernel32.OpenThread(Interop.Kernel32.THREAD_TERMINATE, bInheritHandle: false, Interop.Kernel32.GetCurrentThreadId());
+ if (instance.ThreadHandle.IsInvalid)
{
int lastError = Marshal.GetLastPInvokeError();
Debug.Fail($"{nameof(Interop.Kernel32.OpenThread)} unexpectedly failed with 0x{lastError:X8}: {Marshal.GetPInvokeErrorMessage(lastError)}");
return default;
}
- t_currentThreadHandle = ThreadHandle;
+ t_currentThreadHandle = instance.ThreadHandle;
}
// Register with the token.
SyncAsyncWorkItemRegistration reg = default;
- reg.WorkItem = this;
+ reg.WorkItem = instance;
reg.CancellationRegistration = cancellationToken.UnsafeRegister(static s =>
{
- var state = (AsyncOverSyncWithIoCancellation)s!;
+ var instance = (AsyncOverSyncWithIoCancellation)s!;
// If cancellation was already requested when UnsafeRegister was called, it'll invoke
// the callback immediately. If we allowed that to loop until cancellation was successful,
// we'd deadlock, as we'd never perform the very I/O it was waiting for. As such, if
// the callback is invoked prior to be ready for it, we ignore the callback.
- if (!state.FinishedCancellationRegistration)
+ if (!instance.FinishedCancellationRegistration)
{
return;
}
@@ -250,17 +230,17 @@ private SyncAsyncWorkItemRegistration RegisterCancellation(CancellationToken can
// this looping synchronously, we instead queue the invocation of the looping so that it
// runs asynchronously from the Cancel call. Then in order to be able to track its completion,
// we store the Task representing that asynchronous work, such that cleanup can wait for the Task.
- state.CallbackCompleted = Task.Factory.StartNew(static s =>
+ instance.CallbackCompleted = Task.Factory.StartNew(static s =>
{
- var state = (AsyncOverSyncWithIoCancellation)s!;
+ var instance = (AsyncOverSyncWithIoCancellation)s!;
// Cancel the I/O. If the cancellation happens too early and we haven't yet initiated
// the synchronous operation, CancelSynchronousIo will fail with ERROR_NOT_FOUND, and
// we'll loop to try again.
SpinWait sw = default;
- while (state.ContinueTryingToCancel)
+ while (instance.ContinueTryingToCancel)
{
- if (Interop.Kernel32.CancelSynchronousIo(state.ThreadHandle!))
+ if (Interop.Kernel32.CancelSynchronousIo(instance.ThreadHandle!))
{
// Successfully canceled I/O.
break;
@@ -276,12 +256,12 @@ private SyncAsyncWorkItemRegistration RegisterCancellation(CancellationToken can
sw.SpinOnce();
}
- }, s, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
- }, this);
+ }, instance, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
+ }, instance);
// Now that we've registered with the token, tell the callback it's safe to enter
// its cancellation loop if the callback is invoked.
- FinishedCancellationRegistration = true;
+ instance.FinishedCancellationRegistration = true;
// And now since cancellation may have been requested and we may have suppressed it
// until the previous line, check to see if cancellation has now been requested, and
diff --git a/src/libraries/Common/src/System/TimeProvider.cs b/src/libraries/Common/src/System/TimeProvider.cs
index d1489826eecc40..a8db64c6739047 100644
--- a/src/libraries/Common/src/System/TimeProvider.cs
+++ b/src/libraries/Common/src/System/TimeProvider.cs
@@ -16,7 +16,7 @@ public abstract class TimeProvider
/// and a timer based on .
///
///
- /// If the changes after the object is returned, the change will be reflected in any subsequent operations that retrieve .
+ /// If the changes after the object is returned, the change will be reflected in any subsequent operations that retrieve .
///
public static TimeProvider System { get; } = new SystemTimeProvider();
@@ -274,7 +274,7 @@ private static (uint duration, uint periodTime) CheckAndGetValues(TimeSpan dueTi
}
///
- /// Used to create a instance returned from and uses the default implementation
+ /// Used to create a instance returned from and uses the default implementation
/// provided by which uses , , , and .
///
private sealed class SystemTimeProvider : TimeProvider
diff --git a/src/libraries/Common/tests/StreamConformanceTests/System/IO/StreamConformanceTests.cs b/src/libraries/Common/tests/StreamConformanceTests/System/IO/StreamConformanceTests.cs
index 2c7627dd9ac07e..5a2c897571ccf9 100644
--- a/src/libraries/Common/tests/StreamConformanceTests/System/IO/StreamConformanceTests.cs
+++ b/src/libraries/Common/tests/StreamConformanceTests/System/IO/StreamConformanceTests.cs
@@ -603,15 +603,6 @@ protected sealed class CustomTaskScheduler : TaskScheduler
protected override IEnumerable GetScheduledTasks() => new Task[0];
}
- protected readonly struct JumpToThreadPoolAwaiter : ICriticalNotifyCompletion
- {
- public JumpToThreadPoolAwaiter GetAwaiter() => this;
- public bool IsCompleted => false;
- public void OnCompleted(Action continuation) => ThreadPool.QueueUserWorkItem(_ => continuation());
- public void UnsafeOnCompleted(Action continuation) => ThreadPool.UnsafeQueueUserWorkItem(_ => continuation(), null);
- public void GetResult() { }
- }
-
protected sealed unsafe class NativeMemoryManager : MemoryManager
{
private readonly int _length;
@@ -2046,9 +2037,7 @@ public static IEnumerable ReadAsync_ContinuesOnCurrentContextIfDesired
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "iOS/tvOS blocks binding to UNIX sockets")]
public virtual async Task ReadAsync_ContinuesOnCurrentSynchronizationContextIfDesired(bool flowExecutionContext, bool? continueOnCapturedContext)
{
- await default(JumpToThreadPoolAwaiter); // escape xunit sync ctx
-
- using StreamPair streams = await CreateConnectedStreamsAsync();
+ using StreamPair streams = await CreateConnectedStreamsAsync().ConfigureAwait(ConfigureAwaitOptions.ForceYielding /* escape xunit sync ctx */);
foreach ((Stream writeable, Stream readable) in GetReadWritePairs(streams))
{
Assert.Null(SynchronizationContext.Current);
@@ -2130,9 +2119,7 @@ public virtual async Task ReadAsync_ContinuesOnCurrentSynchronizationContextIfDe
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "iOS/tvOS blocks binding to UNIX sockets")]
public virtual async Task ReadAsync_ContinuesOnCurrentTaskSchedulerIfDesired(bool flowExecutionContext, bool? continueOnCapturedContext)
{
- await default(JumpToThreadPoolAwaiter); // escape xunit sync ctx
-
- using StreamPair streams = await CreateConnectedStreamsAsync();
+ using StreamPair streams = await CreateConnectedStreamsAsync().ConfigureAwait(ConfigureAwaitOptions.ForceYielding /* escape xunit sync ctx */);
foreach ((Stream writeable, Stream readable) in GetReadWritePairs(streams))
{
Assert.Null(SynchronizationContext.Current);
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanFactory.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanFactory.cs
index 6497640809f3ab..84bbea4587eef4 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanFactory.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanFactory.cs
@@ -14,6 +14,7 @@ public interface IECDiffieHellmanProvider
bool ExplicitCurvesSupported { get; }
bool CanDeriveNewPublicKey { get; }
bool SupportsRawDerivation { get; }
+ bool SupportsSha3 { get; }
}
public static partial class ECDiffieHellmanFactory
@@ -45,5 +46,7 @@ public static bool IsCurveValid(Oid oid)
public static bool CanDeriveNewPublicKey => s_provider.CanDeriveNewPublicKey;
public static bool SupportsRawDerivation => s_provider.SupportsRawDerivation;
+
+ public static bool SupportsSha3 => s_provider.SupportsSha3;
}
}
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hash.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hash.cs
index dfca203f4fa14c..0065092e52aad1 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hash.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hash.cs
@@ -207,56 +207,87 @@ public static void DeriveKeyMaterialEquivalentToDeriveKeyFromHash()
public static IEnumerable HashDerivationTestCases()
{
- return new object[][]
+ yield return new object[]
{
- new object[]
- {
- HashAlgorithmName.SHA256,
- null,
- null,
- "595B71C33D9D40ACD9CA847C47267DAEE7498EEF0B553482FAA45791418AC679",
- },
+ HashAlgorithmName.SHA256,
+ null,
+ null,
+ "595B71C33D9D40ACD9CA847C47267DAEE7498EEF0B553482FAA45791418AC679",
+ };
- new object[]
- {
- HashAlgorithmName.SHA1,
- null,
- null,
- "25E464FAC33F4A5F8786627FB3685F4C31B26327",
- },
+ yield return new object[]
+ {
+ HashAlgorithmName.SHA1,
+ null,
+ null,
+ "25E464FAC33F4A5F8786627FB3685F4C31B26327",
+ };
- new object[]
- {
- HashAlgorithmName.SHA256,
- "02040608",
- null,
- "D0F4C42D61E794E508A079822F3069C9F89D9E3385C8E090425FF38927798017",
- },
+ yield return new object[]
+ {
+ HashAlgorithmName.SHA256,
+ "02040608",
+ null,
+ "D0F4C42D61E794E508A079822F3069C9F89D9E3385C8E090425FF38927798017",
+ };
+
+ yield return new object[]
+ {
+ HashAlgorithmName.SHA256,
+ null,
+ "010305",
+ "20DCB58E2AC4E70B1BF47362B0D1C8B728E27D6575EA9B85106CBE05E1F7D6DB",
+ };
- new object[]
+ yield return new object[]
+ {
+ HashAlgorithmName.SHA256,
+ "02040608",
+ "010305",
+ "EFC758D39896E9DE96C120B0A74FB751F140BD7F3F4FC3777DC2A530145E01EC",
+ };
+
+ yield return new object[]
+ {
+ HashAlgorithmName.SHA256,
+ "010305",
+ "02040608",
+ "7DB5520A5D6351595FC286CD53509D964FBB152C289F072581CB5E16EBF319E8",
+ };
+
+ if (ECDiffieHellmanFactory.SupportsSha3)
+ {
+ // Created with:
+ // (echo -n -e '\x01\x03\0x05'; openssl pkeyutl -derive -inkey private.key -peerkey public.key; echo -n -e '\x02\x04\0x06\0x08') | openssl dgst -sha3-256
+ yield return new object[]
{
- HashAlgorithmName.SHA256,
- null,
+ HashAlgorithmName.SHA3_256,
"010305",
- "20DCB58E2AC4E70B1BF47362B0D1C8B728E27D6575EA9B85106CBE05E1F7D6DB",
- },
+ "02040608",
+ "2AF6DA738DADF26607513ECB56451B5A476C7D42CFEC89872791B7A6C136A4F9",
+ };
- new object[]
+ // Created with:
+ // (echo -n -e '\x01\x03\0x05'; openssl pkeyutl -derive -inkey private.key -peerkey public.key; echo -n -e '\x02\x04\0x06\0x08') | openssl dgst -sha3-384
+ yield return new object[]
{
- HashAlgorithmName.SHA256,
- "02040608",
+ HashAlgorithmName.SHA3_384,
"010305",
- "EFC758D39896E9DE96C120B0A74FB751F140BD7F3F4FC3777DC2A530145E01EC",
- },
+ "02040608",
+ "EE9C10A3E60EA06296699195B3E338575DA529BA167A7520CA8BF50C86C4A08AB153DD7B97ADEE58CE5A9CAAC2F52ED1",
+ };
- new object[]
+ // Created with:
+ // (echo -n -e '\x01\x03\0x05'; openssl pkeyutl -derive -inkey private.key -peerkey public.key; echo -n -e '\x02\x04\0x06\0x08') | openssl dgst -sha3-512
+ yield return new object[]
{
- HashAlgorithmName.SHA256,
+ HashAlgorithmName.SHA3_512,
"010305",
"02040608",
- "7DB5520A5D6351595FC286CD53509D964FBB152C289F072581CB5E16EBF319E8",
- },
- };
+ "3614398AFC4A09B0490E095A7901FEA3C9C217E742064A371F2E04D6363EF864" +
+ "FE52EEEEA976FEC3FF98DE55D1E78E864F009FD834E1D301FA069BD44F6ECD52",
+ };
+ }
}
#if NETCOREAPP
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hmac.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hmac.cs
index b8ba791ddd7844..f95fb64aafd3a4 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hmac.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hmac.cs
@@ -248,71 +248,105 @@ public static void SimpleHmacNullKeyForwardsNull()
public static IEnumerable HmacDerivationTestCases()
{
- return new object[][]
+ yield return new object[]
{
- new object[]
- {
- HashAlgorithmName.SHA256,
- null,
- null,
- null,
- "6D7D15C9A08FD47DFDABD3541BE3BBAF93B15FC65D30E6012CCC0B23ED5C43FF",
- },
-
- new object[]
- {
- HashAlgorithmName.SHA1,
- null,
- null,
- null,
- "39D4B035BC1A1E4108B965689E27BA98ACED8449",
- },
-
- new object[]
- {
- HashAlgorithmName.SHA256,
- "030609",
- null,
- null,
- "7A4F81BF065CC521AFB162DB4A45CEFC78227178A58632EA53D3E367AB7D1979",
- },
+ HashAlgorithmName.SHA256,
+ null,
+ null,
+ null,
+ "6D7D15C9A08FD47DFDABD3541BE3BBAF93B15FC65D30E6012CCC0B23ED5C43FF",
+ };
- new object[]
- {
- HashAlgorithmName.SHA256,
- null,
- "02040608",
- "010305",
- "DB39A6AC9334701D2DCD508C401C65BC69348F684C85EDDE506950F049668842",
- },
+ yield return new object[]
+ {
+ HashAlgorithmName.SHA1,
+ null,
+ null,
+ null,
+ "39D4B035BC1A1E4108B965689E27BA98ACED8449",
+ };
+
+ yield return new object[]
+ {
+ HashAlgorithmName.SHA256,
+ "030609",
+ null,
+ null,
+ "7A4F81BF065CC521AFB162DB4A45CEFC78227178A58632EA53D3E367AB7D1979",
+ };
+
+ yield return new object[]
+ {
+ HashAlgorithmName.SHA256,
+ null,
+ "02040608",
+ "010305",
+ "DB39A6AC9334701D2DCD508C401C65BC69348F684C85EDDE506950F049668842",
+ };
- new object[]
+ yield return new object[]
+ {
+ HashAlgorithmName.SHA256,
+ null,
+ "010305",
+ "02040608",
+ "66471DE2655DF9404636F9076F845F0B71A04DDA2BA6F1469EB0F2E9EF57DC33",
+ };
+
+ yield return new object[]
+ {
+ HashAlgorithmName.SHA256,
+ "030609",
+ "02040608",
+ "010305",
+ "2F7A31FF9118A6BBF92E268568C634A9F1E244CA8C1A74C864DECC50727B7DEE",
+ };
+
+ yield return new object[]
+ {
+ HashAlgorithmName.SHA256,
+ "030609",
+ "010305",
+ "02040608",
+ "AE3CD974F262B199B0859D9F933207D2F6E3E04434D60089FE0BE801ED38D370",
+ };
+
+ if (ECDiffieHellmanFactory.SupportsSha3)
+ {
+ // Created with:
+ // (echo -n -e '\x01\x03\0x05'; openssl pkeyutl -derive -inkey private.key -peerkey public.key; echo -n -e '\x02\x04\0x06\0x08') | openssl sha3-256 -mac HMAC -macopt hexkey:030609
+ yield return new object[]
{
- HashAlgorithmName.SHA256,
- null,
+ HashAlgorithmName.SHA3_256,
+ "030609",
"010305",
"02040608",
- "66471DE2655DF9404636F9076F845F0B71A04DDA2BA6F1469EB0F2E9EF57DC33",
- },
+ "23E7E5648EF46D537F4159F7F40E686279D89ADFD7EF6CFA110034F42EC8CEF7",
+ };
- new object[]
+ // Created with:
+ // (echo -n -e '\x01\x03\0x05'; openssl pkeyutl -derive -inkey private.key -peerkey public.key; echo -n -e '\x02\x04\0x06\0x08') | openssl sha3-384 -mac HMAC -macopt hexkey:030609
+ yield return new object[]
{
- HashAlgorithmName.SHA256,
+ HashAlgorithmName.SHA3_384,
"030609",
- "02040608",
"010305",
- "2F7A31FF9118A6BBF92E268568C634A9F1E244CA8C1A74C864DECC50727B7DEE",
- },
+ "02040608",
+ "FD0F7B11489F641DE0964F81D83EF90E33C46D1628C51FA79A85AD1034A9CAD36F8A38C3925704AC0E404BC6FE50ECA4",
+ };
- new object[]
+ // Created with:
+ // (echo -n -e '\x01\x03\0x05'; openssl pkeyutl -derive -inkey private.key -peerkey public.key; echo -n -e '\x02\x04\0x06\0x08') | openssl sha3-512 -mac HMAC -macopt hexkey:030609
+ yield return new object[]
{
- HashAlgorithmName.SHA256,
+ HashAlgorithmName.SHA3_512,
"030609",
"010305",
"02040608",
- "AE3CD974F262B199B0859D9F933207D2F6E3E04434D60089FE0BE801ED38D370",
- },
- };
+ "2C32BBFBF8A41118AAD3BAA94C8995B5B027246EA3D972937C1BFD9F460C6492" +
+ "44EEC68EF570B4BB74B0D3BBD463F18526400A77211B5CB39311CDE21104E209",
+ };
+ }
}
#if NETCOREAPP
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.NistValidation.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.NistValidation.cs
index aab3429ed745b7..d0c596935ef092 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.NistValidation.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.NistValidation.cs
@@ -246,6 +246,112 @@ public void ValidateNistP521Sha512()
HashAlgorithmName.SHA512);
}
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsSha3))]
+ public void ValidateNistP256Sha3_256()
+ {
+ // From https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Standards-and-Guidelines/documents/examples/P256_SHA3-256.pdf
+ byte[] msg = "4578616d706c65206f66204543445341207769746820502d323536".HexToByteArray();
+
+ ECParameters parameters = new ECParameters
+ {
+ Curve = ECCurve.NamedCurves.nistP256,
+ Q = new ECPoint
+ {
+ X = "b7e08afdfe94bad3f1dc8c734798ba1c62b3a0ad1e9ea2a38201cd0889bc7a19".HexToByteArray(),
+ Y = "3603f747959dbf7a4bb226e41928729063adc7ae43529e61b563bbc606cc5e09".HexToByteArray(),
+ },
+ D = "c477f9f65c22cce20657faa5b2d1d8122336f851a508a1ed04e479c34985bf96".HexToByteArray(),
+ };
+
+ byte[] signature = (
+ // r
+ "2b42f576d07f4165ff65d1f3b1500f81e44c316f1f0b3ef57325b69aca46104f" +
+ // s
+ "0a861c2526900245c73bacb9adaec1a5acb3ba1f7114a3c334fdcd5b7690dadd"
+ ).HexToByteArray();
+
+ Validate(
+ parameters,
+ EccTestData.GetNistP256ExplicitCurve(),
+ msg,
+ signature,
+ HashAlgorithmName.SHA3_256);
+ }
+
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsSha3))]
+ public void ValidateNistP384Sha3_384()
+ {
+ // From https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Standards-and-Guidelines/documents/examples/P384_SHA3-384.pdf
+ byte[] msg = "4578616d706c65206f66204543445341207769746820502d333834".HexToByteArray();
+
+ ECParameters parameters = new ECParameters
+ {
+ Curve = ECCurve.NamedCurves.nistP384,
+ Q = new ECPoint
+ {
+ X = ("3bf701bc9e9d36b4d5f1455343f09126f2564390f2b48736" +
+ "5071243c61e6471fb9d2ab74657b82f9086489d9ef0f5cb5").HexToByteArray(),
+ Y = ("d1a358eafbf952e68d533855ccbdaa6ff75b137a51014431" +
+ "99325583552a6295ffe5382d00cfcda30344a9b5b68db855").HexToByteArray(),
+ },
+ D = ("f92c02ed629e4b48c0584b1c6ce3a3e3b4faae4afc6acb04" +
+ "55e73dfc392e6a0ae393a8565e6b9714d1224b57d83f8a08").HexToByteArray(),
+ };
+
+ byte[] signature = (
+ // r
+ "30ea514fc0d38d8208756f068113c7cada9f66a3b40ea3b3" +
+ "13d040d9b57dd41a332795d02cc7d507fcef9faf01a27088" +
+ // s
+ "691b9d4969451a98036d53aa725458602125de74881bbc33" +
+ "3012ca4fa55bde39d1bf16a6aae3fe4992c567c6e7892337"
+ ).HexToByteArray();
+
+ Validate(
+ parameters,
+ EccTestData.GetNistP384ExplicitCurve(),
+ msg,
+ signature,
+ HashAlgorithmName.SHA3_384);
+ }
+
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsSha3))]
+ public void ValidateNistP521Sha3_512()
+ {
+ // From https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Standards-and-Guidelines/documents/examples/P521_SHA3-512.pdf
+ byte[] msg = "4578616d706c65206f66204543445341207769746820502d353231".HexToByteArray();
+
+ ECParameters parameters = new ECParameters
+ {
+ Curve = ECCurve.NamedCurves.nistP521,
+ Q = new ECPoint
+ {
+ X = ("0098e91eef9a68452822309c52fab453f5f117c1da8ed796b255e9ab8f6410cca1" +
+ "6e59df403a6bdc6ca467a37056b1e54b3005d8ac030decfeb68df18b171885d5c4").HexToByteArray(),
+ Y = ("0164350c321aecfc1cca1ba4364c9b15656150b4b78d6a48d7d28e7f31985ef17b" +
+ "e8554376b72900712c4b83ad668327231526e313f5f092999a4632fd50d946bc2e").HexToByteArray(),
+ },
+ D = ("0100085f47b8e1b8b11b7eb33028c0b2888e304bfc98501955b45bba1478dc184e" +
+ "eedf09b86a5f7c21994406072787205e69a63709fe35aa93ba333514b24f961722").HexToByteArray(),
+ };
+
+ byte[] signature = (
+ // r
+ "0140c8edca57108ce3f7e7a240ddd3ad74d81e2de62451fc1d558fdc79269adacd" +
+ "1c2526eeeef32f8c0432a9d56e2b4a8a732891c37c9b96641a9254ccfe5dc3e2ba" +
+ // s
+ "00b25188492d58e808edebd7bf440ed20db771ca7c618595d5398e1b1c0098e300" +
+ "d8c803ec69ec5f46c84fc61967a302d366c627fcfa56f87f241ef921b6e627adbf"
+ ).HexToByteArray();
+
+ Validate(
+ parameters,
+ EccTestData.GetNistP521ExplicitCurve(),
+ msg,
+ signature,
+ HashAlgorithmName.SHA3_512);
+ }
+
private static void Validate(
ECParameters parameters,
ECCurve explicitCurve,
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs
index c74a993e54a7b6..5b97f468a4271e 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs
@@ -315,7 +315,19 @@ public void RsaCryptRoundtrip_OaepSHA384() =>
public void RsaCryptRoundtrip_OaepSHA512() =>
RsaCryptRoundtrip(RSAEncryptionPadding.OaepSHA512, RSAFactory.SupportsSha2Oaep);
- private void RsaCryptRoundtrip(RSAEncryptionPadding paddingMode, bool expectSuccess=true)
+ [Fact]
+ public void RsaCryptRoundtrip_OaepSHA3_256() =>
+ RsaCryptRoundtrip(RSAEncryptionPadding.OaepSHA3_256, RSAFactory.SupportsSha3);
+
+ [Fact]
+ public void RsaCryptRoundtrip_OaepSHA3_384() =>
+ RsaCryptRoundtrip(RSAEncryptionPadding.OaepSHA3_384, RSAFactory.SupportsSha3);
+
+ [Fact]
+ public void RsaCryptRoundtrip_OaepSHA3_512() =>
+ RsaCryptRoundtrip(RSAEncryptionPadding.OaepSHA3_512, RSAFactory.SupportsSha3);
+
+ private void RsaCryptRoundtrip(RSAEncryptionPadding paddingMode, bool expectSuccess = true)
{
byte[] crypt;
byte[] output;
@@ -324,9 +336,12 @@ private void RsaCryptRoundtrip(RSAEncryptionPadding paddingMode, bool expectSucc
{
if (!expectSuccess)
{
- Assert.ThrowsAny(
+ Exception ex = Assert.ThrowsAny(
() => Encrypt(rsa, TestData.HelloBytes, paddingMode));
+ Assert.True(ex is CryptographicException or PlatformNotSupportedException,
+ "exception is CryptographicException or PlatformNotSupportedException");
+
return;
}
@@ -370,6 +385,13 @@ void RoundtripEmpty(RSAEncryptionPadding paddingMode)
RoundtripEmpty(RSAEncryptionPadding.OaepSHA384);
RoundtripEmpty(RSAEncryptionPadding.OaepSHA512);
}
+
+ if (RSAFactory.SupportsSha3)
+ {
+ RoundtripEmpty(RSAEncryptionPadding.OaepSHA3_256);
+ RoundtripEmpty(RSAEncryptionPadding.OaepSHA3_384);
+ RoundtripEmpty(RSAEncryptionPadding.OaepSHA3_512);
+ }
}
}
@@ -715,6 +737,13 @@ public static IEnumerable OaepPaddingModes
yield return new object[] { RSAEncryptionPadding.OaepSHA384 };
yield return new object[] { RSAEncryptionPadding.OaepSHA512 };
}
+
+ if (RSAFactory.SupportsSha3)
+ {
+ yield return new object[] { RSAEncryptionPadding.OaepSHA3_256 };
+ yield return new object[] { RSAEncryptionPadding.OaepSHA3_384 };
+ yield return new object[] { RSAEncryptionPadding.OaepSHA3_512 };
+ }
}
}
}
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAFactory.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAFactory.cs
index 9a4b27348ab4a0..b13a6ee01d8e41 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAFactory.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAFactory.cs
@@ -12,6 +12,7 @@ public interface IRSAProvider
bool SupportsSha2Oaep { get; }
bool SupportsPss { get; }
bool SupportsSha1Signatures { get; }
+ bool SupportsSha3 { get; }
}
public static partial class RSAFactory
@@ -42,5 +43,8 @@ public static RSA Create(RSAParameters rsaParameters)
public static bool SupportsPss => s_provider.SupportsPss;
public static bool SupportsSha1Signatures => s_provider.SupportsSha1Signatures;
+
+ public static bool SupportsSha3 => s_provider.SupportsSha3;
+ public static bool NoSupportsSha3 => !SupportsSha3;
}
}
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/SignVerify.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/SignVerify.cs
index 0bbdd7db7372da..6b0fd33bf89e7b 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/SignVerify.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/SignVerify.cs
@@ -504,6 +504,84 @@ public void VerifySignature_SHA256_2048()
VerifySignature(signature, TestData.HelloBytes, "SHA256", TestData.RSA2048Params);
}
+ [ConditionalFact(typeof(RSAFactory), nameof(RSAFactory.SupportsSha3))]
+ public void VerifySignature_SHA3_256_RSA2048()
+ {
+ byte[] signature = new byte[]
+ {
+ 0x37, 0xfc, 0x5b, 0xa7, 0xcd, 0x72, 0x93, 0x55, 0x43, 0x6f, 0x2c, 0x5c, 0xce, 0x10, 0x20, 0x67,
+ 0x38, 0xbc, 0x82, 0x65, 0xad, 0x64, 0x41, 0x3d, 0x7b, 0xe1, 0x13, 0x6e, 0xbf, 0x7c, 0x0a, 0xa7,
+ 0xc7, 0x42, 0x57, 0xf3, 0x75, 0xec, 0xda, 0xf1, 0xa0, 0xeb, 0x6d, 0x61, 0x04, 0x07, 0x4b, 0x3c,
+ 0xf8, 0x0d, 0x1d, 0x7a, 0xb2, 0x1f, 0xb1, 0xa4, 0xae, 0x35, 0x85, 0x18, 0xe4, 0xe1, 0xa5, 0x66,
+ 0x3d, 0x0c, 0xcd, 0x60, 0xf6, 0x6c, 0x89, 0xf6, 0x49, 0x87, 0x19, 0x3a, 0xa2, 0x24, 0x8a, 0xd9,
+ 0x17, 0x58, 0x2e, 0x50, 0x69, 0xd4, 0xae, 0x92, 0x17, 0xc1, 0xf8, 0x8e, 0xae, 0xca, 0x05, 0xc0,
+ 0x9c, 0x9d, 0xda, 0x0c, 0x82, 0x16, 0xae, 0xa4, 0x73, 0xe7, 0x65, 0x90, 0xb9, 0x25, 0x89, 0xe8,
+ 0xae, 0x60, 0x74, 0x86, 0x2e, 0xd6, 0xa8, 0x8a, 0x05, 0xda, 0x6c, 0x2e, 0x3f, 0x32, 0x24, 0x84,
+ 0x23, 0x87, 0x10, 0x5b, 0x42, 0x79, 0xdd, 0x64, 0x2c, 0xe4, 0x60, 0x75, 0x38, 0x2b, 0x37, 0x43,
+ 0x1c, 0x9b, 0x75, 0x6a, 0xf2, 0xfa, 0xbf, 0x95, 0x7f, 0xdb, 0x64, 0xe0, 0xa6, 0xc0, 0xb1, 0x24,
+ 0xcb, 0xf9, 0xdc, 0x30, 0xcd, 0xba, 0x54, 0x9a, 0xd4, 0xea, 0x3d, 0xcf, 0x3b, 0x08, 0x97, 0x19,
+ 0xdd, 0xc1, 0xf0, 0x20, 0xf6, 0x02, 0x7c, 0x0e, 0x0c, 0x84, 0x70, 0x89, 0x78, 0x5c, 0x50, 0xc5,
+ 0xce, 0xe5, 0xdd, 0x03, 0xf4, 0xc5, 0x86, 0x0e, 0xb7, 0x98, 0xd5, 0x96, 0x98, 0x2e, 0x02, 0xc9,
+ 0xb0, 0x41, 0x84, 0xa9, 0xa1, 0xda, 0x75, 0x81, 0x1d, 0x5a, 0x6a, 0x00, 0x33, 0x0f, 0x94, 0xa4,
+ 0x20, 0x0c, 0x91, 0xae, 0xae, 0xa4, 0xd3, 0xa8, 0x95, 0x20, 0x5c, 0x0c, 0x3b, 0x6e, 0x32, 0x7e,
+ 0xd3, 0x5b, 0xf4, 0x9b, 0x0c, 0xe2, 0x97, 0xd4, 0x1c, 0xf7, 0x98, 0x96, 0x77, 0xda, 0x05, 0xf5,
+ };
+
+ VerifySignature(signature, TestData.HelloBytes, HashAlgorithmName.SHA3_256.Name, TestData.RSA2048Params);
+ }
+
+ [ConditionalFact(typeof(RSAFactory), nameof(RSAFactory.SupportsSha3))]
+ public void VerifySignature_SHA3_384_RSA2048()
+ {
+ byte[] signature = new byte[]
+ {
+ 0x96, 0x76, 0xdf, 0xa3, 0xd3, 0xac, 0x74, 0x08, 0x18, 0x41, 0x0a, 0xa1, 0x03, 0x6b, 0x28, 0x5d,
+ 0xf8, 0xf7, 0xe5, 0x72, 0xe1, 0x7e, 0xb0, 0x11, 0x2f, 0x91, 0xbf, 0xce, 0xba, 0xa1, 0x4e, 0xfa,
+ 0x6f, 0x20, 0xaa, 0xc7, 0x8d, 0xf4, 0x8a, 0xba, 0xd3, 0xa3, 0x07, 0xa0, 0x0f, 0x09, 0x44, 0x7d,
+ 0xcc, 0xa1, 0x7b, 0xe4, 0x17, 0xcb, 0xe9, 0xe0, 0x78, 0xff, 0xd0, 0xf2, 0xdf, 0xd1, 0xdb, 0xd3,
+ 0x4a, 0xfb, 0xa8, 0x11, 0xac, 0xd3, 0x27, 0xcc, 0x05, 0x59, 0xc8, 0x16, 0x5d, 0x15, 0x68, 0x4d,
+ 0x20, 0x17, 0xd2, 0x52, 0xa1, 0xee, 0x7f, 0xce, 0xdb, 0xd4, 0x1a, 0x18, 0x6a, 0xc1, 0x2e, 0x42,
+ 0x74, 0xcd, 0xc8, 0x31, 0x92, 0x24, 0x33, 0x7e, 0x41, 0x0b, 0x16, 0xf3, 0xd4, 0xa0, 0x30, 0x78,
+ 0x8e, 0x3a, 0x05, 0xfa, 0xcb, 0x5b, 0x9f, 0x71, 0xd4, 0xfb, 0x27, 0x17, 0x19, 0x66, 0xe1, 0x05,
+ 0x6d, 0x3a, 0xd8, 0x89, 0x27, 0x19, 0x4f, 0x28, 0x3f, 0x6c, 0xb9, 0xfe, 0xca, 0xfb, 0x77, 0xcc,
+ 0xf1, 0x46, 0x2a, 0x3a, 0x74, 0x17, 0x8a, 0xb1, 0x76, 0x3a, 0x1b, 0xc3, 0x2e, 0x29, 0x29, 0xa6,
+ 0xeb, 0x1e, 0xf5, 0x3d, 0x4a, 0x41, 0x39, 0x49, 0xc3, 0x87, 0xe6, 0xcb, 0x49, 0x81, 0x8c, 0xa9,
+ 0x8a, 0xd8, 0xf5, 0x9e, 0x1c, 0x96, 0x8f, 0xac, 0xc4, 0xac, 0xd3, 0x1b, 0x7a, 0x09, 0x33, 0x48,
+ 0x62, 0xcc, 0x13, 0x3b, 0xb6, 0x9c, 0x20, 0x55, 0xb3, 0x3c, 0x0b, 0x77, 0xc5, 0x0e, 0x3d, 0x26,
+ 0x41, 0x15, 0xbf, 0xf7, 0xea, 0xdf, 0x44, 0x9c, 0x35, 0x0b, 0xca, 0x2e, 0x6e, 0xac, 0x04, 0x34,
+ 0x52, 0x18, 0x68, 0xa0, 0xc8, 0x3b, 0x51, 0xfb, 0x67, 0xed, 0x89, 0x29, 0x1e, 0xe4, 0xfe, 0xb3,
+ 0x78, 0xb1, 0x40, 0xe3, 0xd3, 0x53, 0xf4, 0x3e, 0xa5, 0x07, 0x33, 0x83, 0xf7, 0x02, 0x39, 0x1b,
+ };
+
+ VerifySignature(signature, TestData.HelloBytes, HashAlgorithmName.SHA3_384.Name, TestData.RSA2048Params);
+ }
+
+ [ConditionalFact(typeof(RSAFactory), nameof(RSAFactory.SupportsSha3))]
+ public void VerifySignature_SHA3_512_RSA2048()
+ {
+ byte[] signature = new byte[]
+ {
+ 0x18, 0x83, 0xab, 0x01, 0xc1, 0xaf, 0x98, 0xa9, 0xc2, 0xde, 0x2d, 0x63, 0x4f, 0x8a, 0xf6, 0x47,
+ 0xd9, 0xd2, 0xd1, 0xa0, 0x5b, 0xf4, 0x14, 0x6a, 0x49, 0x14, 0x56, 0x90, 0x63, 0xf9, 0x2c, 0xf6,
+ 0xed, 0xc2, 0x19, 0x65, 0x80, 0x0b, 0xa9, 0x7a, 0xa9, 0xcc, 0x00, 0x93, 0xdc, 0x8c, 0xcd, 0xef,
+ 0xa1, 0x76, 0x4c, 0x56, 0x8c, 0x36, 0x25, 0xcb, 0xbe, 0xd2, 0xbf, 0x49, 0xe6, 0xac, 0xbe, 0x50,
+ 0x52, 0xf8, 0xd0, 0xf9, 0xb0, 0xcb, 0xfb, 0xae, 0x41, 0x8b, 0x94, 0xbc, 0x47, 0xee, 0x71, 0x1d,
+ 0x9e, 0x4b, 0xcc, 0x6b, 0xe2, 0x66, 0x01, 0x92, 0x16, 0x06, 0x43, 0x64, 0x65, 0x19, 0x3a, 0xed,
+ 0x5f, 0x60, 0x85, 0xb1, 0xa8, 0x29, 0x76, 0x17, 0x2d, 0xb3, 0xc5, 0xee, 0x6d, 0x76, 0xef, 0x14,
+ 0xf8, 0x47, 0x8b, 0x35, 0x32, 0x4e, 0x8f, 0x79, 0xa8, 0x02, 0xe1, 0xe6, 0x49, 0xda, 0x50, 0x98,
+ 0xd7, 0xb9, 0x71, 0xf6, 0x9d, 0x9b, 0xcd, 0xb6, 0x0d, 0xd3, 0xc8, 0x9d, 0xf2, 0xac, 0xfa, 0xad,
+ 0xd4, 0xb6, 0xc2, 0x72, 0x9f, 0x14, 0xce, 0x24, 0x87, 0x68, 0x47, 0x6d, 0x7a, 0x73, 0xce, 0x67,
+ 0xb2, 0xd5, 0x07, 0x69, 0x0d, 0xc3, 0xdd, 0xb4, 0xc2, 0x56, 0xbc, 0x10, 0xc2, 0xe5, 0x9d, 0xb3,
+ 0xf9, 0x4d, 0xcd, 0xef, 0x9f, 0xe3, 0x3b, 0x8c, 0x49, 0xdf, 0x4b, 0x1f, 0xc0, 0x0c, 0x2d, 0xf6,
+ 0xad, 0x6c, 0x0f, 0x83, 0x5c, 0x74, 0xb0, 0xff, 0x95, 0x7f, 0x37, 0x34, 0x7b, 0x07, 0x50, 0x91,
+ 0x7f, 0xd2, 0x26, 0x39, 0x1f, 0xad, 0x72, 0x8a, 0x47, 0x2e, 0x6c, 0xb4, 0xf2, 0xcd, 0x09, 0xfd,
+ 0x1b, 0xca, 0xf6, 0xbe, 0x70, 0x14, 0xe8, 0x51, 0x1e, 0xf4, 0x5b, 0xd9, 0x57, 0xa6, 0x73, 0xe2,
+ 0xa0, 0xde, 0xc4, 0x67, 0x7a, 0x4a, 0xe2, 0x24, 0x64, 0x79, 0xd5, 0xe7, 0x39, 0xfc, 0xb2, 0xd9,
+ };
+
+ VerifySignature(signature, TestData.HelloBytes, HashAlgorithmName.SHA3_512.Name, TestData.RSA2048Params);
+ }
+
[Theory]
[MemberData(nameof(RoundTripTheories))]
public void SignAndVerify_Roundtrip(string hashAlgorithm, RSAParameters rsaParameters)
@@ -877,19 +955,10 @@ public void VerifyHashSignature_SHA256_2048()
VerifyHashSignature(hashSignature, dataHash, "SHA256", TestData.RSA2048Params);
}
- [ConditionalTheory]
- [InlineData("SHA256")]
- [InlineData("SHA384")]
- [InlineData("SHA512")]
- [InlineData("MD5")]
- [InlineData("SHA1")]
+ [Theory]
+ [MemberData(nameof(HashAlgorithmNames))]
public void PssRoundtrip(string hashAlgorithmName)
{
- if (!RSAFactory.SupportsSha1Signatures && hashAlgorithmName == "SHA1")
- {
- throw new SkipTestException("Platform does not support RSA with SHA1 signatures.");
- }
-
RSAParameters privateParameters = TestData.RSA2048Params;
RSAParameters publicParameters = new RSAParameters
{
@@ -1062,6 +1131,150 @@ public void VerifyExpectedSignature_PssSha512()
helloSignature);
}
+ [ConditionalFact(typeof(RSAFactory), nameof(RSAFactory.SupportsSha3))]
+ public void VerifyExpectedSignature_PssSha3_256()
+ {
+ // Signature independently created with
+ // echo -n Hello | openssl dgst -sha3-256 -binary | openssl pkeyutl -sign -inkey key.pem -pkeyopt rsa_padding_mode:pss -pkeyopt digest:sha3-256 | xxd -i -c 16
+ byte[] helloSignature =
+ {
+ 0x0b, 0x02, 0x36, 0x0c, 0x56, 0x6b, 0x93, 0xa8, 0x4e, 0x4d, 0x0e, 0xa3, 0x67, 0x28, 0xc6, 0xea,
+ 0xdb, 0x05, 0xc8, 0x63, 0x64, 0xe5, 0xec, 0xf9, 0xc1, 0x25, 0x5a, 0x34, 0xe6, 0x3f, 0xe1, 0x38,
+ 0x49, 0x45, 0x0b, 0x34, 0x6b, 0xa7, 0x91, 0xe1, 0x22, 0xe0, 0x2c, 0x8d, 0x46, 0x23, 0x38, 0xb1,
+ 0x9e, 0x4c, 0xf3, 0xa0, 0xff, 0x57, 0x96, 0x01, 0xbb, 0xa4, 0x0f, 0x03, 0x27, 0xaf, 0x8e, 0x99,
+ 0x5e, 0x0e, 0x99, 0xfd, 0xc6, 0x55, 0x81, 0x65, 0x56, 0x83, 0x2d, 0x42, 0xa3, 0x60, 0xc3, 0x36,
+ 0x69, 0xb4, 0x39, 0x04, 0x70, 0xfe, 0x26, 0x9b, 0x65, 0x6a, 0x15, 0xaa, 0xfc, 0xc5, 0x70, 0x71,
+ 0xba, 0x01, 0x49, 0xae, 0x27, 0xd4, 0x52, 0x28, 0xe4, 0xce, 0x37, 0x8a, 0x7d, 0x16, 0x2f, 0x59,
+ 0x3a, 0x1d, 0x36, 0x44, 0x82, 0xba, 0x51, 0xa3, 0x2c, 0xf9, 0x7e, 0xad, 0x36, 0xd4, 0x24, 0xfb,
+ 0x77, 0xae, 0x55, 0x10, 0x6e, 0xbc, 0x9d, 0xc8, 0xd7, 0xf4, 0x2b, 0x07, 0x70, 0x20, 0x8e, 0xd4,
+ 0xc6, 0xb3, 0x7f, 0x72, 0x9e, 0xa7, 0x0e, 0xd5, 0x31, 0x5d, 0x8c, 0x0c, 0xca, 0xae, 0x5a, 0x5a,
+ 0x38, 0x10, 0x42, 0x9f, 0x4f, 0x64, 0xc8, 0xe3, 0xdb, 0x4c, 0x17, 0x0b, 0x7b, 0x97, 0x82, 0x1f,
+ 0x9c, 0x88, 0xcf, 0x5e, 0xe7, 0x19, 0x8f, 0xa9, 0x5f, 0xd0, 0x1b, 0x19, 0x21, 0x2a, 0x2d, 0x36,
+ 0x45, 0x4a, 0xb1, 0x4d, 0xc8, 0xe1, 0x5e, 0x53, 0x24, 0xe1, 0x0b, 0x03, 0x01, 0x5d, 0xd9, 0x8f,
+ 0xe3, 0x3a, 0xdb, 0x3f, 0xbf, 0xa4, 0x24, 0x16, 0x44, 0x3e, 0x52, 0x5c, 0x6c, 0xfd, 0x2d, 0x0e,
+ 0x22, 0x69, 0xcf, 0x2a, 0x58, 0x8f, 0xe7, 0x31, 0x88, 0x22, 0xb8, 0x21, 0x68, 0x56, 0x6b, 0xb6,
+ 0xab, 0x76, 0x81, 0x41, 0x59, 0xb9, 0xe5, 0xc2, 0x61, 0x06, 0xea, 0x9b, 0x5b, 0x57, 0xf7, 0xb0,
+ };
+
+ VerifyExpectedSignature_Pss(
+ TestData.RSA2048Params,
+ HashAlgorithmName.SHA3_256,
+ TestData.HelloBytes,
+ helloSignature);
+ }
+
+ [ConditionalFact(typeof(RSAFactory), nameof(RSAFactory.SupportsSha3))]
+ public void VerifyExpectedSignature_PssSha3_384()
+ {
+ // Signature independently created with
+ // echo -n Hello | openssl dgst -sha3-384 -binary | openssl pkeyutl -sign -inkey key.pem -pkeyopt rsa_padding_mode:pss -pkeyopt digest:sha3-384 | xxd -i -c 16
+ byte[] helloSignature =
+ {
+ 0x75, 0x00, 0x1d, 0xa9, 0x3b, 0xfa, 0x79, 0x57, 0x4a, 0x3c, 0x9f, 0xec, 0x7b, 0xa4, 0x1f, 0x17,
+ 0x3a, 0x32, 0x20, 0x90, 0x62, 0x16, 0x25, 0xae, 0x80, 0x54, 0x71, 0xb0, 0xf5, 0x28, 0x5c, 0x97,
+ 0xfc, 0x4c, 0x21, 0x18, 0xb0, 0xfb, 0x90, 0xae, 0xca, 0xa6, 0x76, 0xf5, 0x14, 0x7a, 0x23, 0x47,
+ 0x39, 0x1c, 0xf4, 0x62, 0x23, 0x82, 0x18, 0x72, 0x58, 0x64, 0x9a, 0xe2, 0x3b, 0x4e, 0x5a, 0xe5,
+ 0xf1, 0x16, 0x77, 0xe4, 0xbe, 0xb5, 0x90, 0x54, 0x34, 0x38, 0x24, 0xe4, 0xe1, 0x59, 0xd2, 0x58,
+ 0x82, 0xc3, 0x68, 0x95, 0xb0, 0x1a, 0x0e, 0x1a, 0x67, 0x4a, 0x28, 0x1e, 0x7e, 0x5c, 0x67, 0xd2,
+ 0x2e, 0x9c, 0xb6, 0x12, 0x29, 0xf4, 0x57, 0x62, 0xaa, 0xf6, 0x46, 0x00, 0x90, 0xee, 0xc1, 0xb8,
+ 0x06, 0x40, 0x41, 0x8d, 0xc4, 0x69, 0x68, 0x75, 0xc5, 0xfc, 0xbc, 0x73, 0x40, 0x7c, 0xd6, 0xef,
+ 0xd0, 0x28, 0xe7, 0x32, 0x52, 0x34, 0x2d, 0x43, 0xca, 0xb8, 0x1e, 0x80, 0x07, 0x1c, 0xe6, 0x54,
+ 0xd9, 0x03, 0x06, 0xc0, 0xc7, 0x1a, 0x5a, 0xaf, 0x1a, 0xf3, 0xaa, 0xce, 0xa4, 0x02, 0xff, 0xf5,
+ 0xed, 0x7e, 0x0b, 0x2a, 0x68, 0x7d, 0x65, 0x98, 0xf4, 0xf4, 0x82, 0x3f, 0x54, 0x2a, 0x18, 0x02,
+ 0xf9, 0x3e, 0x3d, 0xed, 0x18, 0x98, 0xd5, 0xb2, 0x5f, 0x7f, 0xee, 0x26, 0xa1, 0x8f, 0xf5, 0x39,
+ 0x97, 0xeb, 0x71, 0x18, 0xf1, 0x3c, 0x10, 0x49, 0x34, 0x2e, 0xa8, 0x92, 0x50, 0x17, 0xb7, 0x91,
+ 0x6b, 0x66, 0x67, 0x2b, 0xd1, 0x73, 0x0b, 0x73, 0xa3, 0xc5, 0xef, 0x03, 0x70, 0xbc, 0x38, 0x59,
+ 0x1d, 0x23, 0xa2, 0xf8, 0x2d, 0xae, 0x43, 0xc8, 0x6d, 0x10, 0x2c, 0x56, 0x48, 0x2a, 0xc7, 0xef,
+ 0xf2, 0x4e, 0x5c, 0x30, 0x75, 0xbc, 0xd3, 0xd6, 0x4c, 0xfd, 0x45, 0xc6, 0x43, 0xca, 0xe8, 0x73,
+ };
+
+ VerifyExpectedSignature_Pss(
+ TestData.RSA2048Params,
+ HashAlgorithmName.SHA3_384,
+ TestData.HelloBytes,
+ helloSignature);
+ }
+
+ [ConditionalFact(typeof(RSAFactory), nameof(RSAFactory.SupportsSha3))]
+ public void VerifyExpectedSignature_PssSha3_512()
+ {
+ // Signature independently created with
+ // echo -n Hello | openssl dgst -sha3-512 -binary | openssl pkeyutl -sign -inkey key.pem -pkeyopt rsa_padding_mode:pss -pkeyopt digest:sha3-512 | xxd -i -c 16
+ byte[] helloSignature =
+ {
+ 0x2b, 0x02, 0x93, 0xd1, 0x56, 0x1d, 0x03, 0xce, 0xc7, 0xe0, 0xd0, 0x76, 0xf7, 0xce, 0x76, 0xd7,
+ 0xd6, 0xf1, 0xeb, 0xc2, 0xc4, 0x97, 0xee, 0x16, 0xdb, 0x04, 0x9c, 0x51, 0xd3, 0xc4, 0x76, 0xcd,
+ 0xdb, 0x77, 0x3f, 0x82, 0xf1, 0x31, 0x56, 0x77, 0xc8, 0x44, 0xfd, 0x29, 0x42, 0xf0, 0x68, 0x5d,
+ 0x27, 0x11, 0x74, 0xc1, 0x44, 0x4e, 0x30, 0x6e, 0xfc, 0x3c, 0xa8, 0x61, 0x14, 0x1d, 0x84, 0xec,
+ 0x92, 0x2c, 0x80, 0xeb, 0x57, 0xd0, 0x81, 0xe7, 0xae, 0xf7, 0x83, 0xe1, 0xe6, 0xfb, 0xc6, 0xed,
+ 0x5e, 0x0a, 0xd8, 0x67, 0x01, 0xf4, 0xc8, 0x8d, 0x27, 0x7c, 0x5f, 0xff, 0xb7, 0x9d, 0xb4, 0xd4,
+ 0x70, 0x18, 0xd4, 0x94, 0x7d, 0x36, 0xa7, 0x63, 0xe1, 0xa2, 0x30, 0x53, 0x6a, 0xef, 0x6e, 0xfa,
+ 0xad, 0xf4, 0xfd, 0xea, 0xba, 0x81, 0xd9, 0x73, 0x75, 0x90, 0xff, 0x98, 0x4c, 0xdb, 0x7d, 0xc6,
+ 0x91, 0xd9, 0x83, 0xdf, 0x31, 0xa3, 0xb4, 0x05, 0x91, 0xf9, 0xbe, 0x96, 0xfc, 0xed, 0xfd, 0x8b,
+ 0x8e, 0x9a, 0xee, 0xe5, 0xaf, 0xfd, 0x7e, 0x7e, 0xe0, 0xe1, 0x65, 0xa4, 0xf1, 0xdb, 0x4f, 0x01,
+ 0x47, 0x00, 0xee, 0x03, 0xb7, 0x96, 0x4c, 0x73, 0xdc, 0x6f, 0xf8, 0xf9, 0xac, 0xce, 0x1e, 0x4b,
+ 0xb8, 0x3d, 0x5b, 0xd5, 0xea, 0xf1, 0x4b, 0xd9, 0x63, 0x45, 0x2a, 0x49, 0x22, 0x2d, 0x6c, 0xc5,
+ 0x48, 0xe3, 0x1d, 0xbd, 0x92, 0xed, 0x42, 0x5a, 0x0c, 0xde, 0xb3, 0x2b, 0x91, 0xbd, 0x8e, 0x74,
+ 0x59, 0x6c, 0x9c, 0x39, 0x24, 0x43, 0xe4, 0x5c, 0xf6, 0x26, 0xd6, 0x30, 0xa0, 0x53, 0xb5, 0x2a,
+ 0x0d, 0x0d, 0xfc, 0x68, 0xb5, 0xae, 0x8d, 0x7e, 0xdf, 0x45, 0xfc, 0x66, 0x43, 0x93, 0x8d, 0x40,
+ 0x42, 0x29, 0xe1, 0xe9, 0xe3, 0xff, 0xda, 0xd8, 0x7d, 0x64, 0x9a, 0x26, 0xea, 0xb3, 0xba, 0x7d,
+ };
+
+ VerifyExpectedSignature_Pss(
+ TestData.RSA2048Params,
+ HashAlgorithmName.SHA3_512,
+ TestData.HelloBytes,
+ helloSignature);
+ }
+
+ [ConditionalTheory(typeof(RSAFactory), nameof(RSAFactory.NoSupportsSha3))]
+ [InlineData("SHA3-256")]
+ [InlineData("SHA3-384")]
+ [InlineData("SHA3-512")]
+ public void Pkcs1UnsupportedHashAlgorithm(string hashAlgorithm)
+ {
+ using (RSA rsa = RSAFactory.Create())
+ {
+ Exception ex = Assert.ThrowsAny(() =>
+ SignData(rsa, new byte[] { 1 }, new HashAlgorithmName(hashAlgorithm), RSASignaturePadding.Pkcs1));
+
+ Assert.True(
+ ex is PlatformNotSupportedException or CryptographicException,
+ "ex is PlatformNotSupportedException or CryptographicException");
+
+ ex = Assert.ThrowsAny(() =>
+ VerifyData(rsa, new byte[] { 1 }, new byte[] { 1 }, new HashAlgorithmName(hashAlgorithm), RSASignaturePadding.Pkcs1));
+
+ Assert.True(
+ ex is PlatformNotSupportedException or CryptographicException,
+ "ex is PlatformNotSupportedException or CryptographicException");
+ }
+ }
+
+ [ConditionalTheory(typeof(RSAFactory), nameof(RSAFactory.NoSupportsSha3))]
+ [InlineData("SHA3-256")]
+ [InlineData("SHA3-384")]
+ [InlineData("SHA3-512")]
+ public void PssUnsupportedHashAlgorithm(string hashAlgorithm)
+ {
+ using (RSA rsa = RSAFactory.Create())
+ {
+ Exception ex = Assert.ThrowsAny(() =>
+ SignData(rsa, new byte[] { 1 }, new HashAlgorithmName(hashAlgorithm), RSASignaturePadding.Pss));
+
+ Assert.True(
+ ex is CryptographicException or PlatformNotSupportedException,
+ "ex is CryptographicException or PlatformNotSupportedException");
+
+ ex = Assert.ThrowsAny(() =>
+ VerifyData(rsa, new byte[] { 1 }, new byte[] { 1 }, new HashAlgorithmName(hashAlgorithm), RSASignaturePadding.Pss));
+
+ Assert.True(
+ ex is CryptographicException or PlatformNotSupportedException,
+ "ex is CryptographicException or PlatformNotSupportedException");
+ }
+ }
+
private void VerifyExpectedSignature_Pss(
RSAParameters keyParameters,
HashAlgorithmName hashAlgorithm,
@@ -1314,5 +1527,28 @@ private void SignAndVerify(byte[] data, string hashAlgorithmName, RSAParameters
Assert.True(signatureMatched);
}
}
+
+ public static IEnumerable HashAlgorithmNames
+ {
+ get
+ {
+ yield return new object[] { HashAlgorithmName.SHA256.Name };
+ yield return new object[] { HashAlgorithmName.SHA384.Name };
+ yield return new object[] { HashAlgorithmName.SHA512.Name };
+ yield return new object[] { HashAlgorithmName.MD5.Name };
+
+ if (RSAFactory.SupportsSha1Signatures)
+ {
+ yield return new object[] { HashAlgorithmName.SHA1.Name };
+ }
+
+ if (RSAFactory.SupportsSha3)
+ {
+ yield return new object[] { HashAlgorithmName.SHA3_256.Name };
+ yield return new object[] { HashAlgorithmName.SHA3_384.Name };
+ yield return new object[] { HashAlgorithmName.SHA3_512.Name };
+ }
+ }
+ }
}
}
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/SP800108HmacCounterKdfTests.Functional.cs b/src/libraries/Common/tests/System/Security/Cryptography/SP800108HmacCounterKdfTests.Functional.cs
index 338ffc7a2a6527..5eb6d097026c65 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/SP800108HmacCounterKdfTests.Functional.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/SP800108HmacCounterKdfTests.Functional.cs
@@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Globalization;
+using Microsoft.DotNet.XUnitExtensions;
using Xunit;
namespace System.Security.Cryptography.Tests
@@ -81,7 +82,7 @@ public static void EmptyTests(byte[] key, string label, string context, byte[] e
VerifyKbkdf(expected, key, HashAlgorithmName.SHA256, label.ToCharArray(), context.ToCharArray());
}
- [Theory]
+ [ConditionalTheory]
[InlineData(nameof(HashAlgorithmName.SHA1), 512 / 8 - 1, new byte[] { 0xc9, 0x0f, 0x9d, 0x91, 0x85, 0xe5, 0xeb, 0x9b })]
[InlineData(nameof(HashAlgorithmName.SHA1), 512 / 8, new byte[] { 0x7b, 0xdb, 0x38, 0x28, 0xc0, 0x9f, 0x49, 0x05 })]
[InlineData(nameof(HashAlgorithmName.SHA1), 512 / 8 + 1, new byte[] { 0x6c, 0x3a, 0xba, 0x28, 0x38, 0xad, 0x51, 0x2c })]
@@ -94,8 +95,28 @@ public static void EmptyTests(byte[] key, string label, string context, byte[] e
[InlineData(nameof(HashAlgorithmName.SHA512), 1024 / 8 - 1, new byte[] { 0xa4, 0xe5, 0x24, 0xe8, 0x56, 0x2b, 0x48, 0xa4 })]
[InlineData(nameof(HashAlgorithmName.SHA512), 1024 / 8, new byte[] { 0xba, 0xf6, 0xed, 0xa7, 0x3a, 0xf7, 0x12, 0x27 })]
[InlineData(nameof(HashAlgorithmName.SHA512), 1024 / 8 + 1, new byte[] { 0x34, 0xdf, 0x2d, 0x21, 0xfd, 0xf1, 0x0e, 0x13 })]
+#if NET8_0_OR_GREATER
+ [InlineData("SHA3-256", 1088 / 8 - 1, new byte[] { 0xa1, 0x96, 0xae, 0x83, 0x56, 0xf4, 0x2a, 0x4b })]
+ [InlineData("SHA3-256", 1088 / 8, new byte[] { 0xe7, 0xe9, 0xe0, 0x98, 0x09, 0x54, 0x54, 0x2d })]
+ [InlineData("SHA3-256", 1088 / 8 + 1, new byte[] { 0x7d, 0x7a, 0x71, 0xdf, 0x1f, 0x5d, 0x5b, 0x44 })]
+ [InlineData("SHA3-384", 832 / 8 - 1, new byte[] { 0xd6, 0x08, 0x69, 0xd0, 0x99, 0x98, 0x6d, 0xcc })]
+ [InlineData("SHA3-384", 832 / 8, new byte[] { 0x49, 0x83, 0x06, 0x4e, 0x08, 0xf8, 0x93, 0x62 })]
+ [InlineData("SHA3-384", 832 / 8 + 1, new byte[] { 0xcc, 0x03, 0x1f, 0x57, 0x5e, 0x0c, 0xe1, 0xe8 })]
+ [InlineData("SHA3-512", 576 / 8 - 1, new byte[] { 0x47, 0xd2, 0x7e, 0x61, 0x01, 0x61, 0x9a, 0xd0 })]
+ [InlineData("SHA3-512", 576 / 8, new byte[] { 0xda, 0x56, 0x5b, 0x08, 0x73, 0xbc, 0x4d, 0x33 })]
+ [InlineData("SHA3-512", 576 / 8 + 1, new byte[] { 0xd3, 0xa1, 0xfd, 0x76, 0xc4, 0xf9, 0x62, 0xc3 })]
+#endif
public static void Kdk_HmacBlockBoundarySizes(string hashAlgorithmName, int kdkSize, byte[] expected)
{
+#if NET8_0_OR_GREATER
+ if ((hashAlgorithmName == "SHA3-256" && !SHA3_256.IsSupported) ||
+ (hashAlgorithmName == "SHA3-384" && !SHA3_384.IsSupported) ||
+ (hashAlgorithmName == "SHA3-512" && !SHA3_512.IsSupported))
+ {
+ throw new SkipTestException($"Algorithm '{hashAlgorithmName}' is not supported on the current platform.");
+ }
+#endif
+
// We do HMAC key adjust for the CNG implementation when the kdk exceeds the block size of the HMAC algorithm.
// This tests one byte below, at, and above the block size for each HMAC algorithm.
// Verified against OpenSSL 3. Example command used below. Adjust the digest and the seq upper boundary as needed.
@@ -306,6 +327,149 @@ public static IEnumerable GetOutputLengthBoundaries()
0x61,
}
};
+
+#if NET8_0_OR_GREATER
+ if (HMACSHA3_256.IsSupported)
+ {
+ // HMACSHA3_256 output size is 32 bytes
+ yield return new object[]
+ {
+ "SHA3-256",
+ new byte[63]
+ {
+ 0x25, 0xb6, 0xc5, 0xba, 0x60, 0x47, 0x95, 0xb6, 0x5c, 0x92, 0xcb, 0x8f, 0xd2, 0x4d, 0x40, 0xfa,
+ 0x68, 0xa9, 0xa6, 0xd3, 0x2c, 0x7f, 0x3c, 0xcd, 0x88, 0x89, 0xdc, 0x45, 0x10, 0xeb, 0x16, 0x38,
+ 0xf3, 0xe2, 0xe0, 0x26, 0xb5, 0xbc, 0x61, 0x9f, 0x56, 0x66, 0x7d, 0xbd, 0x55, 0x4e, 0x6b, 0x70,
+ 0x84, 0xc1, 0x9c, 0x95, 0x1e, 0x8f, 0x1b, 0xdc, 0xc2, 0x68, 0xc3, 0x10, 0x9c, 0x13, 0xf8,
+ }
+ };
+
+ yield return new object[]
+ {
+ "SHA3-256",
+ new byte[64]
+ {
+ 0xc8, 0x8a, 0xfe, 0xd4, 0x62, 0xa6, 0x9e, 0xa6, 0x90, 0xa7, 0xb1, 0xe2, 0x01, 0xff, 0x67, 0x52,
+ 0x5d, 0xca, 0xa9, 0x13, 0xa2, 0x92, 0x3c, 0xc0, 0x42, 0xd1, 0x1b, 0xe2, 0xff, 0xe0, 0xa2, 0xb9,
+ 0x48, 0x3d, 0xb1, 0x17, 0x73, 0x76, 0x3d, 0x37, 0x0f, 0xc6, 0x6f, 0x65, 0xa5, 0xb9, 0x23, 0xcf,
+ 0xc0, 0xd4, 0x5f, 0xdf, 0x46, 0x0e, 0xab, 0xce, 0x8e, 0x7d, 0x2c, 0x9d, 0x71, 0x40, 0xf0, 0x89,
+ }
+ };
+
+ yield return new object[]
+ {
+ "SHA3-256",
+ new byte[65]
+ {
+ 0xcc, 0x3a, 0x45, 0x55, 0x26, 0x1e, 0x56, 0xf4, 0x3c, 0x18, 0x66, 0x1d, 0xa8, 0xe3, 0x91, 0xe7,
+ 0xbc, 0xc3, 0x93, 0x1f, 0x85, 0xbe, 0x0c, 0xfb, 0xab, 0x10, 0xa1, 0x52, 0x93, 0xc7, 0x3c, 0xac,
+ 0x20, 0x09, 0xfb, 0x40, 0x95, 0xb9, 0x0f, 0x0a, 0x35, 0x50, 0xe2, 0x05, 0x33, 0x20, 0xdd, 0xb0,
+ 0xb7, 0xca, 0xda, 0x15, 0xa8, 0xc8, 0x73, 0x5d, 0xb7, 0x22, 0x5f, 0x23, 0xef, 0xcd, 0x33, 0x41,
+ 0xa2,
+ }
+ };
+ }
+
+ if (HMACSHA3_384.IsSupported)
+ {
+ // HMACSHA3_384 output size is 48 bytes
+ yield return new object[]
+ {
+ "SHA3-384",
+ new byte[95]
+ {
+ 0x80, 0x3b, 0x0a, 0x83, 0xe5, 0xae, 0xab, 0xff, 0x16, 0x7a, 0x04, 0x60, 0x97, 0x74, 0x39, 0xcf,
+ 0x8b, 0xeb, 0xbb, 0x57, 0x89, 0x62, 0x24, 0xab, 0x01, 0x61, 0xce, 0x23, 0xbc, 0xc1, 0xe0, 0xc4,
+ 0x9e, 0x73, 0xd1, 0x21, 0xdc, 0x21, 0xee, 0x30, 0xdb, 0xec, 0xb0, 0xbf, 0xec, 0xaa, 0x24, 0x18,
+ 0xf9, 0x93, 0xda, 0xd1, 0xaf, 0xfe, 0xbb, 0x1c, 0x7f, 0xcd, 0xea, 0x8f, 0x57, 0x41, 0x3c, 0x01,
+ 0xa8, 0x94, 0x06, 0x27, 0x8d, 0x95, 0x5d, 0x62, 0x61, 0xe7, 0x67, 0x60, 0xc4, 0xa2, 0xc4, 0xf5,
+ 0x7e, 0x38, 0x6e, 0x30, 0x38, 0x83, 0x7d, 0x5e, 0xf4, 0x0f, 0xdf, 0xd3, 0xac, 0x65, 0x48,
+ }
+ };
+
+ yield return new object[]
+ {
+ "SHA3-384",
+ new byte[96]
+ {
+ 0xb8, 0xea, 0xbd, 0xcb, 0x67, 0xcb, 0xd7, 0xf5, 0x12, 0xdf, 0xc2, 0x35, 0x89, 0x66, 0x80, 0x6f,
+ 0xc4, 0x7c, 0x28, 0xf2, 0x4b, 0xf5, 0xd1, 0x4d, 0x54, 0x4c, 0x78, 0xae, 0xde, 0xc2, 0xae, 0xb0,
+ 0x7d, 0xfc, 0x02, 0x6e, 0x0e, 0x08, 0x2b, 0xfc, 0xd2, 0x2b, 0xae, 0xfc, 0xa1, 0x55, 0xf7, 0xc7,
+ 0xd5, 0x77, 0xe4, 0x84, 0xbb, 0x53, 0x1d, 0x3d, 0xd2, 0x7a, 0x61, 0x97, 0x8a, 0xd3, 0xae, 0x1b,
+ 0x47, 0xbe, 0xa9, 0x40, 0x02, 0xac, 0x55, 0x1b, 0x74, 0x72, 0x02, 0x5b, 0xa8, 0xa8, 0xd4, 0xfe,
+ 0xcf, 0xd1, 0xb2, 0x44, 0x01, 0xec, 0xb7, 0xef, 0x63, 0x0f, 0x16, 0xae, 0xa9, 0x63, 0xb1, 0x56,
+ }
+ };
+
+ yield return new object[]
+ {
+ "SHA3-384",
+ new byte[97]
+ {
+ 0x62, 0x93, 0xa5, 0x45, 0x03, 0x7a, 0x2f, 0x50, 0xfe, 0x6b, 0xe6, 0x85, 0x56, 0x88, 0x8c, 0x78,
+ 0xbd, 0x4f, 0x08, 0x68, 0xdd, 0x33, 0xab, 0x18, 0x05, 0x81, 0x79, 0x70, 0x24, 0xe0, 0x3f, 0x94,
+ 0x40, 0x9b, 0xc3, 0x41, 0xa2, 0xe0, 0xfd, 0x02, 0xe8, 0xb8, 0x41, 0x53, 0x2e, 0x95, 0x59, 0xc5,
+ 0xf7, 0xab, 0x5b, 0xe9, 0x2d, 0x15, 0x0a, 0xcc, 0xb8, 0xc0, 0x87, 0xbd, 0x78, 0x39, 0xb9, 0xb8,
+ 0x83, 0x2c, 0x49, 0x7b, 0x45, 0x9b, 0x81, 0xed, 0x33, 0xdc, 0x75, 0xf1, 0x7d, 0xbd, 0x44, 0xce,
+ 0xa5, 0xf3, 0xbe, 0x43, 0xa5, 0x15, 0x7c, 0x7e, 0xcd, 0x06, 0x09, 0xb0, 0x4a, 0x17, 0x48, 0xf3,
+ 0x51,
+ }
+ };
+ }
+
+ if (HMACSHA3_512.IsSupported)
+ {
+ // HMACSHA3_512 output size is 64 bytes
+ yield return new object[]
+ {
+ "SHA3-512",
+ new byte[127]
+ {
+ 0x41, 0xe4, 0xb5, 0xe6, 0x5b, 0x8c, 0xce, 0x14, 0xa8, 0x39, 0xd3, 0xdf, 0xb4, 0x27, 0x0f, 0xff,
+ 0x1f, 0x9a, 0xca, 0x24, 0x03, 0x59, 0x4b, 0x86, 0x40, 0x66, 0xf0, 0xae, 0xdc, 0x59, 0x44, 0x0e,
+ 0x6a, 0x87, 0xa5, 0x38, 0x5a, 0x79, 0x27, 0xa5, 0x61, 0x91, 0x1a, 0x9d, 0x39, 0xca, 0x80, 0xe0,
+ 0x11, 0x3b, 0xd0, 0xfa, 0x2e, 0x48, 0x70, 0x83, 0x31, 0xa7, 0xa6, 0x6c, 0x5f, 0xf2, 0x2f, 0x09,
+ 0x5b, 0x1e, 0xad, 0x8b, 0x4f, 0xbd, 0x63, 0x26, 0x6f, 0xcd, 0xc6, 0xce, 0xff, 0xa6, 0x86, 0xbe,
+ 0xf6, 0x4b, 0x81, 0x63, 0x65, 0x24, 0x48, 0xbc, 0x59, 0x6a, 0x4f, 0x00, 0xb5, 0x9e, 0x9b, 0xbd,
+ 0x85, 0xbc, 0xf6, 0xf1, 0xf1, 0xaa, 0xd3, 0x91, 0x9b, 0x7b, 0x26, 0xfe, 0xd0, 0xd7, 0x4c, 0x34,
+ 0xdd, 0x2c, 0x57, 0x2e, 0x10, 0x09, 0x76, 0x32, 0xed, 0x3a, 0x95, 0x7d, 0x88, 0x2b, 0xdc,
+ }
+ };
+
+ yield return new object[]
+ {
+ "SHA3-512",
+ new byte[128]
+ {
+ 0xbe, 0x9f, 0x29, 0xd7, 0x9d, 0x11, 0x7e, 0xd7, 0x33, 0xd4, 0xcf, 0x66, 0xed, 0x1a, 0x61, 0xfd,
+ 0xb0, 0x68, 0x3b, 0x03, 0xd1, 0x7c, 0x1a, 0x69, 0xd0, 0x33, 0x1c, 0xf4, 0x7a, 0xf0, 0x4a, 0x46,
+ 0xed, 0x4a, 0x33, 0xbf, 0x2b, 0x18, 0x16, 0x4b, 0xda, 0x30, 0x96, 0x11, 0xee, 0x52, 0x4b, 0x0e,
+ 0x22, 0xa0, 0x8f, 0xb0, 0xdc, 0xe6, 0x8c, 0x57, 0xd0, 0x6e, 0x25, 0xd8, 0x29, 0xf7, 0xf9, 0x94,
+ 0xe3, 0x73, 0x20, 0x4e, 0x11, 0xc0, 0xa9, 0x3b, 0x00, 0xf0, 0x8e, 0xff, 0xb3, 0x07, 0x87, 0x4c,
+ 0x3b, 0x96, 0x09, 0xff, 0x14, 0x3b, 0x65, 0x17, 0x5f, 0x54, 0x16, 0xaf, 0x15, 0xe5, 0x59, 0x5b,
+ 0x75, 0xf5, 0x03, 0x61, 0x5b, 0xd9, 0xf3, 0x7c, 0x71, 0x96, 0xaa, 0x67, 0xef, 0xdd, 0x40, 0x4c,
+ 0xd2, 0x9e, 0xf6, 0x05, 0x02, 0x93, 0x23, 0x83, 0x33, 0xcc, 0x0f, 0xf2, 0xdd, 0x9c, 0xd6, 0x46,
+ }
+ };
+
+ yield return new object[]
+ {
+ "SHA3-512",
+ new byte[129]
+ {
+ 0x5f, 0xf7, 0xd9, 0x1e, 0x98, 0xb3, 0xa4, 0xab, 0x4d, 0xc8, 0x50, 0x9a, 0xd7, 0x50, 0x37, 0xba,
+ 0x10, 0xeb, 0x1b, 0x10, 0x5f, 0x6c, 0xfe, 0x81, 0x75, 0x5d, 0x6c, 0x63, 0x8a, 0xfe, 0x60, 0x4f,
+ 0xb3, 0x9e, 0xf4, 0x84, 0x5d, 0xa3, 0x88, 0xf7, 0x29, 0x5c, 0x30, 0xbb, 0xf7, 0x30, 0x69, 0x84,
+ 0xab, 0x9e, 0xc6, 0xb0, 0xc3, 0xce, 0x45, 0x7a, 0xf2, 0xac, 0x18, 0x0b, 0x09, 0x8c, 0xbb, 0xae,
+ 0x22, 0x12, 0xef, 0xd8, 0xec, 0x6f, 0x9f, 0xbf, 0x09, 0x7f, 0xe2, 0xb6, 0xc8, 0x6a, 0xf7, 0x5e,
+ 0x86, 0x27, 0x22, 0xeb, 0xa8, 0x7b, 0x1f, 0x54, 0x97, 0x16, 0x0f, 0x21, 0xad, 0xcd, 0xd9, 0x9d,
+ 0xd6, 0x01, 0x0b, 0x79, 0xe9, 0x16, 0xd8, 0xcd, 0xa6, 0x93, 0x25, 0xd1, 0xeb, 0xac, 0x9b, 0x5f,
+ 0x26, 0xf4, 0xad, 0x0a, 0xf2, 0xc6, 0x4d, 0xad, 0x69, 0x96, 0xb7, 0xc8, 0xcd, 0xe0, 0x13, 0xfb,
+ 0xf6,
+ }
+ };
+ }
+#endif
}
public static IEnumerable GetRfc8009TestVectors()
diff --git a/src/libraries/Common/tests/System/TimeProviderTests.cs b/src/libraries/Common/tests/System/TimeProviderTests.cs
index b3fe700165e2fd..93a92dde712907 100644
--- a/src/libraries/Common/tests/System/TimeProviderTests.cs
+++ b/src/libraries/Common/tests/System/TimeProviderTests.cs
@@ -321,7 +321,7 @@ public static void RunDelayTests(TimeProvider provider, ITestTaskFactory taskFac
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[MemberData(nameof(TimersProvidersWithTaskFactorData))]
- public static async void RunWaitAsyncTests(TimeProvider provider, ITestTaskFactory taskFactory)
+ public static async Task RunWaitAsyncTests(TimeProvider provider, ITestTaskFactory taskFactory)
{
CancellationTokenSource cts = new CancellationTokenSource();
@@ -377,7 +377,7 @@ public static async void RunWaitAsyncTests(TimeProvider provider, ITestTaskFacto
#if !NETFRAMEWORK
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[MemberData(nameof(TimersProvidersListData))]
- public static async void PeriodicTimerTests(TimeProvider provider)
+ public static async Task PeriodicTimerTests(TimeProvider provider)
{
var timer = new PeriodicTimer(TimeSpan.FromMilliseconds(1), provider);
Assert.True(await timer.WaitForNextTickAsync());
diff --git a/src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs b/src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs
index 479d2aef83c6e2..bf676b7b6f26be 100644
--- a/src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs
+++ b/src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs
@@ -405,6 +405,15 @@ public static void Equal(HashSet expected, HashSet actual)
}
}
+ /// Validates that the two sets contains the same elements. XUnit doesn't display the full collections.
+ public static void Equal(ISet expected, ISet actual)
+ {
+ if (!actual.SetEquals(expected))
+ {
+ throw new XunitException($"Expected: {string.Join(", ", expected)}{Environment.NewLine}Actual: {string.Join(", ", actual)}");
+ }
+ }
+
///
/// Validates that the actual collection contains same items as expected collection. If the test fails, this will display:
/// 1. Count if two collection count are different;
diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
index 68ca7995303e7e..88ab461e49dcea 100644
--- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
+++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
@@ -303,6 +303,7 @@ private static bool GetAlpnSupport()
private static readonly Lazy s_supportsTls12 = new Lazy(GetTls12Support);
private static readonly Lazy s_supportsTls13 = new Lazy(GetTls13Support);
private static readonly Lazy s_sendsCAListByDefault = new Lazy(GetSendsCAListByDefault);
+ private static readonly Lazy s_supportsSha3 = new Lazy(GetSupportsSha3);
public static bool SupportsTls10 => s_supportsTls10.Value;
public static bool SupportsTls11 => s_supportsTls11.Value;
@@ -310,6 +311,8 @@ private static bool GetAlpnSupport()
public static bool SupportsTls13 => s_supportsTls13.Value;
public static bool SendsCAListByDefault => s_sendsCAListByDefault.Value;
public static bool SupportsSendingCustomCANamesInTls => UsesAppleCrypto || IsOpenSslSupported || (PlatformDetection.IsWindows8xOrLater && SendsCAListByDefault);
+ public static bool SupportsSha3 => s_supportsSha3.Value;
+ public static bool DoesNotSupportSha3 => !s_supportsSha3.Value;
private static readonly Lazy s_largeArrayIsNotSupported = new Lazy(IsLargeArrayNotSupported);
@@ -651,5 +654,25 @@ private static bool AssemblyConfigurationEquals(string configuration)
return assemblyConfigurationAttribute != null &&
string.Equals(assemblyConfigurationAttribute.Configuration, configuration, StringComparison.InvariantCulture);
}
+
+ private static bool GetSupportsSha3()
+ {
+ if (IsOpenSslSupported)
+ {
+ if (OpenSslVersion.Major >= 3)
+ {
+ return true;
+ }
+
+ return OpenSslVersion.Major == 1 && OpenSslVersion.Minor >= 1 && OpenSslVersion.Build >= 1;
+ }
+
+ if (IsWindowsVersionOrLater(10, 0, 25324))
+ {
+ return true;
+ }
+
+ return false;
+ }
}
}
diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets
index bc1e24d670a421..8e000b5f4d7604 100644
--- a/src/libraries/Directory.Build.targets
+++ b/src/libraries/Directory.Build.targets
@@ -47,14 +47,8 @@
-->
$(WarningsAsErrors.Replace('NU1605', ''))
- true
-
- true
true
- true
+ true
true
diff --git a/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/HashAlgorithmNames.cs b/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/HashAlgorithmNames.cs
index 8f10590302e4bb..feb43d2caa487b 100644
--- a/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/HashAlgorithmNames.cs
+++ b/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/HashAlgorithmNames.cs
@@ -3,11 +3,15 @@
namespace System.Security.Cryptography
{
+ // Strings need to match CNG identifiers.
internal static class HashAlgorithmNames
{
internal const string SHA1 = nameof(SHA1);
internal const string SHA256 = nameof(SHA256);
internal const string SHA384 = nameof(SHA384);
internal const string SHA512 = nameof(SHA512);
+ internal const string SHA3_256 = "SHA3-256";
+ internal const string SHA3_384 = "SHA3-384";
+ internal const string SHA3_512 = "SHA3-512";
}
}
diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchMetaObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchMetaObject.cs
index d1c80b62c0a580..c6aed3cca13b6e 100644
--- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchMetaObject.cs
+++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchMetaObject.cs
@@ -11,6 +11,7 @@ namespace Microsoft.CSharp.RuntimeBinder.ComInterop
internal sealed class IDispatchMetaObject : ComFallbackMetaObject
{
private readonly IDispatchComObject _self;
+ private static readonly bool[] s_false = new bool[] { false };
[RequiresUnreferencedCode(Binder.TrimmerWarning)]
internal IDispatchMetaObject(Expression expression, IDispatchComObject self)
@@ -218,7 +219,7 @@ private DynamicMetaObject TryPropertyPut(SetMemberBinder binder, DynamicMetaObje
DynamicMetaObject result = new ComInvokeBinder(
new CallInfo(1),
new[] { value },
- new bool[] { false },
+ s_false,
restrictions,
Expression.Constant(method),
dispatch,
diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantArray.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantArray.cs
index 71e466deb0acf0..37e34303feadff 100644
--- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantArray.cs
+++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/VariantArray.cs
@@ -49,6 +49,7 @@ internal static class VariantArray
// Don't need a dictionary for this, it will have very few elements
// (guaranteed less than 28, in practice 0-2)
private static readonly List s_generatedTypes = new List(0);
+ private static readonly string[] s_genericTName = new string[] { "T" };
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields, typeof(VariantArray1))]
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields, typeof(VariantArray2))]
@@ -100,7 +101,7 @@ private static Type CreateCustomType(int size)
{
TypeAttributes attrs = TypeAttributes.NotPublic | TypeAttributes.SequentialLayout;
TypeBuilder type = UnsafeMethods.DynamicModule.DefineType("VariantArray" + size, attrs, typeof(ValueType));
- GenericTypeParameterBuilder T = type.DefineGenericParameters(new string[] { "T" })[0];
+ GenericTypeParameterBuilder T = type.DefineGenericParameters(s_genericTName)[0];
for (int i = 0; i < size; i++)
{
type.DefineField("Element" + i, T, FieldAttributes.Public);
diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs
index 8deb86a491c978..f2d34b30cb9a79 100644
--- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs
+++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs
@@ -1151,7 +1151,7 @@ private void AdjustCallArgumentsForParams(CType callingObjectType, CType type, M
CType arrayType = (ArrayType)TypeManager.SubstType(mp.Params[mp.Params.Count - 1], type, pTypeArgs);
// Use an EK_ARRINIT even in the empty case so empty param arrays in attributes work.
- ExprArrayInit arrayInit = ExprFactory.CreateArrayInit(arrayType, null, null, new[] { 0 });
+ ExprArrayInit arrayInit = ExprFactory.CreateArrayInit(arrayType, null, null, s_zero);
arrayInit.GeneratedForParamArray = true;
arrayInit.OptionalArguments = named.Value;
@@ -1229,7 +1229,7 @@ private void AdjustCallArgumentsForParams(CType callingObjectType, CType type, M
CType elementType = subArr.ElementType;
// Use an EK_ARRINIT even in the empty case so empty param arrays in attributes work.
- ExprArrayInit exprArrayInit = ExprFactory.CreateArrayInit(substitutedArrayType, null, null, new[] { 0 });
+ ExprArrayInit exprArrayInit = ExprFactory.CreateArrayInit(substitutedArrayType, null, null, s_zero);
exprArrayInit.GeneratedForParamArray = true;
if (it.AtEnd())
@@ -1618,6 +1618,8 @@ private static void CheckUnsafe(CType type)
private AggregateSymbol ContextForMemberLookup => Context.ContextForMemberLookup;
+ private static readonly int[] s_zero = new[] { 0 };
+
private static ExprWrap WrapShortLivedExpression(Expr expr) => ExprFactory.CreateWrap(expr);
private static ExprAssignment GenerateOptimizedAssignment(Expr op1, Expr op2) => ExprFactory.CreateAssignment(op1, op2);
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Emitter.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Emitter.cs
index f309f203486bf7..911a00d91fdbd5 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Emitter.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Emitter.cs
@@ -176,7 +176,7 @@ private void EmitGetValueMethods()
if (_generationSpec.ShouldEmitMethods(BinderMethodSpecifier.GetValue_TypeOf_key_defaultValue))
{
EmitBlankLineIfRequired();
- _writer.WriteLine($"public static object? {Identifier.GetValue}(this {FullyQualifiedDisplayName.IConfiguration} {Identifier.configuration}, {FullyQualifiedDisplayName.Type} {Identifier.type}, string {Identifier.key}, object? {Identifier.defaultValue}) =>" +
+ _writer.WriteLine($"public static object? {Identifier.GetValue}(this {FullyQualifiedDisplayName.IConfiguration} {Identifier.configuration}, {FullyQualifiedDisplayName.Type} {Identifier.type}, string {Identifier.key}, object? {Identifier.defaultValue}) => " +
$"{expressionForGetValueCore}({Identifier.configuration}, {Identifier.type}, {Identifier.key}) ?? {Identifier.defaultValue};");
}
}
@@ -527,7 +527,7 @@ private void EmitHelperMethods()
_precedingBlockExists = true;
}
- if (_generationSpec.ShouldEmitMethods(BinderMethodSpecifier.RootMethodsWithConfigOptions))
+ if (_generationSpec.ShouldEmitMethods(BinderMethodSpecifier.MethodsThatAssessBinderOptions))
{
_writer.WriteBlankLine();
EmitGetBinderOptionsHelper();
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Parser.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Parser.cs
index 020c1104018669..4064232c5a7153 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Parser.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Parser.cs
@@ -7,7 +7,6 @@
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
-using System.Runtime.CompilerServices;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Operations;
@@ -15,7 +14,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration
{
public sealed partial class ConfigurationBindingGenerator
{
- private sealed class Parser
+ private sealed partial class Parser
{
private readonly SourceProductionContext _context;
private readonly KnownTypeSymbols _typeSymbols;
@@ -140,18 +139,19 @@ private void ProcessBindCall(BinderInvocationOperation binderOperation)
}
ITypeSymbol? type = ResolveType(objectArg.Value)?.WithNullableAnnotation(NullableAnnotation.None);
- INamedTypeSymbol? namedType;
- if ((namedType = type as INamedTypeSymbol) is null ||
- namedType.SpecialType == SpecialType.System_Object ||
- namedType.SpecialType == SpecialType.System_Void ||
- // Binding to root-level struct is a no-op.
- namedType.IsValueType)
+ if (!IsValidRootConfigType(overload, type, binderOperation.Location))
{
return;
}
- AddRootConfigType(methodGroup: BinderMethodSpecifier.Bind, overload, namedType, binderOperation.Location);
+ if (type.IsValueType)
+ {
+ _context.ReportDiagnostic(Diagnostic.Create(Diagnostics.ValueTypesInvalidForBind, binderOperation.Location, type));
+ return;
+ }
+
+ AddRootConfigType(methodGroup: BinderMethodSpecifier.Bind, overload, type, binderOperation.Location);
static ITypeSymbol? ResolveType(IOperation conversionOperation) =>
conversionOperation switch
@@ -180,7 +180,7 @@ private void ProcessGetCall(BinderInvocationOperation binderOperation)
}
BinderMethodSpecifier overload = BinderMethodSpecifier.None;
- INamedTypeSymbol? namedType;
+ ITypeSymbol? type;
if (targetMethod.IsGenericMethod)
{
@@ -189,7 +189,7 @@ private void ProcessGetCall(BinderInvocationOperation binderOperation)
return;
}
- namedType = targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None) as INamedTypeSymbol;
+ type = targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None);
if (paramLength is 1)
{
@@ -207,7 +207,7 @@ private void ProcessGetCall(BinderInvocationOperation binderOperation)
else
{
ITypeOfOperation? typeOfOperation = operation.Arguments[1].ChildOperations.FirstOrDefault() as ITypeOfOperation;
- namedType = typeOfOperation?.TypeOperand as INamedTypeSymbol;
+ type = typeOfOperation?.TypeOperand;
if (paramLength is 2)
{
@@ -219,15 +219,12 @@ private void ProcessGetCall(BinderInvocationOperation binderOperation)
}
}
- if (overload is BinderMethodSpecifier.None ||
- namedType is null ||
- namedType.SpecialType == SpecialType.System_Object ||
- namedType.SpecialType == SpecialType.System_Void)
+ if (!IsValidRootConfigType(overload, type, binderOperation.Location))
{
return;
}
- AddRootConfigType(methodGroup: BinderMethodSpecifier.Get, overload, namedType, binderOperation.Location);
+ AddRootConfigType(methodGroup: BinderMethodSpecifier.Get, overload, type, binderOperation.Location);
}
private void ProcessGetValueCall(BinderInvocationOperation binderOperation)
@@ -282,15 +279,12 @@ private void ProcessGetValueCall(BinderInvocationOperation binderOperation)
}
}
- if (overload is BinderMethodSpecifier.None ||
- type is null ||
- type.SpecialType == SpecialType.System_Object ||
- type.SpecialType == SpecialType.System_Void)
+ if (!IsValidRootConfigType(overload, type, binderOperation.Location))
{
return;
}
- ITypeSymbol effectiveType = IsNullable(type, out ITypeSymbol? underlyingType) ? underlyingType : type;
+ ITypeSymbol effectiveType = (IsNullable(type, out ITypeSymbol? underlyingType) ? underlyingType : type)!;
if (IsParsableFromString(effectiveType, out _))
{
AddRootConfigType(methodGroup: BinderMethodSpecifier.GetValue, overload, type, binderOperation.Location);
@@ -310,23 +304,38 @@ private void ProcessConfigureCall(BinderInvocationOperation binderOperation)
SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, @params[1].Type))
{
ITypeSymbol? type = targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None);
- if (type is not INamedTypeSymbol namedType ||
- namedType.SpecialType == SpecialType.System_Object)
+
+ if (!IsValidRootConfigType(BinderMethodSpecifier.Configure, type, binderOperation.Location))
{
return;
}
- AddRootConfigType(methodGroup: BinderMethodSpecifier.Configure, overload: BinderMethodSpecifier.Configure, namedType, binderOperation.Location);
+ AddRootConfigType(methodGroup: BinderMethodSpecifier.Configure, overload: BinderMethodSpecifier.Configure, type, binderOperation.Location);
}
}
- private void AddRootConfigType(BinderMethodSpecifier methodGroup, BinderMethodSpecifier overload, ITypeSymbol type, Location? location)
+ private bool IsValidRootConfigType(BinderMethodSpecifier overload, ITypeSymbol? type, Location? location)
{
- if (type is INamedTypeSymbol namedType && ContainsGenericParameters(namedType))
+ if (overload is BinderMethodSpecifier.None)
{
- return;
+ return false;
+ }
+
+ if (type is null ||
+ type.SpecialType is SpecialType.System_Object or SpecialType.System_Void ||
+ type.TypeKind is TypeKind.TypeParameter or TypeKind.Pointer or TypeKind.Error ||
+ type.IsRefLikeType ||
+ ContainsGenericParameters(type))
+ {
+ _context.ReportDiagnostic(Diagnostic.Create(Diagnostics.CouldNotDetermineTypeInfo, location));
+ return false;
}
+ return true;
+ }
+
+ private void AddRootConfigType(BinderMethodSpecifier methodGroup, BinderMethodSpecifier overload, ITypeSymbol type, Location? location)
+ {
if (GetOrCreateTypeSpec(type, location) is TypeSpec spec)
{
RegisterConfigType(spec, overload);
@@ -345,7 +354,7 @@ private void AddRootConfigType(BinderMethodSpecifier methodGroup, BinderMethodSp
if (IsNullable(type, out ITypeSymbol? underlyingType))
{
- spec = TryGetTypeSpec(underlyingType, ParserDiagnostics.NullableUnderlyingTypeNotSupported, out TypeSpec? underlyingTypeSpec)
+ spec = TryGetTypeSpec(underlyingType, Diagnostics.NullableUnderlyingTypeNotSupported, out TypeSpec? underlyingTypeSpec)
? new NullableSpec(type) { Location = location, UnderlyingType = underlyingTypeSpec }
: null;
}
@@ -386,7 +395,7 @@ private void AddRootConfigType(BinderMethodSpecifier methodGroup, BinderMethodSp
if (spec is null)
{
- ReportUnsupportedType(type, ParserDiagnostics.TypeNotSupported, location);
+ ReportUnsupportedType(type, Diagnostics.TypeNotSupported, location);
return null;
}
@@ -562,7 +571,7 @@ private bool TryGetTypeSpec(ITypeSymbol type, DiagnosticDescriptor descriptor, o
private EnumerableSpec? CreateArraySpec(IArrayTypeSymbol arrayType, Location? location)
{
- if (!TryGetTypeSpec(arrayType.ElementType, ParserDiagnostics.ElementTypeNotSupported, out TypeSpec elementSpec))
+ if (!TryGetTypeSpec(arrayType.ElementType, Diagnostics.ElementTypeNotSupported, out TypeSpec elementSpec))
{
return null;
}
@@ -594,7 +603,7 @@ private bool IsSupportedArrayType(ITypeSymbol type, Location? location)
if (arrayType.Rank > 1)
{
- ReportUnsupportedType(arrayType, ParserDiagnostics.MultiDimArraysNotSupported, location);
+ ReportUnsupportedType(arrayType, Diagnostics.MultiDimArraysNotSupported, location);
return false;
}
@@ -624,15 +633,15 @@ private bool IsSupportedArrayType(ITypeSymbol type, Location? location)
private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, Location? location, ITypeSymbol keyType, ITypeSymbol elementType)
{
- if (!TryGetTypeSpec(keyType, ParserDiagnostics.DictionaryKeyNotSupported, out TypeSpec keySpec) ||
- !TryGetTypeSpec(elementType, ParserDiagnostics.ElementTypeNotSupported, out TypeSpec elementSpec))
+ if (!TryGetTypeSpec(keyType, Diagnostics.DictionaryKeyNotSupported, out TypeSpec keySpec) ||
+ !TryGetTypeSpec(elementType, Diagnostics.ElementTypeNotSupported, out TypeSpec elementSpec))
{
return null;
}
if (keySpec.SpecKind != TypeSpecKind.ParsableFromString)
{
- ReportUnsupportedType(type, ParserDiagnostics.DictionaryKeyNotSupported, location);
+ ReportUnsupportedType(type, Diagnostics.DictionaryKeyNotSupported, location);
return null;
}
@@ -657,7 +666,7 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, Location? loc
}
else
{
- ReportUnsupportedType(type, ParserDiagnostics.CollectionNotSupported, location);
+ ReportUnsupportedType(type, Diagnostics.CollectionNotSupported, location);
return null;
}
}
@@ -678,7 +687,7 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, Location? loc
}
else
{
- ReportUnsupportedType(type, ParserDiagnostics.CollectionNotSupported, location);
+ ReportUnsupportedType(type, Diagnostics.CollectionNotSupported, location);
return null;
}
@@ -702,7 +711,7 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, Location? loc
private EnumerableSpec? CreateEnumerableSpec(INamedTypeSymbol type, Location? location)
{
if (!TryGetElementType(type, out ITypeSymbol? elementType) ||
- !TryGetTypeSpec(elementType, ParserDiagnostics.ElementTypeNotSupported, out TypeSpec elementSpec))
+ !TryGetTypeSpec(elementType, Diagnostics.ElementTypeNotSupported, out TypeSpec elementSpec))
{
return null;
}
@@ -727,7 +736,7 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, Location? loc
}
else
{
- ReportUnsupportedType(type, ParserDiagnostics.CollectionNotSupported, location);
+ ReportUnsupportedType(type, Diagnostics.CollectionNotSupported, location);
return null;
}
}
@@ -767,7 +776,7 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, Location? loc
}
else
{
- ReportUnsupportedType(type, ParserDiagnostics.CollectionNotSupported, location);
+ ReportUnsupportedType(type, Diagnostics.CollectionNotSupported, location);
return null;
}
@@ -829,8 +838,8 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, Location? loc
bool hasPublicParameterlessCtor = type.IsValueType || parameterlessCtor is not null;
if (!hasPublicParameterlessCtor && hasMultipleParameterizedCtors)
{
- diagnosticDescriptor = ParserDiagnostics.MultipleParameterizedConstructors;
- objectSpec.InitExceptionMessage = string.Format(ExceptionMessages.MultipleParameterizedConstructors, typeName);
+ diagnosticDescriptor = Diagnostics.MultipleParameterizedConstructors;
+ objectSpec.InitExceptionMessage = string.Format(Emitter.ExceptionMessages.MultipleParameterizedConstructors, typeName);
}
ctor = type.IsValueType
@@ -843,8 +852,8 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, Location? loc
if (ctor is null)
{
- diagnosticDescriptor = ParserDiagnostics.MissingPublicInstanceConstructor;
- objectSpec.InitExceptionMessage = string.Format(ExceptionMessages.MissingPublicInstanceConstructor, typeName);
+ diagnosticDescriptor = Diagnostics.MissingPublicInstanceConstructor;
+ objectSpec.InitExceptionMessage = string.Format(Emitter.ExceptionMessages.MissingPublicInstanceConstructor, typeName);
}
if (diagnosticDescriptor is not null)
@@ -869,7 +878,7 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, Location? loc
TypeSpec? propertyTypeSpec = GetOrCreateTypeSpec(property.Type);
if (propertyTypeSpec is null)
{
- _context.ReportDiagnostic(Diagnostic.Create(ParserDiagnostics.PropertyNotSupported, location, new string[] { propertyName, type.ToDisplayString() }));
+ _context.ReportDiagnostic(Diagnostic.Create(Diagnostics.PropertyNotSupported, location, new string[] { propertyName, type.ToDisplayString() }));
}
else
{
@@ -914,7 +923,7 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, Location? loc
if (invalidParameters.Count > 0)
{
- objectSpec.InitExceptionMessage = string.Format(ExceptionMessages.CannotBindToConstructorParameter, typeName, FormatParams(invalidParameters));
+ objectSpec.InitExceptionMessage = string.Format(Emitter.ExceptionMessages.CannotBindToConstructorParameter, typeName, FormatParams(invalidParameters));
}
else if (missingParameters.Count > 0)
{
@@ -924,7 +933,7 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, Location? loc
}
else
{
- objectSpec.InitExceptionMessage = string.Format(ExceptionMessages.ConstructorParametersDoNotMatchProperties, typeName, FormatParams(missingParameters));
+ objectSpec.InitExceptionMessage = string.Format(Emitter.ExceptionMessages.ConstructorParametersDoNotMatchProperties, typeName, FormatParams(missingParameters));
}
}
@@ -1021,16 +1030,17 @@ private static bool IsInterfaceMatch(INamedTypeSymbol type, INamedTypeSymbol @in
return SymbolEqualityComparer.Default.Equals(type, @interface);
}
- public static bool ContainsGenericParameters(INamedTypeSymbol type)
+ public static bool ContainsGenericParameters(ITypeSymbol type)
{
- if (!type.IsGenericType)
+ if (type is not INamedTypeSymbol { IsGenericType: true } genericType)
{
return false;
}
- foreach (ITypeSymbol typeArg in type.TypeArguments)
+ foreach (ITypeSymbol typeArg in genericType.TypeArguments)
{
- if (typeArg.TypeKind == TypeKind.TypeParameter)
+ if (typeArg.TypeKind is TypeKind.TypeParameter or TypeKind.Error ||
+ ContainsGenericParameters(typeArg))
{
return true;
}
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.cs
index 37b228343d7a63..cc0787ebf56d4e 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.cs
@@ -54,7 +54,7 @@ private static void Execute(CompilationData compilationData, ImmutableArray
+ new DiagnosticDescriptor(
+ id: "SYSLIB1100",
+ title: new LocalizableResourceString(nameof(SR.TypeNotSupportedTitle), SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Configuration.Binder.SourceGeneration.SR)),
+ messageFormat: new LocalizableResourceString(nameofLocalizableMessageFormat, SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Configuration.Binder.SourceGeneration.SR)),
+ category: ProjectName,
+ defaultSeverity: DiagnosticSeverity.Warning,
+ isEnabledByDefault: true);
+ }
+ }
+ }
+}
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/ParserDiagnostics.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/ParserDiagnostics.cs
deleted file mode 100644
index be2631422fe391..00000000000000
--- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/ParserDiagnostics.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using Microsoft.CodeAnalysis;
-
-namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration
-{
- internal static class ParserDiagnostics
- {
- public static DiagnosticDescriptor TypeNotSupported { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.TypeNotSupported));
- public static DiagnosticDescriptor MissingPublicInstanceConstructor { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.MissingPublicInstanceConstructor));
- public static DiagnosticDescriptor CollectionNotSupported { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.CollectionNotSupported));
- public static DiagnosticDescriptor DictionaryKeyNotSupported { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.DictionaryKeyNotSupported));
- public static DiagnosticDescriptor ElementTypeNotSupported { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.ElementTypeNotSupported));
- public static DiagnosticDescriptor MultipleParameterizedConstructors { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.MultipleParameterizedConstructors));
- public static DiagnosticDescriptor MultiDimArraysNotSupported { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.MultiDimArraysNotSupported));
- public static DiagnosticDescriptor NullableUnderlyingTypeNotSupported { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.NullableUnderlyingTypeNotSupported));
-
- public static DiagnosticDescriptor PropertyNotSupported { get; } = new DiagnosticDescriptor(
- id: "SYSLIB1101",
- title: new LocalizableResourceString(nameof(SR.PropertyNotSupportedTitle), SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Configuration.Binder.SourceGeneration.SR)),
- messageFormat: new LocalizableResourceString(nameof(SR.PropertyNotSupportedMessageFormat), SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Configuration.Binder.SourceGeneration.SR)),
- category: ConfigurationBindingGenerator.ProjectName,
- defaultSeverity: DiagnosticSeverity.Warning,
- isEnabledByDefault: true);
-
- public static DiagnosticDescriptor LanguageVersionNotSupported { get; } = new DiagnosticDescriptor(
- id: "SYSLIB1102",
- title: new LocalizableResourceString(nameof(SR.LanguageVersionIsNotSupportedTitle), SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Configuration.Binder.SourceGeneration.SR)),
- messageFormat: new LocalizableResourceString(nameof(SR.Language_VersionIsNotSupportedMessageFormat), SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Configuration.Binder.SourceGeneration.SR)),
- category: ConfigurationBindingGenerator.ProjectName,
- defaultSeverity: DiagnosticSeverity.Error,
- isEnabledByDefault: true);
-
- private static DiagnosticDescriptor CreateTypeNotSupportedDescriptor(string nameofLocalizableMessageFormat) =>
- new DiagnosticDescriptor(
- id: "SYSLIB1100",
- title: new LocalizableResourceString(nameof(SR.TypeNotSupportedTitle), SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Configuration.Binder.SourceGeneration.SR)),
- messageFormat: new LocalizableResourceString(nameofLocalizableMessageFormat, SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Configuration.Binder.SourceGeneration.SR)),
- category: ConfigurationBindingGenerator.ProjectName,
- defaultSeverity: DiagnosticSeverity.Warning,
- isEnabledByDefault: true);
- }
-}
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Microsoft.Extensions.Configuration.Binder.SourceGeneration.csproj b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Microsoft.Extensions.Configuration.Binder.SourceGeneration.csproj
index c3929ec6ba6662..65150ea38a4111 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Microsoft.Extensions.Configuration.Binder.SourceGeneration.csproj
+++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Microsoft.Extensions.Configuration.Binder.SourceGeneration.csproj
@@ -24,16 +24,16 @@
+
-
-
-
+
+
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/BinderMethodSpecifier.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/BinderMethodSpecifier.cs
index 33b2859a867bfa..dafbd0bee3c019 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/BinderMethodSpecifier.cs
+++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/BinderMethodSpecifier.cs
@@ -80,6 +80,7 @@ internal enum BinderMethodSpecifier
Bind = Bind_instance | Bind_instance_BinderOptions | Bind_key_instance,
Get = Get_T | Get_T_BinderOptions | Get_TypeOf | Get_TypeOf_BinderOptions,
GetValue = GetValue_T_key | GetValue_T_key_defaultValue | GetValue_TypeOf_key | GetValue_TypeOf_key_defaultValue,
- RootMethodsWithConfigOptions = Bind_instance_BinderOptions | Get_T_BinderOptions | Get_TypeOf_BinderOptions,
+
+ MethodsThatAssessBinderOptions = Bind_instance_BinderOptions | Get
}
}
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/KnownTypeSymbols.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/KnownTypeSymbols.cs
similarity index 100%
rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/KnownTypeSymbols.cs
rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/KnownTypeSymbols.cs
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/Strings.resx b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/Strings.resx
index 9bf38777bde79a..301913987d7c7e 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/Strings.resx
+++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/Strings.resx
@@ -120,6 +120,12 @@
The collection type is not supported: '{0}'.
+
+ Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects.
+
+
+ The target type for a binder call could not be determined
+
The dictionary key type is not supported: '{0}'.
@@ -156,4 +162,10 @@
Did not generate binding logic for a type
+
+ Binding logic was not generated for a binder call with target type '{0}'. Value types are invalid inputs to configuration 'Bind' methods.
+
+
+ Value types are invalid inputs to configuration 'Bind' methods
+
\ No newline at end of file
diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.cs.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.cs.xlf
index 67cc2e5f23ea48..e248c54626865f 100644
--- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.cs.xlf
+++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.cs.xlf
@@ -7,6 +7,16 @@
Typ kolekce se nepodporuje: „{0}“.
+
+ Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects.
+ Pro volání vazače se nevygenerovala logika vazby. Nepodporované vstupní vzory zahrnují obecná volání a předávání zabalených objektů.
+
+
+
+ The target type for a binder call could not be determined
+ Cílový typ volání vazače nelze určit
+
+
The dictionary key type is not supported: '{0}'.
Typ klíče slovníku se nepodporuje:„{0}“.
@@ -29,7 +39,7 @@
Cannot create instance of type '{0}' because it is missing a public instance constructor.
- Cannot create instance of type '{0}' because it is missing a public instance constructor.
+ Nelze vytvořit instanci typu „{0}“, protože chybí konstruktor veřejné instance.
@@ -39,7 +49,7 @@
Cannot create instance of type '{0}' because it has multiple public parameterized constructors.
- Cannot create instance of type '{0}' because it has multiple public parameterized constructors.
+ Nelze vytvořit instanci typu „{0}“, protože má více veřejných parametrizovaných konstruktorů.
@@ -67,6 +77,16 @@
Negenerovala se logika vazby pro typ
+
+ Binding logic was not generated for a binder call with target type '{0}'. Value types are invalid inputs to configuration 'Bind' methods.
+ Logika vazby nebyla vygenerována pro volání pořadače s cílovým typem „{0}“. Typy hodnot jsou neplatné vstupy pro konfigurační metody Bind.
+
+
+
+ Value types are invalid inputs to configuration 'Bind' methods
+ Typy hodnot nejsou platné vstupy pro konfigurační metody „Bind“.
+
+