mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
th
-> ec
for some functions.
* vm.c: `th` -> `ec` for the following functions: * vm_normal_frame * vm_cfp_svar_get * vm_cfp_svar_set git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5a7bd5349c
commit
e6956c048a
1 changed files with 12 additions and 12 deletions
24
vm.c
24
vm.c
|
@ -1189,11 +1189,11 @@ rb_vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc,
|
||||||
/* special variable */
|
/* special variable */
|
||||||
|
|
||||||
static rb_control_frame_t *
|
static rb_control_frame_t *
|
||||||
vm_normal_frame(rb_thread_t *th, rb_control_frame_t *cfp)
|
vm_normal_frame(const rb_execution_context_t *ec, rb_control_frame_t *cfp)
|
||||||
{
|
{
|
||||||
while (cfp->pc == 0) {
|
while (cfp->pc == 0) {
|
||||||
cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
|
cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
|
||||||
if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(th->ec, cfp)) {
|
if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1201,31 +1201,31 @@ vm_normal_frame(rb_thread_t *th, rb_control_frame_t *cfp)
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
vm_cfp_svar_get(rb_thread_t *th, rb_control_frame_t *cfp, VALUE key)
|
vm_cfp_svar_get(const rb_execution_context_t *ec, rb_control_frame_t *cfp, VALUE key)
|
||||||
{
|
{
|
||||||
cfp = vm_normal_frame(th, cfp);
|
cfp = vm_normal_frame(ec, cfp);
|
||||||
return lep_svar_get(th->ec, cfp ? VM_CF_LEP(cfp) : 0, key);
|
return lep_svar_get(ec, cfp ? VM_CF_LEP(cfp) : 0, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vm_cfp_svar_set(rb_thread_t *th, rb_control_frame_t *cfp, VALUE key, const VALUE val)
|
vm_cfp_svar_set(const rb_execution_context_t *ec, rb_control_frame_t *cfp, VALUE key, const VALUE val)
|
||||||
{
|
{
|
||||||
cfp = vm_normal_frame(th, cfp);
|
cfp = vm_normal_frame(ec, cfp);
|
||||||
lep_svar_set(th->ec, cfp ? VM_CF_LEP(cfp) : 0, key, val);
|
lep_svar_set(ec, cfp ? VM_CF_LEP(cfp) : 0, key, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
vm_svar_get(VALUE key)
|
vm_svar_get(VALUE key)
|
||||||
{
|
{
|
||||||
rb_thread_t *th = GET_THREAD();
|
const rb_execution_context_t *ec = GET_EC();
|
||||||
return vm_cfp_svar_get(th, th->ec->cfp, key);
|
return vm_cfp_svar_get(ec, ec->cfp, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vm_svar_set(VALUE key, VALUE val)
|
vm_svar_set(VALUE key, VALUE val)
|
||||||
{
|
{
|
||||||
rb_thread_t *th = GET_THREAD();
|
const rb_execution_context_t *ec = GET_EC();
|
||||||
vm_cfp_svar_set(th, th->ec->cfp, key, val);
|
vm_cfp_svar_set(ec, ec->cfp, key, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
|
|
Loading…
Add table
Reference in a new issue