| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 8918a9cf6c65409ae1ffcdea324a1b97c6e5bb70 introduced macro
`#define rb_cData rb_cData()`. This deleting `VALUE rb_cData;`
declaration was then macro-expanded into `VALUE rb_cData();`. This
worked by accident because the expanded expression happen to be a K&R
style function declaration.
This is rather complicated and I guess unintended. Just delete the line
to keep things simple straight forward.
|
|
|
|
|
|
|
| |
* Use the wrapper of rb_cObject instead of data access
* Replaced rest of extentions
* Updated the version guard for Data
* Added the version guard of rb_cData
|
|
|
|
|
|
|
|
| |
Has been deprecated since 684bdf6171b76f5bc5e4f05926a5ab01ec2b4fd5.
Matz says in [ruby-core:83954] that Data should be an alias of Object.
Because rb_cData has not been deprecated, let us deprecate the constant
to make it a C-level synonym of rb_cObject.
|
| |
|
|
|
|
| |
symbols
|
|
|
|
|
|
| |
This reverts commit 41c208d4a463183fddca250026e5f1cd759d2604.
Reintroduce 66090b9d10cdaed917b525225e59d1c19e399248.
|
|
|
|
|
| |
symbols (#3935)
Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also document that both :deprecated and :experimental are supported
:category option values.
The locations where warnings were marked as deprecation warnings
was previously reviewed by shyouhei.
Comment a couple locations where deprecation warnings should probably
be used but are not currently used because deprecation warning
enablement has not occurred at the time they are called
(RUBY_FREE_MIN, RUBY_HEAP_MIN_SLOTS, -K).
Add assert_deprecated_warn to test assertions. Use this to simplify
some tests, and fix failing tests after marking some warnings with
deprecated category.
|
|
|
|
|
|
| |
alias_method"
This reverts commit 81739ad4fdfcc86a769056fec352f27c686fba1b.
|
|
|
|
| |
This reverts commit 66090b9d10cdaed917b525225e59d1c19e399248.
|
| |
|
| |
|
|
|
|
| |
[Bug #17395]
|
| |
|
| |
|
| |
|
|
|
|
|
| |
(1) nobody uses it (gem-codesearch)
(2) the data strucuture will be changed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, when an object is first initialized, ROBJECT_EMBED isn't
set. This means that for brand new objects, ROBJECT_NUMIV(obj) is 0 and
ROBJECT_IV_INDEX_TBL(obj) is NULL.
Previously, this combination meant that the inline cache would never be
initialized when setting an ivar on an object for the first time since
iv_index_tbl was NULL, and if it were it would never be used because
ROBJECT_NUMIV was 0. Both cases always fell through to the generic
rb_ivar_set which would then set the ROBJECT_EMBED flag and initialize
the ivar array.
This commit changes rb_class_allocate_instance to set the ROBJECT_EMBED
flag on the object initially and to initialize all members of the
embedded array to Qundef. This allows the inline cache to be set
correctly on first use and to be used on future uses.
This moves rb_class_allocate_instance to gc.c, so that it has access to
newobj_of. This seems appropriate given that there are other allocating
methods in this file (ex. rb_data_object_wrap, rb_imemo_new).
|
|
|
|
|
|
|
| |
Former ROBJECT_IV_INDEX_TBL macro included RCLASS_IV_INDEX_TBL, which is
not disclosed to extension libraies. The macro was kind of broken. Why
not just deprecate it, and convert the internal use into an inline
function.
|
|
|
|
|
|
|
| |
Both clone & dup returns a new object when executed
on the documentation looks like they are returning the
same object cloned or dup'ed which is true for method
as extend, but not for the above mentioned.
|
|
|
|
|
| |
We can obtain the verbatim source code of Primitive.cexpr!. Why not
paste that content into the JITed program.
|
|
|
|
|
| |
* Make Kernel#then, #yield_self, #frozen? builtin
* Fix test_jit
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rewrite Kernel#tap with Ruby
This was good for VM too, but of course my intention is to unblock JIT's inlining of a block over yield
(inlining invokeyield has not been committed though).
* Fix test_settracefunc
About the :tap deletions, the :tap events are actually traced (we already have a TracePoint test for builtin methods),
but it's filtered out by tp.path == "xyzzy" (it became "<internal:kernel>"). We could trace tp.path == "<internal:kernel>"
cases too, but the lineno is impacted by kernel.rb changes and I didn't want to make it fragile for kernel.rb lineno changes.
|
|
|
|
|
|
| |
Not every compilers understand that rb_raise does not return. When a
function does not end with a return statement, such compilers can issue
warnings. We would better tell them about reachabilities.
|
|
|
|
|
| |
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
|
|
|
|
|
| |
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
|
|
|
|
|
| |
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
|
|
|
|
|
| |
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
|
|
|
|
|
| |
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
|
|
|
|
|
| |
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
```
$ benchmark-driver -v --rbenv 'before;after;before --jit;after --jit' benchmark/mjit_class.yml --repeat-count=4
before: ruby 2.8.0dev (2020-06-23T07:09:54Z master 37a2e48d76) [x86_64-linux]
after: ruby 2.8.0dev (2020-06-23T17:29:56Z inline-class 0ff147c007) [x86_64-linux]
before --jit: ruby 2.8.0dev (2020-06-23T07:09:54Z master 37a2e48d76) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-06-23T17:29:56Z inline-class 0ff147c007) +JIT [x86_64-linux]
Calculating -------------------------------------
before after before --jit after --jit
mjit_class(self) 39.219M 40.060M 53.502M 69.202M i/s - 40.000M times in 1.019915s 0.998495s 0.747631s 0.578021s
mjit_class(1) 39.567M 41.242M 52.100M 68.895M i/s - 40.000M times in 1.010935s 0.969885s 0.767749s 0.580591s
Comparison:
mjit_class(self)
after --jit: 69201690.7 i/s
before --jit: 53502336.4 i/s - 1.29x slower
after: 40060289.1 i/s - 1.73x slower
before: 39218939.2 i/s - 1.76x slower
mjit_class(1)
after --jit: 68895358.6 i/s
before --jit: 52100353.0 i/s - 1.32x slower
after: 41241993.6 i/s - 1.67x slower
before: 39567314.0 i/s - 1.74x slower
```
|
| |
|
|
|
|
|
|
|
| |
This uses less harsh language recommended by duerst.
Fixes [Misc #15265]
Fixes [Misc #15748]
|
|
|
|
| |
To fix build failures.
|
|
|
|
| |
This shall fix compile errors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Bug #16465] [Bug #16801]
[Fix GH-2795] [Fix GH-2944] [Fix GH-3045] [Fix GH-3093]
Note: Backporting shouldn't modify object.h and instead can use
struct_new_kw which is basically a duplicate implementation of
rb_class_new_instance_pass_kw
Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
Co-authored-by: John Hawthorn <john@hawthorn.email>
Co-authored-by: Adam Hess <HParker@github.com>
Co-authored-by: Jose Cortinas <jacortinas@gmail.com>
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
|
| |
|
|
|
|
|
| |
As now `Object#===` document is separated from `rb_equal`, this note
no longer makes sense.
|
|
|
|
|
| |
`rb_equal` may be inlined in `case_equal` and actually same code
is generated twice.
|
| |
|
|
|
|
|
|
|
| |
* Multiple times people have been confused and believed rb_equal()
called #=== but it does not, it calls #==.
* This optimization has a subtle side effect for Float::NAN,
which is now documented.
|
|
|
|
| |
* rb_equal() already checks using `obj1 == obj2`.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# Iteration per second (i/s)
| |compare-ruby|built-ruby|
|:------------|-----------:|---------:|
|float | 30.395M| 38.314M|
| | -| 1.26x|
|float_true | 3.833M| 27.322M|
| | -| 7.13x|
|float_false | 4.182M| 24.938M|
| | -| 5.96x|
|
|
|
|
| |
Deprerecated constants which had been warned since 2.4.
|