ruby/yarp/yarp_compiler.c
Jemma Issroff 3b815ed7da
Add yarp/yarp_compiler.c (#8042)
* Add yarp/yarp_compiler.c as stencil for compiling YARP

This commit adds yarp/yarp_compiler.c, and changes the sync script
to ensure that yarp/yarp_compiler.c will not get overwritten

* [Misc #119772] Create and expose RubyVM::InstructionSequence.compile_yarp

This commit creates the stencil for a compile_yarp function, which
we will continue to fill out. It allows us to check the output
of compiled YARP code against compiled code without using YARP.
2023-08-28 13:55:58 -07:00

19 lines
473 B
C

#include "yarp.h"
static void
yp_compile_node(rb_iseq_t *iseq, const yp_node_t *node, LINK_ANCHOR *const ret, const char * src, bool popped) {
return;
}
static VALUE
rb_translate_yarp(rb_iseq_t *iseq, const yp_node_t *node, LINK_ANCHOR *const ret)
{
RUBY_ASSERT(ISEQ_COMPILE_DATA(iseq));
RUBY_ASSERT(node->type == YP_NODE_PROGRAM_NODE);
yp_compile_node(iseq, node, ret, node->location.start, false);
iseq_set_sequence(iseq, ret);
return Qnil;
}