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

Inline functions #11

Open
eliassjogreen opened this issue Mar 19, 2022 · 0 comments
Open

Inline functions #11

eliassjogreen opened this issue Mar 19, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@eliassjogreen
Copy link
Member

Proposal to add inline functions using the inline keyword:

export inline fn test_inline(a: i32): u32 {
  return a as u32
}

This would most likely be implement by adding another field to the Compiler struct which contains the instructions for each registered inline function. This is useful for things like std/math, and other high performance, or small tasks where a function call is not desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

1 participant