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

1294 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 4e8336bae8
Share test-bundled-gems-run in common.mk 2019-11-05 00:05:38 +09:00
Martin Dürst c54635c08b Update Unicode Emoji version from 12.0 to 12.1.
This update does not add any new codepoint assignments, it just
expands the range of emoji codepoint sequences recommended for
public interchange.

Depending on how emoji data files are cached, this commit may
require manual intervention in some build environments
(including some CI systems).
2019-10-30 08:25:45 +09:00
Alan Wu 89e7997622 Combine call info and cache to speed up method invocation
To perform a regular method call, the VM needs two structs,
`rb_call_info` and `rb_call_cache`. At the moment, we allocate these two
structures in separate buffers. In the worst case, the CPU needs to read
4 cache lines to complete a method call. Putting the two structures
together reduces the maximum number of cache line reads to 2.

Combining the structures also saves 8 bytes per call site as the current
layout uses separate two pointers for the call info and the call cache.
This saves about 2 MiB on Discourse.

This change improves the Optcarrot benchmark at least 3%. For more
details, see attached bugs.ruby-lang.org ticket.

Complications:
 - A new instruction attribute `comptime_sp_inc` is introduced to
 calculate SP increase at compile time without using call caches. At
 compile time, a `TS_CALLDATA` operand points to a call info struct, but
 at runtime, the same operand points to a call data struct. Instruction
 that explicitly define `sp_inc` also need to define `comptime_sp_inc`.
 - MJIT code for copying call cache becomes slightly more complicated.
 - This changes the bytecode format, which might break existing tools.

[Misc #16258]
2019-10-24 18:03:42 +09:00
Nobuyoshi Nakada f1d4216bd9
Added refresh-gems
Refreshes bundled gems to the latest version, and extracts them.
2019-10-24 01:42:48 +09:00
Nobuyoshi Nakada 67f010af9b
name2ctype.h depends on also Emoji data 2019-10-23 15:11:52 +09:00
Nobuyoshi Nakada 929d5fd3b9 Comparable#clamp with a range [Feature #14784] 2019-10-16 01:42:34 +09:00
卜部昌平 f1ce4897f2 make rb_raise a GVL-only function again
Requested by ko1 that ability of calling rb_raise from anywhere
outside of GVL is "too much".  Give up that part, move the GVL
aquisition routine into gc.c, and make our new gc_raise().
2019-10-10 17:10:21 +09:00
Nobuyoshi Nakada 495ebd6e95
Now error.o needs thread.h 2019-10-10 14:21:29 +09:00
卜部昌平 9c3153e0da allow rb_raise from outside of GVL
Now that allocation routines like ALLOC_N() can raise exceptions
on integer overflows.  This is a problem when the calling thread
has no GVL.  Memory allocations has been allowed without it, but
can still fail.

Let's just relax rb_raise's restriction so that we can call it
with or without GVL.  With GVL the behaviour is unchanged.  With
no GVL, wait for it.

Also, integer overflows can theoretically occur during GC when
we expand the object space.  We cannot do so much then.  Call
rb_memerror and let that routine abort the process.
2019-10-10 12:07:38 +09:00
Nobuyoshi Nakada 212da9a6ae
Added dependencies on prerequisite makefiles 2019-10-05 11:04:23 +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
Takashi Kokubun bcd49a4669
Upgrade benchmark_driver to v0.15.5
Fixed new Struct-related keyword argument warnings
2019-09-13 00:34:54 +09:00
Nobuyoshi Nakada 8bfc46a9a3
Fixed wrong usage of file2lastrev.rb 2019-09-07 11:59:19 +09:00
Takashi Kokubun 9c0626fa90
Upgrade benchmark-driver to v0.15.4
Fixing a bug on Windows introduced in v0.15.0
2019-09-07 09:14:33 +09:00
Takashi Kokubun bb53ddfe0e
Upgrade benchmark-driver to v0.15.3
It got some nice features for better support of
benchmark_driver-output-charty, Windows, ridk, and rbenv.
2019-09-07 00:43:38 +09:00
Takashi Kokubun e13da00824
Explain how to run an individual btest in help 2019-09-03 01:25:59 +09:00
Takashi Kokubun 04c3e34456
Upgrade benchmark-driver for keyword args warnings 2019-09-01 19:26:23 +09:00
Kazuhiro NISHIYAMA 972222c039
Show MFLAGS to check `Set ENV` in .github/workflows/ubuntu.yml 2019-08-26 17:45:18 +09:00
Nobuyoshi Nakada 44bead391f
CPPFLAGS is not needed for link 2019-08-26 16:54:10 +09:00
Nobuyoshi Nakada 2614653622
Moved INCFLAGS to XCFLAGS from CPPFLAGS as well as mswin
Rules which have used CPPFLAGS will need XCFLAGS or INCFLAGS now.
2019-08-26 16:54:10 +09:00
Nobuyoshi Nakada fafabe2f43
Add INCFLAGS for fake.rb
INCFLAGS is not included in CPPFLAGS on mswin, not to be exported
to rbconfig.rb.
2019-08-26 16:11:53 +09:00
Nobuyoshi Nakada b4d6d9c167
Removed unnecessary flags for fake.rb
Flags for ruby core such as warning and `_FORTIFY_SOURCE` macro
are not necessary to make fake.rb, except for `RUBY_EXPORT` macro
which prevents to include ruby/backward.h.
2019-08-26 13:14:01 +09:00
Hiroshi SHIBATA 1940347fdf
Use () instead of {} for nmake 2019-08-22 08:21:43 +10:00
Hiroshi SHIBATA 2d8d6345ff
`--fomart progress` is default. It's duplicated. 2019-08-22 08:03:54 +10:00
Hiroshi SHIBATA 0b0fedad70
Introduce test-bundler-parallel task. 2019-08-22 08:02:48 +10:00
David Rodríguez 5a384e2c08 Fix some bundler specs (#2380)
* These seem to consistenly pass already

* Show actual command when running `make test-bundler`

Current the setup command that installs the necessary gems for testing
bundler was printed, but not the actual command that runs the tests.
That was a bit confusing.

* Borrow trick from setproctitle specs

* A title that long doesn't get set sometimes

No idea why, but the test doesn't need that the title is that long.

* Fix most gem helper spec ruby-core failures

* Fix the rest of the gem helper failures

* Fix version spec by improving the assertion

* Remove unnecessary `BUNDLE_RUBY` environment var

We can use `RUBY` when necessary, and `BUNDLE_RUBY` is not a good name
because bundler considers `BUNDLE_*` variables as settings.

* Rename `BUNDLE_GEM` to `GEM_COMMAND`

This is more descriptive I think, and also friendlier for bundler
because `BUNDLE_` env variables are interpreted by bundler as settings,
and this is not a bundler setting.

This fixes one bundler spec failure in config specs against ruby-core.

* Fix quality spec when run in core

Use the proper path helper.

* Fix dummy lib builder to never load default gems

If a dummy library is named as a default gem, when requiring the library
from its executable, the default gem would be loaded when running from
core, because in core all default gems share path with bundler, and thus
they are always in the $LOAD_PATH. We fix the issue by loading lib
relatively inside dummy lib executables.

* More exact assertions

Sometimes I have the problem that I do some "print debugging" inside
specs, and suddently the spec passes. This happens when the assertion is
too relaxed, and the things I print make it match, specially when they
are simple strings like "1.0" than can be easily be part of gem paths
that I print for debugging.

I fix this by making a more exact assertion.

* Detect the correct shebang when ENV["RUBY"] is set

* Relax assertion

So that the spec passes even if another paths containing "ext" are in
the load path. This works to fix a ruby-core issue, but it's a better
assertion in general. We just want to know that the extension path was
added.

* Use folder structure independent path helper

It should fix this spec for ruby-core.

* Fix the last failing spec on ruby-core

* Skip `bundle open <default_gem>` spec when no default gems
2019-08-20 09:46:31 +09:00
Nobuyoshi Nakada 7bb0a7d7cb
Prefer exact ITEM to benchmark 2019-08-18 00:34:12 +09:00
Koichi Sasada 3b39cc6b03 gc.h is required on mswin build.
thread.c requires gc.h on mswin build. Sorry.
2019-08-09 14:11:24 +09:00
Koichi Sasada 6bf8db9a07 add rp() and bp() in internal.h.
debug utility macro rp() (rp_m()) and bp() are introduced.
* rp(obj) shows obj information w/o any side-effect to STDERR.
* rp_m(m, obj) is similar to rp(obj), but show m before.
* bp() is alias of ruby_debug_breakpoint(), which is registered
  as a breakpoint in run.gdb (used by `make gdb` or make gdb-ruby`).
2019-08-09 14:01:15 +09:00
Koichi Sasada 37eefb11fb remove useless include and dependency 2019-08-09 13:08:01 +09:00
Takashi Kokubun 0176e74d6c
Add missing dependency
just fix CI failure
https://travis-ci.org/ruby/ruby/jobs/569625233
2019-08-09 11:39:24 +09:00
Takashi Kokubun 0d2aa6fec9
Upgrade benchmark-driver version
as I already started to use --runner=block introduced in v0.14.20 like:
https://github.com/ruby/ruby/pull/2321#issuecomment-518638663
2019-08-07 22:11:53 +09:00
Nobuyoshi Nakada ceb9e276b9
Shorten dependency hint [ci skip] 2019-07-30 21:16:30 +09:00
Nobuyoshi Nakada e25088488b
Hint for the dependency update [Bug #16000] 2019-07-30 17:23:42 +09:00
Nobuyoshi Nakada 8e53d18e67
Separated tool/test/runner.rb and test/runner.rb
As `make test-tool` does not use gems, and no Rubygems stuffs is
needed, so moved such things to test/runner.rb.  Also no longer
nees `--test-target-dir` option.
2019-07-25 16:57:38 +09:00
Nobuyoshi Nakada 0338c44bde
Retry to update Unicode timestamp 2019-07-23 17:39:03 +09:00
Nobuyoshi Nakada f6461fa890
Only the first argument can be --test-target-dir option
Raise the proper exception when that option is not given but
non-option argument is.
2019-07-22 13:07:03 +09:00
Yusuke Endoh 08ea924043 common.mk: `make check` now includes `make test-tool`
And `make test-tool` includes `make test-testframework`.

This change may be arguable because I'm unsure who is an intended user
of `make check`: a normal user, or Ruby-core developer.  Normal users
don't have to run `make test-tool` for testing their installation, but
Ruby committers should run it before they commit anything.

In this case, I'd be conservative; `make check` includes `test-tool`.
If normal users often report a failure of `make test-tool`, then we can
consider to split `make check` for two sets of target users.
2019-07-21 22:30:15 +09:00
Yusuke Endoh 24712eeec3 tool/test/runner.rb: support --test-target-dir option
tool/test/runner.rb had been copied from test/runner.rb.
test/runner.rb was for `make test-all`, and tool/test/runner.rb was for
`make test-testframework` and `make test-tool`.
But I want to avoid the code clones.

This change makes tool/test/runner.rb support --test-target-dir option
which allows tool/test/runner.rb to run `make test-all`.
Now we can remove test/runner.rb.
2019-07-21 19:19:08 +09:00
Hiroshi SHIBATA d285579ea7
Update simplecov and doclie to the latest version. 2019-07-21 09:46:49 +09:00
Takashi Kokubun 56b957e88a
Upgrade benchmark-driver.gem again
because v0.14.18 was actually not working with `make run`.
In `make run`, `Gem` is defined but `Gem::Version` isn't.
v0.14.19 checks `defined?(Gem::Version)` instead of `defined?(Gem)`.
2019-07-20 15:27:58 +09:00
Takashi Kokubun 8a38eff2bd
Upgrade benchmark-driver.gem version
This is to make `make run` with benchmark/lib/load.rb work for ko1
https://github.com/benchmark-driver/benchmark-driver/compare/v0.14.17...v0.14.18
2019-07-20 15:13:03 +09:00
Samuel Williams 7291fef55c
Improve build process and coroutine implementation selection. 2019-07-18 20:54:54 +12:00
Nobuyoshi Nakada 8e37ef76f6
Fixed the library path for tools 2019-07-16 08:46:38 +09:00
Hiroshi SHIBATA d02f2fc3e2
Added help message for test-tool target. 2019-07-15 11:19:13 +09:00
Hiroshi SHIBATA ac6d137157
Added test-tool target for the test suite of tool/test files. 2019-07-15 11:16:29 +09:00
Takashi Kokubun 0a417248a0
Fix unaligned help output
1f99274ccf was indenting details with a
hard tab, but other lines are using spaces.
2019-07-15 08:38:09 +09:00
Takashi Kokubun 02c4ed4a7f
Stop consuming 2 entries for goruby
similar to 364f43ab7f and
13cb9e6bd2
2019-07-15 08:36:53 +09:00
Hiroshi SHIBATA 1f99274ccf
Added the bundled gems target to make help. 2019-07-15 08:19:56 +09:00
Yusuke Endoh 13cb9e6bd2 common.mk: remove "make exam" from help
Currently it is completely the same as "make check".
I think it is not worth mentioning now.
2019-07-15 08:19:21 +09:00