diff --git a/mini_builtin.c b/mini_builtin.c index 86803e1656..eade34710d 100644 --- a/mini_builtin.c +++ b/mini_builtin.c @@ -23,7 +23,20 @@ builtin_iseq_load(const char *feature_name, const struct rb_builtin_function *ta vm->builtin_function_table = table; vm->builtin_inline_index = 0; - const rb_iseq_t *iseq = rb_iseq_new(&ast->body, name_str, name_str, Qnil, NULL, ISEQ_TYPE_TOP); + static const rb_compile_option_t optimization = { + TRUE, /* int inline_const_cache; */ + TRUE, /* int peephole_optimization; */ + FALSE,/* int tailcall_optimization; */ + TRUE, /* int specialized_instruction; */ + TRUE, /* int operands_unification; */ + TRUE, /* int instructions_unification; */ + TRUE, /* int stack_caching; */ + TRUE, /* int frozen_string_literal; */ + FALSE, /* int debug_frozen_string_literal; */ + FALSE, /* unsigned int coverage_enabled; */ + 0, /* int debug_level; */ + }; + const rb_iseq_t *iseq = rb_iseq_new_with_opt(&ast->body, name_str, name_str, Qnil, INT2FIX(0), NULL, 0, ISEQ_TYPE_TOP, &optimization); GET_VM()->builtin_function_table = NULL; rb_ast_dispose(ast);