Skip to content

Commit

Permalink
Add new JIT tier between the interpreter and the LLVM JIT tiers.
Browse files Browse the repository at this point in the history
This JIT is tightly coupled to the ASTInterpreter, at every CFGBlock* entry/exit
on can switch between interpreting and directly executing the generated code without having
to do any translations.
Generating the code is pretty fast compared to the LLVM tier but the generated code is not as fast
as code generated by the higher LLVM tiers.
But because the JITed can use runtime ICs, avoids a lot of interpretation overhead and
stores CFGBlock locals sysbols inside register/stack slots, it's much faster than the interpreter.
  • Loading branch information
undingen committed Jun 30, 2015
1 parent a3f8b25 commit 279bca1
Show file tree
Hide file tree
Showing 19 changed files with 1,745 additions and 303 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ add_library(PYSTON_OBJECTS OBJECT ${OPTIONAL_SRCS}
capi/object.cpp
capi/typeobject.cpp
codegen/ast_interpreter.cpp
codegen/baseline_jit.cpp
codegen/codegen.cpp
codegen/compvars.cpp
codegen/entry.cpp
Expand Down
1 change: 0 additions & 1 deletion src/asm_writing/icinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ void ICSlotRewrite::commit(CommitHook* hook) {
if (!do_commit)
return;

assert(assembler->isExactlyFull());
assert(!assembler->hasFailed());

for (int i = 0; i < dependencies.size(); i++) {
Expand Down
3 changes: 1 addition & 2 deletions src/asm_writing/icinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ class ICSlotRewrite {

std::vector<std::pair<ICInvalidator*, int64_t>> dependencies;

ICSlotRewrite(ICInfo* ic, const char* debug_name);

public:
ICSlotRewrite(ICInfo* ic, const char* debug_name);
~ICSlotRewrite();

assembler::Assembler* getAssembler() { return assembler; }
Expand Down

0 comments on commit 279bca1

Please sign in to comment.