summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2019-06-19 18:47:15 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2019-06-19 20:39:10 +1200
commitcb5da39f20a17bd73e791dca1e7e1832f0adbc53 (patch)
treea8cbf20a2f94b3e184e1517b9a68fe5fd005d8f1 /vm_core.h
parent714703805370767efb859078d5095a014417a692 (diff)
Use shared implementation of `rb_ec_initialize_vm_stack`.
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index a0f9388df7..7860c2d505 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -903,8 +903,15 @@ typedef struct rb_execution_context_struct {
} machine;
} rb_execution_context_t;
+// Set the vm_stack pointer in the execution context.
void rb_ec_set_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size);
+// Initialize the vm_stack pointer in the execution context and push the initial stack frame.
+// @param ec the execution context to update.
+// @param stack a pointer to the stack to use.
+// @param size the size of the stack, as in `VALUE stack[size]`.
+void rb_ec_initialize_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size);
+
typedef struct rb_thread_struct {
struct list_node vmlt_node;
VALUE self;