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

Generalize extern capture and add resources #178

Merged
merged 14 commits into from
Nov 7, 2022

Conversation

b-studios
Copy link
Collaborator

@b-studios b-studios commented Nov 7, 2022

This PR generalizes the capture annotated on extern defs. The following are equivalent:

extern pure def foo(): Unit = ""
extern {} def foo(): Unit = ""
extern def foo(): Unit = ""
extern io def foo(): Unit = ""
extern {io} def foo(): Unit = ""

The PR also adds the new concepts of extern interfaces and extern resources:

extern interface StackLocal
extern resource stack: StackLocal

extern interface Array[T]
extern {stack} def makeArray[T](size: Int): Array[T] at {stack} = ""

@b-studios b-studios changed the title Refactor/generalize extern capture Generalize extern capture and add resources Nov 7, 2022
@b-studios b-studios merged commit ca55037 into master Nov 7, 2022
@b-studios b-studios deleted the refactor/generalize-extern-capture branch November 7, 2022 15:25
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

Successfully merging this pull request may close these issues.

None yet

2 participants