summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-23 06:56:08 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-23 06:56:08 (GMT)
commite6ad53beaa8f61c784d7e6c9cace5bd6ecc4d5c8 (patch)
tree224599c7b347566e9d0050cb986052810b7df7cb /vm_core.h
parentb32b2a61060a93babfa2f97cbc0a32be81b57dc0 (diff)
remove VM_ENV_DATA_INDEX_ENV_PROC.
* vm_core.h (VM_ENV_DATA_INDEX_ENV_PROC): ep[VM_ENV_DATA_INDEX_ENV_PROC] is allocated to mark a Proc which is created from iseq block. However, `lep[0]` keeps Proc object itself as a block handler (Proc). So we don't need to keep it. * vm_core.h (VM_ENV_PROCVAL): ditto. * vm.c (vm_make_env_each): do not need to keep blockprocval as special value. * vm.c (vm_block_handler_escape): simply return Proc value. * proc.c (proc_new): we don't need to check Env because a Proc type block handler is a Proc object itself. [Bug #14782] * test/ruby/test_proc.rb: add a test for [Bug #14782] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/vm_core.h b/vm_core.h
index a999b26..8e34ff1 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -1084,7 +1084,6 @@ enum {
#define VM_ENV_DATA_INDEX_SPECVAL (-1) /* ep[-1] */
#define VM_ENV_DATA_INDEX_FLAGS ( 0) /* ep[ 0] */
#define VM_ENV_DATA_INDEX_ENV ( 1) /* ep[ 1] */
-#define VM_ENV_DATA_INDEX_ENV_PROC ( 2) /* ep[ 2] */
#define VM_ENV_INDEX_LAST_LVAR (-VM_ENV_DATA_SIZE)
@@ -1223,16 +1222,6 @@ VM_ENV_ENVVAL_PTR(const VALUE *ep)
return (const rb_env_t *)VM_ENV_ENVVAL(ep);
}
-static inline VALUE
-VM_ENV_PROCVAL(const VALUE *ep)
-{
- VM_ASSERT(VM_ENV_ESCAPED_P(ep));
- VM_ASSERT(VM_ENV_LOCAL_P(ep));
- VM_ASSERT(VM_ENV_BLOCK_HANDLER(ep) != VM_BLOCK_HANDLER_NONE);
-
- return ep[VM_ENV_DATA_INDEX_ENV_PROC];
-}
-
static inline const rb_env_t *
vm_env_new(VALUE *env_ep, VALUE *env_body, unsigned int env_size, const rb_iseq_t *iseq)
{