зеркало из https://github.com/github/ruby.git
* vm.c (vm_make_env_each): don't save prev env value.
It is no longer used. [Feature #4871] [ruby-dev:43743] * vm.c (check_env): changed accordingly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
53d3b13233
Коммит
172ac007f8
|
@ -1,3 +1,10 @@
|
|||
Sun Jul 31 22:50:23 2011 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||
|
||||
* vm.c (vm_make_env_each): don't save prev env value.
|
||||
It is no longer used. [Feature #4871] [ruby-dev:43743]
|
||||
|
||||
* vm.c (check_env): changed accordingly.
|
||||
|
||||
Sun Jul 31 20:21:36 2011 "Yuki Sonoda (Yugui)" <yugui@yugui.jp>
|
||||
|
||||
* common.mk (ECHO1): ":" in a make variable replacement cause a syntax
|
||||
|
|
16
vm.c
16
vm.c
|
@ -217,7 +217,6 @@ ruby_vm_run_at_exit_hooks(rb_vm_t *vm)
|
|||
env{
|
||||
env[0] // special (block or prev env)
|
||||
env[1] // env object
|
||||
env[2] // prev env val
|
||||
};
|
||||
*/
|
||||
|
||||
|
@ -305,17 +304,13 @@ check_env(rb_env_t * const env)
|
|||
{
|
||||
printf("---\n");
|
||||
printf("envptr: %p\n", (void *)&env->block.dfp[0]);
|
||||
printf("orphan: %p\n", (void *)env->block.dfp[1]);
|
||||
printf("inheap: %p\n", (void *)env->block.dfp[2]);
|
||||
printf("envval: %10p ", (void *)env->block.dfp[3]);
|
||||
dp(env->block.dfp[3]);
|
||||
printf("penvv : %10p ", (void *)env->block.dfp[4]);
|
||||
dp(env->block.dfp[4]);
|
||||
printf("envval: %10p ", (void *)env->block.dfp[1]);
|
||||
dp(env->block.dfp[1]);
|
||||
printf("lfp: %10p\n", (void *)env->block.lfp);
|
||||
printf("dfp: %10p\n", (void *)env->block.dfp);
|
||||
if (env->block.dfp[4]) {
|
||||
if (env->prev_envval) {
|
||||
printf(">>\n");
|
||||
check_env_value(env->block.dfp[4]);
|
||||
check_env_value(env->prev_envval);
|
||||
printf("<<\n");
|
||||
}
|
||||
return 1;
|
||||
|
@ -379,7 +374,7 @@ vm_make_env_each(rb_thread_t * const th, rb_control_frame_t * const cfp,
|
|||
local_size = cfp->iseq->local_size;
|
||||
}
|
||||
|
||||
env->env_size = local_size + 1 + 2;
|
||||
env->env_size = local_size + 1 + 1;
|
||||
env->local_size = local_size;
|
||||
env->env = ALLOC_N(VALUE, env->env_size);
|
||||
env->prev_envval = penvval;
|
||||
|
@ -398,7 +393,6 @@ vm_make_env_each(rb_thread_t * const th, rb_control_frame_t * const cfp,
|
|||
*envptr = envval; /* GC mark */
|
||||
nenvptr = &env->env[i - 1];
|
||||
nenvptr[1] = envval; /* frame self */
|
||||
nenvptr[2] = penvval; /* frame prev env object */
|
||||
|
||||
/* reset lfp/dfp in cfp */
|
||||
cfp->dfp = nenvptr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче