Age | Commit message (Collapse) | Author |
|
This `st_table` is used to both mark and pin classes
defined from the C API. But `vm->mark_object_ary` already
does both much more efficiently.
Currently a Ruby process starts with 252 rooted classes,
which uses `7224B` in an `st_table` or `2016B` in an `RArray`.
So a baseline of 5kB saved, but since `mark_object_ary` is
preallocated with `1024` slots but only use `405` of them,
it's a net `7kB` save.
`vm->mark_object_ary` is also being refactored.
Prior to this changes, `mark_object_ary` was a regular `RArray`, but
since this allows for references to be moved, it was marked a second
time from `rb_vm_mark()` to pin these objects.
This has the detrimental effect of marking these references on every
minors even though it's a mostly append only list.
But using a custom TypedData we can save from having to mark
all the references on minor GC runs.
Addtionally, immediate values are now ignored and not appended
to `vm->mark_object_ary` as it's just wasted space.
|
|
xfree can handle null values, so we don't need to check it.
|
|
[Misc #18891]
Notes:
Merged: https://github.com/ruby/ruby/pull/6094
|
|
rb_class_get_superclass returns the immediate SUPER, including T_ICLASS.
rb_ivar_lookup isn't implemented for T_ICLASS so it uses the default
behaviour, which always returns Qnil.
This commit avoids checking T_ICLASS for ivars.
Notes:
Merged: https://github.com/ruby/ruby/pull/5663
|
|
Notes:
Merged-By: mrkn <[email protected]>
|
|
* memory_view.c: Rename private to private_data for C++
* doc/memory_view.md: Update document
* Fix doc/memory_view.md
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Notes:
Merged-By: mrkn <[email protected]>
|
|
[Feature #18051]
Notes:
Merged: https://github.com/ruby/ruby/pull/4763
|
|
* --braces-after-func-def-line
* --dont-cuddle-else
* --procnames-start-lines
* --space-after-for
* --space-after-if
* --space-after-while
|
|
* See [Feature #17752]
Co-authored-by: xtkoba (Tee KOBAYASHI) <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/4428
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4414
|
|
exported_object_registry is freed at exit, so this change is just in case.
|
|
|
|
|
|
|
|
* memory_view.c: make Ractor-safe
* test/ruby/test_memory_view.rb: Add test_ractor
* memory_view: fix typo
* memory_view.c: Use st_update in unregster_exported_object
* memory_view: update dependency
Notes:
Merged-By: mrkn <[email protected]>
|
|
rb_memory_view_prepare_item_desc (#3871)
Notes:
Merged-By: mrkn <[email protected]>
|
|
Notes:
Merged-By: mrkn <[email protected]>
|
|
This reverts the following three commits.
- ce707079c153f389d861c91a8dccc510fab0e245
- 1a76bb56b0ba99a19d1373c4c8ebac42e7b6f27c
- 51500eedefa492699668ced3e07e330a9a4d53ee
|
|
|
|
|
|
|
|
|
|
* memory_view.c: remove a reference in view->obj at rb_memory_view_release
* memory_view.c: keep references of memory-view-exported objects
* Update common.mk
* memory_view.c: Use st_update
Notes:
Merged-By: mrkn <[email protected]>
|
|
```
find . -name \*.o -exec nm {} + |&
sed '/Init_.*\.rbimpl_id/!d;s/^.* b //;s/\.[1-9][0-9]*$//;s/\.rbimpl_id$//' |
uniq
```
should be empty.
|
|
This was a workaround for RUBY_ALIGNOF's glitch, which has already been
fixed. See also https://github.com/ruby/ruby/pull/3570
Notes:
Merged: https://github.com/ruby/ruby/pull/3631
|
|
Because `bool` is already used in the header there is no reason to
hesitate.
Notes:
Merged: https://github.com/ruby/ruby/pull/3631
|
|
* memory_view.c: Use ssize_t for ndim in memory_view
* include/ruby/memory_view.h: Fix the type of item_size argument
Notes:
Merged-By: mrkn <[email protected]>
|
|
initialized"
|
|
* Add buffer protocol
* Modify for some review comments
* Per-object buffer availability
* Rename to MemoryView from Buffer and make compilable
* Support integral repeat count in memory view format
* Support 'x' for padding bytes
* Add rb_memory_view_parse_item_format
* Check type in rb_memory_view_register
* Update dependencies in common.mk
* Add test of MemoryView
* Add test of rb_memory_view_init_as_byte_array
* Add native size format test
* Add MemoryView test utilities
* Add test of rb_memory_view_fill_contiguous_strides
* Skip spaces in format string
* Support endianness specifiers
* Update documentation
* Support alignment
* Use RUBY_ALIGNOF
* Fix format parser to follow the pack format
* Support the _ modifier
* Parse count specifiers in get_format_size function.
* Use STRUCT_ALIGNOF
* Fix test
* Fix test
* Fix total size for the case with tail padding
* Fix rb_memory_view_get_item_pointer
* Fix rb_memory_view_parse_item_format again
Notes:
Merged-By: mrkn <[email protected]>
|