Add the "outgoing_frame_posn" instruction, to support tail calls. - 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年06月13日 01:48:58 +0000
committerRhys Weatherley <rweather@southern-storm.com.au>2004年06月13日 01:48:58 +0000
commit0f17c4bcbc2b24eb98d3a2c6dcb3fc3206ba6975 (patch)
treed437f2243a4c31079df77dbf6a3e962dd3ad9c48 /jitplus/jit-plus-function.cpp
parent088ba2737d6cb16f3cf34f061cecb60a86ca10a8 (diff)
downloadlibjit-0f17c4bcbc2b24eb98d3a2c6dcb3fc3206ba6975.tar.gz
Add the "outgoing_frame_posn" instruction, to support tail calls.
Diffstat (limited to 'jitplus/jit-plus-function.cpp')
-rw-r--r--jitplus/jit-plus-function.cpp 10
1 files changed, 10 insertions, 0 deletions
diff --git a/jitplus/jit-plus-function.cpp b/jitplus/jit-plus-function.cpp
index 38b9a86..1541b00 100644
--- a/jitplus/jit-plus-function.cpp
+++ b/jitplus/jit-plus-function.cpp
@@ -639,6 +639,7 @@ jit_value jit_function::get_struct_pointer()
* @deftypemethodx jit_function void insn_incoming_reg ({const jit_value&} value, int reg)
* @deftypemethodx jit_function void insn_incoming_frame_posn ({const jit_value&} value, jit_nint posn)
* @deftypemethodx jit_function void insn_outgoing_reg ({const jit_value&} value, int reg)
+ * @deftypemethodx jit_function void insn_outgoing_frame_posn ({const jit_value&} value, jit_nint posn)
* @deftypemethodx jit_function void insn_return_reg ({const jit_value&} value, int reg)
* @deftypemethodx jit_function void insn_setup_for_nested (int nested_level, int reg)
* @deftypemethodx jit_function void insn_flush_struct ({const jit_value&} value)
@@ -1174,6 +1175,15 @@ void jit_function::insn_outgoing_reg(const jit_value& value, int reg)
}
}
+void jit_function::insn_outgoing_frame_posn
+ (const jit_value& value, jit_nint posn)
+{
+ if(!jit_insn_outgoing_frame_posn(func, value.raw(), posn))
+ {
+ out_of_memory();
+ }
+}
+
void jit_function::insn_return_reg(const jit_value& value, int reg)
{
if(!jit_insn_return_reg(func, value.raw(), reg))
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月11日 21:23:05 +0000

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