Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_internalInline should be a stack instead of a single bool variable #1208

Open
Hecate2 opened this issue Oct 22, 2024 · 2 comments
Open

_internalInline should be a stack instead of a single bool variable #1208

Hecate2 opened this issue Oct 22, 2024 · 2 comments

Comments

@Hecate2
Copy link
Contributor

Hecate2 commented Oct 22, 2024

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.

@Jim8y
Copy link
Contributor

Jim8y commented Oct 23, 2024

can you provide an example?

@Hecate2
Copy link
Contributor Author

Hecate2 commented Oct 23, 2024

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));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants