mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
move rb_vm_lvar_exposed() correctly.
rb_vm_lvar_exposed() is prepared for __builtin_inline!(), needed for mini_builtin.c and builtin.c. However, it's only on builtin.c. So move it to make it as a part of VM.
This commit is contained in:
parent
a8f9e25ca8
commit
179062dd80
2 changed files with 9 additions and 8 deletions
|
@ -41,11 +41,3 @@ Init_builtin(void)
|
|||
{
|
||||
//
|
||||
}
|
||||
|
||||
// inline
|
||||
VALUE
|
||||
rb_vm_lvar_exposed(rb_execution_context_t *ec, int index)
|
||||
{
|
||||
const rb_control_frame_t *cfp = ec->cfp;
|
||||
return cfp->ep[index];
|
||||
}
|
||||
|
|
|
@ -4995,3 +4995,12 @@ vm_invoke_builtin_delegate(rb_execution_context_t *ec, rb_control_frame_t *cfp,
|
|||
// fprintf(stderr, "%s %s(%d):%p\n", __func__, bf->name, bf->argc, bf->func_ptr);
|
||||
return invoke_bf(ec, cfp, bf, argv);
|
||||
}
|
||||
|
||||
// for __builtin_inline!()
|
||||
|
||||
VALUE
|
||||
rb_vm_lvar_exposed(rb_execution_context_t *ec, int index)
|
||||
{
|
||||
const rb_control_frame_t *cfp = ec->cfp;
|
||||
return cfp->ep[index];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue