aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.h
diff options
context:
space:
mode:
Diffstat (limited to 'builtin.h')
-rw-r--r--builtin.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/builtin.h b/builtin.h
index ee99e21dcc..236dfd961c 100644
--- a/builtin.h
+++ b/builtin.h
@@ -43,6 +43,19 @@ static inline void rb_builtin_function_check_arity13(VALUE (*f)(rb_execution_con
static inline void rb_builtin_function_check_arity14(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
static inline void rb_builtin_function_check_arity15(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
+VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index);
+
+// inline
+inline VALUE
+rb_vm_lvar(rb_execution_context_t *ec, int index)
+{
+#if VM_CORE_H_EC_DEFINED
+ return ec->cfp->ep[index];
+#else
+ return rb_vm_lvar_exposed(ec, index);
+#endif
+}
+
// dump/load
struct builtin_binary {