summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-14 17:36:36 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-14 17:36:36 (GMT)
commite07dad00ee37173a990cc8d4f147963d7f57a28c (patch)
treef9a07e80f9287ecd81ab7b17f5382d6645491215 /vm_dump.c
parentaf4cbc4fe0eb0c8cec4f1ed4b6194b9cd700021e (diff)
* vm_core.h, vm.c: remvoe rb_env_t::prev_envval because we can know it
via env->ep. rb_vm_env_prev_envval(env) returns prev_envval via env->ep. * vm_core.h (rb_vm_env_local_variables): change parameter type from VALUE (T_DATA/env) to `const rb_env_t *' to make same as rb_vm_env_prev_envval(). * proc.c: catch up these changes. * vm_dump.c: ditto. * vm.c: rename macros. * ENV_IN_HEAP_P() to VM_EP_IN_HEAP_P() because it uses ep. * ENV_VAL() to VM_ENV_EP_ENVVAL() because it is too short. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/vm_dump.c b/vm_dump.c
index 0408992..714bee6 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -185,6 +185,8 @@ rb_vmdebug_env_dump_raw(rb_env_t *env, VALUE *ep)
fprintf(stderr, "-- env --------------------\n");
while (env) {
+ VALUE prev_envval;
+
fprintf(stderr, "--\n");
for (i = 0; i < env->env_size; i++) {
fprintf(stderr, "%04d: %08"PRIxVALUE" (%p)", i, env->env[i], (void *)&env->env[i]);
@@ -192,11 +194,11 @@ rb_vmdebug_env_dump_raw(rb_env_t *env, VALUE *ep)
fprintf(stderr, "\n");
}
- if (env->prev_envval != 0) {
- GetEnvPtr(env->prev_envval, env);
+ if ((prev_envval = rb_vm_env_prev_envval(env)) != Qfalse) {
+ GetEnvPtr(prev_envval, env);
}
else {
- env = 0;
+ env = NULL;
}
}
fprintf(stderr, "---------------------------\n");