summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Implement Hash ST tables on VWAPeter Zhu2023-05-171-0/+2
|
* Constify `type` and `typed_flag` in `RTypedData`Nobuyoshi Nakada2023-04-271-4/+2
| | | | These must not be changed once initialized.
* Refactor `Regexp#match` cache implementation (#7724)TSUYUSATO Kitsune2023-04-191-2/+0
| | | | | | | | | | * Refactor Regexp#match cache implementation Improved variable and function names Fixed [Bug 19537] (Maybe fixed in https://github.com/ruby/ruby/pull/7694) * Add a comment of the glossary for "match cache" * Skip to reset match cache when no cache point on null check
* Add RB_WARN_CATEGORY_DEFAULT_BITSJean Boussier2023-04-141-0/+6
| | | | | | | | | | Followup: ac123f167a364c3d7a43eca78d564e41f6dbb91e RB_WARN_CATEGORY_ALL_BITS is exposed in a public header, so it makes sense for it to be updated to contain all valid bits. Instead we introduce RB_WARN_CATEGORY_DEFAULT_BITS to list the categories that are enabled by default.
* Emit a performance warning when a class reached max variationsJean Boussier2023-04-131-0/+3
| | | | | | | [Feature #19538] This new `peformance` warning category is disabled by default. It needs to be specifically enabled via `-W:performance` or `Warning[:performance] = true`
* Disable all warning categories other than `RB_WARN_CATEGORY_ALL_BITS`Nobuyoshi Nakada2023-04-131-1/+4
|
* [Bug #19584] [DOC] Tweek description of `rb_gc_register_address`Nobuyoshi Nakada2023-04-071-4/+9
|
* [Feature #19579] Remove !USE_RVARGC code (#7655)Peter Zhu2023-04-044-90/+0
| | | | | | | | | | | Remove !USE_RVARGC code [Feature #19579] The Variable Width Allocation feature was turned on by default in Ruby 3.2. Since then, we haven't received bug reports or backports to the non-Variable Width Allocation code paths, so we assume that nobody is using it. We also don't plan on maintaining the non-Variable Width Allocation code, so we are going to remove it.
* Support `IO#pread` / `IO#pwrite` using fiber scheduler. (#7594)Samuel Williams2023-03-312-25/+55
| | | * Skip test if non-blocking file IO is not supported.
* Use an st table for "too complex" objectsAaron Patterson2023-03-201-0/+2
| | | | | | | | | | st tables will maintain insertion order so we can marshal dump / load objects with instance variables in the same order they were set on that particular instance [ruby-core:112926] [Bug #19535] Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
* [Feature #19406] Allow declarative definition of referencesMatt Valentine-House2023-03-172-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using rb_data_type_struct to wrap a C struct, that C struct can contain VALUE references to other Ruby objects. If this is the case then one must also define dmark and optionally dcompact callbacks in order to allow these objects to be correctly handled by the GC. This is suboptimal as it requires GC related logic to be implemented by extension developers. This can be a cause of subtle bugs when references are not marked of updated correctly inside these callbacks. This commit provides an alternative approach, useful in the simple case where the C struct contains VALUE members (ie. there isn't any conditional logic, or data structure manipulation required to traverse these references). In this case references can be defined using a declarative syntax as a list of edges (or, pointers to references). A flag can be set on the rb_data_type_struct to notify the GC that declarative references are being used, and a list of those references can be assigned to the dmark pointer instead of a function callback, on the rb_data_type_struct. Macros are also provided for simple declaration of the reference list, and building edges. To avoid having to also find space in the struct to define a length for the references list, I've chosed to always terminate the references list with RUBY_REF_END - defined as UINTPTR_MAX. My assumption is that no single struct will ever be large enough that UINTPTR_MAX is actually a valid reference.
* Remove obsoleted MJIT_HEADER macroTakashi Kokubun2023-03-062-7/+3
|
* Remove obsoleted MJIT_STATIC macroTakashi Kokubun2023-03-062-20/+1
|
* Stop exporting symbols for MJITTakashi Kokubun2023-03-061-11/+0
|
* Update the depend filesMatt Valentine-House2023-02-281-425/+0
|
* Merge internal/rgengc.h and internal/gc.hMatt Valentine-House2023-02-283-3/+424
|
* Remove "unused parameter" warnings on include of ruby.hSébastien Helleu2023-02-282-0/+13
| | | | | These warnings are displayed when compiling with flag "-Wunused-parameter" (or with "-Wall -Wextra").
* Merge internal/intern/gc.h into internal/gc.hMatt Valentine-House2023-02-273-393/+363
|
* Remove USE_RGENGC_LOGGING_WB_UNPROTECTMatt Valentine-House2023-02-171-31/+2
| | | | | | | | | | This macro is broken when set to anything other than 0. And has had a comment saying that it's broken for 3 years. This commit deletes it and the associated logging code. It's clearly not being used. Co-Authored-By: Peter Zhu <peter@peterzhu.ca>
* Add utility macros `DECIMAL_SIZE_OF` and `DECIMAL_SIZE_OF_BYTES`Nobuyoshi Nakada2023-02-141-0/+9
|
* Implement Write Barrier for RMatch objectsJean Boussier2023-02-101-0/+11
| | | | They only have two references.
* Replace `PACKED_STRUCT` in includeNobuyoshi Nakada2023-02-081-3/+4
|
* Extract include/ruby/internal/attr/packed_struct.hNobuyoshi Nakada2023-02-082-10/+51
| | | | | | | | | Split `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED` macros into the macros bellow: * `RBIMPL_ATTR_PACKED_STRUCT_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_END` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END`
* [Bug #19289] Retain `ruby_abi_version` functionNobuyoshi Nakada2023-01-201-2/+5
| | | | | | | | A few extension libraries, to hide all symbols except for necessary to load, hardcode the symbols to be exported in symbol list files for linker without even checking by `have_func`. As a workaround for such libraries, retain `ruby_abi_version` symbol always even in released versions for now.
* Remove macro RHASH_ITER_LEVPeter Zhu2023-01-181-13/+0
| | | | The function rb_hash_iter_lev doesn't exist as it was removed.
* Remove Encoding#replicateBenoit Daloze2023-01-111-17/+0
|
* Reset ABI version [ci skip]Nobuyoshi Nakada2022-12-261-1/+1
|
* Development of 3.3.0 started.Yukihiro "Matz" Matsumoto2022-12-261-1/+1
|
* Never use the storage of another Fiber, that violates the whole designBenoit Daloze2022-12-201-5/+1
| | | | * See https://bugs.ruby-lang.org/issues/19078#note-30
* Add `Regexp.linear_time?` (#6901)TSUYUSATO Kitsune2022-12-141-0/+2
|
* [ci skip] Fix Doxygen for ROBJECT MacroMatt Valentine-House2022-12-131-2/+2
|
* [DOC] Update `rb_gc_mark_locations` docJimmy Bourassa2022-12-091-1/+1
| | | | The documentation says that the `end` pointer will be marked but looking at the source, that is not the case.
* document for commit 5bbba76489628f450949 [ci skip]卜部昌平2022-12-071-3/+30
|
* [DOC] Improve documentation to RB_ALLOCVv3_2_0_rc1Lars Kanis2022-12-061-3/+3
| | | Although the storage of the opaque Ruby object is an array of VALUEs, the intention of RB_ALLOCV is to allocate bytes of memory.
* Clarify the storage argument. (#6849)Samuel Williams2022-12-021-2/+7
| | | * Slightly more consistent indentation with other parts of the document.
* Introduce `Fiber#storage` for inheritable fiber-scoped variables. (#6612)Samuel Williams2022-12-011-0/+21
|
* add debug context APIs for debuggers (frame depth)Koichi Sasada2022-11-251-6/+29
| | | | | | | | | | | | | The following new debug context APIs are for implementing debugger's `next` (step over) and similar functionality. * `rb_debug_inspector_frame_depth(dc, index)` returns `index`-th frame's depth. * `rb_debug_inspector_current_depth()` returns current frame depth. The frame depth is not related to the frame index because debug context API skips some special frames but proposed `_depth()` APIs returns the count of all frames (raw depth).
* Refactor RB_SPECIAL_CONST_P (#6759)Takashi Kokubun2022-11-171-1/+1
| | | | | | | | | | Since https://github.com/ruby/ruby/pull/6599, RUBY_IMMEDIATE_MASK also overlaps RUBY_Qnil. Now RB_SPECIAL_CONST_P seems confusing since both RB_IMMEDIATE_P and RB_TEST check for RUBY_Qnil while we only need to check RUBY_Qnil besides RUBY_IMMEDIATE_MASK. I'd like to make this change to make it less confusing. I confirmed that this doesn't change the number of instructions used for the RUBY_Qfalse check on Linux x86_64 GCC and macOS arm64 Clang.
* Add support for `sockaddr_un` on Windows. (#6513)Samuel Williams2022-11-171-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Windows: Fix warning about undefined if_indextoname() * Windows: Fix UNIXSocket on MINGW and make .pair more reliable * Windows: Use nonblock=true for read tests with scheduler * Windows: Move socket detection from File.socket? to File.stat Add S_IFSOCK to Windows and interpret reparse points accordingly. Enable tests that work now. * Windows: Use wide-char functions to UNIXSocket This fixes behaviour with non-ASCII characters. It also fixes deletion of temporary UNIXSocket.pair files. * Windows: Add UNIXSocket tests for specifics of Windows impl. * Windows: fix VC build due to missing _snwprintf Avoid usage of _snwprintf, since it fails linking ruby.dll like so: linking shared-library x64-vcruntime140-ruby320.dll x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol snwprintf x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol vsnwprintf_l whereas linking miniruby.exe succeeds. This patch uses snprintf on the UTF-8 string instead. Also remove branch GetWindowsDirectoryW, since it doesn't work. * Windows: Fix dangling symlink test failures Co-authored-by: Lars Kanis <kanis@comcard.de>
* Windows: Readlink improvements (#6745)Lars Kanis2022-11-171-1/+0
| | | | | | | | | | | | | | | | | | | * Windows: Use readlink emulation for File.readlink This fixes readlink emulation for the ERROR_MORE_DATA case and general error reporting. It now releases GVL while readlink IO operation. The dedicated rb_readlink was introduced in commit 2ffb87995a33cdc7ba609a4b867f03f18da0c3b3 in order to improve encoding and buffer allocation. However the encoding issues are solved since ruby-3.0 switched to UTF-8 and the buffer allocation will be improved in a later commit. * Windows: Increase the default buffer size for reparse point info So far nearly all queries of reparse points needed two attempts to get enough buffer. * Windows: Remove declaration of rb_w32_wreadlink It was removed in commit 2f6fdd3aebdee2ce04d003b206f6da78120e8235
* Remove numiv from RObjectJemma Issroff2022-11-101-58/+1
| | | | | | | Since object shapes store the capacity of an object, we no longer need the numiv field on RObjects. This gives us one extra slot which we can use to give embedded objects one more instance variable (for a total of 3 ivs). This commit removes the concept of numiv from RObject.
* Transition shape when object's capacity changesJemma Issroff2022-11-101-0/+10
| | | | | | | | | | | | | | | | This commit adds a `capacity` field to shapes, and adds shape transitions whenever an object's capacity changes. Objects which are allocated out of a bigger size pool will also make a transition from the root shape to the shape with the correct capacity for their size pool when they are allocated. This commit will allow us to remove numiv from objects completely, and will also mean we can guarantee that if two objects share shapes, their IVs are in the same positions (an embedded and extended object cannot share shapes). This will enable us to implement ivar sets in YJIT using object shapes. Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
* [Bug #19100] Add `init_int32` function to `rb_random_interface_t`Nobuyoshi Nakada2022-11-101-4/+26
| | | | | Distinguish initialization by single word from initialization by array.
* Add version to the interface of Random extensionsNobuyoshi Nakada2022-11-101-0/+33
|
* Reduce warningsTSUYUSATO Kitsune2022-11-091-2/+2
|
* Revert "Refactor field names"TSUYUSATO Kitsune2022-11-091-3/+2
| | | | This reverts commit 1e6673d6bbd2adbf555d82c7c0906ceb148ed6ee.
* Refactor field namesTSUYUSATO Kitsune2022-11-091-2/+3
|
* Support OP_REPEAT and OP_REPEAT_INCTSUYUSATO Kitsune2022-11-091-0/+2
|
* [DOC] Fix missing type nameNobuyoshi Nakada2022-11-091-1/+1
|
* Fix -Wundef warningsNobuyoshi Nakada2022-10-263-3/+3
|