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

63617 Коммитов

Автор SHA1 Сообщение Дата
Aaron Patterson d7581370fd Add a benchmark for polymorphic ivar setting
This benchmark demonstrates the performance of setting an instance
variable when the type of object is constantly changing.  This benchmark
should give us an idea of the performance of ivar setting in a
polymorphic environment
2020-11-09 14:05:41 -08:00
Aaron Patterson 4219cb7adb Add debug counter for ivar inline cache misses that could hit
This commit adds a debug counter for the case where the inline cache
*missed* but the ivar index table has an entry for that ivar.  This is a
case where a polymorphic cache could help
2020-11-09 14:05:41 -08:00
Aaron Patterson f259906eab Avoid slow path ivar setting
If the ivar index table exists, we can avoid the slowest path for
setting ivars.
2020-11-09 14:05:41 -08:00
Alan Wu 6778ba48fd Fix excessive GC rooting
rb_vm_add_root_module() is enough to make sure the object become a GC
root.
2020-11-09 16:08:36 -05:00
Alan Wu 6817f4c6b1 rb_vm_add_root_module(): Remove unused parameter 2020-11-09 16:08:36 -05:00
git cbe869b370 * 2020-11-10 [ci skip] 2020-11-10 02:44:39 +09:00
Aaron Patterson f649946fb9 remove unused debug counter 2020-11-09 09:44:16 -08:00
Aaron Patterson 2324584d46 Update vm_insnhelper.c
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2020-11-09 09:44:16 -08:00
Aaron Patterson 5582c5a232 Remove iv table size check
iv tables cannot shrink.  If the inline cache was ever set, then there
must be an entry for the instance variable in the iv table.  Just set
the iv list on the object to be equal to the iv index table size, then
set the iv.
2020-11-09 09:44:16 -08:00
Aaron Patterson eb229994e5 eagerly initialize ivar table when index is small enough
When the inline cache is written, the iv table will contain an entry for
the instance variable.  If we get an inline cache hit, then we know the
iv table must contain a value for the index written to the inline cache.

If the index in the inline cache is larger than the list on the object,
but *smaller* than the iv index table on the class, then we can just
eagerly allocate the iv list to be the same size as the iv index table.

This avoids duplicate work of checking frozen as well as looking up the
index for the particular instance variable name.
2020-11-09 09:44:16 -08:00
Kazuhiro NISHIYAMA d14397bcc4
`fe80` should be case insensitive too 2020-11-09 16:16:30 +09:00
Hiroshi SHIBATA ba1472f43a
Removed needless require for 'enumerator' 2020-11-09 14:18:38 +09:00
git 66107cb162 * 2020-11-09 [ci skip] 2020-11-09 00:50:04 +09:00
Benoit Daloze b8eb08e096 Fix TestFiberMutex#test_condition_variable assertion
* Now that it works correctly.
2020-11-08 16:49:33 +01:00
Yusuke Endoh fcf8b9ef72 test/resolv/test_dns.rb: suppress "assigned but unused variable" 2020-11-08 23:32:44 +09:00
Jeremy Evans 54ac1d7717 Support s390 IPv6 link local addresses 2020-11-07 23:42:02 -08:00
Samuel Williams bed4848661 Urgent notification pipe has same lifetime as scheduler. 2020-11-08 20:40:52 +13:00
Samuel Williams 57b83dad4c Defer `kernel_sleep` to `block` to avoid exiting the event loop when duration is nil. 2020-11-08 20:40:52 +13:00
Samuel Williams c39984ec5c Tidy up book keeping for `thread->keeping_mutexes`.
When a scheduler is present, it's entirely possible for
`th->keeping_mutexes` to be updated while enumerating the waitq. Therefore
it must be fetched only during the removal operation.
2020-11-08 20:40:52 +13:00
Samuel Williams f73135233b Don't try to resume blocked fiber on dead thread. 2020-11-08 20:40:52 +13:00
Samuel Williams afe3cb782b `Fiber.new(blocking: false)` is now the default. 2020-11-08 20:40:52 +13:00
Jeremy Evans 2f12af42f7 Add support for IPv6 link local addresses to resolv
Now that it should work correctly, test that every address returned
by Socket.ip_address_list is resolvable.

Socket works with IPv6 link local addresses, and ipaddr now does
as well, so I think resolv should support them.

Fixes [Bug #17112]
2020-11-07 13:47:45 -08:00
git fcde1e0e62 * 2020-11-08 [ci skip] 2020-11-08 06:12:48 +09:00
Jeremy Evans 9682db0651 Remove sender/message_id pair after response received in resolv
Once a response for a given DNS request has been received (which
requires a matching message id), the [sender, message_id] pair
should be removed from the list of valid senders.  This makes it
so duplicate responses from the same sender are ignored.

Fixes [Bug #12838]
2020-11-07 13:12:27 -08:00
Kazuki Tsujimoto 5823f6c25b
Fix indentation 2020-11-07 22:12:22 +09:00
Kazuki Tsujimoto 640fd94eff
Fix and remove spec testing undefined behavior 2020-11-07 22:05:20 +09:00
Samuel Williams 5b3572b5ae Update dependencies 2020-11-07 23:39:50 +13:00
Samuel Williams a08ee8330d Rename to `Fiber#set_scheduler`. 2020-11-07 23:39:50 +13:00
git 656d4cddaf * 2020-11-07 [ci skip] 2020-11-07 02:55:52 +09:00
Alan Wu f234f2740d Add docs for some C extension GC APIs 2020-11-06 09:55:26 -08:00
Hiroshi SHIBATA 037803e092
Added dependency for net-protocol 2020-11-06 17:42:57 +09:00
Koichi Sasada 7718e9588b a part of T_DATA object can Ractor#send
T_DATA objects can refer unshareable objects and they should be
copied recursively, however there is no way to replace with copied
unshareable objects. However, if a T_DATA object refers only
shareable objects, there is no need to replace. So this kind of
T_DATA object (such as Time, Dir, File::Status and so on) can be
sent by Ractor.send.
2020-11-06 16:14:36 +09:00
Yusuke Endoh 4948982b53 Update TypeProf to 0.4.2 2020-11-06 13:28:58 +09:00
Aaron Patterson 6d17c9fa5d
gc_rest can change the total pages, so we need to do that first 2020-11-05 12:28:50 -08:00
Aaron Patterson d8da5c1983
add asserts to find crash 2020-11-05 12:27:09 -08:00
Aaron Patterson ab5f2fa4fb
Refactor verification method
Combine everything in to one C function
2020-11-05 11:13:04 -08:00
Aaron Patterson 68a3a2d90f
take VM lock when mutating the heap 2020-11-05 08:51:40 -08:00
git 193edbde91 * 2020-11-06 [ci skip] 2020-11-06 00:12:16 +09:00
Soutaro Matsumoto 8014ed9bd2
Update RBS & TypeProf (#3732)
* Bundle rbs 0.16.0

* Bundle typeprof 0.4.1
2020-11-06 00:11:48 +09:00
NARUSE, Yui 3407b7d8a6 Revert "Prefer #send over #__send__ when it is clear there is no possible conflict"
This reverts commit 4dba0c1a8e.

Matz's comment is "send is not deprecated. __send__ is safer".
But "Prefer #send over #__send__" is not reasonable.
2020-11-05 20:54:34 +09:00
NARUSE, Yui b29fe5eb2d Add description __send__ is safer 2020-11-05 20:51:48 +09:00
Hiroshi SHIBATA b2ca183cc9
Promote un.rb to the default gems. It's preparation for 3.0.0-preview2. 2020-11-05 20:21:31 +09:00
Benoit Daloze 4dba0c1a8e Prefer #send over #__send__ when it is clear there is no possible conflict
* Reverts part of 3198e7abd7.
* If the rule is #send should be deprecated, that should be ruled by matz,
  there is no such rule currently and gems seem to prefer #send
  overwhelmingly.
2020-11-05 11:23:27 +01:00
Marc-Andre Lafortune 2aa9a50dcc [ruby/ostruct] Update version 2020-11-04 17:52:03 -05:00
Marc-Andre Lafortune 015b023820 [ruby/ostruct] Restore `ostruct` doc 2020-11-04 17:52:03 -05:00
Marc-Andre Lafortune 6f24be8565 Revert "Make `marshal_load` public"
This reverts commit ee7cc6ac35.

I'm not sure I agree with the spec, but I just tweaked it.
2020-11-04 17:52:03 -05:00
git 9232f91827 * 2020-11-05 [ci skip] 2020-11-05 07:41:17 +09:00
Aaron Patterson 70680feeea Simplify setting instance variables
Since T_OBJECT objects come to life as embedded objects, that means that
ROBJECT_NUMIV will always return a _minimum_ of ROBJECT_EMBED_LEN_MAX.
If ivup.index is *greater* than ROBJECT_NUMIV, then we know that the
object *must not* be an embedded object. Thus we can skip the
ROBJECT_EMBED_LEN_MAX check as well as initializing internals of
embedded objects.
2020-11-04 14:40:50 -08:00
Aaron Patterson a8581ce673 ensure T_OBJECT objects have internals initialized 2020-11-04 14:40:50 -08:00
Kazuhiro NISHIYAMA 704fb0b815
Suppress a warning
```
transient_heap.c: In function ‘transient_heap_allocatable_header’:
transient_heap.c:347:37: warning: comparison of integer expressions of different signedness: ‘int16_t’ {aka ‘short int’} and ‘long unsigned int’ [-Wsign-compare]
  347 |         TH_ASSERT(block->info.index <= TRANSIENT_HEAP_USABLE_SIZE);
      |                                     ^~
```
2020-11-04 18:45:48 +09:00