diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-08 19:38:22 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-08 19:38:22 +0000 |
commit | 27f9e70795e500cb934395bf17446533b8e41f76 (patch) | |
tree | 4285553eb99c6d3097a8a009ef12b93d22cbc285 /vm_core.h | |
parent | 66d09c6d12109df49e7855207094555ec01345fb (diff) |
vm_core.h (rb_env_t): use flexible array
* vm_core.h (rb_env_t): use flexible array
This reduces allocations and speeds up the lambda calculus
fizzbuzz (bm_app_lc_fizzbuzz.rb) benchmark [ruby-core:64858]
* proc.c (get_local_variable_ptr): deconst to adjust for flex array
* vm.c (env_mark, env_free, env_memsize): remove check for env->env
* vm.c (env_alloc): single allocation for flex array
* vm.c (vm_make_env_each): adjust env_alloc call
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -753,11 +753,11 @@ typedef struct { GetCoreDataFromValue((obj), rb_env_t, (ptr)) typedef struct { - VALUE *env; int env_size; int local_size; VALUE prev_envval; /* for GC mark */ rb_block_t block; + VALUE env[1]; /* flexible array */ } rb_env_t; extern const rb_data_type_t ruby_binding_data_type; |