summaryrefslogtreecommitdiff
path: root/darray.h
AgeCommit message (Collapse)Author
2024-04-15Remove dependency on gc.h for darray.hPeter Zhu
2024-04-02Remove with_gc functions in darrayPeter Zhu
We can wrap in DURING_GC_COULD_MALLOC_REGION instead.
2024-02-12Replace assert with RUBY_ASSERT in darray.hPeter Zhu
assert does not print the bug report, only the file and line number of the assertion that failed. RUBY_ASSERT prints the full bug report, which makes it much easier to debug.
2023-08-25Implement weak references in the GCPeter Zhu
[Feature #19783] This commit adds support for weak references in the GC through the function `rb_gc_mark_weak`. Unlike strong references, weak references does not mark the object, but rather lets the GC know that an object refers to another one. If the child object is freed, the pointer from the parent object is overwritten with `Qundef`. Co-Authored-By: Jean Boussier <byroot@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/8113
2023-08-25Add _without_gc functions to darrayPeter Zhu
These functions manipulate darray without the possibility of triggering GC, which is used for places that cannot trigger GC. These functions crash when the allocation fails. Notes: Merged: https://github.com/ruby/ruby/pull/8113
2023-07-21Remove unused code in darray.hPeter Zhu
2023-02-28Fix spelling (#7405)John Bampton
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-05-03Remove _with_gc functions in darrayPeter Zhu
darray was used in YJIT which required the functions to not trigger GC. YJIT has now moved to Rust and does not use darray anymore, so we can remove the functions that don't trigger GC and only keep the ones that trigger GC. Notes: Merged: https://github.com/ruby/ruby/pull/5874
2022-02-16Change feature_index from fake Array to darrayPeter Zhu
Using a fake (malloc) RArray is not friendly for the garbage collector. Fake RArray does not have a heap page, so it causes Variable Width Allocation to crash when we try to implement it on Arrays. This commit changes feature_index from a RArray to a darray. Notes: Merged: https://github.com/ruby/ruby/pull/5546
2022-02-16Change darray size to size_t and add functions that use GC mallocPeter Zhu
Changes size and capacity of darray to size_t to support more elements. Adds functions to darray that use GC allocation functions. Notes: Merged: https://github.com/ruby/ruby/pull/5546
2021-10-20Add rb_darray_clear() for Kevin. Fix some warnings.Maxime Chevalier-Boisvert
2021-10-20Malloc branch entries (#112)Maxime Chevalier-Boisvert
* Malloc branch entries * Add ASM comment for stack overflow check * WIP * Fix branch GC code. Add rb_darray_remove_unordered(). * Fix block end_pos after branch rewriting. Remove dst_patched bits.
2021-10-20Remove trailing whitespacesMaxime Chevalier-Boisvert
2021-10-20YJIT: Use 2D array to group block versionsAlan Wu
For deferred compilation, we sometimes want to care about the order of the block versions. Use an array instead of a linked list to do that.
2021-10-20darray: fix strict aliasing issueAlan Wu
2021-10-20Add rb_darray_makeAlan Wu
2021-10-20darray: fix buffer size calculation for element with strict alignmentAlan Wu
2021-10-20Tie lifetime of uJIT blocks to iseqsAlan Wu
* Tie lifetime of uJIT blocks to iseqs Blocks weren't being freed when iseqs are collected. * Add rb_dary. Use it for method dependency table * Keep track of blocks per iseq Remove global version_tbl * Block version bookkeeping fix * dary -> darray * free ujit_blocks * comment about size of ujit_blocks