aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Parse the source in SCRIPT_LINES__ as arraynobu2018-11-103-8/+57
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Check the argument before creating a parsernobu2018-11-101-29/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Parse the source in SCRIPT_LINES__ if possiblenobu2018-11-101-2/+21
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix potential NULL pointer access [ci skip]nobu2018-11-101-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-11-10svn2018-11-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c (rb_sigwait_sleep): add note about spurious wakeupnormal2018-11-091-0/+3
| | | | | | | I already forgot why we needed to jump through such hoops :x [ruby-core:88102] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Get rid of setting SCRIPT_LINES__ by AST.parsenobu2018-11-093-6/+33
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Hoisted out rb_ast_parse_str and rb_ast_parse_filenobu2018-11-091-1/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove unused default value of MJIT_CC [ci skip]kazu2018-11-091-1/+1
| | | | | | because always set `MJIT_CC` at `: ${MJIT_CC=$CC}` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c: fix compilation for i386-darwinnobu2018-11-091-12/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* util.c: suppress warningsshyouhei2018-11-091-0/+2
| | | | | | | | These functions handle overflows correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: avoid division by zeroshyouhei2018-11-091-11/+43
| | | | | | | | | | | | | | | | | | | In C, division by zero is undefined, even if the expression is double (cf: ISO/IEC 9899:1990 section 6.3.5). OTOH we have tests about such operations and results, means we expect no exceptional situation shall occur. We need to carefully reroute the situation, and generate what is needed. See also: https://travis-ci.org/ruby/ruby/jobs/452680646#L2943 PS: Recently (last two decades), C have Annex. F document. It normatively specifies that the division operator is IEEE 754's division operator (cf: ISO/IEC 9899:1999 section F.3). If we could move to such newer version this could be no problem. But that is not possible today. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Rename `AST` module to `AbstractSyntaxTree`yui-knk2018-11-093-37/+37
| | | | | | Follow the same naming convention of `InstructionSequence` class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2018-11-092-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* There is a path to use bmethod with ifunc.ko12018-11-092-6/+8
| | | | | | | | * vm_insnhelper.c (vm_yield_with_cfunc): use passed me as bmethod. We also need to set `VM_FRAME_FLAG_BMETHOD` if needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-11-09svn2018-11-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2018-11-091-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix passing wrong `passed_bmethod_me`.ko12018-11-093-17/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vm_core.h: remove `rb_execution_context_t::passed_bmethod_me` and fix functions to pass the `me` directly. `passed_bmethod_me` was used to make bmethod (methods defined by `defined_method`). `rb_vm_invoke_bmethod` invoke `Proc` with `me` information as method frame (`lambda` frame, actually). If the proc call is not bmethod call, `passed_bmethod_me` should be NULL. However, there is a bug which passes wrong `me` for normal block call. http://ci.rvm.jp/results/trunk-asserts@silicon-docker/1449470 This is because wrong `me` was remained in `passed_bmethod_me` (and used incorrectly it after collected by GC). We need to clear `passed_bmethod_me` just after bmethod call, but clearing is not enough. To solve this issue, I removed `passed_bmethod_me` and pass `me` information as a function parameter of `rb_vm_invoke_bmethod`, `invoke_block_from_c_proc` and `invoke_iseq_block_from_c` in vm.c. * vm.c (invoke_iseq_block_from_c): the number of parameters is too long so that I try to specify `ALWAYS_INLINE`. * vm.c (invoke_block_from_c_proc): ditto. * vm_insnhelper.c (vm_yield_with_cfunc): now there are no pathes to use bmethod here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* st.c: bin might be zeroshyouhei2018-11-081-1/+1
| | | | | | | | | When EMPTY_OR_DELETED_BIN_P(bin) is true, it is a wrong idea to subtract ENTRY_BASE from it. Delay doing so until we are sure to be safe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2018-11-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: avoid integer overflow at process exitshyouhei2018-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is rather nitpicking but at the moment the process terminates, heap_pages_final_slots overflows. (lldb) bt * thread #1: tid = 0xc0903, 0x00000001002b3bf7 miniruby`finalize_list(objspace=0x0000000101c09240, zombie=4329149840) + 999 at gc.c:2946, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x00000001002b3bf7 miniruby`finalize_list(objspace=0x0000000101c09240, zombie=4329149840) + 999 at gc.c:2946 frame #1: 0x000000010026a69e miniruby`rb_objspace_call_finalizer(objspace=0x0000000101c09240) + 7118 at gc.c:3092 frame #2: 0x0000000100268ac5 miniruby`rb_gc_call_finalizer_at_exit + 149 at gc.c:3015 frame #3: 0x00000001002272bc miniruby`ruby_finalize_1 + 156 at eval.c:146 frame #4: 0x00000001002282b6 miniruby`ruby_cleanup(ex=0) + 4070 at eval.c:238 frame #5: 0x0000000100228785 miniruby`ruby_run_node(n=0x0000000102060ad8) + 85 at eval.c:317 frame #6: 0x0000000100000b9c miniruby`main(argc=2, argv=0x00007fff5fbfdc38) + 124 at main.c:42 frame #7: 0x00007fff9966a5ad libdyld.dylib`start + 1 frame #8: 0x00007fff9966a5ad libdyld.dylib`start + 1 (lldb) p objspace->heap_pages (rb_objspace::(anonymous struct)) $0 = { sorted = 0x0000000101c070b0 allocated_pages = 24 allocatable_pages = 0 sorted_length = 24 range = { [0] = 0x0000000102020028 [1] = 0x00000001020dbfd0 } freeable_pages = 0 final_slots = 0 deferred_final = 4329149840 } (lldb) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: +(-1) is a wrong ideashyouhei2018-11-081-1/+5
| | | | | | | | | | | | | Before this changeset RHASH_ARRAY_SIZE_DEC() was expaneded to include an expression like `RHASH_ARRAY_SIZE+(-1)`. RHASH_ARRAY_SIZE is by definition unsigned int. -1 is signed, of course. Adding a signed and an unsigned value requires the "usual arithmetic conversions" (cf: ISO/IEC 9899:1990 section 6.2.1.5). -1 is converted to 0xFFFF by that. This patch prevents that conversion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_core.h: conform C90k0kubun2018-11-081-1/+1
| | | | | | https://travis-ci.org/ruby/ruby/jobs/452230859 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* avoid (size_t)-- (2nd try)shyouhei2018-11-082-2/+7
| | | | | | | | | | | The decrements overflow and these variables remain ~0 when leaving the while loops. They are not fatal by accident, but better replace with ordinal for loops. See also: https://travis-ci.org/ruby/ruby/jobs/452218871#L3246 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rubygems/indexer.rb: suppress random test-all errork0kubun2018-11-081-1/+8
| | | | | | | | by bundler. Similar to r65613, but fixing this more carefully because here is not just inside tests but inside rubygems code. http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/1448239 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* initialize VM postponed_job first. [Bug #15288]ko12018-11-082-8/+3
| | | | | | | | * inits.c: call `Init_vm_postponed_job` first because postponed_job is used by transient heap. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* svn merge -r 65625:65623 .shyouhei2018-11-082-7/+2
| | | | | | | Was breaking make test-all git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .travis.yml: simplify travis matrix descriptionk0kubun2018-11-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* st.c: fix comparison between signed and unsignedshyouhei2018-11-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* avoid (size_t)--shyouhei2018-11-082-2/+7
| | | | | | | | | | | The decrements overflow and these variables remain ~0 when leaving the while loops. They are not fatal by accident, but better replace with ordinal for loops. See also: https://travis-ci.org/ruby/ruby/jobs/452218871#L3246 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2018-11-081-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* separate Thread type (func or proc) explicitly.ko12018-11-084-70/+126
| | | | | | | | | | | | | | | | | | | | | | | | | * vm_core.h (rb_thread_struct): introduce new fields `invoke_type` and `invoke_arg`. There are two types threads: invoking proc (normal Ruby thread created by `Thread.new do ... end`) and invoking func, created by C-API. `invoke_type` shows the types. * thread.c (thread_do_start): copy `invoke_arg.proc.args` contents from Array to ALLOCA stack memory if args length is enough small (<8). We don't need to keep Array and don't need to cancel using transient heap. * vm.c (thread_mark): For func invoking threads, they can pass (void *) parameter (rb_thread_t::invoke_arg::func::arg). However, a rubyspec test (thread_spec.c) passes an Array object and it expect to mark it. Clealy it is out of scope (misuse of `rb_thread_create` C-API). However, I'm not sure someone else has such kind of misunderstanding. So now we mark conservatively this (void *) arg with rb_gc_mark_maybe. This misuse is found by this error log. http://ci.rvm.jp/results/trunk-theap-asserts@silicon-docker/1448164 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* st.c: straight-forward comparison of charactersshyouhei2018-11-081-10/+10
| | | | | | | | | | | These functions are used in strcasehash, which is used to store encoding names. Encoding names often include hyphens (e.g. "UTF-8"), and ` '-' - 'A' ` is negative (cannot express in unsigned int). Don't be tricky, just do what to do. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_ftp.rb: extend timeout for --jit-wait testingk0kubun2018-11-081-1/+1
| | | | | | | to avoid random failures like https://app.wercker.com/ruby/ruby/runs/mjit-test1/5be394b818310600284f2b50?step=5be394f1591ca800079b1329 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/socket/init.c (wait_connectable): bail out early on some errorsnormal2018-11-081-1/+20
| | | | | | | | This becomes necesary if sockets become non-blocking by default <https://bugs.ruby-lang.org/issues/14968>; but it's always been possible to make sockets non-blocking anyways. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refine parse_ratnobu2018-11-082-25/+43
| | | | | | | | | | * rational.c (read_num): return the exponent instead of the divisor, to get rid of huge bignums. * rational.c (parse_rat): subtract exponents instead of reduction of powers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: compile error than rb_bug [ci skip]nobu2018-11-081-4/+11
| | | | | | | | | | * compile.c (get_local_var_idx, get_dyna_var_idx): raise a compile error which is useful than rb_bug, when ID is not found. * compile.c (iseq_set_sequence): ditto when IC index overflow, with dumping generated code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* st.c: suppress integer overlow warningsshyouhei2018-11-081-0/+1
| | | | | | | | This `i += h;` overflows. Don't know the intention of the operation, so just suppress UBSAN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: Add `RubyVM::AST.of` to NEWS [ci skip]yui-knk2018-11-081-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: unreachable than rb_bug [ci skip]nobu2018-11-081-1/+1
| | | | | | | * compile.c (iseq_calc_param_size): use UNREACHABLE than rb_bug, at where never reachable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/rdoc/minitest_helper.rb: suppress bundler errork0kubun2018-11-081-1/+2
| | | | | | | | | | | maybe after bundler introduction to this repository, we randomly hit errors like: http://ci.rvm.jp/results/trunk-gc-asserts@silicon-docker/1447918 As we would require minitest in this repository anyway, it should be fine to suppress the error there. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Following up r65583. Removed VCR files when retrieving code from upstream.hsbt2018-11-071-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Clear CC_WRAPPER in other than the toplevelnobu2018-11-072-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Dir.children is available since Feature #11302. FileUtils useshsbt2018-11-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Dir.each on an internal method encapsulated on a private class `Entry_#entry`, having no '.' neither '..' entries would make now superfluous a chained reject filtering. This change can improve the performance of these FileUtils methods when the provided path covers thousands of files or directories: - chmod_R - chown_R - remove_entry - remove_entry_secure - rm_r - remove_dir - copy_entry Related: Feature #13896 https://bugs.ruby-lang.org/issues/13896 [Feature #14109][Fix GH-1754] Co-Authored-By: esparta <esparta@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-11-08svn2018-11-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Expand MJIT_CC on mswin toonobu2018-11-071-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Convert MJIT_CC to Windows path on msys toonobu2018-11-071-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs. [ci skip]svn2018-11-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add cast to suppress warnings on Solaris [ci skip]nobu2018-11-072-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* `+` sign in the path of ruby needs to be escapednobu2018-11-073-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e