summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-11-18introduce `trace_events' info for iseq.ko1
* vm_core.h (rb_iseq_t::aux): add `trace_events` which represents which events are enabled on this iseq. With this information, we can skip useless trace-on changes for ISeqs. * vm_trace.c (RUBY_EVENTS_TRACE_BY_ISEQ): moved to iseq.h and rename it with ISEQ_TRACE_EVENTS. * iseq.h: introduce ISEQ_USE_COMPILE_DATA iseq (imemo) flag to represent COMPILE_DATA is available. In other words, iseq->aux.trace_events is not available when this flag is set. * ISEQ_COMPILE_DATA() is changed from a macro. * ISEQ_COMPILE_DATA_ALLOC() is added. * ISEQ_COMPILE_DATA_CLEAR() is added. * iseq.c: use them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18Cannot call rb_thread_call_with{out,}_gvl before running VMusa
* dir.c (opendir_without_gvl, with_gvl_gc_for_fd, opendir_at): check the VM is already initialized before calling rb_thread_call_with{out,}_gvl(). [Bug #14115] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18parse.y: Fix the locations of NODE_DVAR and NODE_LVARyui-knk
* parse.y: Fix the locations of NODE_DVAR and NODE_LVAR when it's a multiple assignment method parameter. e.g. The locations of NODE_DVAR is fixed: ``` a {|(b, c)| d} ``` * Before ``` NODE_DVAR (line: 1, first_lineno: 1, first_column: 4, last_lineno: 1, last_column: 10) ``` * After ``` NODE_DVAR (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 9) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18.gdbinit: fix print_pathobjktsj
$str is not C string but RString. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18.gdbinit: follow up changes in r60726ktsj
rb_iseq_constant_body::line_info_size and line_info_table have been renamed to insns_info_size, insns_info. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18parse.y: Use node_assignyui-knk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18* ext/win32ole/win32ole.c: use WIN32OLEQueryInterfaceError when failedsuke
to query com interface. * ext/win32ole/win32ole_event.c: ditto. * ext/win32ole/win32ole_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18dir.c: openat calls release GVL, toonormal
openat(2) also performs a path lookup, so it is also subject to pathological slowdowns like opendir(3) and open(2) syscalls. * dir.c (struct opendir_at_arg): new struct for callback (with_gvl_gc_for_fd): new callback for rb_thread_call_with_gvl (gc_for_fd_with_gvl): moved up (nogvl_opendir_at): extracted from do_opendir (opendir_at): new wrapper to release GVL for opendir_at (do_opendir): use new wrappers to release GVL (nogvl_dir_empty_p): adjust for gc_for_fd_with_gvl git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18dir: release GVL on opendirnormal
opendir(3) is subject to the same pathological slowdowns on slow or unreliable filesystems as open(2), so release the GVL to avoid stalling the entire VM like we do with IO#open * dir.c (nogvl_opendir): new function (opendir_without_gvl): new function (dir_initialize): s/opendir/&_without_gvl/ (do_opendir): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18Update the last location of NODE_ARRAYyui-knk
* parse.y (list_append_gen, list_concat): Update the last location of NODE_ARRAY when an item is appended or concatenated with another NODE_ARRAY. e.g. The locations of NODE_ARRAY is fixed: ``` a(1,2,3) ``` * Before ``` NODE_ARRAY (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 3) ``` * After ``` NODE_ARRAY (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 7) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17* 2017-11-18svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17Fix typo in `Timeout` doc [ci skip]kazu
Author: yuuji.yaginuma <yuuji.yaginuma@gmail.com> https://github.com/ruby/ruby/pull/1760 [Fix GH-1760] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17parse.y: RUBY_SET_YYLLOC to rb_parser_set_locationnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17parse.y: RUBY_SET_YYLLOCnobu
* parse.y (RUBY_SET_YYLLOC): extract setting locations from the source line. * parse.y (yylex): use RUBY_SET_YYLLOC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17Add examples to Set documentation [ci skip]knu
GitHub PR: https://github.com/ruby/ruby/pull/1752 [Fix GH-1752] Submitted by: @Ana06 <anamma06@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17NODE_CALL is not passed to node_assign_genyui-knk
* parse.y (node_assign_gen): NODE_CALL is not passed to node_assign_gen. NODE_CALL is not assignable. Assignable method call (array set and attr set) is represented by NODE_ATTRASGN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17don't use `goto`.ko1
* vm_trace.c (rb_exec_event_hooks): we don't need to use goto statement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17Fix location of assignable nodesyui-knk
* parse.y (node_assign_gen): NODE_ATTRASGN is created before rhs is created. It is needed to set location after rhs is created to rhs range be included to the location of NODE_ATTRASGN. e.g. The locations of NODE_ATTRASGN is fixed: ``` a[1] = 2 ``` * Before ``` NODE_ATTRASGN (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 4) ``` * After ``` NODE_ATTRASGN (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 8) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17remove a wrong assertion.ko1
* iseq.c (rb_iseq_trace_set): remove a wrong assertion. This assertion checked `insn` is `trace_` prefix instruction but threaded code `insn` is original code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17reuse gvar value.ko1
* vm_core.h (EXEC_EVENT_HOOK_VM_TRACE): added to pass vm_event_flags (== ruby_vm_event_flags) as a macro parameter. * vm_insnhelper.c (vm_trace): use an added macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17remove `trace_` prefix insns lazily.ko1
* vm_trace.c (update_global_event_hook): set only when tracing is added. If tracing was off (event flags are decreased), then ignore them. Next `trace_` prefix instruction will trace off itself (lazy tracing off). * vm_insnhelper.c (vm_trace): trace-off for when trace is not needed. * iseq.c (rb_iseq_trace_set): fix trace-off process (it was never off tracing). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-17Fix location of assignable nodesyui-knk
* parse.y (node_assign_gen): In some case assignable nodes are created before rhs is created. In this case it is needed to set location after rhs is shifted to rhs range be included to assignable nodes. e.g. The locations of NODE_DASGN_CURR is fixed: ``` 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: 6) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16* 2017-11-17svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16Fix location of NODEs generated by new_op_assign_genyui-knk
* parse.y (new_op_assign_gen): Use a location of lhs when call gettable, bacause gettable creates a variable node. Use a location of rhs when call new_list, because item of new_list is rhs. The locations of NODE_DVAR(nd_vid: :a) and NODE_ARRAY are fixed: ``` a -= 1 ``` * Before ``` NODE_DVAR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 6) NODE_ARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 6) ``` * After ``` NODE_DVAR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 1) NODE_ARRAY (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 6) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16Old gem file had not been removedusa
* common.mk (update-gems): `old.delete("gems/#{gem}")` always returns nil because when really downloading new gem, the filename is not in `old`. the real intention of this condition might be checking `old` is empty or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16Refactoring out the direct accesses of NODE's u1, u2, and u3mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16thread_win32.c: stop returning unused valuek0kubun
to unify signature with pthread's one I'm planning to use functions for rb_nativethread_cond_t and rb_nativethread_mutex_t in the future JIT introduction. In that case, I want them to have the same signature. To prevent the case that its return value is used in somewhere and it becomes harder to unify signature, I want to drop unused return value. [close GH-1751] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16remove an unused function.ko1
* eval.c (rb_iterator_p): removed because nobody use it and not exposed by headers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-16make a func static.ko1
* vm_backtrace.c (rb_ec_backtrace_location_ary): make it static and remove `rb_` prefix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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