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

Support creating IR from scratch #45

Merged
merged 2 commits into from
Jan 30, 2020
Merged

Support creating IR from scratch #45

merged 2 commits into from
Jan 30, 2020

Conversation

MikeInnes
Copy link
Member

@MikeInnes MikeInnes commented Jan 30, 2020

Who needs syntax anyway:

julia> @dynamo function add(_, _)
         ir = IR()
         args = argument!(ir)
         x = push!(ir, xcall(:getindex, args, 1))
         y = push!(ir, xcall(:getindex, args, 2))
         return!(ir, xcall(:+, x, y))
       end

julia> add(5, 2)
7

see #44, @phipsgabler

@MikeInnes MikeInnes merged commit ed99e23 into master Jan 30, 2020
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.

1 participant