summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-24Sync rubygems with current master (#2889)David Rodríguez
Notes: Merged-By: hsbt <hsbt@ruby-lang.org>
2020-03-24Add rexml to fix rss of test-bundled-gems (#2976)Kazuhiro NISHIYAMA
Notes: Merged-By: hsbt <hsbt@ruby-lang.org>
2020-03-24Show failed timesNobuyoshi Nakada
2020-03-23Try to avoid random failures on clock_getres_spec.rbTakashi Kokubun
This spec fails too often https://github.com/ruby/ruby/runs/529546249 https://github.com/ruby/ruby/runs/524933256
2020-03-23Use miniruby to run tool/mjit_tabs.rbTakashi Kokubun
hoping to fix https://github.com/ruby/actions/runs/527422022
2020-03-23Make file names and variable names consistentTakashi Kokubun
2020-03-24Moved MJIT_WITHOUT_TABS default to configure.acNobuyoshi Nakada
And then the environment variable.
2020-03-24* 2020-03-24 [ci skip]git
2020-03-24test/json/test_helper.rb: Do not add a relative path to $LOAD_PATHYusuke Endoh
... because it conflicts with test/ruby/test_m17n.rb. An exception `incompatible character encodings: UTF-8 and UTF-16BE` occurs when: * a non-existence relative path is added to $LOAD_PATH, * ASCII-incompatible encoding is set to default_external, and * some file is loaded. ``` $LOAD_PATH << "no_existing_dir" Encoding.default_external = Encoding::UTF_16BE load "dummy.rb" #=> incompatible character encodings: UTF-8 and UTF-16BE ``` This issue can be actually observed by a combination of out-of-place build and the following command: make test-all TESTS="json ruby/m17n -n test_object_inspect_external" http://ci.rvm.jp/logfiles/brlog.trunk-test-random.20200322-221411 ASCII-incompatible default external encoding assumes that the cwd is the encoding, and it is attempted to beconcatenated with a non-existence relative LOAD_PATH UTF-8 string, which causes the exception. This changeset avoids a relative path.
2020-03-22Change the filename like make variableTakashi Kokubun
for consistency
2020-03-22Make the first argument slightly more robustTakashi Kokubun
2020-03-22Change the run_without_tabs switching to dedicatedTakashi Kokubun
variable of make instead of d059714746 as requested. You can disable this like `make MJIT_WITHOUT_TABS=false` or `export MJIT_WITHOUT_TABS=false`.
2020-03-22Disable run_without_tabs when there's no -ggdb3Takashi Kokubun
in debugflags, as requested by nobu I actually wanted to check debugflags directly rather than MJIT_DEBUGFLAGS because debugflags is always used but MJIT_DEBUGFLAGS may not be always used. But I couldn't find a better way to check debugflags.
2020-03-23disable to show the maximum number of threads.Koichi Sasada
On Deiban 9 environment, the thread tests failed and this maximum threads information can finish up the machine resources. To check it, I turned-off showing this information.
2020-03-23test/ruby/test_m17n.rb: Update the debugging code to get C stacktraceYusuke Endoh
2020-03-22Expand tabs of include/ruby/ruby.h in MJIT headerTakashi Kokubun
rb_class_of is indented with tabs
2020-03-22Try asserting no static decl rather than warningTakashi Kokubun
This didn't exist in my machine, but it may exist in some CI environments.
2020-03-22Reduce the number of lines used by transform_mjit_headerTakashi Kokubun
2020-03-22Workaround an encoding problem in run_without_tabsTakashi Kokubun
It's to be fixed properly later. But this should be able to avoid the failure. https://travis-ci.org/github/ruby/ruby/jobs/665580361 https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20200322T190003Z.fail.html.gz
2020-03-22Expand tabs for rb_mjit_header.h (#2975)Takashi Kokubun
This is necessary to avoid converting a hard tab to just 1 space in preprocessor to generate rb_mjit_header.h, which is helpful when using gdb or perf report. See also: [Misc #16112] This reverts commit 91acdd17c4b4bb69a8fa3ada46e09dad46b9362e. Fixed permission failure on Travis, encoding, and added SKIPPED_FILES. Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2020-03-23test/ruby/test_m17n.rb: Make the debugging code print to stderrYusuke Endoh
The test is executed with -j8, so printing someting to stdout may break.
2020-03-23* 2020-03-23 [ci skip]git
2020-03-22Merge pull request #2721 from jeremyevans/method-inspect-chain-alias-11188Jeremy Evans
Correctly show defined class for aliases of aliases Notes: Merged-By: jeremyevans <code@jeremyevans.net>
2020-03-22Support obj.clone(freeze: true) for freezing cloneJeremy Evans
This freezes the clone even if the receiver is not frozen. It is only for consistency with freeze: false not freezing the clone even if the receiver is frozen. Because Object#clone is now partially implemented in Ruby and not fully implemented in C, freeze: nil must be supported to provide the default behavior of only freezing the clone if the receiver is frozen. This requires modifying delegate and set, to set freeze: nil instead of freeze: true as the keyword parameter for initialize_clone. Those are the two libraries in stdlib that override initialize_clone. Implements [Feature #16175] Notes: Merged: https://github.com/ruby/ruby/pull/2969
2020-03-22test/ruby/test_m17n.rb: Add a temporal code for debuggingYusuke Endoh
http://ci.rvm.jp/logfiles/brlog.trunk-test-random.20200322-221411 ``` I, [2020-03-22T22:15:50.761950 #23076] INFO -- : 1) Error: I, [2020-03-22T22:15:50.761963 #23076] INFO -- : TestM17N#test_object_inspect_external: I, [2020-03-22T22:15:50.761974 #23076] INFO -- : Encoding::CompatibilityError: incompatible character encodings: UTF-8 and UTF-16BE ```
2020-03-22test/ruby/test_fiber.rb (test_many_fibers_with_threads): relax timeoutYusuke Endoh
This test takes 40..50 seconds under Solaris 11, so the timeout (60 seconds) was too strict. This change increases it to 180 seconds. https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11-gcc/ruby-master/log/20200322T100007Z.fail.html.gz ``` 1) Error: TestFiber#test_many_fibers_with_threads: Timeout::Error: execution of assert_normal_exit expired timeout (60 sec) ```
2020-03-22Revert "Expand tabs for rb_mjit_header.h"Takashi Kokubun
This reverts commit 57119dd561418c917b885db5f5af7f129a96d1ec. Temporarily reverting for Travis failures
2020-03-22Expand tabs for rb_mjit_header.hTakashi Kokubun
I can't live without this when using gdb or perf report. See also: [Misc #16112]
2020-03-22* 2020-03-22 [ci skip]git
2020-03-22Update power_assert to 1.1.7Kazuki Tsujimoto
This update fixes test-bundled-gems failures: https://github.com/ruby/actions/actions/runs/60272820 https://github.com/ruby/actions/actions/runs/60273425
2020-03-21test/net/http/test_http.rb: relax open_timeout limitYusuke Endoh
The test fails randomly on the CI of OpenCSW SPARC Solaris 10: https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-master/log/20200321T091909Z.fail.html.gz ``` 1) Failure: TestNetHTTP_v1_2_chunked#test_timeout_during_HTTP_session [/export/home/rubyci/unstable10s/tmp/build/20200321T091909Z/ruby/test/net/http/test_http.rb:575]: [Net::ReadTimeout] exception expected, not #<Net::OpenTimeout: execution expired>. ``` The environment uses RUBY_TEST_SUBPROCESS_TIMEOUT_SCALE=20, so the open timeout 0.1 sec. means 2.0 sec. for the environment, but it seems too strict because the environment is painfully slow.
2020-03-21Removed non-RUBY_INTEGER_UNIFICATION codeNobuyoshi Nakada
2020-03-21Leave power cache table initialized as QfalseNobuyoshi Nakada
2020-03-21Show libffi version only if setNobuyoshi Nakada
2020-03-21[ci skip]Fix return type on RbConfig.fire_update!taki
Notes: Merged: https://github.com/ruby/ruby/pull/2972
2020-03-21test/openssl/test_ssl.rb: ignore SSLError when the connection is closedYusuke Endoh
"test_close_after_socket_close" checks if ssl.close is no-op even after the wrapped socket is closed. The test itself is fair, but the other endpoint that is reading the SSL connection may fail with SSLError: "SSL_read: unexpected eof while reading" in some environments: https://github.com/ruby/ruby/actions/runs/60085389 (MinGW) https://rubyci.org/logs/rubyci.s3.amazonaws.com/android28-x86_64/ruby-master/log/20200321T034442Z.fail.html.gz ``` 1) Failure: OpenSSL::TestSSL#test_close_after_socket_close [D:/a/ruby/ruby/src/test/openssl/utils.rb:299]: exceptions on 1 threads: SSL_read: unexpected eof while reading ``` This changeset rescues and ignores the SSLError in the test.
2020-03-21* 2020-03-21 [ci skip]git
2020-03-21Enablie IPv6 on Travis s390s case again.Jun Aruga
It seems the issue was fixed by Travis. See https://travis-ci.community/t/6719/5 . Notes: Merged: https://github.com/ruby/ruby/pull/2970
2020-03-19Fix typos [ci skip]Kazuhiro NISHIYAMA
2020-03-19Get rid of redefinition of `rb_execution_context_t`Nobuyoshi Nakada
Regardless of the order to include "vm_core.h" and "builtin.h".
2020-03-19.travis.yml: allow arm64-linux to fail卜部昌平
Ditto for a833eb29f7eaced61919b7ed19e830a3905e8a8b
2020-03-18Ignore TestJITDebug in mswin RubyCI for nowTakashi Kokubun
It's still pending to be implemented. To be enabled later when it's implemented.
2020-03-19* 2020-03-19 [ci skip]git
2020-03-19.travis.yml: allow arm32-linux to fail卜部昌平
It seems fragile now, seemingly due to environmental issues. Lets allow it to fail for a while. Reported by Jun Agura <jaruga@redhat.com> [ruby-core:97540]
2020-03-18Added link to the ticket [ci skip]Kazuhiro NISHIYAMA
2020-03-18* 2020-03-18 [ci skip]git
2020-03-17Reduce allocations for keyword argument hashesJeremy Evans
Previously, passing a keyword splat to a method always allocated a hash on the caller side, and accepting arbitrary keywords in a method allocated a separate hash on the callee side. Passing explicit keywords to a method that accepted a keyword splat did not allocate a hash on the caller side, but resulted in two hashes allocated on the callee side. This commit makes passing a single keyword splat to a method not allocate a hash on the caller side. Passing multiple keyword splats or a mix of explicit keywords and a keyword splat still generates a hash on the caller side. On the callee side, if arbitrary keywords are not accepted, it does not allocate a hash. If arbitrary keywords are accepted, it will allocate a hash, but this commit uses a callinfo flag to indicate whether the caller already allocated a hash, and if so, the callee can use the passed hash without duplicating it. So this commit should make it so that a maximum of a single hash is allocated during method calls. To set the callinfo flag appropriately, method call argument compilation checks if only a single keyword splat is given. If only one keyword splat is given, the VM_CALL_KW_SPLAT_MUT callinfo flag is not set, since in that case the keyword splat is passed directly and not mutable. If more than one splat is used, a new hash needs to be generated on the caller side, and in that case the callinfo flag is set, indicating the keyword splat is mutable by the callee. In compile_hash, used for both hash and keyword argument compilation, if compiling keyword arguments and only a single keyword splat is used, pass the argument directly. On the caller side, in vm_args.c, the callinfo flag needs to be recognized and handled. Because the keyword splat argument may not be a hash, it needs to be converted to a hash first if not. Then, unless the callinfo flag is set, the hash needs to be duplicated. The temporary copy of the callinfo flag, kw_flag, is updated if a hash was duplicated, to prevent the need to duplicate it again. If we are converting to a hash or duplicating a hash, we need to update the argument array, which can including duplicating the positional splat array if one was passed. CALLER_SETUP_ARG and a couple other places needs to be modified to handle similar issues for other types of calls. This includes fairly comprehensive tests for different ways keywords are handled internally, checking that you get equal results but that keyword splats on the caller side result in distinct objects for keyword rest parameters. Included are benchmarks for keyword argument calls. Brief results when compiled without optimization: def kw(a: 1) a end def kws(**kw) kw end h = {a: 1} kw(a: 1) # about same kw(**h) # 2.37x faster kws(a: 1) # 1.30x faster kws(**h) # 2.19x faster kw(a: 1, **h) # 1.03x slower kw(**h, **h) # about same kws(a: 1, **h) # 1.16x faster kws(**h, **h) # 1.14x faster Notes: Merged: https://github.com/ruby/ruby/pull/2945
2020-03-17Make {**{}} return unfrozen empty hashJeremy Evans
Previously, method call keyword splats and hash keyword splats were compiled exactly the same. This is because parse-wise, they operate on indentical nodes when it comes to compiling the **{}. Fix this by using an ugly hack of temporarily modifying the nd_brace flag in the method call keyword splat case. Inside compile_hash, only optimize the **{} case for hashes where the nd_brace flag has been modified to reflect we are in the method call keyword splat case and it is safe to do so. Since compile_keyword_args is only called in one place, move the keyword_node_p call out of that method to the single caller to avoid duplicating the code. Notes: Merged: https://github.com/ruby/ruby/pull/2945
2020-03-17Get rid of bogus warning by VCNobuyoshi Nakada
``` c:\projects\ruby\mjit_worker.c(1219) : warning C4090: 'function' : different 'const' qualifiers ``` It seems confused by passing "pointer to pointer to const object", not "pointer to const object".
2020-03-17Check if `freeze` option is givenNobuyoshi Nakada