Add "jit_insn_new_block" to simplify creating a new block that - libjit.git - libjit

index : libjit.git
libjit
summary refs log tree commit diff
path: root/jitplus/jit-plus-function.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rweather@southern-storm.com.au>2004年05月26日 01:05:03 +0000
committerRhys Weatherley <rweather@southern-storm.com.au>2004年05月26日 01:05:03 +0000
commit2ee5d29874e2ebf1cf371a99a86dfe54922e4243 (patch)
tree289abd41a6baa346320e259c3e513b9b905f6e36 /jitplus/jit-plus-function.cpp
parent23e7561ff68130e448274b208308c8b3a1723099 (diff)
downloadlibjit-2ee5d29874e2ebf1cf371a99a86dfe54922e4243.tar.gz
Add "jit_insn_new_block" to simplify creating a new block that
doesn't have an explicit label.
Diffstat (limited to 'jitplus/jit-plus-function.cpp')
-rw-r--r--jitplus/jit-plus-function.cpp 9
1 files changed, 9 insertions, 0 deletions
diff --git a/jitplus/jit-plus-function.cpp b/jitplus/jit-plus-function.cpp
index ddd47a3..1bb8917 100644
--- a/jitplus/jit-plus-function.cpp
+++ b/jitplus/jit-plus-function.cpp
@@ -559,6 +559,7 @@ jit_value jit_function::get_struct_pointer()
/*@
* @deftypemethod jit_function void insn_label ({jit_label&} label)
+ * @deftypemethodx jit_function void insn_new_block ()
* @deftypemethodx jit_function jit_value insn_load ({const jit_value&} value)
* @deftypemethodx jit_function jit_value insn_dup ({const jit_value&} value)
* @deftypemethodx jit_function jit_value insn_load_small ({const jit_value&} value)
@@ -680,6 +681,14 @@ void jit_function::insn_label(jit_label& label)
}
}
+void jit_function::insn_new_block()
+{
+ if(!jit_insn_new_block(func))
+ {
+ out_of_memory();
+ }
+}
+
jit_value jit_function::insn_load(const jit_value& value)
{
value_wrap(jit_insn_load(func, value.raw()));
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月12日 09:57:50 +0000

AltStyle によって変換されたページ (->オリジナル) /