diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-14 17:36:36 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-14 17:36:36 +0000 |
commit | e07dad00ee37173a990cc8d4f147963d7f57a28c (patch) | |
tree | f9a07e80f9287ecd81ab7b17f5382d6645491215 /vm_core.h | |
parent | af4cbc4fe0eb0c8cec4f1ed4b6194b9cd700021e (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_core.h')
-rw-r--r-- | vm_core.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -796,7 +796,6 @@ typedef struct { typedef struct { int env_size; - VALUE prev_envval; /* for GC mark */ rb_block_t block; VALUE env[1]; /* flexible array */ } rb_env_t; @@ -958,7 +957,8 @@ VALUE rb_vm_invoke_proc(rb_thread_t *th, rb_proc_t *proc, VALUE rb_vm_make_proc_lambda(rb_thread_t *th, const rb_block_t *block, VALUE klass, int8_t is_lambda); VALUE rb_vm_make_proc(rb_thread_t *th, const rb_block_t *block, VALUE klass); VALUE rb_vm_make_binding(rb_thread_t *th, const rb_control_frame_t *src_cfp); -VALUE rb_vm_env_local_variables(VALUE envval); +VALUE rb_vm_env_local_variables(const rb_env_t *env); +VALUE rb_vm_env_prev_envval(const rb_env_t *env); VALUE *rb_binding_add_dynavars(rb_binding_t *bind, int dyncount, const ID *dynvars); void rb_vm_inc_const_missing_count(void); void rb_vm_gvl_destroy(rb_vm_t *vm); |