aboutsummaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h43
1 files changed, 20 insertions, 23 deletions
diff --git a/src/common.h b/src/common.h
index df150c1..b845e1c 100644
--- a/src/common.h
+++ b/src/common.h
@@ -204,11 +204,15 @@ enum ejit_opcode {
ARG_F,
ARG_FI,
- ESCAPEI,
+ ESCAPEI_I,
+ ESCAPEI_L,
ESCAPEI_F,
+ ESCAPEI_D,
- CALLI,
+ CALLI_I,
+ CALLI_L,
CALLI_F,
+ CALLI_D,
RETR,
RETI,
@@ -248,6 +252,9 @@ struct ejit_insn {
#define VEC_NAME insns
#include "vec.h"
+#define VEC_TYPE enum ejit_type
+#define VEC_NAME types
+#include "vec.h"
struct fpr_stat {
struct ejit_fpr f;
@@ -268,6 +275,7 @@ struct gpr_stat {
#include "vec.h"
struct ejit_func {
+ struct types sign;
struct insns insns;
struct labels labels;
enum ejit_type rtype;
@@ -289,27 +297,16 @@ struct interp_state {
struct args args;
};
-int64_t ejit_interp(struct ejit_func *f, size_t argc,
- struct ejit_arg args[argc],
- struct interp_state *state, bool run,
- void ***labels_wb);
-
-double ejit_interp_f(struct ejit_func *f, size_t argc,
- struct ejit_arg args[argc],
- struct interp_state *state, bool run,
- void ***labels_wb);
-
-int64_t ejit_run_interp(struct ejit_func *f, size_t argc,
- struct ejit_arg args[argc],
- struct interp_state *state,
- bool run,
- void ***labels_wb);
-
-double ejit_run_interp_f(struct ejit_func *f, size_t argc,
- struct ejit_arg args[argc],
- struct interp_state *state,
- bool run,
- void ***labels_wb);
+union interp_ret {
+ int64_t i;
+ double f;
+};
+
+union interp_ret ejit_run(struct ejit_func *f, size_t argc,
+ struct ejit_arg args[argc],
+ struct interp_state *state,
+ bool run,
+ void ***labels_wb);
bool ejit_compile(struct ejit_func *f, bool use_64);