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

1780 Коммитов

Автор SHA1 Сообщение Дата
aycabta be13b897ea Show failed commits only when exists 2019-12-07 22:02:24 +09:00
Aaron Patterson 2c8d186c6e
Introduce an "Inline IVAR cache" struct
This commit introduces an "inline ivar cache" struct.  The reason we
need this is so compaction can differentiate from an ivar cache and a
regular inline cache.  Regular inline caches contain references to
`VALUE` and ivar caches just contain references to the ivar index.  With
this new struct we can easily update references for inline caches (but
not inline var caches as they just contain an int)
2019-12-05 13:37:02 -08:00
Takashi Kokubun 72cff5f3af
MJIT_CC and MJIT_SUPPORT are not a prefix
0b19e15a12 was also for "MJIT_SUPPORT"
too.
2019-12-04 22:18:43 -08:00
Takashi Kokubun 5fbb4555b4
Prefer using MJIT_CC for JIT support check
because Solaris might have CC=cc and we'd like to check full path
MJIT_CC=/opt/developerstudio12.5/bin/cc instead.
2019-12-04 22:16:08 -08:00
Alan Wu df76f2c577
Make TracePoint.stat a singleton method again (#2726)
[Bug #16399]
2019-12-04 21:02:21 -05:00
Yusuke Endoh 409e4ab740 tool/lib/test/unit/parallel.rb: fail explicitly when failing to get io
`(ulimit -n 30; make test-tool)` fails with unexplicit message:
"undefined method `write' for nil:NilClass" due to lack of stdout.

This change makes it explicit.  [Bug #5577]
2019-12-03 17:26:12 +09:00
Kevin Deisz 171803d5d3 Promote did_you_mean to default gem
At the moment, there are some problems with regard to bundler + did_you_mean because of did_you_mean being a bundled gem. Since the vendored version of thor inside bundler and ruby itself explicitly requires did_you_mean, it can become difficult to load it when using Bundler.setup. See this issue: https://github.com/yuki24/did_you_mean/issues/117#issuecomment-482733159 for more details.
2019-11-30 21:08:19 -05:00
David Rodríguez a2fc6a51dd [ruby/fileutils] Fix test failure under ruby 2.4
`Exception#full_message` is only defined on ruby 2.5.0 and above.

https://github.com/ruby/fileutils/commit/a8968f41ed
2019-12-01 08:23:05 +09:00
David Rodríguez fa0f3eff22 [ruby/fileutils] Fix error printing test failure
`exception_details` is not defined anywhere.

This commit fixes the following test crash in ruby 2.4

```
Error: test_assert_output_lines(TestFileUtils): NoMethodError: undefined method `exception_details' for #<TestFileUtils:0x00005556ef699178>
```

And replaces it with an actual test failure:

```
[Test::Unit::CoreAssertions::MiniTest::Assertion] exception expected, not #<NoMethodError: undefined method `full_message' for #<RuntimeError: ok>
Did you mean?  message>.
```

https://github.com/ruby/fileutils/commit/2f38ba6e82
2019-12-01 08:22:37 +09:00
Hiroshi SHIBATA 80705e2c4f
Add to support the single commit for sync_default_gems.rb 2019-11-30 14:48:26 +09:00
Hiroshi SHIBATA 0b1b2f2442 Remove e2mmap from sync_default_gems.rb 2019-11-30 08:00:40 +09:00
NARUSE, Yui 76871dea6b Use more template feature of w.r-l.o 2019-11-28 23:49:28 +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 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
Hiroshi SHIBATA 82525fcce1
Add sync task for ruby/openssl 2019-11-26 18:26:08 +09:00
NARUSE, Yui 35608760ff Add github repo to remove_tag 2019-11-22 19:05:58 +09:00
Kazuhiro NISHIYAMA 8eb0a9e566
Use jsDelivr instead of raw.githubusercontent.com
Try to fix download error on Solaris CI

https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20191121T162422Z.fail.html.gz
```
tool/downloader.rb:243:in `rescue in download': failed to download config.guess (RuntimeError)
Net::HTTPFatalError: 503 "Service Unavailable": https://raw.githubusercontent.com/gcc-mirror/gcc/master/config.guess
```
2019-11-22 13:55:59 +09:00
Nobuyoshi Nakada f09fc1b034
Dependents on probes.h need the dummy header too 2019-11-18 23:16:22 +09:00
Nobuyoshi Nakada 39492d6ce6
Build ruby-runner 2019-11-18 18:42:40 +09:00
Nobuyoshi Nakada 227220b25a
Skip dependencies on timestamp files 2019-11-18 18:42:40 +09:00
Jeremy Evans c5c05460ac Warn on access/modify of $SAFE, and remove effects of modifying $SAFE
This removes the security features added by $SAFE = 1, and warns for access
or modification of $SAFE from Ruby-level, as well as warning when calling
all public C functions related to $SAFE.

This modifies some internal functions that took a safe level argument
to no longer take the argument.

rb_require_safe now warns, rb_require_string has been added as a
version that takes a VALUE and does not warn.

One public C function that still takes a safe level argument and that
this doesn't warn for is rb_eval_cmd.  We may want to consider
adding an alternative method that does not take a safe level argument,
and warn for rb_eval_cmd.
2019-11-18 01:00:25 +02:00
Hiroshi SHIBATA 57dc3ff73d
Removed sync library from sync tool 2019-11-13 15:37:21 +09:00
Dylan Thacker-Smith ac112f2b5d Avoid top-level search for nested constant reference from nil in defined?
Fixes [Bug #16332]

Constant access was changed to no longer allow top-level constant access
through `nil`, but `defined?` wasn't changed at the same time to stay
consistent.

Use a separate defined type to distinguish between a constant
referenced from the current lexical scope and one referenced from
another namespace.
2019-11-13 15:36:58 +09:00
Kazuhiro NISHIYAMA c4064aef7f Add commit number of today to notification of GitHub Actions 2019-11-13 14:25:30 +09:00
Nobuyoshi Nakada b0fb9bda9a
Strip the last line which become trailing spaces 2019-11-12 16:16:46 +09:00
Nobuyoshi Nakada 2de3feab44
Get rid of `__` prefix which is presereved by C standard 2019-11-12 16:09:36 +09:00
Yusuke Endoh c02de30efb tool/lib/leakchecker.rb: show the code location that allocated leaked fd
by using ObjectSpace.trace_object_allocations.

`make test-all LEAK_CHECKER_TRACE_OBJECT_ALLOCATION=true` will print not
only leaked fds but also where it was created.
2019-11-12 01:47:18 +09:00
NARUSE, Yui b2b1279272 format-release uses the result of GitHub Actions 2019-11-12 01:22:59 +09:00
NARUSE, Yui 0ba1ea7fbf Always use git.ruby-lang.org as origin
naruse sets remote.origin.pushUrl = nonexistent as fail-safe
configuration to avoid accidentally push a new branch to origin.
2019-11-12 01:22:59 +09:00
Hiroshi SHIBATA bcfe94b7f2
Revert "Revert "Promote uri to default gems""
This reverts commit fdfad90522.

  f1f27da6c4 resolved this.
2019-11-11 22:21:43 +09:00
Koichi Sasada 3141642380 __builtin_inline!
Add an experimental `__builtin_inline!(c_expression)` special intrinsic
which run a C code snippet.
In `c_expression`, you can access the following variables:
  * ec (rb_execution_context_t *)
  * self (const VALUE)
  * local variables (const VALUE)
Not that you can read these variables, but you can not write them.
You need to return from this expression and return value will be a
result of __builtin_inline!().

Examples:
  `def foo(x) __builtin_inline!('return rb_p(x);'); end` calls `p(x)`.
  `def double(x) __builtin_inline!('return INT2NUM(NUM2INT(x) * 2);')`
  returns x*2.
2019-11-11 16:47:50 +09:00
Nobuyoshi Nakada 390293525a
Remove binary data at installation
And revert "Relaxed warning assertions",
6f9be8505d.
2019-11-11 12:20:03 +09:00
David Rodríguez f48655d04d Remove unneeded exec bits from some files
I noticed that some files in rubygems were executable, and I could think
of no reason why they should be.

In general, I think ruby files should never have the executable bit set
unless they include a shebang, so I run the following command over the
whole repo:

```bash
find . -name '*.rb' -type f -executable -exec bash -c 'grep -L "^#!" $1 || chmod -x $1' _ {} \;
```
2019-11-09 21:36:30 +09:00
Hiroshi SHIBATA fdfad90522
Revert "Promote uri to default gems"
This reverts commit c5b4d2a259.

  This commit affects with activation feature of RubyGems.
  [Bug #16337][ruby-core:95768]
2019-11-09 20:16:03 +09:00
Nobuyoshi Nakada e3c8524411
Full-path of builtin scripts no longer needed 2019-11-09 19:43:14 +09:00
Kazuhiro NISHIYAMA 50bc7e7e9f
Add debug print
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/2380788
```
test_all             #<Thread:0x000055b6c8e9fca8@/tmp/ruby/v2/src/trunk-mjit/tool/lib/test/unit/parallel.rb:42 run> terminated with exception (report_on_exception is true):
<internal:pack>:134:in `pack': no implicit conversion of false into String (TypeError)
	from /tmp/ruby/v2/src/trunk-mjit/tool/lib/test/unit/parallel.rb:160:in `_report'
	from /tmp/ruby/v2/src/trunk-mjit/tool/lib/test/unit/parallel.rb:45:in `block in _run_suite'
```
2019-11-09 15:20:52 +09:00
Hiroshi SHIBATA c5b4d2a259
Promote uri to default gems 2019-11-09 07:32:34 +09:00
Hiroshi SHIBATA 8c9438d219
Promote yaml to default gems 2019-11-09 07:32:34 +09:00
Hiroshi SHIBATA 2a0ed5691e
Promote timeout to default gems 2019-11-09 07:32:34 +09:00
Hiroshi SHIBATA 5f206cebb9
Promote observer to default gems. But not yet released 2019-11-09 07:32:34 +09:00
Hiroshi SHIBATA 3d731c3694
Promote readline to default gems named readline-ext 2019-11-09 07:32:34 +09:00
Hiroshi SHIBATA fc1d06b25d
Added gemspec for readline gem that is wrapper library for reline and readline extension 2019-11-09 07:32:34 +09:00
Koichi Sasada b5d8849220 Revert "don't embed full-path."
This reverts commit dfac2e9eb3.

It does not work if cwd is different from builddir...
2019-11-09 07:09:01 +09:00
Koichi Sasada dfac2e9eb3 don't embed full-path.
miniruby load *.rb from srcdir. To specify file path,
tool/mk_builtin_loader.rb embed full path of each *.rb file.
However it prevent to pre-generation of required files for tarball.
This patch generate srcdir/*.rb from __FILE__ information.
2019-11-09 06:57:58 +09:00
Nobuyoshi Nakada 88b9a0f7fe
Prettify builtin_binary format 2019-11-09 00:21:44 +09:00
Yusuke Endoh 882179a0ec tool/mk_builtin_loader.rb: check if op is an array or not
The insn array includes not only an array but also some literal objects.
2019-11-08 23:29:50 +09:00
Nobuyoshi Nakada 2e29b65109
Add file mode to generated files [ci skip] 2019-11-08 16:37:42 +09:00
Nobuyoshi Nakada 20971799f2
Renamed `load_*.inc` as `*.rbinc` to utilize a suffix rule 2019-11-08 16:30:28 +09:00
Koichi Sasada 2eb02dfd3b Stop compiling if type mismatch was found.
If there is a type mismatch between expected builtin function type
and actual function type, C compiler shows warning.

For example, `__builtin_func(1, 2)` expects
`func(rb_ec_t*, VALUE self, VALUE p1, VALUE p2)` function definition.

However, it is easy to overlook "warning" messages. So this patch
changes to stop compiling as an error if there is a mismatch.
2019-11-08 15:29:02 +09:00
Koichi Sasada e2a45cb984 use builtin for TracePoint.
Define TracePoint in trace_point.rb and use __builtin_ syntax.
2019-11-08 09:09:29 +09:00