/*
* call-seq:
* node.bytecode_compile => VM::InstructionSequence
*
* Compile a parsed node tree into a bytecode sequence.
*/
static VALUE node_bytecode_compile(int argc, VALUE * argv, VALUE self)
{
NODE * node = unwrap_node(self);
VALUE opt = Qnil;
rb_compile_option_t option;
rb_scan_args(argc, argv, "01", &opt);
make_compile_option(&option, opt);
return rb_iseq_new_with_opt(
node,
rb_str_new2("<main>"),
rb_str_new2(node->nd_file),
Qfalse,
ISEQ_TYPE_TOP,
&option);
}