summaryrefslogtreecommitdiff
path: root/tool
AgeCommit message (Collapse)Author
2019-11-12Strip the last line which become trailing spacesNobuyoshi Nakada
2019-11-12Get rid of `__` prefix which is presereved by C standardNobuyoshi Nakada
2019-11-12tool/lib/leakchecker.rb: show the code location that allocated leaked fdYusuke Endoh
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-12format-release uses the result of GitHub ActionsNARUSE, Yui
2019-11-12Always use git.ruby-lang.org as originNARUSE, Yui
naruse sets remote.origin.pushUrl = nonexistent as fail-safe configuration to avoid accidentally push a new branch to origin.
2019-11-11Revert "Revert "Promote uri to default gems""Hiroshi SHIBATA
This reverts commit fdfad905227a0e2e4c224d87181041fb75d5082e. f1f27da6c457684fdbfc0352297e6847f675ce4c resolved this.
2019-11-11__builtin_inline!Koichi Sasada
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-11Remove binary data at installationNobuyoshi Nakada
And revert "Relaxed warning assertions", 6f9be8505d172b110ec449478a791d70b9b74afb.
2019-11-09Remove unneeded exec bits from some filesDavid Rodríguez
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' _ {} \; ``` Notes: Merged: https://github.com/ruby/ruby/pull/2662
2019-11-09Revert "Promote uri to default gems"Hiroshi SHIBATA
This reverts commit c5b4d2a2592942766dc2789f46105b91eba7026a. This commit affects with activation feature of RubyGems. [Bug #16337][ruby-core:95768]
2019-11-09Full-path of builtin scripts no longer neededNobuyoshi Nakada
2019-11-09Add debug printKazuhiro NISHIYAMA
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-09Promote uri to default gemsHiroshi SHIBATA
2019-11-09Promote yaml to default gemsHiroshi SHIBATA
2019-11-09Promote timeout to default gemsHiroshi SHIBATA
2019-11-09Promote observer to default gems. But not yet releasedHiroshi SHIBATA
2019-11-09Promote readline to default gems named readline-extHiroshi SHIBATA
2019-11-09Added gemspec for readline gem that is wrapper library for reline and ↵Hiroshi SHIBATA
readline extension
2019-11-09Revert "don't embed full-path."Koichi Sasada
This reverts commit dfac2e9eb3d697e56d91151584f1d3cf9d2c79c9. It does not work if cwd is different from builddir...
2019-11-09don't embed full-path.Koichi Sasada
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-09Prettify builtin_binary formatNobuyoshi Nakada
2019-11-08tool/mk_builtin_loader.rb: check if op is an array or notYusuke Endoh
The insn array includes not only an array but also some literal objects.
2019-11-08Add file mode to generated files [ci skip]Nobuyoshi Nakada
2019-11-08Renamed `load_*.inc` as `*.rbinc` to utilize a suffix ruleNobuyoshi Nakada
2019-11-08Stop compiling if type mismatch was found.Koichi Sasada
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-08use builtin for TracePoint.Koichi Sasada
Define TracePoint in trace_point.rb and use __builtin_ syntax. Notes: Merged: https://github.com/ruby/ruby/pull/2655
2019-11-08support builtin features with Ruby and C.Koichi Sasada
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. Notes: Merged: https://github.com/ruby/ruby/pull/2655
2019-11-07extend rb_call_cache卜部昌平
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 Notes: Merged: https://github.com/ruby/ruby/pull/2583
2019-11-07Promote cgi to default gemsHiroshi SHIBATA
2019-11-07Promote net-smtp to default gemsHiroshi SHIBATA
2019-11-07Promote net-pop to default gemsHiroshi SHIBATA
2019-11-07Promote benchmark to default gemsHiroshi SHIBATA
2019-11-07Promote delegate to default gemsHiroshi SHIBATA
2019-11-07Promote pstore to default gemsHiroshi SHIBATA
2019-11-07Fixed an Errno::ENOENT with non-test librariesHiroshi SHIBATA
2019-11-07Promote open3 to default gemsHiroshi SHIBATA
2019-11-07fallback standard structure library to sync_lib_gem methodHiroshi SHIBATA
2019-11-07Promote singleton to default gemsHiroshi SHIBATA
2019-11-05Do not occupy `ARGV` by XRUBY commandNobuyoshi Nakada
Instead run test-bundled-gems.rb by `ENV['RUBY']`, which should be set by runruby.rb. Notes: Merged: https://github.com/ruby/ruby/pull/2646
2019-11-04sync_default_gems.rb: Show the progress at fetchingNobuyoshi Nakada
It looks like hanging up when fetching from a remote first time.
2019-10-31Fixed the sync task for jsonHiroshi SHIBATA
* Ignode to change ext/json/depend * Fixed to ignore json_pure files
2019-10-31Try to run assert_output_unchanged with racc testsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/2635
2019-10-30Update the latest structure for racc upstreamHiroshi SHIBATA
2019-10-29tool/lib/minitest/unit.rb: add "omit" as an alias to "skip"Yusuke Endoh
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.
2019-10-28test-bundled-gems.rb: fixed for out-of-place buildNobuyoshi Nakada
2019-10-25more on struct rb_call_data卜部昌平
Replacing adjacent struct rb_call_info and struct rb_call_cache into a struct rb_call_data.
2019-10-24Combine call info and cache to speed up method invocationAlan Wu
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] Notes: Merged: https://github.com/ruby/ruby/pull/2564
2019-10-24Fixed sync path of e2mmap structure for gemspec.Hiroshi SHIBATA
2019-10-23Catch syntax error even if fatalNobuyoshi Nakada
2019-10-22tool/release.sh uses ruby-actions' resultNARUSE, Yui
https://github.com/ruby/actions