-
Notifications
You must be signed in to change notification settings - Fork 57
Added JIT compiler abstraction #19
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
Conversation
CodaFi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modulo nits, LGTM.
Sources/LLVM/JIT.swift
Outdated
| @@ -0,0 +1,112 @@ | |||
| import cllvm | |||
|
|
|||
| /// JITError represents the different kinds of errors the JIT compiler can throw | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: period
Sources/LLVM/JIT.swift
Outdated
| } | ||
| } | ||
|
|
||
| /// A JIT is a Just-In-Time compiler that will compile and execute LLVM IR that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: code voice for class names.
Sources/LLVM/JIT.swift
Outdated
| /// return the value the function generated, allowing you to write interactive | ||
| /// programs that will run as soon as they are compiled. | ||
| class JIT { | ||
| /// The underlying LLVMExecutionEngineRef backing this JIT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: period
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I'm here: public final class JIT please
Sources/LLVM/JIT.swift
Outdated
|
|
||
|
|
||
| /// Runs the specified function with the provided arguments by compiling | ||
| /// it to machine code for your specific architecture. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this JIT's specified architecture or the target architecture used to initialize this JIT.
This abstracts the built-in
ExecutionEngineJIT. We should use this until we can get theORCJITbindings to build with SwiftPM.