|
byte* rawSignature = stackalloc byte[encoder.Builder.Count]; |
|
byte* c = rawSignature; |
|
foreach (Blob blob in blobEncoder.Builder.GetBlobs()) |
|
{ |
|
foreach (byte b in blob.GetBytes()) |
|
{ |
|
*c++ = b; |
|
} |
|
} |
|
|
|
_context.ILInfo.SetLocalSignature(rawSignature, blobEncoder.Builder.Count); |
Saves one minor heap allocation every assemble, but not really worth the readability loss and the stackalloc doesn't guard against stack overflow.
ILAssembler/src/ILAssembler/CilAssembler.cs
Lines 244 to 254 in ccdac27
Saves one minor heap allocation every assemble, but not really worth the readability loss and the
stackallocdoesn't guard against stack overflow.