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:
authorAleksey Demakov <ademakov@gmail.com>2008年02月29日 11:10:41 +0000
committerAleksey Demakov <ademakov@gmail.com>2008年02月29日 11:10:41 +0000
commitc18e6dde0a46751d795cc2a12b90a8d3d2c948a8 (patch)
tree7199f64ce96799898a0cc800c7e390a432e66a91 /jitplus/jit-plus-function.cpp
parent6cacbd0d82545a0e86b53de680730fe1aece3d5f (diff)
downloadlibjit-c18e6dde0a46751d795cc2a12b90a8d3d2c948a8.tar.gz
add jump table support to jitplus interface
Diffstat (limited to 'jitplus/jit-plus-function.cpp')
-rw-r--r--jitplus/jit-plus-function.cpp 17
1 files changed, 8 insertions, 9 deletions
diff --git a/jitplus/jit-plus-function.cpp b/jitplus/jit-plus-function.cpp
index cb97e3d..d8116f1 100644
--- a/jitplus/jit-plus-function.cpp
+++ b/jitplus/jit-plus-function.cpp
@@ -42,15 +42,6 @@ for more information on creating and managing instructions.
#define JITPP_MAPPING 20000
-class jit_build_exception
-{
-public:
- jit_build_exception(int result) { this->result = result; }
- ~jit_build_exception() {}
-
- int result;
-};
-
jit_type_t const jit_function::end_params = (jit_type_t)0;
/*@
@@ -1081,6 +1072,14 @@ void jit_function::insn_branch_if_not(const jit_value& value, jit_label& label)
}
}
+void jit_function::insn_jump_table(const jit_value& value, jit_jump_table& jump_table)
+{
+ if(!jit_insn_jump_table(func, value.raw(), jump_table.raw(), jump_table.size()))
+ {
+ out_of_memory();
+ }
+}
+
jit_value jit_function::insn_address_of(const jit_value& value1)
{
value_wrap(jit_insn_address_of(func, value1.raw()));
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月10日 11:22:40 +0000

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