aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * addr2line.c: Include ELF header after system headers (especiallyakr2013-10-262-5/+13
| | | | | | | | | | sys/types.h) to avoid compilation failure, "usr/include/sh3/elf_machdep.h:4:2: error: #error Define _BYTE_ORDER!", on NetBSD/sh3 (dreamcast, hpcsh, landisk, mmeye). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: tuning parameters.ko12013-10-262-3/+14
| | | | | | | | | | | * gc.c (GC_MALLOC_LIMIT): change default value to 16MB. * gc.c (GC_MALLOC_LIMIT_GROWTH_FACTOR): change default value to 2.0. * gc.c (gc_before_sweep): change decrease ratio of `malloc_limit' from 1/4 to 1/10. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (vm_malloc_increase): do gc_rest_sweep() before GC.ko12013-10-262-1/+19
| | | | | | | | | | | gc_rest_sweep() can reduce malloc_increase, so try it before GC. Otherwise, malloc_increase can be less than malloc_limit at gc_before_sweep(). This means that re-calculation of malloc_limit may be wrong value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_before_heap_sweep): Restructure code to mean clearly.tarui2013-10-252-11/+9
| | | | | | | heap->freelist is connected to end of list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-10-26svn2013-10-251-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_before_heap_sweep): fix freelist management.ko12013-10-252-1/+18
| | | | | | | | | After rb_gc_force_recycle() for a object blonging to heap->freelist, `heap->using_page->freelist' is not null. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* range.c: fix int and VALUEnobu2013-10-251-5/+7
| | | | | | | | * range.c (SET_EXCL): set boolean always. * range.c (range_init): fix int flag and boolean VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* range.c: setter macrosnobu2013-10-251-6/+9
| | | | | | | * range.c (RANGE_SET_{BEG,END,EXCL}): add setter macros which wrap RSTRUCT_SET() and index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-10-25svn2013-10-241-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.sub: fix typonobu2013-10-241-1/+1
| | | | | | * win32/Makefile.sub (MISSING): fix typo, missing extention. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: Remove +(binary) and -(binary) special cases [Feature #9048]marcandre2013-10-243-3/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c: [DOC] Document first argument also takes string for:zzak2013-10-242-0/+28
| | | | | | | | | rb_mod_const_get, rb_mod_const_set, rb_mod_const_defined Also added note about NameError exception for invalid constant name git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_thread_terminate_all): add a comment why we needkosaki2013-10-242-0/+10
| | | | | | state check and call terminate_i again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_thread_terminate_all): add a comment why infinitekosaki2013-10-242-0/+9
| | | | | | sleep is safe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: add new initial_growth_max tuning parameter. [ruby-core:57928] [Bug ↵tmm12013-10-233-1/+24
| | | | | | #9035] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.h: suppress INFINITY warningsnobu2013-10-232-0/+19
| | | | | | | * include/ruby/win32.h (rb_infinity_float): suppress overflow in constant arithmetic warnings. [ruby-core:57981] [Bug #9044] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.sub: C99 mathematics functionsnobu2013-10-231-1/+2
| | | | | | | | * win32/Makefile.sub (config.h): fix version number of runtime library. log2 needs to be defined, not only HAVE_LOG2. [ruby-core:57992] [Bug #9044] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: adjust indent.nobu2013-10-231-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb: raise NoMethodError with a #name and #args.marcandre2013-10-233-1/+24
| | | | | | | | Patch by Kenichi Kamiya. [Fixes GH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb (Struct#each_pair): Return an enumerator with sizemarcandre2013-10-232-1/+2
| | | | | | | | Patch by Kenichi Kamiya. [Fixes GH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb (OpenStruct#delete): Use the converted argument.marcandre2013-10-232-1/+11
| | | | | | | | Patch by Kenichi Kamiya. [Fixes GH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb: Raise RuntimeError when modifying frozen instancesmarcandre2013-10-232-4/+4
| | | | | | | | instead of TypeError. Patch by Kenichi Kamiya. [Fixes GH-383] * test/ostruct/test_ostruct.rb: Added tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: Add Array#to_h [Feature #7292]marcandre2013-10-236-0/+117
| | | | | | * enum.c: Add Enumerable#to_h git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-10-24svn2013-10-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: Rename free_min to min_free_slots and free_min_page to ↵tmm12013-10-232-24/+31
| | | | | | | | | max_free_slots. The algorithm for heap growth is: if (swept_slots < min_free_slots) pages++ if (swept_slots > max_free_slots) pages-- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.sub: C99 mathematics functionsnobu2013-10-232-1/+20
| | | | | | | * win32/Makefile.sub (config.h): VC 2013 supports C99 mathematics functions. [ruby-core:57981] [Bug #9044] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: move increment from heap to heap_pages.ko12013-10-232-34/+48
| | | | | | | | | | | Share `increment' information with heaps. * gc.c: change ratio of heap_pages_free_min_page to 0.80. This change means slow down page freeing speed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (heap_pages_free_unused_pages): cast to (int) for size_tko12013-10-232-1/+6
| | | | | | | | variable `i'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: introduce tomb heap.ko12013-10-232-129/+210
| | | | | | | | | | | | | | | | | | | Tomb heap is where zombie objects and ghost (freed slot) lived in. Separate from other heaps (now there is only eden heap) at sweeping helps freeing pages more efficiently. Before this patch, even if there is an empty page at former phase of sweeping, we can't free it. Algorithm: (1) Sweeping all pages in a heap and move empty pages from the heap to tomb_heap. (2) Check all exsisting pages and free a page if all slots of this page are empty and there is enough empty slots (checking by swept_num) To introduce this pach, there are several tuning of GC parameters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_prof_sweep_timer_stop): catch up recent changesko12013-10-232-1/+6
| | | | | | | | to compile on GC_PROFILE_MORE_DETAIL=1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c: [DOC] fix rdoc format of File#expand_path from r43386zzak2013-10-232-3/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-10-23svn2013-10-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typoskazu2013-10-221-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (enum): avoid syntax error.shyouhei2013-10-224-3/+11
| | | | | | | | | * method.h: ditto. * internal.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (Init_heap): move logics from heap_pages_init() and removeko12013-10-222-22/+23
| | | | | | | | heap_pages_init(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: allow multiple heaps.ko12013-10-222-280/+355
| | | | | | | | | | | | | | | | | | | | Now, objects are managed by page. And a set of pages is called heap. This commit supports multiple heaps in the object space. * Functions heap_* and rb_heap_t manages heap data structure. * Functions heap_page_* and struct heap_page manage page data strcuture. * Functions heap_pagse_* and struct rb_objspace_t::heap_pages maintains all pages. For example, pagaes are allocated from the heap_pages. See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/GC_design and https://bugs.ruby-lang.org/attachments/4015/data-heap_structure_with_multiple_heaps.png for more deitals. Now, there is only one heap called `eden', which is a space for all new generated objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (object_address_group): Use Kernel#to_s to obtain the classakr2013-10-222-13/+11
| | | | | | | | | | | name and object address. This fix a problem caused by %p in C generates variable length address. Reported by ko1 via IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (File#expand_path): [DOC] improve documentation of File#expand_path.eregon2013-10-222-1/+17
| | | | | | Based on patch by Prathamesh Sonpatki. [ruby-core:57734] [Bug #9002] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir.c: DOTMATCH to current directorynobu2013-10-223-4/+20
| | | | | | | * dir.c (glob_helper): don't skip current directories if FNM_DOTMATCH is given. [ruby-core:53108] [Bug #8006] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-10-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: exterminate Zombies.ko12013-10-224-25/+81
| | | | | | | | | | | | | | | | | | | | | | | There is a bug that T_ZOMBIE objects are not collected. Because there is a pass to miss finalizer postponed job with multi-threading. This patch solve this issue. * vm_trace.c (rb_postponed_job_register_one): set RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(th) if another same job is registered. There is a possibility to remain a postponed job without interrupt flag. * vm_trace.c (rb_postponed_job_register_one): check interrupt carefully. * vm_trace.c (rb_postponed_job_register_one): use additional space to avoid buffer full. * gc.c (gc_finalize_deferred_register): check failure. * thread.c (rb_threadptr_execute_interrupts): check `postponed_job_interrupt' immediately. There is a possibility to miss this flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: check CFLAGS and LDFLAGSnobu2013-10-222-0/+24
| | | | | | | * configure.in: check if the given CFLAGS and LDFLAGS are working, and bail out early if not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h: fix typonobu2013-10-221-1/+1
| | | | | | | * internal.h (rb_syserr_fail_path): fix typo on platforms where function name string predefined identifier is not supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir.c: warn Dir.exists?nobu2013-10-212-2/+9
| | | | | | * dir.c (rb_dir_exists_p): warn deprecated name. [Bug #9041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_exists_p): maybe FileTest.nobu2013-10-211-1/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-10-22svn2013-10-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: warn File.exists?nobu2013-10-212-1/+12
| | | | | | * file.c (rb_file_exists_p): warn deprecated name. [Bug #9041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c: preserve outer errinfonobu2013-10-213-1/+17
| | | | | | | * encoding.c (load_encoding): should preserve outer errinfo, so that expected exception may not be lost. [ruby-core:57949] [Bug #9038] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-10-21svn2013-10-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: fix omitted messagenobu2013-10-211-1/+1
| | | | | | | * lib/test/unit/assertions.rb (assert_raise_with_message): remove omitted message by splatting nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e