| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
The insn array includes not only an array but also some literal objects.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Define TracePoint in trace_point.rb and use __builtin_ syntax.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support loading builtin features written in Ruby, which implement
with C builtin functions.
[Feature #16254]
Several features:
(1) Load .rb file at boottime with native binary.
Now, prelude.rb is loaded at boottime. However, this file is contained
into the interpreter as a text format and we need to compile it.
This patch contains a feature to load from binary format.
(2) __builtin_func() in Ruby call func() written in C.
In Ruby file, we can write `__builtin_func()` like method call.
However this is not a method call, but special syntax to call
a function `func()` written in C. C functions should be defined
in a file (same compile unit) which load this .rb file.
Functions (`func` in above example) should be defined with
(a) 1st parameter: rb_execution_context_t *ec
(b) rest parameters (0 to 15).
(c) VALUE return type.
This is very similar requirements for functions used by
rb_define_method(), however `rb_execution_context_t *ec`
is new requirement.
(3) automatic C code generation from .rb files.
tool/mk_builtin_loader.rb creates a C code to load .rb files
needed by miniruby and ruby command. This script is run by
BASERUBY, so *.rb should be written in BASERUBY compatbile
syntax. This script load a .rb file and find all of __builtin_
prefix method calls, and generate a part of C code to export
functions.
tool/mk_builtin_binary.rb creates a C code which contains
binary compiled Ruby files needed by ruby command.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this changeset, majority of inline cache mishits resulted
into the same method entry when rb_callable_method_entry() resolves
a method search. Let's not call the function at the first place on
such situations.
In doing so we extend the struct rb_call_cache from 44 bytes (in
case of 64 bit machine) to 64 bytes, and fill the gap with
secondary class serial(s). Call cache's class serials now behavies
as a LRU cache.
Calculating -------------------------------------
ours 2.7 2.6
vm2_poly_same_method 2.339M 1.744M 1.369M i/s - 6.000M times in 2.565086s 3.441329s 4.381386s
Comparison:
vm2_poly_same_method
ours: 2339103.0 i/s
2.7: 1743512.3 i/s - 1.34x slower
2.6: 1369429.8 i/s - 1.71x slower
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Instead run test-bundled-gems.rb by `ENV['RUBY']`, which should be
set by runruby.rb.
|
|
|
|
| |
It looks like hanging up when fetching from a remote first time.
|
|
|
|
|
| |
* Ignode to change ext/json/depend
* Fixed to ignore json_pure files
|
| |
|
| |
|
|
|
|
|
|
| |
According to rdoc, test-unit provides omit instead of skip.
This is a compatibility layer to make it work with both test-unit and
tool/lib/minitest.
|
| |
|
|
|
|
|
| |
Replacing adjacent struct rb_call_info and struct rb_call_cache
into a struct rb_call_data.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
| |
|
| |
|
|
|
|
| |
https://github.com/ruby/actions
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 43015275b9a7f2833c93ad11ea96ae4cb3b7acd7.
`assert_raise_message` in test-unit is different from
`assert_raise_with_message`. It checks the exception message
only, but not the exception class,
|
| |
|
|
|
|
| |
pointed out by ruby-trunk-changes
|
| |
|
|
|
|
|
| |
- `info.yml` is for ruby/www.ruby-lang.org/_data/releases.yml
- `info.json` is meta data for users of snapshot
|
|
|
|
| |
It will not use in `ruby/actions`, and `default=tmp` is not correct.
|
|
|
|
|
| |
Align mtime of files updated by `make prepare-package` to make
packages reproducible.
|
| |
|
|
|
|
| |
To get rid of setting mode and mtime of the original cache files.
|
|
|
|
|
|
| |
* Use the given branch name instead of implicit 'HEAD".
* Format like as git-svn when `from` or `to` is SVN revision
number.
|
|
|
|
| |
https://github.com/ruby/fileutils/commit/f16f5a0dd6
|
|
|
|
|
| |
This one allocation of Method object is worth avoiding. We don't
want to test UnboundMethod#bind right here. GC need not run.
|
|
|
|
|
| |
On parallel test, there are additional tests because of implicit
checkers which are enabled on 84cbce3d88.
|
| |
|
|
|
|
|
|
|
|
|
| |
parallel test (`make test-all TESTS=-j8`) runs tests on specified
number of processes. However, some test checkers written in
`runner.rb` are not loaded. This fix enable these checkers on
parallel tests.
See also: https://github.com/ruby/ruby/pull/2508
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This reverts commit c3b84f2de83a27acc638f99743bfa2c44bac621c.
Backtrace shows it is before running tests and debug check was
nonsense.
|