Граф коммитов

58007 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 7aeacb213b
Revert eval.c in e81a3e6df5
Inadvertently merged change to suppress warnings by gcc 9.2.
Pointed out by Alan Wu.
2019-09-21 01:57:29 +09:00
git 990e714fd3 * 2019-09-21 [ci skip] 2019-09-21 00:48:46 +09:00
Nobuyoshi Nakada daa4ad8ed7
Disable method definition type checks on Windows 2019-09-21 00:48:24 +09:00
Nobuyoshi Nakada fe1e623fae
Fixed format specifiers
Use PRIdPTRDIFF for the platforms where a pointer is larger than a long.
2019-09-20 23:57:20 +09:00
Jeremy Evans e47b111627 Call rb_vm_call_kw insted of rb_vm_call0 in a few cases
rb_vm_call_kw handles the tmp buffer for you.

Also, change method_missing so it also calls rb_vm_call_kw to
handle the kw_splat flag, instead of requiring callers to handle
kw_splat flag before calling method_missing.  This may fix other
cases where method_missing is currently called without the kw_splat
being handled.
2019-09-20 07:45:29 -07:00
Jeremy Evans c9f2b790ad Handle keyword argument separation for Enumerator#size
When Object#to_enum is passed a block, the block is called to get
a size with the arguments given to to_enum.  This calls the block
with the same keyword flag as to_enum is called with.

This requires adding rb_check_funcall_kw and
rb_check_funcall_default_kw to handle keyword flags.
2019-09-20 07:45:18 -07:00
Jeremy Evans 27b6746872 Make passing empty keywords to dig pass empty keywords to next dig method
If defined in Ruby, dig would be defined as def dig(arg, *rest) end,
it would not use keywords.  If the last dig argument was an empty
hash, it could be treated as keyword arguments by the next dig
method.  Allow dig to pass along the empty keyword flag if called
with an empty keyword, to suppress the previous behavior and force
treating the hash as a positional argument and not keywords.

Also handle the case where dig calls method_missing, passing the
empty keyword flag to that as well.

This requires adding rb_check_funcall_with_hook_kw functions, so
that dig can specify how arguments are treated.  It also adds
kw_splat arguments to a couple static functions.
2019-09-20 07:45:11 -07:00
Nobuyoshi Nakada e81a3e6df5
Allows calling a private method only with bare `self` 2019-09-20 22:05:54 +09:00
Takashi Kokubun 9e171b1fa0
Fix wrong allocation failure handling
`iseq->body->jit_unit->compile_info` should not be referenced before
the null check of `iseq->body->jit_unit`.
2019-09-20 21:50:33 +09:00
Takashi Kokubun 6e0dd3e7c1
Use RUBY_VM_NEXT_CONTROL_FRAME macro
in vm_push_frame and limit scope of i.
Just a minor maintainability improvement.
2019-09-20 21:06:08 +09:00
Nobuyoshi Nakada 740a98fe10
Fix for explicit cast without RUBY_METHOD_FUNC 2019-09-20 19:12:36 +09:00
Nobuyoshi Nakada cb1f9fe918
Check various method defitions in C++ 2019-09-20 19:12:35 +09:00
Takashi Kokubun 4ffcadd39c
Fix rb_define_singleton_method warning
for debug counters

```
../include/ruby/intern.h:1175:137: warning: passing argument 3 of 'rb_define_singleton_method0' from incompatible pointer type [-Wincompatible-pointer-types]
 #define rb_define_singleton_method(klass, mid, func, arity) rb_define_singleton_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
                                                                                                                                         ^
../vm.c:2958:5: note: in expansion of macro 'rb_define_singleton_method'
     rb_define_singleton_method(rb_cRubyVM, "show_debug_counters", rb_debug_counter_show, 0);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~
../include/ruby/intern.h:1139:99: note: expected 'VALUE (*)(VALUE) {aka long unsigned int (*)(long unsigned int)}' but argument is of type 'VALUE (*)(void) {aka long unsigned int (*)(void)}'
 __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__(2,3)))static void rb_define_singleton_method0 (VALUE,const char*,VALUE(*)(VALUE),int);
```
2019-09-20 17:44:48 +09:00
Nobuyoshi Nakada 04c53a1d03
Get rid of embedding make command line
NMAKE sets MAKE to the full path name, which includes spaces by
the default installation.
2019-09-20 17:05:52 +09:00
Nobuyoshi Nakada d56a3c0635
Fixed cxxanyargs/depend
* Removed excess backslashes
* Fixed the target name to try failure.cpp
2019-09-20 16:58:47 +09:00
Nobuyoshi Nakada 2683171994
[DOC] DOT is not a part of a receiver [ci skip]
[Feature #11297] [Feature #16123]
2019-09-20 16:43:39 +09:00
Hiroshi SHIBATA 1de242de0f
Fixed up 37c0839425 2019-09-20 14:22:32 +09:00
Hiroshi SHIBATA 9d25c652a9
Removed ThreadsWait from the ruby repository 2019-09-20 14:21:04 +09:00
Hiroshi SHIBATA 37c0839425
Removed Synchronizer from the ruby repository. 2019-09-20 14:06:22 +09:00
Hiroshi SHIBATA 3b56a0934f
Removed Shell from the ruby repository. 2019-09-20 12:56:18 +09:00
Hiroshi SHIBATA 67a6662032
Removed Scanf from the ruby repository. 2019-09-20 12:43:11 +09:00
Hiroshi SHIBATA a3b8501614
Removed CMath from the ruby repository. 2019-09-20 12:31:37 +09:00
Nobuyoshi Nakada 422ae594d9
Fixed memory leak
* array.c (flatten): fix a memory leak in the case of an exception
  at conversion of an element to Array.
2019-09-20 10:49:49 +09:00
Nobuyoshi Nakada 45bac62845
Added the target to run a benchmark 2019-09-20 09:31:55 +09:00
Nobuyoshi Nakada d3c6fe65e3
Fixed a variable in checkout-github-% 2019-09-20 09:25:30 +09:00
Nobuyoshi Nakada b80df6e8e0
Update NEWS and documents [ci skip]
[Feature #11297] [Feature #16123]
2019-09-20 02:40:59 +09:00
Nobuyoshi Nakada e6378cdcd8
Allow calling a private accessor with `self.`
[Feature #11297] [Feature #16123]
2019-09-20 02:21:37 +09:00
Nobuyoshi Nakada d583df5259
Added version guard
[Feature #11297] [Feature #16123]
2019-09-20 02:21:25 +09:00
Dylan Thacker-Smith 7fbd2f7cc2
Allow calling a private method with `self.`
This makes it consistent with calling private attribute assignment
methods, which currently is allowed (e.g. `self.value =`).

Calling a private method in this way can be useful when trying to
assign the return value to a local variable with the same name.

[Feature #11297] [Feature #16123]
2019-09-20 02:20:59 +09:00
Nobuyoshi Nakada 17a1366399 Overload variable definition functions
Define overloading functions of rb_define_virtual_variable and
rb_define_hooked_variable, for combinations with and without
ANYARGS casts.
2019-09-20 01:29:48 +09:00
Nobuyoshi Nakada 9c0d5e51cb Check method functions in C++
By using template and overloading, instead of transparent union.
2019-09-20 01:29:48 +09:00
git 5e3771aad4 * 2019-09-20 [ci skip] 2019-09-20 00:20:35 +09:00
Nobuyoshi Nakada e13b09c450
Use EXPECT_NODE_NONULL 2019-09-19 23:45:09 +09:00
Nobuyoshi Nakada 82f25404ff
Check COMPILE_RECV result 2019-09-19 23:44:37 +09:00
Nobuyoshi Nakada e0c56b45a4
Moved unmatch arity check to depend file
To substitute suffixes and VPATH for nmake.
2019-09-19 22:09:43 +09:00
Nobuyoshi Nakada a3daf8e49a
Ensure that unmatched arity fails in C++ 2019-09-19 20:57:58 +09:00
Nobuyoshi Nakada b3ddeac33e
Revert "DEBUG: dump mkmf.log"
This reverts commit 69e209a345.

The debug has finishted.
2019-09-19 20:57:57 +09:00
NARUSE, Yui cbf405fec4 Specify encoding explicitly for sprintf 2019-09-19 20:45:24 +09:00
NARUSE, Yui 5208c431be Separate Time#inspect from to_s and show subsec [Feature #15958] 2019-09-19 20:20:15 +09:00
Nobuyoshi Nakada 2698f13a1f
Fixed reserved numbered parameter warning 2019-09-19 19:40:44 +09:00
Nobuyoshi Nakada 6180f1fede
Added link_command for C++ 2019-09-19 19:06:18 +09:00
Takashi Kokubun 6045ff64e3
Use benchmark-driver v0.15.6
to fix another keyword argument warning which was added recently.
2019-09-19 18:04:47 +09:00
NagayamaRyoga 20baa08d65 Improve the output of `RubyVM::InstructionSequence#to_binary` (#2450)
The output of RubyVM::InstructionSequence#to_binary is extremely large.
We have reduced the output of #to_binary by more than 70%.

The execution speed of RubyVM::InstructionSequence.load_from_binary is about 7% slower, but when reading a binary from a file, it may be faster than the master.

Since Bootsnap gem uses #to_binary, this proposal reduces the compilation cache size of Rails projects to about 1/4.

See details: [Feature #16163]
2019-09-19 17:35:32 +09:00
Takashi Kokubun f84efe4b9d
Avoid unneeded casts in INSN_ENTRY_SIG 2019-09-19 17:30:31 +09:00
Takashi Kokubun 7202bf9ed8
Drop PREFETCH macro unused since 6b534134a7 2019-09-19 17:19:22 +09:00
卜部昌平 fcfe36b733 fix spec failure
See also https://travis-ci.org/ruby/ruby/jobs/586452224
2019-09-19 15:18:10 +09:00
卜部昌平 d74fa8e55c reuse cc->call
I noticed that in case of cache misshit, re-calculated cc->me can
be the same method entry than the pevious one.  That is an okay
situation but can't we partially reuse the cache, because cc->call
should still be valid then?

One thing that has to be special-cased is when the method entry
gets amended by some refinements.  That happens behind-the-scene
of call cache mechanism.  We have to check if cc->me->def points to
the previously saved one.

Calculating -------------------------------------
                          trunk        ours
vm2_poly_same_method     1.534M      2.025M i/s -      6.000M times in 3.910203s 2.962752s

Comparison:
             vm2_poly_same_method
                ours:   2025143.9 i/s
               trunk:   1534447.2 i/s - 1.32x  slower
2019-09-19 15:18:10 +09:00
Kazuhiro NISHIYAMA 9fb9f2d318
Add draft-release.yml [ci skip]
Make draft release packages. (Release packages are official after tests and release announce.)

- Copy from ruby/actions
- Change trigger tags from `draft/v*` to `v*` (I use `draft/v*` on ruby/actions because I want to avoid to cause trouble with shell history on working directory of ruby/ruby.)
- Change secrets names because secrets are repository local and use different names between ruby/ruby and ruby/actions.
2019-09-19 12:47:09 +09:00
Nobuyoshi Nakada e2aac6a611
Separate @have_devel for C++ 2019-09-19 12:25:48 +09:00
Nobuyoshi Nakada df3fd50717
Removed mkmf.log dump in Makefile 2019-09-19 12:25:48 +09:00