Skip to content

Commit

Permalink
NRT
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsck committed Nov 11, 2020
1 parent 04915a6 commit e6221ed
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected override void InitializeSecurityAttributes() {
var data = MDAPI.GetPermissionSetBlob(mdi, token) ?? Array.Empty<byte>();
var gpContext = new GenericParamContext();
var tmp = DeclSecurityReader.Read(readerModule, data, gpContext);
Interlocked.CompareExchange(ref securityAttributes, tmp, null);
Interlocked.CompareExchange(ref securityAttributes, tmp, null!);
}

public override byte[] GetBlob() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void InitGenericParams_NoLock() {

protected override void InitializeOverrides() {
var tmp = ownerType.GetMethodOverrides(this);
Interlocked.CompareExchange(ref overrides, tmp, null);
Interlocked.CompareExchange(ref overrides, tmp, null!);
}

protected override ImplMap? GetImplMap_NoLock() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ CilBody ReadCilBody(IList<Parameter> parameters, uint rva, uint mdToken, Generic
protected override void InitializeTypes() {
var list = GetNonNestedClassRids();
var tmp = new LazyList<TypeDef?, uint[]>(list.Length, this, list, (list2, index) => ResolveTypeDef(list2[index]));
Interlocked.CompareExchange(ref types, tmp, null);
Interlocked.CompareExchange(ref types, tmp, null!);
}

uint[] GetNonNestedClassRids() {
Expand Down Expand Up @@ -1075,7 +1075,7 @@ uint[] GetNewTokens(uint rid) {
protected override void InitializeExportedTypes() {
var list = MDAPI.GetExportedTypeRids(MetaDataAssemblyImport);
var tmp = new LazyList<ExportedType?, uint[]>(list.Length, list, (list2, i) => ResolveExportedType(list2[i]));
Interlocked.CompareExchange(ref exportedTypes, tmp, null);
Interlocked.CompareExchange(ref exportedTypes, tmp, null!);
lastExportedTypeRidInList = list.Length == 0 ? 0 : list.Max();
}

Expand Down Expand Up @@ -1109,7 +1109,7 @@ public bool UpdateExportedTypes() {
protected override void InitializeResources() {
var list = MDAPI.GetManifestResourceRids(MetaDataAssemblyImport);
var tmp = new ResourceCollection(list.Length, null, (ctx, i) => CreateResource((uint)i + 1));
Interlocked.CompareExchange(ref resources, tmp, null);
Interlocked.CompareExchange(ref resources, tmp, null!);
lastManifestResourceRidInList = list.Length == 0 ? 0 : list.Max();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ void Add(Dictionary<uint, CorMethodDef> dict, IList<MethodDef> methods, uint tok
protected override void InitializeNestedTypes() {
var list = readerModule.GetTypeDefNestedClassRids(this);
var tmp = new LazyList<TypeDef?, uint[]>(list.Length, this, list, (list2, index) => readerModule.ResolveTypeDef(list2[index]));
Interlocked.CompareExchange(ref nestedTypes, tmp, null);
Interlocked.CompareExchange(ref nestedTypes, tmp, null!);
}
}
}

0 comments on commit e6221ed

Please sign in to comment.