Граф коммитов

25092 Коммитов

Автор SHA1 Сообщение Дата
normal 44c32c22b8 rb_proc_t: reduce to 64 bytes from 72 on 64-bit
* vm_core.h (rb_proc_t): reduce to 64 bytes from 72 on 64-bit

This allows rb_proc_t to fit inside a single cache line on x86-64

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-20 05:34:32 +00:00
normal 0a2c4b4c2a rb_econv_t: reduce to 184 bytes from 200 on 64-bit
* transcode.c (rb_econv_t): reduce to 184 bytes from 200 on 64-bit

This allows rb_econv_t to fit inside of three cache lines on x86-64.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-20 04:51:35 +00:00
normal eeb05e8c11 rb_io_buffer_t: pack structure
* include/ruby/io.h (rb_io_buffer_t): pack structure
  Reduces rb_io_t from 200 to 192 bytes, allowing rb_io_t to
  occupy one less cache line.
  [Feature #10050]

n.b. this leaves a 4-byte hole after the `cbuf' field which may
be used for future expansion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-20 04:19:06 +00:00
normal 910d081d02 rb_io_t: shrink from 216 to 200 bytes on 64-bit
* include/ruby/io.h (rb_io_t): shrink to 200 bytes from 216 on 64-bit
  This puts us within 8 bytes of being three cache lines instead of
  four lines on x86-64.  This breaks the ABI.
  [Feature #10050]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-20 04:18:58 +00:00
svn cc9e233e44 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-20 04:18:51 +00:00
normal f36315a519 re_pattern_buffer: shrink from 464 to 448 bytes on 64-bit
* include/ruby/oniguruma.h (struct re_pattern_buffer): shrink to 448
  bytes from 464 bytes on 64-bit.  This breaks the ABI.
  [Feature #10034]

Reducing struct re_pattern_buffer from 464 to 448 bytes allows it to fit
into neatly into seven 64-byte cache lines on x86-64 systems.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-20 04:18:49 +00:00
hsbt 2f1ce28358 * ext/openssl/ossl.c: use encryptor instead of encrypter in doc.
contributed from @vipulnsward. [fix GH-663]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-19 16:10:58 +00:00
nobu c73c34e27f io.c: fix rdoc of append mode
* io.c (rb_io_initialize): [DOC] fix rdoc of append mode.  it does
  not move the pointer at open.  [ruby-core:63747] [Bug #10039]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-19 15:32:46 +00:00
nobu bc45eed1e5 compile.c: private reader in op_assign
* compile.c (iseq_compile_each): allow to access private attribute
  reader in op_assign.  [ruby-core:63817] [Bug #10060]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-19 03:40:52 +00:00
nobu f75b676cc4 Fix `Time.parse` for out of range arguments with an offset
* lib/time.rb (Time#apply_offset): Guards against a `nil` return
  value from `Time.month_days` when offsetting date.  Out of range
  values are then caught when `Time.utc` is called (as usual).
  Previously a `nil` return value from `Time.month_days` would
  have the `<` operator called on it, and raise `NoMethodError`.
  [fix GH-667]
* lib/rdoc/parser/changelog.rb (RDoc#parse_entries): fix dirty hack.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-19 02:56:39 +00:00
suke cf55e34e30 * refactoring
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-18 21:20:43 +00:00
suke d89c763528 * ext/win32ole/win32ole.c (folevariant_initialize): WIN32OLE_VARIANT
does not support VT_RECORD. VT_RECORD should be supported in
  WIN32OLE_RECORD.

* test/win32ole/test_win32ole_variant.rb (test_s_new_vt_record_exc):
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-18 13:40:41 +00:00
nobu e23d173679 revert r46859 and r46860
revert "enum.c: optimize any? object allocations for Array and Hash"

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-18 13:16:37 +00:00
suke 7ebb63f038 * ext/win32ole/win32ole.c (folevariant_initialize): remove unnecessary
code.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-18 10:56:31 +00:00
marcandre 84eba0de32 * lib/matrix/eigenvalue_decomposition: Style fix
Patch by Gogo Tanaka [#10058]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-18 10:11:18 +00:00
marcandre b0eda56826 * lib/matrix.rb: Avoid using `and`.
Patch by gogo tanaka [#10058]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-18 10:04:15 +00:00
hsbt b794145222 * test/matrix/test_matrix.rb: Add tests for Matrix class.
[Feature #10057][ruby-core:63809]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-18 08:48:05 +00:00
nobu ff4dad976e ChangeLog: fix GH reference
* ChangeLog: fix Github reference in r46859.  [fix GH-671]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-18 02:18:16 +00:00
nobu 0d0fc55122 enum.c: optimize any? object allocations for Array and Hash
* enum.c (enum_any): optimize object allocations for Array and
  Hash when `each` is not redefined, always false if empty and the
  case without a block.  [fix GH-617]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-18 02:10:37 +00:00
hsbt 2de10af779 * lib/fileutils.rb: added missing options of FileUtils.touch by @Domon.
[fix GH-669]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-18 01:16:12 +00:00
nobu 4c849f0e62 thread/thread.c: non-blocking push on SizedQueue
* ext/thread/thread.c (rb_szqueue_push): add optional parameter,
  non_block defaulted to false.  [ruby-core:63794] [Feature #10052]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-17 10:57:13 +00:00
suke 686bd6b3ae * ext/win32ole/win32ole.c (ole_variant2val): support array of
VT_RECORD variant.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-16 14:05:52 +00:00
ngoto e54e53f355 * vm_core.h (struct rb_iseq_struct): stack_max is changed to int
because all calculations related to stack_max in compile.c
  (iseq_set_sequence) and vm_insnhelper.c (vm_push_frame) are
  conducted by using int. This partly reverts r23945.
* vm_insnhelper.c (vm_push_frame): ditto. This reverts r42401.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-16 11:46:06 +00:00
ngoto e49a7bed21 * vm_core.h (struct rb_iseq_struct): temporal workaround of [Bug 10037].
Add padding on big-endian 64-bit architecture (e.g. sparc64).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-16 11:04:01 +00:00
suke eccc9886ea * ext/win32ole/win32ole.c (fole_record_method_missing): call
rb_hash_fetch instead of rb_hash_aref.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-16 10:34:57 +00:00
ko1 239c98553d revert r46834 because it does not pass tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-16 10:16:34 +00:00
ko1 01dc0a7104 * vm_core.h: remove rb_vm_t::trap_list[RUBY_NSIG], but add
rb_vm_t::trap_list_cmds (an array) and
  rb_vm_t::trap_list_safes[RUBY_NSIG]
  (separate to two different array).
  This modification reduce root objects.
* signal.c: ditto.
* vm.c (rb_vm_mark): remove marking code for rb_vm_t::trap_list.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-16 09:39:09 +00:00
ko1 20a9bd6763 * iseq.c (rb_iseq_defined_string): use rb_gc_mark_object() instead of
marking from vm_mark().
* vm.c (rb_vm_mark): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-16 09:09:40 +00:00
ko1 88722e6a5d * gc.c (gc_mark_roots): call rb_vm_mark directly.
* vm.c: remove mark function for RubyVM object because
  RubyVM object marked manually.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-16 09:06:52 +00:00
naruse 64c81e40d4 * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.
this includes Support for Unicode 7.0 [Bug #9092].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-16 03:27:25 +00:00
nobu 5dbe603f09 Revert r46828
r46828 "md5ossl.c: indicate the result" caused segfaults.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-15 15:43:03 +00:00
nobu 2d33fc97a3 md5ossl.c: indicate the result
* ext/digest/md5/md5ossl.c: use OpenSSL EVP API instead of MD5 API
  to perform MD5 hashes using OpenSSL in ext/digest.
  [ruby-core:61614] [Bug #9659]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-15 14:59:32 +00:00
nobu aadebb29da ext/digest: return values of init and final
* ext/digest: make built-in digest function implementations
  indicate success or failure of init and final functions.
  [ruby-core:61614] [Bug #9659]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-15 14:59:20 +00:00
nobu 6046b9f149 digest.c: raise exception on init failure
* ext/digest/digest.c: expect digest init and finish functions to
  indicate success or failure; raise exception on failure.
  [ruby-core:61614] [Bug #9659]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-15 14:58:53 +00:00
suke a3f50234bc * ext/win32ole/win32ole.c: modify document for WIN32OLE_RECORD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-15 11:33:21 +00:00
hsbt 83edc945fa * defs/default_gems: change version definition file of rake.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-15 03:43:04 +00:00
hsbt 6361928083 * lib/rake.rb, lib/rake/*.rb: Upgrade to rake-10.3.2
[fix GH-668]
* test/rake/*.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-15 03:07:37 +00:00
suke c3000ed8f4 * ext/win32ole/win32ole.c: modify WIN32OLE class document and
add comment for constants of WIN32OLE.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-14 10:17:40 +00:00
normal f747a231cf ChangeLog: document size changes [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-14 09:48:49 +00:00
normal ff9046ad0b vm_core.h (struct rb_iseq_struct): reduce to 288 bytes on 64-bit
* vm_core.h (struct rb_iseq_struct): reduce to 288 bytes on 64-bit
  (found with pahole, from the dwarves package)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-14 07:42:13 +00:00
normal 34f7e9086f iseq.h (struct iseq_catch_table_entry): shrink to 32 bytes on 64-bit
* iseq.h (struct iseq_catch_table_entry): shrink to 32 bytes on 64-bit

This drops a few minor page faults on my system at startup.
Using 64-bit start, end, cont, and sp fields are unnecessary as
label_get_position and label_get_sp only return int values.
label_get_position and label_get_sp should probably return
unsigned, but that is a future change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-14 07:08:55 +00:00
normal e91ae784bc vm_core.h (struct rb_iseq_struct): reduce to 296 bytes on 64-bit
Most iseq do not have a catch_table, so avoid needlessly adding
4-8 bytes to the struct for the common case.

Changes from v2:
- iseq_catch_table_size removed, use if (...) for (;...;)

Changes from v1:
- renamed iseq->_catch_table to iseq->catch_table
- iseq_catch_table_bytes: made a static inline function
- iseq_catch_table_size: new function replaces the
  iseq_catch_table_each iterator macro

* iseq.h (struct iseq_catch_table): new flexible array struct
         (iseq_catch_table_bytes): allocated size function
* vm_core.h (struct rb_iseq_struct): uupdate catch_table member
* compile.c (iseq_set_exception_table): update for struct changes
* iseq.c (iseq_free): ditto
* iseq.c (iseq_memsize): ditto
* iseq.c (rb_iseq_disasm): ditto
* iseq.c (iseq_data_to_ary): ditto
* iseq.c (rb_iseq_build_for_ruby2cext): ditto (untested)
* vm.c (vm_exec): ditto
* vm_core.h (struct rb_iseq_struct): ditto
* vm_insnhelper.c (vm_throw): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-14 07:06:26 +00:00
hsbt 944afa18a1 * ext/openssl/ossl_cipher.c: Fix call to ciphers class method and
spell out `encryption` by @vipulnsward [fix GH-664]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-13 08:51:23 +00:00
hsbt faa9a862ef * ext/gdbm/gdbm.c: fix wrong arguments in GetDBM2 macro.
* ext/sdbm/init.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-13 08:32:32 +00:00
hsbt 3caee48434 * ext/dbm/dbm.c: fix wrong arguments in GetDBM2 macro by @v2e4lisp.
[fix GH-655]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-13 08:29:09 +00:00
normal c7fbc29605 vm_core.h (struct rb_call_info_struct): improve packing
* vm_core.h (struct rb_call_info_struct): improve packing
  On x86-64, it goes from 112 to 104 bytes.  This results in
  ~20K of savings from just "./ruby -e exit"

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-13 07:46:46 +00:00
normal 499f6d62c7 vm_core.h (struct rb_iseq_struct): stack_max is uint32_t
* vm_core.h (struct rb_iseq_struct): stack_max is uint32_t
  No program will ever need more than a few megabytes of stack,
  so there's no sense in using a 64-bit counter for stack
  accounting.  Packing this with the 32-bit type enum reduces
  rb_iseq_struct from 312 to 304 bytes on 64-bit systems.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-13 07:01:09 +00:00
nobu 5e14a4c4b3 configure.in: exit with failure
* configure.in (rb_cv_broken_backtrace): exit with failure
  normally, no needs to abort.  [ruby-core:63678] [Bug #10008]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-13 01:56:27 +00:00
suke 2822bd29e2 * ext/win32ole/win32ole.c (fole_record_method_missing): correct
fields Hash key.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-12 06:17:16 +00:00
kosaki 00eb720394 * lib/net/smtp.rb (Net::SMTP#data): enable buffering while
'data' send for optimizing Net::SMTP#send_message.
  [ruby-dev:48329] [misc #9981]
  patch by Masahiro Tomita.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 19:22:19 +00:00