aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.h
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.h')
-rw-r--r--vm_insnhelper.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/vm_insnhelper.h b/vm_insnhelper.h
index 1dd491cf7f..c07a937855 100644
--- a/vm_insnhelper.h
+++ b/vm_insnhelper.h
@@ -244,4 +244,12 @@ THROW_DATA_CONSUMED_SET(struct vm_throw_data *obj)
}
}
+#define IS_ARGS_SPLAT(ci) ((ci)->flag & VM_CALL_ARGS_SPLAT)
+#define IS_ARGS_KEYWORD(ci) ((ci)->flag & VM_CALL_KWARG)
+
+#define CALLER_SETUP_ARG(cfp, calling, ci) do { \
+ if (UNLIKELY(IS_ARGS_SPLAT(ci))) vm_caller_setup_arg_splat((cfp), (calling)); \
+ if (UNLIKELY(IS_ARGS_KEYWORD(ci))) vm_caller_setup_arg_kw((cfp), (calling), (ci)); \
+} while (0)
+
#endif /* RUBY_INSNHELPER_H */