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

59102 Коммитов

Автор SHA1 Сообщение Дата
aycabta abe8fb49f0 Delete newline when C-k on emacs mode at EOL 2019-11-28 09:32:51 +09:00
aycabta 7769975c3c Remove two removed constants 2019-11-28 08:26:10 +09:00
aycabta 2d0a1a1869 Fix ghost method line no 2019-11-28 08:19:05 +09:00
Jeremy Evans f9debf3437 Update documentation for ruby2_keywords [ci skip] 2019-11-27 15:13:35 -08:00
Kazuhiro NISHIYAMA 416cccc6ec Drop windows-2016 on GitHub Actions
https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners#windows-server-2016
> Note: The Windows Server 2016 virtual environment will be removed on December 3, 2019.
2019-11-27 12:32:42 -08:00
git cdcaf04112 * 2019-11-28 [ci skip] 2019-11-28 03:03:51 +09:00
Jeremy Evans 299a13612e Don't modify rest array when using ruby2_keywords
Previously, the rest array was modified, but it turns out that is
not necessary.  Not modifying the rest array fixes cases when the
rest array is used more than once.
2019-11-27 20:03:27 +02:00
卜部昌平 6f27fa4f7d prefer class_serial over m_tbl
Decades ago, among all the data that a class has, its method
table was no doubt the most frequently accessed data.  Previous
data structures were based on that assumption.

Today that is no longer true.  The most frequently accessed field
moved to class_serial.  That field is not always as wide as VALUE
but if it is, let us swap m_tbl and class_serial.

Calculating -------------------------------------
                               ours       trunk
Optcarrot Lan_Master.nes     47.363      46.630 fps

Comparison:
             Optcarrot Lan_Master.nes
                    ours:        47.4 fps
                   trunk:        46.6 fps - 1.02x  slower
2019-11-27 21:38:07 +09:00
git 177bc652a8 * 2019-11-27 [ci skip] 2019-11-27 03:57:46 +09:00
Koichi Sasada a3e6f52c17 rename __builtin_inline!(code) and introduce others.
rename __builtin_inline!(code) to __builtin_cstmt(code).
Also this commit introduce the following inlining C code features.

* __builtin_cstmt!(STMT)

(renamed from __builtin_inline!)

Define a function which run STMT implicitly and call this function at
evatuation time. Note that you need to return some value in STMT.
If there is a local variables (includes method parameters), you can
read these values.

  static VALUE func(ec, self) {
    VALUE x = ...;
    STMT
  }

Usage:
  def double a
    # a is readable from C code.
    __builtin_cstmt! 'return INT2FIX(FIX2INT(a) * 2);'
  end

* __builtin_cexpr!(EXPR)

Define a function which invoke EXPR implicitly like `__builtin_cstmt!`.
Different from cstmt!, which compiled with `return EXPR;`.
(`return` and `;` are added implicitly)

  static VALUE func(ec, self) {
    VALUE x = ...;
    return EXPPR;
  }

Usage:
  def double a
    __builtin_cexpr! 'INT2FIX(FIX2INT(a) * 2)'
  end

* __builtin_cconst!(EXPR)

Define a function which invoke EXPR implicitly like cexpr!.
However, the function is called once at compile time, not evaluated time.
Any local variables are not accessible (because there is no local variable
at compile time).

Usage:
  GCC = __builtin_cconst! '__GNUC__'

* __builtin_cinit!(STMT)

STMT are writtein in auto-generated code.
This code does not return any value.

Usage:

  __builtin_cinit! '#include <zlib.h>'
  def no_compression?
    __builtin_cconst! 'Z_NO_COMPRESSION ? Qtrue : Qfalse'
  end
2019-11-27 03:55:28 +09:00
Nobuyoshi Nakada 9e01fcd0cb
[ripper] Fixed unique key check in pattern matching
Check keys
* by an internal table, instead of unstable dispatched results
* and by parsed key values, instead of escaped forms in the source
2019-11-26 22:54:35 +09:00
Nobuyoshi Nakada 22dfd14c17
Hoisted out `push_pvtbl`/`pop_pvtbl` 2019-11-26 21:57:00 +09:00
Nobuyoshi Nakada 497f13aea6
Wrap `p_kw` in an array at `p_kwarg`
Not in `p_kw` itself, which makes key and variable/expr pair only
now.
2019-11-26 21:57:00 +09:00
Nobuyoshi Nakada 265b5382b2
Allow `$10` and more in the Ripper DSL 2019-11-26 21:57:00 +09:00
Nobuyoshi Nakada 7db719c516
Write rbinc files to the source directory
Update the target file itself of the dependency on this script.
Fall back to the current working directory if unwritable.
2019-11-26 21:49:42 +09:00
aycabta 8b20829396 Remove an unnecessary variable 2019-11-26 19:22:38 +09:00
Hiroshi SHIBATA 82525fcce1
Add sync task for ruby/openssl 2019-11-26 18:26:08 +09:00
Takashi Kokubun 1fe31737d8
Slightly fix the warning message [ci skip]
I'm not sure, but maybe it was gramatically incorrect?
2019-11-26 01:20:29 -08:00
Takashi Kokubun 958641d991
Suggest an alternative to suppress the irb warning 2019-11-26 01:18:07 -08:00
Kazuhiro NISHIYAMA 5a6e3e7552
Add `--with-openssl-dir` to windows on GitHub Actions
7bd7a013b1/checks?check_suite_id=328682567#step:10:1634
```
*** Following extensions are not compiled:
openssl:
	Could not be configured. It will not be installed.
"	d:/a/ruby/ruby/src/ext/openssl/extconf.rb:97: OpenSSL library could not be found. You might want to use --with-openssl-dir=<dir> option to specify the prefix where OpenSSL is installed."
```
2019-11-26 16:19:18 +09:00
git 307e899d78 * 2019-11-26 [ci skip] 2019-11-26 11:46:22 +09:00
NAKAMURA Usaku 7bd7a013b1
Fix `$(RMALL) -r` on Windows
`set recursive=1 &` sets `1 ` to `recursive`, not `1`.
2019-11-26 11:44:11 +09:00
Nobuyoshi Nakada 26625bc33c
[ripper] Quoted label without expression must be a local variable
The difference from 0b8c73aa65 is to
add the result of `string_add` event to marking objects.

```C
			    RNODE($1)->nd_rval = add_mark_object(p, $$);
```
2019-11-25 17:42:59 +09:00
Nobuyoshi Nakada 86461fc28c
lldb_cruby.py: improved dump of Symbol
[ci skip]
2019-11-25 16:53:27 +09:00
Kazuhiro NISHIYAMA 09e76e9828
Improve consistency of bool/true/false 2019-11-25 15:09:09 +09:00
Koichi Sasada e27acb6148 add fast path for argc==0.
If calling builtin functions with no arguments, we don't need to
calculate argv location.
2019-11-25 14:04:21 +09:00
Kazuhiro NISHIYAMA 5c6235a83c
Set TRUE/FALSE to `bool ruby_tz_uptodate_p` instead of 1/FALSE 2019-11-25 12:10:05 +09:00
Kazuhiro NISHIYAMA 714a0cefc1
Fix a typo [ci skip] 2019-11-25 10:54:09 +09:00
Junichi Ito a5f0d1d715
Remove duplicated line in NEWS [ci skip]
[ruby-core:95935] [Misc #16365]
2019-11-25 10:46:23 +09:00
Nobuyoshi Nakada 9af52c0d09
lldb_cruby.py: fixed dump of embedded RArray
[ci skip]
2019-11-25 09:21:27 +09:00
Paweł Przeniczny ce50af21af Fix the docs for Proc#>>.
The docs are wrong about the behaviour of `#>>` (looks like it was copied from `#<<`)
In `(prc >> g).call(n)` _prc_ is called first (with _n_), *then* _g_ is called with the result.

Code examples are OK.
2019-11-25 09:19:15 +09:00
aycabta fd956c72ea Cache loaded module to suppress method redefined warnings 2019-11-25 07:27:15 +09:00
git 9087252067 * 2019-11-25 [ci skip] 2019-11-25 06:50:27 +09:00
aycabta 51ea1abb5f Remove e2mmap dependency 2019-11-25 05:38:09 +09:00
aycabta efbca15116 Remove lib/irb/slex.rb 2019-11-25 03:10:35 +09:00
aycabta 1aeb201d28 Remove debug code... 2019-11-24 23:29:09 +09:00
git 411644186b * 2019-11-24 [ci skip] 2019-11-24 23:15:25 +09:00
aycabta 745ab16818 Disable tracer ext of IRB when tracer doesn't found 2019-11-24 22:42:08 +09:00
Nobuyoshi Nakada b563439274
Show include directive differences only when under git
When building from tarballs, the source directory is not a git
repository.
2019-11-23 16:06:30 +09:00
Kazuhiro NISHIYAMA 9318e1ff3e
Use realpath to try to fix failures with symlinks 2019-11-23 11:41:27 +09:00
Takashi Kokubun 818708edab
Stop using undefined matrix.os for macOS
and use github.workflow instead. Applied a similar change to MJIT too.
2019-11-22 14:22:34 -08:00
aycabta b0614a0f96 Tracer.set_get_line_procs should support block and Proc object
Original Tracer.set_get_line_procs is implemented by
"def set_get_line_procs(p = proc)". It means that original
Tracer.set_get_line_procs supports block and Proc object.
2019-11-23 05:44:35 +09:00
aycabta 1ee010a317 Tracer.add_filter should support block and Proc object
Original Tracer.add_filter is implemented by "def add_filter(p = proc)". It
means that original Tracer.add_filter supports block and Proc object.
2019-11-23 05:43:07 +09:00
John Hawthorn 8e743fad4e Count pinned slots using only bitmap
This is significantly faster than checking BUILTIN_TYPEs because we
access significantly less memory. We also use popcount to count entire
words at a time.

The only functional difference from the previous implementation is that
T_ZOMBIE objects will no longer be counted. However those are temporary
objects which should be small in number, and this method has always been
an estimate.
2019-11-22 12:42:24 -08:00
John Hawthorn 26fd8d962c Optimize pinned page sorting
Previously we would count the pinned objects on each comparison. Since
sorting is O(N log N) and we calculated this on both left and right
pages on each comparison this resulted in a extra iterations over the
slots.
2019-11-22 12:42:24 -08:00
John Hawthorn 3f4199b0af Use value of use_verifier in gc_compact 2019-11-22 12:42:24 -08:00
git 144bff43fc * 2019-11-23 [ci skip] 2019-11-23 01:58:08 +09:00
Kazuhiro NISHIYAMA 271cb9acd2
Suppress git error message
`fatal: not a git repository (or any of the parent directories): .git`
2019-11-23 01:57:19 +09:00
Kazuhiro NISHIYAMA d7f100226d
Skip test_validate_gemspec when tarball and git installed too
`git --version` failed as expected when git is not installed,
but unexpectedly pass when git installed and pwd is not in git working directory.
So use `git rev-parse` instead, and it failed when git installed too.
2019-11-23 01:57:19 +09:00
Yusuke Endoh 053f78e139 internal.h: Add a prototype declaration for rb_gvar_readonly_setter
emscripten fails to compile ruby due to lack of this.
2019-11-22 23:56:18 +09:00