summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-11-16make a func static.ko1
* vm_method.c (rb_resolve_refined_method_callable): make it static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16make funcs static.ko1
* thread.c (rb_threadptr_trap_interrupt): make it static and remove `rb_` prefix. * thread.c (rb_threadptr_pending_interrupt_active_p): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16make funcs static.ko1
* node.c: make them static: * rb_node_buffer_new * rb_node_buffer_free git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16make a func static.ko1
* addr2line.c (main_exe_path): make it static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16remove unused func.ko1
* gc.c (rb_garbage_collect): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16make a func static.ko1
* vm_eval.c (rb_f_block_given_p): make it static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16make a func static.ko1
* vm_eval.c (rb_f_public_send): make it static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16remove unused function.ko1
* vm_method.c (rb_method_entry_with_refinements): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16make a func static.ko1
* vm.c (rb_proc_create_from_captured): make this func static and renmae with vm_ prefix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16export rb_tracearg_callee_id().ko1
* include/ruby/debug.h (rb_tracearg_callee_id): export. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16make a func static.ko1
* vm_eval.c (rb_raise_method_missing): make this func static and renmae with vm_ prefix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16make it static.ko1
* vm.c (rb_thread_mark): now file local. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16provide rb_vm_make_proc/lambda().ko1
* vm.c (rb_vm_make_proc): removed. * vm_core.h: provide utility inline functions * rb_vm_make_proc() * rb_vm_make_lambda() to call rb_vm_make_proc_lambda(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16remove unused function.ko1
* vm_insnhelper.c (rb_vm_env_write): remove unused function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16accepts `ec` as first parameter.ko1
* vm_insnhelper.c (vm_check_match): accepts `ec` as first parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16fix r60792.ko1
* error.c (warning_string): `file` is already cstr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16`rb_source_loc` -> `rb_source_location_cstr`ko1
* vm.c (rb_source_loc): rename to rb_source_location_cstr() to make behavior clear compare with rb_source_location(). * error.c (warning_string): use rb_source_location_cstr() directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16fix r60789.ko1
* vm.c (rb_source_loc): fix condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16parse.y: no return in classnobu
* parse.y (k_return): prohibit return in class/module body except for singleton class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16rb_source_location() may return nil.ko1
* vm.c (rb_source_location): return nil if path is not found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16remove an unused function.ko1
* vm.c (rb_sourcefilename): removed because nobody use it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16add `ec` as first parameter.ko1
* vm.c (vm_svar_get): accepts `ec` as first parameter. * vm.c (vm_svar_set): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16fix up r60782 and r60783.ko1
* cont.c (cont_restore_thread): re-check a condition (pointed by nobu). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16Add a last location to branch coverageyui-knk
* compile.c (DECL_BRANCH_BASE, ADD_TRACE_BRANCH_COVERAGE): Add a last location to arguments. * compile.c (compile_if, compile_case, compile_case2, compile_loop, iseq_compile_each0): Pass a last location to macros. * ext/coverage/coverage.c (branch_coverage): Add a last location to a return value. * test/coverage/test_coverage.rb: Follow-up these changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16Regexp#===: Use `\A` and `\z` instead of `^` and `$`kazu
[ci skip] ref https://github.com/rurema/doctree/pull/812 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16avoid duplicated-cond compile error.ko1
* cont.c (cont_restore_thread): fix duplicated-cond compile error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16cleanup hook cleanup code.ko1
* vm_trace.c: before this patch, deleted hooks are remvoed at *the beggining* of hooks (exec_hooks_precheck). This patch cleanup deleted hooks at (1) just after hook is deleted (TracePoint#disable and so on) (2) just after executing hooks (exec_hooks_postcheck) Most of time (1) is enough, but if some threads running hooks, we need to wait cleaning up deleted hooks until threads finish running the hooks. This is why (2) is introduced (and this is why current impl cleanup deleted hooks at the beggining of hooks). * test/lib/tracepointchecker.rb: check also the number of delete waiting hooks. * cont.c (cont_restore_thread): fix VM->trace_running count. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16parse.y: Fix location of asgn nodeyui-knk
* parse.y (new_op_assign_gen): Fix location of asgn node. Assignable node (e.g. NODE_LASGN) is generated before rhs is generated, so we reset the location when nd_value of asgn is fixed. e.g. : ``` a -= 10 ``` * Before ``` NODE_DASGN_CURR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 1) ``` * After ``` NODE_DASGN_CURR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 7) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16parse.y: Preserve previous line and restore it when read '\n'yui-knk
* parse.y (parser_params): Add prevline to store previous line. * parse.y (yycompile0): Initialize prevline with 0. * parse.y (parser_nextline): Store previous line on prevline. * parse.y (parser_nextc): Check parser is on EOF or has nextline. Now parser_yylex does not always set lex_p as lex_pend, we should check EOF flag and nextline is set. * parse.y (parser_yylex): Restore previous line, set lex_p and tokp on '\n'. Before this commit, tokp is on the head of next line of '\n' and lex_p is on the tail of next line when next token is '\n'. By this behavior, in some case the last column of NODE_CALL (or NODE_QCALL) is set to the last column of next line. NODE_CALL can be generated via `primary_value call_op operation2 {} opt_paren_args` and opt_paren_args can be none. If none is generated with next token '\n', the last column of none is set to the last column of next line. e.g. : ``` a.b cd.ef ``` The location of NODE_CALL of first line is set to, * Before ``` NODE_CALL (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 6) ``` * After ``` NODE_CALL (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 3) ``` * parse.y (parser_mark): GC mark prevline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-15* 2017-11-16svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-15Bump rake-12.3.0 on bundled gems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-15Remove redundant last newline [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-15remove rb_thread_t::event_hooks.ko1
* vm_core.h (rb_thread_t): remove rb_thread_t::event_hooks. * vm_trace.c: all hooks are connected to vm->event_hooks and add rb_event_hook_t::filter::th to filter invoke thread. It will simplify invoking hooks code. * thread.c (thread_start_func_2): clear thread specific trace_func. * test/ruby/test_settracefunc.rb: add a test for Thread#add_trace_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-15tmpdir.rb: merged make_tmpname to createnobu
* lib/tmpdir.rb (Dir::Tmpname#create): try conversion of prefix and suffix just once before loop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-15dir.c: revert r60772, r60770, and r60769normal
Using readdir(3) without any locking causes thread-safety problems if directory streams get shared between threads. On ancient platforms, readdir(3) may have thread-safety problems even on different directory streams. Using readdir_r(3) is not viable, either, as it's deprecated due to name overflow problems. So for now, rely on GVL as in previous Rubies and perhaps consider per-"struct dir_data" mutexes for modern platforms which allow concurrent calls to readdir(3) on different directory streams. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-15thread.c: use ecnobu
* thread.c (call_without_gvl): use execution context for RUBY_VM_CHECK_INTS_BLOCKING. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-15Cannot call rb_thread_call_without_gvl before running VMusa
* dir.c (readdir_without_gvl): check the VM is already initialized before calling rb_thread_call_without_gvl(). [Bug #14108] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-15fix uninitialized memory reference.ko1
* compile.c (iseq_set_sequence): clear kwargs (in ci_entries) memory area. kwargs ci entries are initialized by compiler. However, sometimes these initializations are skipped because corresponding calls are eliminated by some optimizations (for example, `if true` syntax elimnates else code). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-15nogvl readdir make SEGV on Windowsusa
* dir.c (readdir_without_gvl): workaround for Windows. [Bug #14108] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14dir.c: release GVL around remaining readdir callsnormal
Release GVL around all remaining readdir calls from the Dir class to prevent pathological stalls on slow filesystems in multi-threaded applications. opendir, rewinddir, closedir calls are not affected yet, but will be changed in future commits. In the future, further work may be done consolidate multiple GVL releasing calls to reduce overhead, similar to how changes to Dir.empty? were made in r60111 * dir.c (nogvl_readdir): new function (readdir_without_gvl): ditto (dir_read): s/READDIR/readdir_without_gvl/ (dir_each_entry): ditto (glob_helper): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14compile.c: fixup TRACEnobu
* compile.c (remove_unreachable_chunk): ignore TRACE elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14* 2017-11-15svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14parse.y: zero codepointsnobu
* parse.y (parser_tokadd_utf8): relax restriction to allow zero or more codepoints. fixup r59417. https://github.com/ruby/ruby/commit/7e8b910#commitcomment-25602670 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14rewrite only if changed.ko1
* vm_trace.c (update_global_event_hook): rewrite ISeqs only when effective events are changed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14fix prefix.ko1
* compile.c: the following functions accept LINK_ELEMENT so rename to `ELEM_` prefix names: * INSERT_ELEM_NEXT -> ELEM_INSERT_NEXT * INSERT_ELEM_PREV -> ELEM_INSERT_PREV * REPLACE_ELEM -> ELEM_REPLACE * REMOVE_ELEM -> ELEM_REMOVE git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14remove `trace` instruction. [Feature #14104]ko1
* tool/instruction.rb: create `trace_` prefix instructions. * compile.c (ADD_TRACE): do not add `trace` instructions but add TRACE link elements. TRACE elements will be unified with a next instruction as instruction information. * vm_trace.c (update_global_event_hook): modify all ISeqs when hooks are enabled. * iseq.c (rb_iseq_trace_set): added to toggle `trace_` instructions. * vm_insnhelper.c (vm_trace): added. This function is a body of `trace_` prefix instructions. * vm_insnhelper.h (JUMP): save PC to a control frame. * insns.def (trace): removed. * vm_exec.h (INSN_ENTRY_SIG): add debug output (disabled). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14process.c: removed preserving_errnonobu
* process.c (try_with_sh, handle_fork_error): added argument for errno. * process.c (proc_exec_cmd, proc_exec_sh, exec_async_signal_safe): now return errno instead of -1. * process.c (rb_fork_ruby): merged retry_fork_ruby() and unified clean-up after fork regardless failure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14string.c: prefer rb_syserr_failnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14common.mk: add dependencies for iseq.hnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-14compile.c: comments for concatstrings optimization [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e