提交 42c7e011 编写于 作者: V vsadov

renamed PinnedObjectToPointer

上级 6ffc9473
......@@ -236,7 +236,7 @@ internal static Conversion GetTrivialConversion(ConversionKind kind)
internal static Conversion InterpolatedString => new Conversion(ConversionKind.InterpolatedString);
internal static Conversion Deconstruction => new Conversion(ConversionKind.Deconstruction);
internal static Conversion IdentityValue => new Conversion(ConversionKind.IdentityValue);
internal static Conversion ObjectToPointer => new Conversion(ConversionKind.ObjectToPointer);
internal static Conversion PinnedObjectToPointer => new Conversion(ConversionKind.PinnedObjectToPointer);
// trivial conversions that could be underlying in nullable conversion
// NOTE: tuple conversions can be underlying as well, but they are not trivial
......
......@@ -49,9 +49,9 @@ internal enum ConversionKind : byte
// do not become exposed to mutations if used as receivers of struct methods.
IdentityValue,
// ObjectToPointer is not directly a part of the language
// PinnedObjectToPointer is not directly a part of the language
// It is used by lowering of "fixed" statements to represent conversion of an object reference (O) to an unmanaged pointer (*)
// The conversion is unsafe and makes sense only if (O) is pinned.
ObjectToPointer,
PinnedObjectToPointer,
}
}
......@@ -111,7 +111,7 @@ private void EmitConversion(BoundConversion conversion)
_builder.EmitNumericConversion(fromPredefTypeKind, toPredefTypeKind, conversion.Checked);
break;
case ConversionKind.ObjectToPointer:
case ConversionKind.PinnedObjectToPointer:
// same representation, but stop GC tracking
_builder.EmitOpCode(ILOpCode.Conv_u);
break;
......
......@@ -320,7 +320,7 @@ public override BoundNode VisitFixedLocalCollectionInitializer(BoundFixedLocalCo
var addr = factory.Convert(
fixedInitializer.ElementPointerType,
factory.Local(pinnedTemp),
Conversion.ObjectToPointer);
Conversion.PinnedObjectToPointer);
var convertedStringTemp = factory.Convert(
localType,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册