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

Multiple operations #275

Merged
merged 2 commits into from
Jul 26, 2023
Merged

Multiple operations #275

merged 2 commits into from
Jul 26, 2023

Conversation

serkm
Copy link
Contributor

@serkm serkm commented Jul 18, 2023

This adds support for effects and interfaces with more than one operation in the LLVM backend.

Copy link
Collaborator

@phischu phischu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful!

defineFunction(clauseName, List(Parameter(objType, "obj"), Parameter(envType, "env"), Parameter(spType, "sp"))) {
consumeObject(LocalReference(objType, "obj"), closureEnvironment, freeVariables(clause));
loadEnvironment(initialEnvironmentPointer, clause.parameters);
eraseValues(clause.parameters, freeVariables(clause.body));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we should also erase all values that are free in the other clauses but not in this one

@phischu phischu merged commit af47a43 into effekt-lang:master Jul 26, 2023
1 check passed
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