Browse Source

Add insn_label_tight() method to jitplus

pull/1/head
Aleksey Demakov 9 years ago
parent
commit
d6cb9551f0
  1. 3
      ChangeLog
  2. 3
      include/jit/jit-plus.h
  3. 9
      jitplus/jit-plus-function.cpp

3
ChangeLog

@ -7,6 +7,9 @@
* include/jit/jit-insn.h, jit/jit-insn.c (jit_insn_label_tight): add
new function for the behavior of jit_insn_label() before reverted.
* include/jit/jit-plus.h
* jitplus/jit-plus-function.cpp (insn_label_tight): likewise.
2016-04-07 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-insn.c (jit_insn_call): the "intuit additional flags" code

3
include/jit/jit-plus.h

@ -242,7 +242,10 @@ public:
jit_label new_label();
void insn_label(jit_label& label);
void insn_label_tight(jit_label& label);
void insn_new_block();
jit_value insn_load(const jit_value& value);
jit_value insn_dup(const jit_value& value);
jit_value insn_load_small(const jit_value& value);

9
jitplus/jit-plus-function.cpp

@ -533,6 +533,7 @@ jit_label jit_function::new_label()
/*@
* @deftypemethod jit_function void insn_label (jit_label& @var{label})
* @deftypemethodx jit_function void insn_label_tight (jit_label& @var{label})
* @deftypemethodx jit_function void insn_new_block ()
* @deftypemethodx jit_function jit_value insn_load (const jit_value& @var{value})
* @deftypemethodx jit_function jit_value insn_dup (const jit_value& @var{value})
@ -662,6 +663,14 @@ void jit_function::insn_label(jit_label& label)
}
}
void jit_function::insn_label_tight(jit_label& label)
{
if(!jit_insn_label_tight(func, label.rawp()))
{
out_of_memory();
}
}
void jit_function::insn_new_block()
{
if(!jit_insn_new_block(func))

Loading…
Cancel
Save