neo-devpack-dotnet icon indicating copy to clipboard operation
neo-devpack-dotnet copied to clipboard

_internalInline should be a stack instead of a single bool variable

Open Hecate2 opened this issue 1 year ago • 2 comments

If I call another internal method in an inline method, the arguments for the internal method should be prepared from the inline method context. However, with a bool _internalInline, we cannot know whether we are handling an external method calling an inline method, or an inline method calling an internal method.

Hecate2 avatar Oct 22 '24 10:10 Hecate2

can you provide an example?

Jim8y avatar Oct 23 '24 00:10 Jim8y

can you provide an example?

[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static ByteString MyMethod(int foo, ByteString bar) => AnotherMethod(foo, bar);
private static ByteString AnotherMethod(int foo, ByteString bar) => StdLib.Serialize((foo, bar));

Hecate2 avatar Oct 23 '24 00:10 Hecate2