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

52689 Коммитов

Автор SHA1 Сообщение Дата
ko1 8f675cdd00 support theap for T_HASH. [Feature #14989]
* hash.c, internal.h: support theap for small Hash.
  Introduce RHASH_ARRAY (li_table) besides st_table and small Hash
  (<=8 entries) are managed by an array data structure.
  This array data can be managed by theap.
  If st_table is needed, then converting array data to st_table data.

  For st_table using code, we prepare "stlike" APIs which accepts hash value
  and are very similar to st_ APIs.

  This work is based on the GSoC achievement
  by tacinight <tacingiht@gmail.com> and refined by ko1.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 22:11:51 +00:00
svn ca83ed8db6 * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 22:03:48 +00:00
ko1 198ff42258 support theap for T_STRUCT.
* struct.c: members memory can use theap.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 22:03:42 +00:00
ko1 873d57347f support theap for T_OBJECT.
* variable.c: now instance variable space has theap supports.
  obj_ivar_heap_alloc() tries to acquire memory from theap.

* debug_counter.h: add some counters for theap.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 22:01:17 +00:00
svn 437392232a * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 21:54:13 +00:00
ko1 312b105d0e introduce TransientHeap. [Bug #14858]
* transient_heap.c, transient_heap.h: implement TransientHeap (theap).
  theap is designed for Ruby's object system. theap is like Eden heap
  on generational GC terminology. theap allocation is very fast because
  it only needs to bump up pointer and deallocation is also fast because
  we don't do anything. However we need to evacuate (Copy GC terminology)
  if theap memory is long-lived. Evacuation logic is needed for each type.

  See [Bug #14858] for details.

* array.c: Now, theap for T_ARRAY is supported.

  ary_heap_alloc() tries to allocate memory area from theap. If this trial
  sccesses, this array has theap ptr and RARRAY_TRANSIENT_FLAG is turned on.
  We don't need to free theap ptr.

* ruby.h: RARRAY_CONST_PTR() returns malloc'ed memory area. It menas that
  if ary is allocated at theap, force evacuation to malloc'ed memory.
  It makes programs slow, but very compatible with current code because
  theap memory can be evacuated (theap memory will be recycled).

  If you want to get transient heap ptr, use RARRAY_CONST_PTR_TRANSIENT()
  instead of RARRAY_CONST_PTR(). If you can't understand when evacuation
  will occur, use RARRAY_CONST_PTR().

(re-commit of r65444)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 21:53:56 +00:00
svn 69b8ffcd5b * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 21:02:12 +00:00
ko1 7d359f9b69 revert r65444 and r65446 because of commit miss
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 21:01:55 +00:00
ko1 efe869c0e5 support theap for T_OBJECT.
* variable.c: now instance variable space has theap supports.
  obj_ivar_heap_alloc() tries to acquire memory from theap.

* debug_counter.h: add some counters for theap.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 20:49:35 +00:00
svn f926f799e9 * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 20:46:47 +00:00
ko1 90ac549fa6 introduce TransientHeap. [Bug #14858]
* transient_heap.c, transient_heap.h: implement TransientHeap (theap).
  theap is designed for Ruby's object system. theap is like Eden heap
  on generational GC terminology. theap allocation is very fast because
  it only needs to bump up pointer and deallocation is also fast because
  we don't do anything. However we need to evacuate (Copy GC terminology)
  if theap memory is long-lived. Evacuation logic is needed for each type.

  See [Bug #14858] for details.

* array.c: Now, theap for T_ARRAY is supported.

  ary_heap_alloc() tries to allocate memory area from theap. If this trial
  sccesses, this array has theap ptr and RARRAY_TRANSIENT_FLAG is turned on.
  We don't need to free theap ptr.

* ruby.h: RARRAY_CONST_PTR() returns malloc'ed memory area. It menas that
  if ary is allocated at theap, force evacuation to malloc'ed memory.
  It makes programs slow, but very compatible with current code because
  theap memory can be evacuated (theap memory will be recycled).

  If you want to get transient heap ptr, use RARRAY_CONST_PTR_TRANSIENT()
  instead of RARRAY_CONST_PTR(). If you can't understand when evacuation
  will occur, use RARRAY_CONST_PTR().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 20:46:24 +00:00
normal b51724aac5 mjit.c (free_list): clear .length
For robustness against future changes. There should be no impact
at the moment,here, but we may call mjit_finish more than once
in a process lifetime in the future (implementing "stop"
instead of just "pause")

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 18:26:12 +00:00
svn a5582e69c1 * 2018-10-31
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 15:39:19 +00:00
k0kubun 5662e709f4 wercker.yml: try testing wercker again
I don't think we fixed that, but if so, I would like to see more test
failures. Previous failures didn't keep enough C-backtrace information
about the failure and it's hard to debug for now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 15:39:18 +00:00
k0kubun 51a0f04e6b _mjit_compile_send.erb: do not inline tailcall ISeq
because it's not supported by this file. Also, shared `def_iseq_ptr`
instead of copying the main definition of it.

vm_core.h: moved `def_iseq_ptr` to this place. added `inline` to avoid
compiler warnings since it's not used in some files including vm_core.h.
vm_insnhelper.c: moved `def_iseq_ptr` to vm_core.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 14:57:03 +00:00
svn fae6c6bfd8 * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 03:22:09 +00:00
ko1 54726befc3 use RARRAY_AREF() instead of RARRAY_CONST_PTR().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 03:21:56 +00:00
normal f7c0cc3692 process.c: implement rb_f_system without toggling ruby_nocldwait
Following how mjit_worker.c currently works, rb_f_system
now ensures the VM-wide waitpid lists is locked before
creating a new process via fork/vfork.

This ensures other rb_waitpid callers cannot steal work and
there are no possible race conditions from toggling
ruby_nocldwait without the use of atomics.

This sets us up for implementing MJIT process management
logic using normal Ruby APIs prepares us for VM-wide
asynchronous/event-base waitpid which can allow MJIT to
work without worker threads.

Take 2: set waitpid_state.pid on platforms w/o fork.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 01:34:48 +00:00
normal fbee3b8f75 revert r65434
http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20181030T003541Z.fail.html.gz
I have no chance of getting anything to work on proprietary platforms :<

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-30 01:12:38 +00:00
svn 76f08cec20 * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-29 23:52:45 +00:00
normal 8227c91dfe process.c: implement rb_f_system without toggling ruby_nocldwait
Following how mjit_worker.c currently works, rb_f_system
now ensures the VM-wide waitpid lists is locked before
creating a new process via fork/vfork.

This ensures other rb_waitpid callers cannot steal work and
there are no possible race conditions from toggling
ruby_nocldwait without the use of atomics.

This sets us up for implementing MJIT process management
logic using normal Ruby APIs prepares us for VM-wide
asynchronous/event-base waitpid which can allow MJIT to
work without worker threads.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-29 23:52:39 +00:00
ko1 1ac67ec416 use `rb_hash_new_compare_by_id()`.
* vm_eval.c (local_var_list_init): use `rb_hash_new_compare_by_id()`
  directly instead of manipulating st_table.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-29 18:03:13 +00:00
svn 90a97887e2 * 2018-10-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-29 18:00:15 +00:00
svn 708142cabd * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-29 18:00:14 +00:00
ko1 d3edfdc7d9 use RARRAY_AREF() instead of RARRAY_CONST_PTR().
* class.c (rb_keyword_error_new): use RARRAY_AREF() because
  RARRAY_CONST_PTR() can introduce additional overhead in a futre.
  Same fixes for other files.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-29 18:00:02 +00:00
kazu d36ab02b95 compile.c: fix up r65411
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-29 13:30:01 +00:00
nobu 5bb1f4e73f time.c: [DOC] fix method names to refer class methods [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-29 08:11:25 +00:00
nobu b9ca9169ba Mark up code inside link text as <code>
Merged https://github.com/ruby/rdoc/pull/660

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-29 06:23:21 +00:00
shyouhei c80f3f709f less verbose code by sharing attribute definitions
The idea behind this commit is that handles_sp and leaf are two
concepts that are not mutually independent.  By making one explicitly
depend another, we can reduces the number of lines of codes written,
thus making things concise.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-29 03:21:22 +00:00
shyouhei 08e47ab98a bare_instructions.rb: sort attributes [ci skip]
This enhances stability of the generated source code (namely
insns_info.inc) across attribute insertion / deletion.  It does
not change the compiled binary at all; just a bit of readability.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-29 02:07:52 +00:00
naruse 437dd8815b Revert "Add test for cause on pty"
This reverts commit r65422.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 17:03:36 +00:00
svn 13cde0a163 * 2018-10-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 16:06:57 +00:00
naruse 80001cc8c4 Add test for cause on pty
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 16:06:56 +00:00
nobu b361c8e3d5 time.c: added Time::TM#+ and Time::TM#-
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 12:05:19 +00:00
nobu d59ad98f6a time.c: ignore 7th arg
* time.c (tm_initialize): allow 7th argument as well as
  Time#initialize, but just ignore.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 12:05:18 +00:00
nobu c4be18c28b time.c: [DOC] add description and fix markups [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 12:05:17 +00:00
k0kubun de925b4f3c appveyor.yml: fix wrong path to test directory
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 09:06:54 +00:00
k0kubun 323ecafe04 appveyor.yml: run test_open-uri separately
on msys2 because it sometimes crashes worker like
https://ci.appveyor.com/project/ruby/ruby/builds/19853558/job/8v1ehnv40bggiode

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 07:44:59 +00:00
suke 5918f0a086 require fixtures/classes only when platform is windows.
* spec/ruby/library/win32ole/fixtures/classes.rb: remove rescue block
  because this file is required when platform is Windows.
* spec/ruby/library/win32ole/win32ole/_getproperty_spec.rb:
  fixtures/classes is required when platform is Windows
* spec/ruby/library/win32ole/win32ole/_invoke_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/codepage_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/connect_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/const_load_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/constants_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/create_guid_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/invoke_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/locale_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/new_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/ole_get_methods_spec.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 06:37:33 +00:00
suke c5491046ee Refactoring. remove Internet Explorer.
* spec/ruby/library/win32ole/win32ole/ole_methods_spec.rb: refactoring.
  remove Internet Explorer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 06:16:18 +00:00
suke d6f55c7d42 use MSXML.DOMDocument instead of InternetExplorer.Application
* spec/ruby/library/win32ole/fixtures/event.xml use MSXML.DOMDocument
  instead of InternetExplorer.Application. InternetExplorer.Application
  is not available on some environments. Thanks to MSP-Greg (Greg L).
* spec/ruby/library/win32ole/win32ole_event/on_event_spec.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 06:11:30 +00:00
nobu 7eda588d66 time.c: [DOC] fix rdoc-ref [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 05:53:57 +00:00
suke 6ce65875d0 use MSXML.DOMDocument instead of InternetExplorer.Application.
* spec/ruby/library/win32ole/win32ole_event/new_spec.rb: use
  MSXML.DOMDocument. InternetExplorer.Application is not available on
  some environments. Thanks to MSP-Greg (Greg L).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 05:40:41 +00:00
ko1 2d46695c7c use a rb_ function instead of st_ directly.
* compile.c (ibf_dump_object_hash): use `rb_hash_foreach()`
  instead of using `st_foreach()`.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 05:09:58 +00:00
suke ef929bc67b use Scripting.Dictionary instead of InternetExplorer.Application.
* spec/ruby/library/win32ole/win32ole/shared/setproperty.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some environments. Thanks to MSP-Greg (Greg L).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 05:08:37 +00:00
suke 7f0aefec6a use Scripting.Dictionary instead of InternetExplorer.Application.
* spec/ruby/library/win32ole/win32ole/ole_put_methods_spec.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some enviroments. Thanks to MSP-Greg (Greg L).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 04:38:49 +00:00
suke e9a1c8241a use Scripting.Dictionary instead of InternetExplorer.Application.
* spec/ruby/library/win32ole/win32ole/ole_methods_spec.rb: use Scripting
  Dictionary. InternetExplorer.Application is not available on some
  environments. Thanks to MSP-Greg (Greg L).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 04:25:55 +00:00
suke 183b7e36c2 use Scripting.Dictionary instead of InternetExplorer.Application
* spec/ruby/library/win32ole/win32ole/ole_obj_help_spec.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some environments. Thanks to MSP-Greg (Greg L).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 04:18:53 +00:00
nobu 934e3e0e12 time.c: [DOC] about timezone arguemnt [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 04:00:26 +00:00
suke d7d83fa0cf use Scripting.Dictionary instead of InternetExplorer.Application
* spec/ruby/library/win32ole/win32ole/ole_method_spec.rb: recuire in
  platform_is block.
* spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/shared/ole_method.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some environments. Thanks to MSP-Greg (Greg L).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-28 03:48:17 +00:00