Commit 4ca4c082 authored by Marius Wachtler's avatar Marius Wachtler

add a option to disable signal checking

this is nice for making the generated LLVM IR and bjit code simpler when debugging code
parent 87bf4d5d
......@@ -1793,8 +1793,10 @@ Box* ASTInterpreterJitInterface::landingpadHelper(void* _interpreter) {
}
void ASTInterpreterJitInterface::pendingCallsCheckHelper() {
#if ENABLE_SIGNAL_CHECKING
if (unlikely(_pendingcalls_to_do))
makePendingCalls();
#endif
}
void ASTInterpreterJitInterface::setExcInfoHelper(void* _interpreter, Box* type, Box* value, Box* traceback) {
......
......@@ -506,7 +506,9 @@ void JitFragmentWriter::emitOSRPoint(AST_Jump* node) {
}
void JitFragmentWriter::emitPendingCallsCheck() {
#if ENABLE_SIGNAL_CHECKING
call(false, (void*)ASTInterpreterJitInterface::pendingCallsCheckHelper);
#endif
}
void JitFragmentWriter::emitPrint(RewriterVar* dest, RewriterVar* var, bool nl) {
......
......@@ -364,6 +364,7 @@ private:
IRGenerator* irgenerator;
void emitPendingCallsCheck(llvm::BasicBlock* exc_dest) {
#if ENABLE_SIGNAL_CHECKING
auto&& builder = *getBuilder();
llvm::GlobalVariable* pendingcalls_to_do_gv = g.cur_module->getGlobalVariable("_pendingcalls_to_do");
......@@ -405,6 +406,7 @@ private:
cur_block = join_block;
setCurrentBasicBlock(join_block);
#endif
}
void checkAndPropagateCapiException(const UnwindInfo& unw_info, llvm::Value* returned_val, llvm::Value* exc_val,
......
......@@ -51,6 +51,7 @@ extern bool ENABLE_ICS, ENABLE_ICGENERICS, ENABLE_ICGETITEMS, ENABLE_ICSETITEMS,
#define BOOLS_AS_I64 1
#define ENABLE_SAMPLING_PROFILER 0
#define ENABLE_SIGNAL_CHECKING 1
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment