From: Aleksey Demakov Date: Thu, 8 Nov 2007 17:31:42 +0000 (+0000) Subject: fix a typo and add a wrapper for jit_function_reserve_label for jitplus X-Git-Tag: before.move.to.git~133 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=28eac85a0d1059e8015d7f5f65ca565141411fd2;p=francis%2Flibjit.git fix a typo and add a wrapper for jit_function_reserve_label for jitplus --- diff --git a/ChangeLog b/ChangeLog index 2c30f58..423c4b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-11-08 Aleksey Demakov + + * include/jit/jit-plus.h, jitplus/jit-plus-function.cpp (new_label): + add c++ wrapper for jit_function_reserve_label. + + * include/jit/jit-plus.h (clear_recompilable): fix a typo. + 2007-10-07 Aleksey Demakov * jit/jit-rules-x86.ins (JIT_OP_JUMP_TABLE): fix jump table code diff --git a/include/jit/jit-plus.h b/include/jit/jit-plus.h index 90535bf..cefd8d0 100644 --- a/include/jit/jit-plus.h +++ b/include/jit/jit-plus.h @@ -151,7 +151,7 @@ public: int is_recompilable() const { return jit_function_is_recompilable(func); } void set_recompilable() { jit_function_set_recompilable(func); } - void clear_recompilable() { jit_function_set_recompilable(func); } + void clear_recompilable() { jit_function_clear_recompilable(func); } void set_recompilable(int flag) { if(flag) set_recompilable(); else clear_recompilable(); } @@ -206,6 +206,8 @@ public: jit_value get_param(unsigned int param); jit_value get_struct_pointer(); + jit_label new_label(); + void insn_label(jit_label& label); void insn_new_block(); jit_value insn_load(const jit_value& value); diff --git a/jitplus/jit-plus-function.cpp b/jitplus/jit-plus-function.cpp index 716cd73..4931fb3 100644 --- a/jitplus/jit-plus-function.cpp +++ b/jitplus/jit-plus-function.cpp @@ -557,6 +557,17 @@ jit_value jit_function::get_struct_pointer() value_wrap(jit_value_get_struct_pointer(func)); } +/*@ + * @deftypemethod jit_function jit_label new_label () + * Create a new label. This is the C++ counterpart to + * @code{jit_function_reserve_label}. + * @end deftypemethod +@*/ +jit_label jit_function::new_label() +{ + return jit_label(jit_function_reserve_label(func)); +} + /*@ * @deftypemethod jit_function void insn_label ({jit_label&} label) * @deftypemethodx jit_function void insn_new_block ()