summaryrefslogtreecommitdiff
path: root/spec/ruby/optional
Commit message (Collapse)AuthorAgeFilesLines
* Update to ruby/spec@7f69c86Benoit Daloze2023-04-253-0/+155
|
* [Bug #19584] Register global variables before assignmentNobuyoshi Nakada2023-04-071-3/+3
|
* Define RUBY_VERSION_IS_3_3 macro in rubyspec.hNobuyoshi Nakada2023-01-181-3/+8
|
* Move classpath to rb_classext_tPeter Zhu2023-01-111-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit moves the classpath (and tmp_classpath) from instance variables to the rb_classext_t. This improves performance as we no longer need to set an instance variable when assigning a classpath to a class. I benchmarked with the following script: ```ruby name = :MyClass puts(Benchmark.measure do 10_000_000.times do |i| Object.const_set(name, Class.new) Object.send(:remove_const, name) end end) ``` Before this patch: ``` 5.440119 0.025264 5.465383 ( 5.467105) ``` After this patch: ``` 4.889646 0.028325 4.917971 ( 4.942678) ```
* Update to ruby/spec@9d69b95Benoit Daloze2023-01-052-0/+58
|
* [Bug #19167] Remove useless conversion of classes for special constNobuyoshi Nakada2022-12-091-3/+5
|
* Fixup spec/ruby/optional/capi/rbasic_spec.rb for mswinMSP-Greg2022-11-212-2/+2
|
* Update to ruby/spec@740ccc8Benoit Daloze2022-11-077-49/+170
|
* Revert jobserver handling in specNobuyoshi Nakada2022-11-071-11/+3
|
* Let other test runners follow the change of GNU make 4.4 jobserverNobuyoshi Nakada2022-11-071-3/+11
|
* Transition frozen string to frozen root shapeJemma Issroff2022-10-191-1/+1
| | | | Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
* Update to ruby/spec@1d9d5c6Benoit Daloze2022-09-287-2/+99
|
* This commit implements the Object Shapes technique in CRuby.Jemma Issroff2022-09-281-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-261-2/+9
| | | | | | | | | | 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-261-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Update to ruby/spec@d01709fBenoit Daloze2022-08-296-11/+105
|
* Update to ruby/spec@cbfaf51Benoit Daloze2022-07-272-8/+14
|
* Update to ruby/spec@ab32a1aBenoit Daloze2022-06-2610-78/+109
|
* Update to ruby/spec@3affe1eBenoit Daloze2022-04-256-208/+13
|
* Get rid of type aliasingNobuyoshi Nakada2022-04-071-3/+3
|
* Suppress an unused functionNobuyoshi Nakada2022-04-071-0/+2
|
* Raise RuntimeError if Kernel#binding is called from a non-Ruby frameJeremy Evans2022-04-061-6/+15
| | | | | | | | | Check whether the current or previous frame is a Ruby frame in call_trace_func and rb_tracearg_binding before attempting to create a binding for the frame. Fixes [Bug #18487] Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
* Revert "Raise RuntimeError if Kernel#binding is called from a non-Ruby frame"Jeremy Evans2022-04-011-15/+6
| | | | | | This reverts commit 343ea9967e4a6b279eed6bd8e81ad0bdc747f254. This causes an assertion failure with -DRUBY_DEBUG=1 -DRGENGC_CHECK_MODE=2
* Update to ruby/spec@aaf998fBenoit Daloze2022-03-287-20/+147
|
* Raise RuntimeError if Kernel#binding is called from a non-Ruby frameJeremy Evans2022-03-241-6/+15
| | | | | | | | | Check whether the current or previous frame is a Ruby frame in call_trace_func before attempting to create a binding for the frame. Fixes [Bug #18487] Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
* Now all extension libraries must consider the ABI headerNobuyoshi Nakada2022-03-241-1/+4
|
* Update to ruby/spec@82cd3a3Benoit Daloze2022-03-033-2/+27
|
* Update to ruby/spec@902ab83Benoit Daloze2022-01-282-0/+13
|
* Update to ruby/spec@226cfdcBenoit Daloze2022-01-104-0/+132
|
* Remove tainted and trusted featuresNobuyoshi Nakada2021-12-263-0/+12
| | | | Already these had been announced to be removed in 3.2.
* Update to ruby/spec@7f22a0bBenoit Daloze2021-11-294-1/+44
|
* [Feature #18239] Implement VWA for stringsPeter Zhu2021-10-251-6/+6
| | | | | This commit adds support for embedded strings with variable capacity and uses Variable Width Allocation to allocate strings.
* Update to ruby/spec@ccf0d85Benoit Daloze2021-10-052-0/+75
|
* FL_USER flags on ohter than T_DATA are reserved [Misc #18059]Nobuyoshi Nakada2021-09-251-13/+15
|
* FL_USER flags on ohter than T_DATA are reserved [Misc #18059]Nobuyoshi Nakada2021-09-242-20/+20
|
* Don't describe C function that does not exist in prior versions.Samuel Williams2021-09-201-2/+2
|
* Add C interface spec.Samuel Williams2021-09-202-0/+49
|
* Add printf attribute to functions call va_list format functionsNobuyoshi Nakada2021-09-121-0/+2
|
* spec/ruby/optional/capi/ext: must support GCC 5卜部昌平2021-09-102-4/+4
| | | | What a silly bug.
* spec/ruby/optional/capi/ext: support ruby < 3卜部昌平2021-09-102-13/+30
| | | | RBIMPL_WARNING_PUSH is a 3.0 feature. Rubyspec OTOH has to support 2.x.
* spec/ruby/optional/capi/ext: suppress warnings卜部昌平2021-09-102-0/+19
| | | | These warnings are okay here.
* Update to ruby/spec@b1e93a2Benoit Daloze2021-09-072-0/+15
|
* Fix rubyspec_capiext dependency and flagsNobuyoshi Nakada2021-08-301-4/+3
| | | | | - The file needed to link may be the import library. - Remove duplicate flags.
* Fix dllimport attributeNobuyoshi Nakada2021-08-301-1/+1
|
* Suppress unused-result warningsS.H2021-08-071-2/+6
| | | | | | | * Hide read function warning in string_spec_RSTRING_PTR_read function * The type of `read` may be `ssize_t` Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* Tweak rb_str_modify_expand() + read() spec to try to find out why it fails ↵Benoit Daloze2021-07-303-9/+21
| | | | | | | on some platforms * Use a longer string as <= 23 characters it's embedded on CRuby and the value of rb_str_capacity() is implementation-specific.
* Update to ruby/spec@b65d01fBenoit Daloze2021-07-2911-28/+243
|
* rb_iterate is no longer used in ruby/specBenoit Daloze2021-07-261-1/+0
|
* Use rb_block_call() instead of the deprecated rb_iterate()Nobuyoshi Nakada2021-07-182-17/+13
|
* Update to ruby/spec@a0b7d0dBenoit Daloze2021-06-026-6/+63
|