summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-09-13class.c: use ALLOC(rb_subclass_entry_t)normal
It is easier to search for allocations by type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-13simplify some trivial rb_data_type_t callbacksnormal
* process.c (free_exec_arg): remove (memsize_exec_arg): ptr is never NULL (exec_arg_data_type): use RUBY_TYPED_DEFAULT_FREE * variable.c (autoload_i_free): remove (autoload_data_i_type): use RUBY_TYPED_DEFAULT_FREE (autoload_memsize): ptr is never NULL * vm_backtrace.c (location_free): remove (location_mark): ptr is never NULL (location_data_type): use RUBY_TYPED_DEFAULT_FREE (backtrace_mark): ditto (backtrace_free): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-13doc/NEWS-2.0.0: fix typo for default RUBY_FIBER_MACHINE_STACK_SIZEnormal
Checked against definition in vm_core.h [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-13* ext/win32ole/win32ole_event.c(ev_advise, ole_event_free,suke
fev_s_allocate, fev_unadvise): avoid segmentation fault when COM server freed before calling Unadvise from WIN32OLE_EVENT object. * ext/win32ole/win32ole.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-13parse.y: intern_cstrnobu
* parse.y (intern_cstr): remove `_without_pindown` suffix and use rb_intern3() as well as RIPPER, for the time being. [ruby-core:65009] [Bug #10206] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-13eval.c: fix message as same as previous versionsnobu
* eval.c (rb_frozen_class_p): fix message for singleton class of class/module as same as previous versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-13man/ruby.1: use https for *.ruby-lang.org linksnormal
Avoid redirects which may be MitM-ed and slow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-13test_yield.rb: use temporary instancenobu
* test/ruby/test_yield.rb (test_with_enum): use temporary instance, do not define a method on the global class object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12vm.c (thread_alloc): remove needless volatilenormal
If we needed a volatile there, every other alloc function would need it. There is nothing special I can see about thread_alloc which would justify it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12proc/env DATA_PTR is never NULLnormal
* proc.c (proc_free): remove, use RUBY_TYPED_DEFAULT_FREE (proc_mark, proc_memsize): remove needless branching * vm.c (env_free): remove, use RUBY_TYPED_DEFAULT_FREE (env_mark, env_memsize): remove needless branching This shows a tiny ~0.5% improvement in benchmark/bm_vm2_newlambda.rb but also removes a lot of code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12proc.c (rb_proc_alloc): inline and move to vm.cnormal
* proc.c (rb_proc_alloc): inline and move to vm.c (rb_proc_wrap): new wrapper function used by rb_proc_alloc (proc_dup): simplify alloc + copy + wrap operation [ruby-core:64994] * vm.c (rb_proc_alloc): new inline function (rb_vm_make_proc): call rb_proc_alloc * vm_core.h: remove rb_proc_alloc, add rb_proc_wrap * benchmark/bm_vm2_newlambda.rb: short test to show difference First we allocate and populate an rb_proc_t struct inline to avoid unnecessary zeroing of the large struct. Inlining speeds up callers as this takes many parameters to ensure correctness. We then call the new rb_proc_wrap function to create the object. rb_proc_wrap - wraps a rb_proc_t pointer as a Ruby object, but we only use it inside rb_proc_alloc. We must call this before the compiler may clobber VALUE parameters passed to rb_proc_alloc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12Process.detach: avoid singleton class creationnormal
* process.c (Init_process): subclass Thread as Process::Waiter (rb_detach_process): use Process::Waiter instead of singleton class * test/ruby/test_process.rb (test_process_detach): new test * inits.c (rb_call_inits): call Init_Thread before Init_process to ensure Process::Waiter may be a subclass of Thread Thanks to headius for reporting [Bug #10231] Thanks to nobu for review of my initial patch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12* 2014-09-13svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12ext/Setup.nacl: remove trainling space.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12set svn:ignorekazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12ruby/ruby.h: freeze singleton classnobu
* include/ruby/ruby.h (rb_obj_freeze_inline): propagate freezing to the singleton class if it is existing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12follow RIncGCnobu
* .gdbinit (rp), debug.c (RUBY_FL_PROMOTED): follow RIncGC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12readline.c: use rb_setup_fake_strnobu
* ext/readline/readline.c (readline_s_delete_text): initialize a fake string by rb_setup_fake_str(). * internal.h (rb_setup_fake_str): allow extensions to call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12fix typos and indent [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12vm.c (env_alloc): inline to avoid extra zeroingnormal
tiny speedup [ruby-core:64980] benchmark results: Execution time (sec) name trunk built app_lc_fizzbuzz 100.411 98.692 Speedup ratio: compare with the result of `trunk' (greater is better) name built app_lc_fizzbuzz 1.017 rb_proc_alloc changes will give more git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12vm_method.c: should not modify frozen objectsnobu
* vm_method.c (rb_method_entry_make, remove_method): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12ruby/ruby.h: move commentsnobu
* include/ruby/ruby.h (enum ruby_special_consts): move bit pattern comments side-by-side. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12* gems/bundled_gems: Upgraded to test-unit-3.0.1 and minitest-5.4.1hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11string.c (Init_frozen_strings): use st_init_table_with_sizenormal
All symbols have an fstring entry, and we initialize symbol tables with 1000 bins. This reduces resizes during startup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* string.c (sym_find): remove Symbol.find because we have Symbol GC now.naruse
https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20140904Japan If you still want this, request again on Redmine. [Feature #7854] https://bugs.ruby-lang.org/issues/7854 * ext/-test-/symbol/init.c (sym_find): moved from string.c for tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11iseq_inline_storage_entry: 24=>16 bytes on 64-bitnormal
We may tag the running_thread pointer to avoid making the "once" struct bigger than "struct iseq_inline_cache_entry". This only saves a small amount with "valgrind ruby -e exit" before: total heap usage: 48,122 allocs, 19,248 frees, 8,110,149 bytes allocated after: total heap usage: 48,122 allocs, 19,253 frees, 8,099,197 bytes allocated * insns.def (once): define and use fake RUNNING_THREAD_ONCE_DONE pointer to indicate is->once.running_thread is done. * vm_core.h (iseq_inline_storage_entry): remove done field, allowing the union to be reduced from 24=>16 bytes on 64-bit git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* class.c (rb_prepend_module): fix typos in a comment.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* 2014-09-12svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* ChangeLog: fix a typo for r47533.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11add revision number.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11update NEWS for frozen nil/true/false.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11update NEWS for new GC related features.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* vm.c (rb_thread_mark): use rb_gc_mark_values() to mark VM stack.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* vm.c (rb_vm_register_special_exception): make new function toko1
make and register special exceptions. * vm.c (rb_vm_mark): do not need to mark special exceptions because they are registerd by rb_gc_register_mark_object(). * eval.c (Init_eval): use rb_vm_register_special_exception(). * gc.c (Init_GC): ditto. * proc.c (Init_Proc): ditto. * thread.c (Init_Thread): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* gc.c (rb_gc_mark_values): added.ko1
This function is similar to rb_gc_mark_locations(), but not conservertive. * internal.h: ditto. * vm.c (env_mark): use rb_gc_mark_values() because env values should be Ruby VALUEs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* gc.c (gc_mark_ptr): rename to gc_mark_set.ko1
* gc.c (gc_mark): add gc_mark_ptr() to skip is_markable_object() check. gc_mark_maybe() can use gc_mark_ptr() directly because passed pointer is checked by is_pointer_to_heap(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* .gitignore: ignored temporary files and coverage results.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* .gitignore: ignored only simplecov.hsbt
* coverage/README: Added coverage docs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* include/ruby/ruby.h, gc.c: add new internal eventsko1
RUBY_INTERNAL_EVENT_GC_ENTER and RUBY_INTERNAL_EVENT_GC_EXIT. When invoking GC process, GC_ENTER event is called. When exiting from GC process, GC_EXIT event is called. Incremental GC (incremental marking and lazy sweep) can call these events many times. For example (minor marking): (1) GC_ENTER - (2) GC_START (minor GC) (minor marking) - (3) GC_END_MARK (start lazy sweep) (4) GC_EXIT (ruby process) (5) GC_ENTER (lazy sweep) (6) GC_EXIT (ruby process) (... repeat (5), (6)) (7) GC_ENTER (finish lazy sweep) - (8) GC_END_SWEEP (9) GC_EXIT 2nd example (incremental major marking): (1) GC_ENTER - (2) GC_START (minor GC) (start incremental marking) (3) GC_EXIT (ruby process) (4) GC_ENTER (incremental marking) (5) GC_EXIT (ruby process) (... repeat (4), (5)) (6) GC_ENTER (finish incremental marking) - (7) GC_END_MARK (start lazy sweep) (8) GC_EXIT (ruby process) (9) GC_ENTER (lazy sweep) (10) GC_EXIT (ruby process) (... repeat (9), (10)) (11) GC_ENTER (finish lazy marking) - (12) GC_STOP_SWEEP (13) GC_EXIT Thease internal events enable to measure GC pause time completely. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* ChangeLog: use ascii characterhsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11lib/benchmark.rb: remove CLOCK_MONOTONIC_RAW supportnormal
In addition to being unaffected by _offset_ correction, CLOCK_MONOTONIC_RAW is also unaffected by _frequency_ correction, making it unsuitable for measuring real time on systems where the clock is always running too fast or slow. CLOCK_MONOTONIC (without _RAW) is the correct clock, as it is unaffected by _offset_ correction (due to human error or battery replacement), but still takes _frequency_ correction into account for clocks which consistently run too fast or slow. Thanks to Vít Ondruch for reporting the issue on ARM [Bug #10202] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11test_object.rb: add assertionsnobu
* test/ruby/test_object.rb (test_freeze_immediate): assertions for [Feature #8923]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11add reference to the ticket.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* include/ruby/ruby.h: freeze nil/true/false.ko1
* gc.c (should_be_finalizable): check frozen after checkin FL_ABLE. * object.c (rb_obj_taint): check OBJ_TAINTABLE(obj). * object.c (rb_obj_freeze): remove immediate_frozen_tbl because all of immediate values are frozen. YAY! * object.c (rb_obj_frozen_p): ditto. * test/ruby/test_eval.rb: skip instance_variable_set for frozen objects. * test/ruby/test_weakmap.rb: check ArgumentError instead of RuntimeError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* 2014-09-11svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(21b241a)hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10variable.c (rb_ivar_set): remove unnecessary checknormal
r47512 contains the proper fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e