aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* refactor newhash (revision 58463 another try) [fix GH-1600]shyouhei2017-04-277-19/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * st.c (rb_hash_bulk_insert): new API to bulk insert entries into a hash. Given arguments are first inserted into the table at once, then reindexed. This is faster than inserting things using rb_hash_aset() one by one. This arrangement (rb_ prefixed function placed in st.c) is unavoidable because it both touches table internal and write barrier at once. * internal.h: delcare the new function. * hash.c (rb_hash_s_create): use the new function. * vm.c (core_hash_merge): ditto. * insns.def (newhash): ditto. * test/ruby/test_hash.rb: more coverage on hash creation. * test/ruby/test_literal.rb: ditto. ----------------------------------------------------------- benchmark results: minimum results in each 7 measurements. Execution time (sec) name before after loop_whileloop2 0.136 0.137 vm2_bighash* 1.249 0.623 Speedup ratio: compare with the result of `before' (greater is better) name after loop_whileloop2 0.996 vm2_bighash* 2.004 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* load.c: make fstrings from C strings soonernormal2017-04-271-3/+2
| | | | | | | | | | The underlying string objects will become fstrings anyways, so create the fstring directly from the C string to reduce intermediate garbage. * load.c (rb_provide, rb_provide): create fstring git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c: send as a single stringnobu2017-04-262-2/+23
| | | | | | | | * error.c (rb_warn_m): send the arguments as a single string concatenated with a newline, so it can be filtered easily. [ruby-core:80875] [Feature #12944] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-04-27svn2017-04-261-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c: improve docsstomar2017-04-261-8/+7
| | | | | | | | * error.c: [DOC] fix rdoc formatting (make sure `Warning.warn' is displayed verbatim; rdoc would render it as a link named `#warn'), use capitalized "Ruby", fix a typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c: splat warn argumentsnobu2017-04-261-12/+2
| | | | | | | | * error.c (rb_warn_m): print array arguments with splatting. it is often used with `caller`. [ruby-core:80849] [Feature #12944] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* range.c: remove no longer used variablenobu2017-04-261-5/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_sync.c (rb_mutex_lock): spelling fix [ci skip]normal2017-04-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use require to load rbconfig in default.mspeceregon2017-04-251-1/+1
| | | | | | * Otherwise it would be loaded twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress_warningnaruse2017-04-251-3/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add timeout.ko12017-04-251-2/+11
| | | | | | | | | | * test/ruby/test_trace.rb (test_trace_stackoverflow): sometimes this test was stopped forever and killed by test process forcibly. However, this test only checks if this code cause some critical failure such as SEGV. So that we can add timeout for this code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-04-26svn2017-04-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r58478 and r58479 because they do not support not in-place buildko12017-04-252-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use require_relative to load rbconfig in default.mspeceregon2017-04-251-1/+1
| | | | | | * Otherwise it would load it twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* No need to pass the config file to mspec as mspec finds it itselferegon2017-04-251-1/+1
| | | | | | * It would also #load (because .mspec cannot be #require'd) it twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove useless else which produced a warningeregon2017-04-251-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* no longer rescue exceptions of #<=> when initializing a Rangeeregon2017-04-253-15/+16
| | | | | | | | | * range.c (range_init): no longer hide the user exception with a ArgumentError, just let the user exception go through. * test/ruby/test_range.rb (test_new): add tests. [Feature #7688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* no longer rescue exceptions of #coerce in Integer#steperegon2017-04-254-17/+8
| | | | | | | | * numeric.c (num_step_negative_p): no more error hiding. * test/ruby/test_float.rb, test/ruby/test_numeric.rb: follow the change. [Feature #7688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* no longer rescue exceptions in numeric comparison operationseregon2017-04-253-40/+14
| | | | | | | | * numeric.c (do_coerce): no more error hiding. * test/ruby/test_numeric.rb: follow the change. [Feature #7688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Import gemspechsbt2017-04-252-1/+5
| | | | | | | | | | Import gemspec and test file from ruby/webrick. * webrick.gemspec: Update files and dependency for standalone gem. * test/webrick/utils.rb: Added explicitly loading of EnvUtil for test suite without ruby core test suite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Document the Warning module and warn methoderegon2017-04-251-0/+25
| | | | | | | * error.c (Warning): add documentation. [Feature #13504] Author: Jeremy Evans <code@jeremyevans.net> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* load.c: backtrace of circular requirenobu2017-04-255-12/+53
| | | | | | | * load.c (load_lock): print backtrace of circular require via `Warning.warn` [ruby-core:80850] [Bug #13505] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Import gemspec and test file changes from ruby/gdbm.hsbt2017-04-252-14/+24
| | | | | | | | * gdbm.gemspec: Update basic configuraiton for standalone gdbm gem. * test/gdbm/test_gdbm.rb: In standalone environment, It needs to explicit loading of EnvUtil module for test suite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-04-25svn2017-04-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix macro expansion bugshyouhei2017-04-251-2/+2
| | | | | | | This previous "key" macro argument accidentally replaced `(ptr)->key` part. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/git-refresh: fix branch operationsnobu2017-04-241-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: args tail at errornobu2017-04-242-0/+8
| | | | | | | | * parse.y (new_args_tail_gen): abandon parsing arguments after error. reported by ilsani Martino Sani (ilsani) at https://hackerone.com/reports/221201 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: rb_parser_fatalnobu2017-04-241-90/+158
| | | | | | | | | * parse.y (rb_parser_fatal): abort compilation on internal parser error. rb_bug() is generic use but not useful for debugging the parser. this function dumps internal states, and continues with enabling yydebug output to stderr for the parser stack dump. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Get rid of unnecessary GCC extensionnobu2017-04-243-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert newhash refactoringshyouhei2017-04-244-124/+91
| | | | | | | | We need to fix GC bug before merging this. Revert revisions 58452, 58435, 58434, 58428, 58427 in this order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-04-24svn2017-04-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Allow Net::HTTP to fetch user/pass from http_proxynaruse2017-04-233-4/+41
| | | | | | | | Note that this feature is enabled only on environment variables are multi-user safe. In this time the list includes Linux, FreeBSD, or Darwin. [Bug #12921] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warning: shadowing outer local variablenaruse2017-04-231-7/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add diagnostic reports section header [ci skip]nobu2017-04-231-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assert_syntax_error returns the exception [ci skip]nobu2017-04-231-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Document parse.y instead of ext/ripper/ripper.cnobu2017-04-232-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/dl has been removed already [ci skip]nobu2017-04-231-4/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use $(srcdir).nobu2017-04-231-1/+1
| | | | | | | * win32/Makefile.sub (enc/jis/props.h): build it in not builddir, but in srcdir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Refactor "%f" % Inf/NaNnobu2017-04-231-18/+17
| | | | | | | * sprintf.c (rb_str_format): as for non-finite float, calculate the exact needed size with the space flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix space flag when Inf/NaN and width==3nobu2017-04-232-3/+53
| | | | | | | | * sprintf.c (rb_str_format): while `"% 2f"` and `"% 4f"` result in `" Inf"` and `" Inf"` respectively, `"% 3f"` results in `"Inf"` (no space). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mark Hash keys correctly.ko12017-04-231-6/+6
| | | | | | | | * hash.c (rb_hash_new_from_object): same as r58434. Newly created frozen objects are not referred from any roots/objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Ignore enc/jis/props.hnobu2017-04-221-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-04-23svn2017-04-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/test_prime.rb: update method name in commentstomar2017-04-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix compile_error formatnobu2017-04-221-3/+3
| | | | | | | | | * parse.y (ripper_compile_error, parser_compile_error): declare as PRINTF_ARGS attribute. * parse.y (id_is_var_gen): fix format specifier for string value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_file_exhaustive.rb: check case-sensitive fsnobu2017-04-221-2/+4
| | | | | | | | * test/ruby/test_file_exhaustive.rb (test_expand_path): dump expanded file name, not only appended char, for case-sensitive filesystem. [ruby-dev:50093] [Bug #13489] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* adjust indentnobu2017-04-221-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove nonexistent files and rename some fileskazu2017-04-221-17/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* define PACKED_STRUCT_UNALIGNED correctlynormal2017-04-222-2/+17
| | | | | | | | | | | | | | | | | | | Defining PACKED_STRUCT_UNALIGNED to a noop in ruby/config.h (via `configure') prevents the definition in include/ruby/defines.h from working This should have been fixed in r46914, so there's a size regression for some objects since Ruby 2.2+. I do not believe we can backport to existing releases, either, since it can affect ABI. Add a test for Time objects on common x86-based platforms to check for future regressions. * configure.in: remove PACKED_STRUCT_UNALIGNED definition * test/ruby/test_time.rb (test_memsize): new test for x86 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add sha512nobu2017-04-222-3/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e