diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-16 20:42:43 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-16 20:42:43 +0000 |
commit | f42ba4068a589cd324961bb01eddbabfff2b0802 (patch) | |
tree | c120482753ed7da03cb06d68d6d077bcf1a10cad /iseq.c | |
parent | 5c743508a1d10247230c0ae8e41a711445cb9a91 (diff) | |
download | ruby-f42ba4068a589cd324961bb01eddbabfff2b0802.tar.gz |
avoid redundant GET_THREAD() calls
This reduces binary size slightly on my 32-bit system:
text data bss dec hex filename
2847705 12360 30632 2890697 2c1bc9 ruby.orig
2847641 12360 30632 2890633 2c1b89 ruby
* iseq.c (rb_iseq_compile_with_option): reuse result of previous
GET_THREAD() call
* thread.c (thread_create_core): ditto
(rb_mutex_trylock): ditto
(rb_mutex_lock): ditto
* process.c (rb_waitpid): avoid multiple eval from RUBY_VM_CHECK_INTS
* thread.c (rb_thread_check_ints): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -568,7 +568,7 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE absolute_path, VALUE li node = rb_parser_compile_string_path(parser, file, src, ln); if (!node) { - rb_exc_raise(GET_THREAD()->errinfo); /* TODO: check err */ + rb_exc_raise(th->errinfo); /* TODO: check err */ } } |