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

Add annotation for context restrictions (internal only, external only, both) #1609

Closed
Tracked by #1145
adlerjohn opened this issue May 19, 2022 · 2 comments
Closed
Tracked by #1145
Assignees
Labels
compiler: codegen Everything to do with IR->ASM, register allocation, etc. compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: ir IRgen and sway-ir including optimization passes compiler: parser Everything to do with the parser language feature Core language features visible to end users P: high Should be looked at if there are no critical issues left

Comments

@adlerjohn
Copy link
Contributor

adlerjohn commented May 19, 2022

Add an annotation that indicates that a function (not an ABI method) is supported in particular contexts: either internal only, external only, or both. By default, functions can be used in both external and internal contexts.

If a function call is reachable from an unsupported context, the compiler must emit an error.

@adlerjohn adlerjohn mentioned this issue May 19, 2022
7 tasks
@adlerjohn adlerjohn added enhancement New feature or request compiler General compiler. Should eventually become more specific as the issue is triaged labels May 19, 2022
@tritao tritao self-assigned this Jul 9, 2022
@mohammadfawaz mohammadfawaz added compiler: ir IRgen and sway-ir including optimization passes compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser compiler: codegen Everything to do with IR->ASM, register allocation, etc. P: high Should be looked at if there are no critical issues left language feature Core language features visible to end users and removed compiler General compiler. Should eventually become more specific as the issue is triaged enhancement New feature or request labels Jul 12, 2022
@tritao
Copy link
Contributor

tritao commented Aug 1, 2022

Duplicate of #963?

@adlerjohn
Copy link
Contributor Author

:yes:

@adlerjohn adlerjohn closed this as not planned Won't fix, can't repro, duplicate, stale Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: codegen Everything to do with IR->ASM, register allocation, etc. compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: ir IRgen and sway-ir including optimization passes compiler: parser Everything to do with the parser language feature Core language features visible to end users P: high Should be looked at if there are no critical issues left
Projects
Archived in project
Development

No branches or pull requests

3 participants