mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-23 18:02:54 -06:00
a fix that should solve the segmentation fault on MacOS with the exhaustive generator
This commit is contained in:
@@ -242,7 +242,7 @@ pgf_jit_predicate(PgfReader* rdr, PgfAbstr* abstr,
|
|||||||
pgf_jit_make_space(rdr, JIT_CODE_WINDOW);
|
pgf_jit_make_space(rdr, JIT_CODE_WINDOW);
|
||||||
jit_patch_movi(ref,jit_get_label());
|
jit_patch_movi(ref,jit_get_label());
|
||||||
} else {
|
} else {
|
||||||
jit_patch_movi(ref,pgf_reasoner_complete);
|
jit_patch_movi(ref,abstr->eval_gates->complete);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -351,7 +351,9 @@ pgf_jit_gates(PgfReader* rdr)
|
|||||||
jit_getarg_p(JIT_VCLOS, closure_arg);
|
jit_getarg_p(JIT_VCLOS, closure_arg);
|
||||||
jit_stxi_p(offsetof(PgfReasoner, enter_stack_ptr), JIT_VSTATE, JIT_SP);
|
jit_stxi_p(offsetof(PgfReasoner, enter_stack_ptr), JIT_VSTATE, JIT_SP);
|
||||||
jit_ldr_p(JIT_R0, JIT_VCLOS);
|
jit_ldr_p(JIT_R0, JIT_VCLOS);
|
||||||
|
jit_pushr_i(JIT_R0); // this is just for stack alignment on System V
|
||||||
jit_callr(JIT_R0);
|
jit_callr(JIT_R0);
|
||||||
|
jit_popr_i(JIT_R0); // this is just for stack alignment on System V
|
||||||
jit_movr_p(JIT_RET, JIT_VHEAP);
|
jit_movr_p(JIT_RET, JIT_VHEAP);
|
||||||
jit_ret();
|
jit_ret();
|
||||||
|
|
||||||
@@ -595,6 +597,15 @@ pgf_jit_gates(PgfReader* rdr)
|
|||||||
jit_finish(pgf_reasoner_combine2);
|
jit_finish(pgf_reasoner_combine2);
|
||||||
jit_bare_ret();
|
jit_bare_ret();
|
||||||
|
|
||||||
|
pgf_jit_make_space(rdr, JIT_CODE_WINDOW);
|
||||||
|
|
||||||
|
gates->complete = (void*) jit_get_ip().ptr;
|
||||||
|
jit_prepare(2);
|
||||||
|
jit_pusharg_p(JIT_VCLOS);
|
||||||
|
jit_pusharg_p(JIT_VSTATE);
|
||||||
|
jit_finish(pgf_reasoner_complete);
|
||||||
|
jit_ret();
|
||||||
|
|
||||||
gates->fin.fn = pgf_jit_finalize_cafs;
|
gates->fin.fn = pgf_jit_finalize_cafs;
|
||||||
gates->cafs = NULL;
|
gates->cafs = NULL;
|
||||||
gu_pool_finally(rdr->opool, &gates->fin);
|
gu_pool_finally(rdr->opool, &gates->fin);
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ struct PgfEvalGates {
|
|||||||
|
|
||||||
PgfFunction combine1;
|
PgfFunction combine1;
|
||||||
PgfFunction combine2;
|
PgfFunction combine2;
|
||||||
|
PgfFunction complete;
|
||||||
|
|
||||||
PgfClosure* (*enter)(PgfReasoner* rs, PgfClosure* closure);
|
PgfClosure* (*enter)(PgfReasoner* rs, PgfClosure* closure);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user