aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* iseq.c: add a map from encoded insn to insn datamame2018-08-234-35/+54
| | | | | | | | | | This enhances rb_vm_insn_addr2insn which retrieves a decoded insn number from encoded insn. The insn data table include not only decoded insn number, but also its len, trace and non-trace version of encoded insn. This table can be used to simplify trace instrumentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: drop unused arraynobu2018-08-231-0/+5
| | | | | | | * compile.c (iseq_peephole_optimize): drop unused dynamic array literal, without concatenation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: drop unused stringnobu2018-08-231-0/+9
| | | | | | | * compile.c (iseq_peephole_optimize): drop unused dynamic string literal, without concatenation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove `const` warning.ko12018-08-231-1/+1
| | | | | | | | * compile.c (iseq_ibf_load): remove `const` to pass iseq as no `const` parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check trace flags at loading [Bug #14702]ko12018-08-234-4/+28
| | | | | | | | | | | | * iseq.c (iseq_init_trace): at ISeq loading time, we need to check `ruby_vm_event_enabled_flags` to turn on trace instructions. Seprate this checking code from `finish_iseq_build()` and make new function. `iseq_ibf_load()` calls this funcation after loading. * test/ruby/test_iseq.rb: add a test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Also skip on AIXnaruse2018-08-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: pop literal object in conditionnobu2018-08-221-0/+7
| | | | | | | * compile.c (compile_branch_condition): pop dynamic literal object, which is never nil/false, as the branch condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-08-23svn2018-08-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (arg_append): support NODE_ARGSCAT casemame2018-08-221-0/+5
| | | | | | | | | | Because of the lack of this case, `[*ary,1,2,3,4,5,6]` was parsed into an inefficient AST like `ary + [1,2] + [3,4] + [5,6]`. A patch from Anmol Chopra <anmolchopra@rocketbox.in>. Fixes [Bug #15018]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: remove tracecoverage instruction for line coveragemame2018-08-225-26/+19
| | | | | | | Line coverage was based on special instruction "tracecoverage". Now, instead, it uses the mechanism of trace hook [Feature #14104]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: remove coverage-related code fragmentsmame2018-08-226-31/+13
| | | | | | | | | | | | | The code fragments that initializes coverage data were scattered into both parse.y and compile.c. parse.y allocated a coverage data, and compile.c initialize the data. To remove this cross-cutting concern, this change moves the allocation from "coverage" function of parse.y to "rb_iseq_new_top" of iseq.c. For the sake, parse.y just counts the line number of the original source code, and the number is passed via rb_ast_body_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* node.h (rb_ast_t): move its field mark_ary to node_buffer_tmame2018-08-222-5/+10
| | | | | | | I want to add a new field to rb_ast_t whose size is restricted because it is an imemo. This change makes one room in rb_ast_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* prototizednobu2018-08-222-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: update "make help" so that "make check" now runs test-specmame2018-08-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c (rb_reset_coverages): remove coverage counters from all ISeqsmame2018-08-223-0/+22
| | | | | | | | | | | | | When coverage measurement is enabled, the compiler makes each iseq have a reference to the counter array of coverage. Even after coverage measurement is disabled, the reference is kept. And, if coverage measurement is restarted, a coverage hook will increase the counter. This is completely meaningless; it brings just overhead. To remove this meaninglessness, this change removes all the reference when coverage measuement is stopped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Avoid compiler depend errorkazu2018-08-224-7/+7
| | | | | | ref r64492 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Run specs against 2.3.7 to ensure version guards are correctly addederegon2018-08-211-0/+5
| | | | | | * See [Feature #15004]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@dd828d6eregon2018-08-216-56/+51
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/mspec@269f9cderegon2018-08-212-29/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Only run the spec on Linuxeregon2018-08-211-1/+1
| | | | | | * Other platforms seem to behave differently. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r64483eregon2018-08-211-5/+4
| | | | | | | | * This reverts commit 12f624b673fd1bd1782f4c52e3b6c78d033e7b84: "Try 4 times for WIN32OLE specs" * It was a machine problem, it needed to be rebooted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-08-22svn2018-08-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* AIX also timeouts the specnaruse2018-08-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add more assertions for NotImplementedError of instance methodkazu2018-08-212-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rename an argument of calc_wday.akr2018-08-211-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Re-Revert "Temporary revert "process.c: dead code when no SIGCHLD""naruse2018-08-212-7/+17
| | | | | | | This re-reverts commit r64447. The issue was machine side problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: fix syntax errornobu2018-08-211-1/+1
| | | | | | | * cont.c (struct rb_fiber_struct): fix wrong usage of BITFIELD in r64487, which caused syntax error on pre-C99 compilers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: timestamp directorynobu2018-08-211-1/+2
| | | | | | | * common.mk: timestamp files need the timestamp directory. [Bug #15015] [ruby-core:88584] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread*.c: replace GetMutexPtr with mutex_ptrnormal2018-08-212-28/+25
| | | | | | | Following ko1's lead in r59192, this gets rid of non-obvious assignments which happen inside macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: replace "GetFooPtr" macros with "foo_ptr" functionsnormal2018-08-211-20/+25
| | | | | | | Following ko1's lead in r59192, this gets rid of non-obvious assignments which happen inside macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h: remove prototype for non-existent rb_divert_reserved_fdnormal2018-08-211-3/+0
| | | | | | I forgot to remove it 3 years ago in r51576 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c (struct rb_fiber_struct): bitfields for trasnferred and statusnormal2018-08-201-2/+2
| | | | | | | On 32-bit x86, this reduces the struct from 836 to 832 bytes and brings us down to 13 (64-byte) cachelines (from 14). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread*.c: avoid unnecessary initialization for list_for_each_safenormal2018-08-202-5/+4
| | | | | | | According to r52446, it is only necessary for the current item (@i), not the `@nxt` parameter for list_for_each_safe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c: reinitialize ubf_list at forknormal2018-08-203-7/+10
| | | | | | | | | | | | | It's possible for the ubf_list_head to be populated with dead threads at fork or the ubf_list_lock to be held, so reinitialize both at startup. And while we're at it, use a static initializer at startup to save a library call and kill some ifdef. [ruby-core:88578] [Bug #15013] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/socket/test_socket.rb (timestamp_retry_rw): IO.select before recvmsgnormal2018-08-201-0/+1
| | | | | | | | | CI failures are still happening from these tests, but try to break out of it earlier instead of holding up the job. [Bug #14898] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Try 4 times for WIN32OLE specseregon2018-08-201-4/+5
| | | | | | | * They seem to fail a lot on: http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/recent.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r64471eregon2018-08-201-2/+0
| | | | | | | | | * This reverts commit 9ab04897bd06767f773b35c6958a0551981093aa: "don't run specs add at r64409 on Windows" * It doesn't seem to help: http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/recent.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-08-21svn2018-08-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove extra semicolonkazu2018-08-202-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update link to Email address specificationkazu2018-08-201-1/+1
| | | | | | | | | The current link leads to 404, I updated to the actual one. [Fix GH-1929] [ci skip] Author: Nikolay Belov <travelerspb@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/ruby/core/io/select_spec.rb: workaround stuck IO.selectnormal2018-08-201-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under pipe page memory pressure on Linux, a pipe may only be created with a single buffer[1]. And as of Linux v4.18, the fs/pipe.c::pipe_poll callback does not account for merging done in fs/pipe::pipe_write; only the number of usable buffers in the pipe. Thus it is possible for a pipe to be writable (if only by a small amount) despite IO.select saying it is not. With the default 16384 /proc/sys/fs/pipe-user-pages-soft value and the pipe having 16 pages of buffers, this issue is trivially reproducible by creating 1024 pipes in a background process before running the spec: $ ulimit -n 2053 # or something higher $ ./miniruby -e '1024.times.map { IO.pipe }; sleep' & $ make test-spec MSPECOPT=spec/ruby/core/io/select_spec.rb So, we create a new pipe we never write to for testing writability of IO.select. This may cause the test to fail with ENFILE on an overloaded system, but at least that's an obvious failure (unlike having a test get stuck). This should reduce failures on our overloaded CI machines: http://ci.rvm.jp/results/trunk-nopara@silicon-docker/1239426 [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/pipe.c?h=v4.18#n642 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_sync.c (rb_condvar_initialize): remove extra semicolonnormal2018-08-191-1/+1
| | | | | | Oops :x git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_sync.c (rb_mutex_sleep): disable interrupt checking in ensurenormal2018-08-191-16/+31
| | | | | | | | | | | | | | | | This is needed to reliably fix ConditionVariable#wait on Thread#kill [Bug #14999] because there is still a chance an interrupt could fire and prevent lock acquisition after an ensure statement. Arguably, rb_mutex_lock itself should be uninterruptible, but that already prevents bootstraptest/test_thread.rb from completing and probably breaks existing use cases. For reference, POSIX expressly forbids EINTR from pthread_mutex_lock. [ruby-core:88556] [Bug #14999] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c (rb_thread_fd_select): fix off-by-one with sigwait_fdnormal2018-08-191-1/+1
| | | | | | | select(2) needs the nfds argument to be one higher than the largest FD in the sets :x git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_sync.rb (rb_condvar_wait): golf out unnecessary variablesnormal2018-08-191-4/+1
| | | | | | | GCC is smart enough to optimize these away, but my attention span is too short :{ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-08-20svn2018-08-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_io.rb (test_select_leak): quiet unused variable warningnormal2018-08-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* don't run specs add at r64409 on Windowsnaruse2018-08-191-0/+2
| | | | | | Maybe it breaks http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20180817T095734Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* select() on all platforms for Socket#recvmsg_nonblock speceregon2018-08-191-1/+1
| | | | | | | * The specs above already do that, and Solaris needs it too: https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180819T111806Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: categorized new entries allnobu2018-08-191-45/+74
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e