summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Prevent potential buffer overrun in onigmoYusuke Endoh2022-10-251-2/+2
| | | | | | | | | | A code pattern `p + enclen(enc, p, pend)` may lead to a buffer overrun if incomplete bytes of a UTF-8 character is placed at the end of a string. Because this pattern is used in several places in onigmo, this change fixes the issue in the side of `enclen`: the function should not return a number that is larger than `pend - p`. Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>
* Use CXX14 to allow constexpr with non-return statementsNick Hengeveld2022-10-241-1/+1
| | | | Co-authored-by: Daniel Colson <composerinteralia@github.com>
* Add Class#attached_objectUfuk Kayserilioglu2022-10-201-0/+12
| | | | | | | Implements [Feature #12084] Returns the object for which the receiver is the singleton class, or raises TypeError if the receiver is not a singleton class.
* Define `UNDEF_P` and `NIL_OR_UNDEF_P` [EXPERIMENTAL]Nobuyoshi Nakada2022-10-201-0/+58
|
* Move "special consts" so `Qundef` and `Qnil` differ just 1 bitNobuyoshi Nakada2022-10-202-12/+12
|
* [DOC] Fix RUBY_SYMBOL_FLAG comment [ci skip]Nobuyoshi Nakada2022-10-201-1/+1
| | | | Upper bits than the least significant 4 bits need not be 0.
* Assert for RTEST that Qnil and Qfalse differ just 1 bitNobuyoshi Nakada2022-10-191-0/+9
|
* Fix and improve coroutines for Darwin (macOS) ppc/ppc64. (#5975)Sergey Fedorov2022-10-191-0/+2
|
* Add support for anonymous shared IO buffers. (#6580)Samuel Williams2022-10-191-0/+3
|
* Update `Fiber::Scheduler` documentation. (#6562)Samuel Williams2022-10-151-14/+20
|
* Introduce `Fiber::Scheduler#io_select` hook for non-blocking `IO.select`. ↵Samuel Williams2022-10-151-1/+21
| | | | (#6559)
* Improvements to IO::Buffer implementation and documentation. (#6525)Samuel Williams2022-10-122-12/+20
|
* Revert "Revert "This commit implements the Object Shapes technique in CRuby.""Jemma Issroff2022-10-112-18/+4
| | | | This reverts commit 9a6803c90b817f70389cae10d60b50ad752da48f.
* object.c: rb_eql returns int not VALUEJean Boussier2022-10-101-2/+2
| | | | | It works, but assumes `Qfalse == 0`, which is true today but might not be forever.
* Try `nil` as default for 'default timeout'. (#6509)Samuel Williams2022-10-081-4/+4
|
* Simplify default argument specification. (#6507)Samuel Williams2022-10-071-0/+5
|
* Add IO#timeout attribute and use it for blocking IO operations. (#5653)Samuel Williams2022-10-071-14/+36
|
* Revert "This commit implements the Object Shapes technique in CRuby."Aaron Patterson2022-09-302-4/+18
| | | | This reverts commit 68bc9e2e97d12f80df0d113e284864e225f771c2.
* This commit implements the Object Shapes technique in CRuby.Jemma Issroff2022-09-282-18/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Object Shapes is used for accessing instance variables and representing the "frozenness" of objects. Object instances have a "shape" and the shape represents some attributes of the object (currently which instance variables are set and the "frozenness"). Shapes form a tree data structure, and when a new instance variable is set on an object, that object "transitions" to a new shape in the shape tree. Each shape has an ID that is used for caching. The shape structure is independent of class, so objects of different types can have the same shape. For example: ```ruby class Foo def initialize # Starts with shape id 0 @a = 1 # transitions to shape id 1 @b = 1 # transitions to shape id 2 end end class Bar def initialize # Starts with shape id 0 @a = 1 # transitions to shape id 1 @b = 1 # transitions to shape id 2 end end foo = Foo.new # `foo` has shape id 2 bar = Bar.new # `bar` has shape id 2 ``` Both `foo` and `bar` instances have the same shape because they both set instance variables of the same name in the same order. This technique can help to improve inline cache hits as well as generate more efficient machine code in JIT compilers. This commit also adds some methods for debugging shapes on objects. See `RubyVM::Shape` for more details. For more context on Object Shapes, see [Feature: #18776] Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Co-Authored-By: Eileen M. Uchitelle <eileencodes@gmail.com> Co-Authored-By: John Hawthorn <john@hawthorn.email>
* Revert this until we can figure out WB issues or remove shapes from GCAaron Patterson2022-09-262-4/+18
| | | | | | | | | | Revert "* expand tabs. [ci skip]" This reverts commit 830b5b5c351c5c6efa5ad461ae4ec5085e5f0275. Revert "This commit implements the Object Shapes technique in CRuby." This reverts commit 9ddfd2ca004d1952be79cf1b84c52c79a55978f4.
* This commit implements the Object Shapes technique in CRuby.Jemma Issroff2022-09-262-18/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Object Shapes is used for accessing instance variables and representing the "frozenness" of objects. Object instances have a "shape" and the shape represents some attributes of the object (currently which instance variables are set and the "frozenness"). Shapes form a tree data structure, and when a new instance variable is set on an object, that object "transitions" to a new shape in the shape tree. Each shape has an ID that is used for caching. The shape structure is independent of class, so objects of different types can have the same shape. For example: ```ruby class Foo def initialize # Starts with shape id 0 @a = 1 # transitions to shape id 1 @b = 1 # transitions to shape id 2 end end class Bar def initialize # Starts with shape id 0 @a = 1 # transitions to shape id 1 @b = 1 # transitions to shape id 2 end end foo = Foo.new # `foo` has shape id 2 bar = Bar.new # `bar` has shape id 2 ``` Both `foo` and `bar` instances have the same shape because they both set instance variables of the same name in the same order. This technique can help to improve inline cache hits as well as generate more efficient machine code in JIT compilers. This commit also adds some methods for debugging shapes on objects. See `RubyVM::Shape` for more details. For more context on Object Shapes, see [Feature: #18776] Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Co-Authored-By: Eileen M. Uchitelle <eileencodes@gmail.com> Co-Authored-By: John Hawthorn <john@hawthorn.email>
* Fix `io/buffer.h` header guard.Samuel Williams2022-09-261-3/+3
|
* Just a star [ci skip]Nobuyoshi Nakada2022-09-231-1/+1
|
* rb_define_method: dedicated overload for rb_f_notimplement卜部昌平2022-09-211-7/+8
| | | | | rb_f_notimplement was type-compatible with VALUE(*)(ANYARGS), but not any longer in C23. Provide a dedicated path for it.
* [Bug #5317] Use `rb_off_t` instead of `off_t`Nobuyoshi Nakada2022-09-084-12/+11
| | | | Get rid of the conflict with system-provided small `off_t`.