|
|
@ -271,6 +271,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms |
|
|
|
} |
|
|
|
} |
|
|
|
Block block; |
|
|
|
Block block; |
|
|
|
if (TransformSpanTCtorContainingStackAlloc(inst, out ILInstruction locallocSpan)) { |
|
|
|
if (TransformSpanTCtorContainingStackAlloc(inst, out ILInstruction locallocSpan)) { |
|
|
|
|
|
|
|
context.Step("new Span<T>(stackalloc) -> stackalloc Span<T>", inst); |
|
|
|
inst.ReplaceWith(locallocSpan); |
|
|
|
inst.ReplaceWith(locallocSpan); |
|
|
|
block = null; |
|
|
|
block = null; |
|
|
|
ILInstruction stmt = locallocSpan; |
|
|
|
ILInstruction stmt = locallocSpan; |
|
|
@ -281,7 +282,9 @@ namespace ICSharpCode.Decompiler.IL.Transforms |
|
|
|
} |
|
|
|
} |
|
|
|
stmt = stmt.Parent; |
|
|
|
stmt = stmt.Parent; |
|
|
|
} |
|
|
|
} |
|
|
|
//ILInlining.InlineIfPossible(block, stmt.ChildIndex - 1, context);
|
|
|
|
// Special case to eliminate extra store
|
|
|
|
|
|
|
|
if (stmt.GetNextSibling() is StLoc) |
|
|
|
|
|
|
|
ILInlining.InlineIfPossible(block, stmt.ChildIndex, context); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (TransformArrayInitializers.TransformSpanTArrayInitialization(inst, context, out block)) { |
|
|
|
if (TransformArrayInitializers.TransformSpanTArrayInitialization(inst, context, out block)) { |
|
|
|