aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* ext/Setup.nacl: remove trainling space.nobu2014-09-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* set svn:ignorekazu2014-09-120-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby/ruby.h: freeze singleton classnobu2014-09-122-5/+13
| | | | | | | * 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
* follow RIncGCnobu2014-09-122-1/+2
| | | | | | * .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
* readline.c: use rb_setup_fake_strnobu2014-09-124-9/+10
| | | | | | | | | * 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
* fix a typo [ci skip]kazu2014-09-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos and indent [ci skip]kazu2014-09-121-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c (env_alloc): inline to avoid extra zeroingnormal2014-09-122-16/+19
| | | | | | | | | | | | | | | | | 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
* vm_method.c: should not modify frozen objectsnobu2014-09-124-2/+19
| | | | | | * 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
* ruby/ruby.h: move commentsnobu2014-09-121-36/+14
| | | | | | | * 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
* * gems/bundled_gems: Upgraded to test-unit-3.0.1 and minitest-5.4.1hsbt2014-09-122-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (Init_frozen_strings): use st_init_table_with_sizenormal2014-09-112-1/+5
| | | | | | | 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
* * string.c (sym_find): remove Symbol.find because we have Symbol GC now.naruse2014-09-116-54/+38
| | | | | | | | | | 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
* iseq_inline_storage_entry: 24=>16 bytes on 64-bitnormal2014-09-113-20/+27
| | | | | | | | | | | | | | | | | | | 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
* * class.c (rb_prepend_module): fix typos in a comment.nagachika2014-09-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2014-09-12svn2014-09-111-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: fix a typo for r47533.nagachika2014-09-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add revision number.ko12014-09-111-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update NEWS for frozen nil/true/false.ko12014-09-111-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update NEWS for new GC related features.ko12014-09-111-0/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (rb_thread_mark): use rb_gc_mark_values() to mark VM stack.ko12014-09-112-4/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (rb_vm_register_special_exception): make new function toko12014-09-117-17/+33
| | | | | | | | | | | | | | 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
* * gc.c (rb_gc_mark_values): added.ko12014-09-114-1/+24
| | | | | | | | | | | | 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
* * gc.c (gc_mark_ptr): rename to gc_mark_set.ko12014-09-112-9/+23
| | | | | | | | | | * 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
* * .gitignore: ignored temporary files and coverage results.hsbt2014-09-112-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2014-09-110-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * .gitignore: ignored only simplecov.hsbt2014-09-113-1/+23
| | | | | | * coverage/README: Added coverage docs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h, gc.c: add new internal eventsko12014-09-113-1/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* * ChangeLog: use ascii characterhsbt2014-09-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/benchmark.rb: remove CLOCK_MONOTONIC_RAW supportnormal2014-09-112-3/+6
| | | | | | | | | | | | | | | | 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
* test_object.rb: add assertionsnobu2014-09-111-0/+3
| | | | | | | * 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
* add reference to the ticket.ko12014-09-111-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: freeze nil/true/false.ko12014-09-116-24/+34
| | | | | | | | | | | | | | | | | * 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-11svn2014-09-111-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(21b241a)hsbt2014-09-118-5/+55
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c (rb_ivar_set): remove unnecessary checknormal2014-09-101-3/+0
| | | | | | r47512 contains the proper fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (rb_vm_addr2insn): rename to rb_vm_insn_addr2insnko12014-09-102-4/+10
| | | | | | | | to clear what address. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_date.rb: nonsense assertionnobu2014-09-101-1/+0
| | | | | | | * test/date/test_date.rb (TestDate#test__const): remove nonsense assertion. nil.frozen? is not date's concern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: preserve encodingnobu2014-09-102-2/+7
| | | | | | | * gc.c (should_be_callable): preserve encoding of class name in error messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: remove useless castnobu2014-09-101-1/+1
| | | | | | | * compile.c (rb_iseq_original_iseq): remove useless cast to fix compile error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: check index overflownobu2014-09-102-1/+5
| | | | | | | * variable.c (rb_ivar_set), vm_insnhelper.c (vm_setivar): check instance variable index overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* pack.c: no nil.taintnobu2014-09-101-1/+1
| | | | | | * pack.c (pack_pack): nil is not taintable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_gc.rb: fix condition.ko12014-09-102-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rb_call_info_t: shrink to 96 bytes from 104 bytes on 64-bitnormal2014-09-106-24/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | This keeps ci->flag and ci->aux.index consistent across 32-bit and 64-bit platforms. ci->flag: VM_CALL_* flags only use 9 bits, currently ci->aux.index: 2 billion ivars per class should be enough for anybody This saves around 50K allocations on "valgrind ruby -e exit" on x86-64 before: total heap usage: 48,122 allocs, 19,253 frees, 8,099,197 bytes allocated after: total heap usage: 48,069 allocs, 19,214 frees, 8,047,266 bytes allocated * vm_core.h (rb_call_info_t): ci->flag becomes 32-bit unsigned int ci->index becomes a 32-bit signed int (from signed long). Reorder for better packing on 64-bit, giving an 8 byte reduction from 104 to 96 bytes for each ci. * compile.c (new_callinfo, setup_args, iseq_compile_each, iseq_build_from_ary_body): adjust for type changes * vm_insnhelper.c (vm_getivar): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile: translate iseq in-placenormal2014-09-106-30/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | running "ruby -rpp -e 'pp GC.stat'", a reduction in malloc usage is shown: before: :malloc_increase=>118784, :oldmalloc_increase=>1178736, after: :malloc_increase=>99832, :oldmalloc_increase=>1031976, For "ruby -e exit", valgrind reports over 300K reduction in overall allocations (and unnecessary memory copies). before: total heap usage: 49,622 allocs, 20,492 frees, 8,697,493 bytes allocated after: total heap usage: 48,935 allocs, 19,805 frees, 8,373,773 bytes allocated (numbers from x86-64) v2 changes based on ko1 recommendations [ruby-core:64883]: - squashed in-place direct thread translation to avoid alloc+copy - renamed rb_iseq_untranslate_threaded_code to rb_iseq_original_iseq, cache new iseq->iseq_original field. * compile.c (rb_iseq_translate_threaded_code): modify in-place w/o copy (rb_vm_addr2insn): new function for debug (rb_iseq_original_iseq): ditto (iseq_set_sequence): assign iseq_encoded directly [Feature #10185] * vm_core (rb_iseq_t): move original ->iseq to bottom * iseq.c (iseq_free, iseq_free): adjust for new layout (rb_iseq_disasm): use original iseq for dump (iseq_data_to_ary): ditto (rb_iseq_line_trace_each): ditto (rb_iseq_build_for_ruby2cext): use iseq_encoded directly * vm_dump.c (rb_vmdebug_debug_print_pre): use original iseq git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2014-09-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* time.c: DATA_PTR is never NULLnormal2014-09-102-9/+9
| | | | | | | | | | | | | | * time.c (time_mark): remove NULL check (time_memsize): ditto (time_free): remove, use RUBY_TYPED_DEFAULT_FREE instead [Feature #10219] Tiny improvement on my old Phenom II X4 945 system: $ ruby --disable=gems -e '6000000.times { Time.now }' before: 2.51user 0.00system 0:02.51elapsed 100%CPU after: 2.45user 0.00system 0:02.45elapsed 100%CPU git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk (encs enc trans libencs libenc libtrans): force to runusa2014-09-102-1/+7
| | | | | | | | enk.mk because common.mk does not know the dependency, but enk.mk knows. [ruby-dev:48530] [Bug #10220] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_stat): update rdoc.ko12014-09-102-20/+30
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_stat_internal): rename:ko12014-09-102-10/+19
| | | | | | | | | | | | * malloc_increase -> malloc_increase_bytes * malloc_limit -> malloc_increase_bytes_limit * oldmalloc_increase -> oldmalloc_increase_bytes * oldmalloc_limit -> oldmalloc_increase_bytes_limit ref: [Feature #9924] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e