From dbc73012852ee76377d772442b21007e85f7890b Mon Sep 17 00:00:00 2001 From: Klaus Treichel Date: Sat, 10 Feb 2007 19:12:28 +0000 Subject: [PATCH] 2007-02-10 Klaus Treichel * jit/jit-function.c: Use the on-demand compilation driver in jit_function_apply too. Return the functions' entry point if the function is allready compiled in jit_function_compile_entry. --- ChangeLog | 6 ++++++ jit/jit-function.c | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index 51f67af..81c9e62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-02-10 Klaus Treichel + + * jit/jit-function.c: Use the on-demand compilation driver in + jit_function_apply too. Return the functions' entry point if the + function is allready compiled in jit_function_compile_entry. + 2007-02-04 Aleksey Demakov * include/jit/jit-common.h, include/jit/jit-context.h, diff --git a/jit/jit-function.c b/jit/jit-function.c index e166398..1896fc4 100644 --- a/jit/jit-function.c +++ b/jit/jit-function.c @@ -910,6 +910,7 @@ jit_function_compile_entry(jit_function_t func, void **entry_point) if(func->is_compiled && !(func->builder)) { /* The function is already compiled, and we don't need to recompile */ + *entry_point = func->entry_point; return 1; } if(!(func->builder)) @@ -1423,6 +1424,9 @@ int jit_function_apply_vararg (jit_function_t func, jit_type_t signature, void **args, void *return_area) { struct jit_backtrace call_trace; +#if defined(jit_redirector_size) + jit_on_demand_driver_func on_demand_driver; +#endif void *entry; jit_jmp_buf jbuf; @@ -1457,7 +1461,16 @@ int jit_function_apply_vararg } else { +#if defined(jit_redirector_size) + on_demand_driver = func->context->on_demand_driver; + if(!on_demand_driver) + { + on_demand_driver = _jit_function_compile_on_demand; + } + entry = (*on_demand_driver)(func); +#else entry = _jit_function_compile_on_demand(func); +#endif } /* Get the default signature if necessary */ -- 2.47.3