about summary refs log tree commit diff
path: root/users/glittershark/achilles/src/ast (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-03-28 r/2356 feat(achilles): Implement a Unit typeGriffin Smith2-1/+8
Add support for a zero-sized Unit type. This requires some special at the codegen level because LLVM (unsurprisingly) only allows Void types in function return position - to make that a little easier to handle there's a new pass that strips any unit-only expressions and pulls unit-only function arguments up to new `let` bindings, so we never have to actually pass around unit values. Change-Id: I0fc18a516821f2d69172c42a6a5d246b23471e38 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2695 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-03-20 r/2296 feat(gs/achilles): Implement very basic monomorphizationGriffin Smith2-7/+72
Implement very basic monomorphization, by recording type variable instantiations when typechecking Call nodes and then using those in a new hir Visitor trait to copy the body of any generic decls for each possible set of instantiation of the type variables. Change-Id: Iab54030973e5d66e2b8bcd074b4cb6c001a90123 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2617 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-03-20 r/2295 fix(gs/achilles): Get rid of universalization stepGriffin Smith1-0/+7
The step of "universalizing" function expressions was conflicting with top-level ascriptions for polymorphic function declarations: universalization generates universal type variables, and top-level polymorphic ascription *also* generates universal type variables, and the two were conflicting with each other when unifying. Let's just get rid of this now, and we can bring it back in a more principled manner once we do actual let-generalization (which there's still an ignored test case for) Change-Id: Idc08c8cb5ac92d1e6e1e63c9b8729176cab73f44 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2616 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2021-03-20 r/2293 feat(gs/achilles): Implement extern decls, for glibc functionsGriffin Smith2-4/+30
Implement extern decls, which codegen to LLVM as forward-declared functions, and use these as a hook into calling glibc functions. We can print to the terminal now! The integration tests can test this now. Change-Id: I70af4546b417b888ad9fbb18798db240f77f4e71 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2614 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2021-03-15 r/2279 merge(glittershark/achilles): Subtree import at 'b93268085a'Vincent Ambo2-0/+662
Imported from https://github.com/glittershark/achilles/ git-subtree-dir: users/glittershark/achilles git-subtree-mainline: 4d193f239525954631ba9d789ca3aea9a2f4e14d git-subtree-split: b93268085aab14c80a400c299da5d04d2781098e Change-Id: I64a583b454bbe03e20358ad7808939a4cbc212ba