summaryrefslogtreecommitdiff
path: root/gc.c
AgeCommit message (Collapse)Author
2007-08-19* gc.c: use VALGRIND_MAKE_MEM_UNDEFINED to detect use of collectedakr
objects if valgrind is available. It cannot detect first 2 words because they are used as the free list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-15* gc.c (os_live_obj): fix to skip T_VALUES.ko1
* sample/test.rb: add an ObjectSpace test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-20* compile.c, compile.h (DECL_ANCHOR, INIT_ANCHOR): split not tonobu
initialize aggregations with dynamic values. [ruby-talk:259306] * eval.c (rb_protect): not to initialize aggregations with dynamic values. [ruby-talk:259306] * gc.c (mark_current_machine_context): ditto. * thread.c (thgroup_list, call_trace_func): ditto. * vm.c (vm_init_redefined_flag): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-14rename mark_current_thread to mark_current_machine_context.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-14make mark_current_thread static.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-14* configure.in: add --enable-valgrind.akr
* gc.h (SET_MACHINE_STACK_END): new macro to replace rb_gc_set_stack_end. it find out accurate stack boundary by asm using gcc on x86. * thread.c (rb_gc_set_stack_end): don't define if asm-version SET_MACHINE_STACK_END is available. * gc.c (mark_current_thread): extracted from garbage_collect. it use SET_MACHINE_STACK_END to not scan out of stack area. it notify conservative GC information to valgrind if --enable-valgrind. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12* blockinlining.c: remove "yarv" prefix.ko1
* array.c, numeric.c: ditto. * insnhelper.ci, insns.def, vm_evalbody.ci: ditto. * yarvcore.c: removed. * yarvcore.h: renamed to core.h. * cont.c, debug.c, error.c, process.c, signal.c : ditto. * ext/probeprofiler/probeprofiler.c: ditto. * id.c, id.h: added. * inits.c: ditto. * compile.c: rename internal functions. * compile.h: fix debug flag. * eval.c, object.c, vm.c: remove ruby_top_self. use rb_vm_top_self() instead. * eval_intern.h, eval_load: ditto. * gc.c: rename yarv_machine_stack_mark() to rb_gc_mark_machine_stack(). * insnhelper.h: remove unused macros. * iseq.c: add iseq_compile() to create iseq object from source string. * proc.c: rename a internal function. * template/insns.inc.tmpl: remove YARV prefix. * thread.c: * vm.c (rb_iseq_eval): added. * vm.c: move some functions from yarvcore.c. * vm_dump.c: fix to remove compiler warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05* include/ruby/{intern,ruby}.h, compile.[ch], error.c, eval.c,nobu
eval_load.c, gc.c, iseq.c, main.c, parse.y, re.c, ruby.c, yarvcore.[ch] (ruby_eval_tree, ruby_sourcefile, ruby_sourceline, ruby_nerrs): purge global variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-29* debug.c (ruby_set_debug_option): separated from main.c.nobu
* gc.c (ruby_gc_stress), signal.c (ruby_enable_coredump): prefixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-28 * gc.c (rb_obj_id): use SIGNED_VALUE instead of long.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-27* include/ruby/node.h, parse.y, gc.c, iseq.c: remove NODE_CREF.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25 * gc.c (RVALUE): in RVALUE and RBasic, flags must be the same type.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25fix indent.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25* gc.h: add RUBY_ prefix to debug macros.ko1
* cont.c, proc.c, yarvcore.c, * gc.c: define ruby_gc_debug_indent variable to debug mark/free. * vm.c, insnhelper.ci: rename some functions to vm_* or rb_vm_*. move some functions, definitions, declarations to suitable files. * eval.c, yarvcore.h, eval_error.ci, insnhelper.ci: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* eval.c: remove ruby_current_node and change eval() prototype.ko1
fix to use rb_sourcefile/line() instead of ruby_sourcefile/line. * error.c, eval_error.ci, eval_load.c, eval_safe.ci, gc.c, include/ruby/intern.h, parse.y, process.c, ruby.c: ditto. * vm.c: fix spaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-16* gc.c (garbage_collect): re-introduce ruby_current_node marking code.akr
[ruby-dev:31005] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-16* gc.c (gc_sweep): re-introduce heap extension strategy change.akr
[ruby-dev:31005] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-14* eval_load.c (Init_load): delay allocating an array for rb_load_pathakr
to avoid GC problem in very early stage. (RUBY_GC_STRESS causes GC in such stage.) * variable.c (rb_gc_mark_global_tbl): rb_global_tbl may be 0 in very early stage. * thread.c (thread_cleanup_func) [IA64]: clear register stack position. (thread_start_func_2) [IA64]: record the beginning of register stack using extra argument. (rb_gc_save_machine_context) [IA64]: record the end of register stack. * gc.c [IA64] (SET_STACK_END): record the end of register stack. (garbage_collect) [IA64]: use recorded register stack area for GC marking. (yarv_machine_stack_mark) [IA64]: GC mark from the register stack area. * yarvcore.c [IA64] (rb_gc_register_stack_start): defined. (Init_VM): store th->self on stack to fix GC problem. (Init_yarv) [IA64]: initialize the beginning of register stack. * yarvcore.h (struct rb_thread_struct) [IA64]: new members for register stack area. * thread_pthread.ci (thread_start_func_1) [IA64]: call thread_start_func_2 with the end of register stack. * cont.c (struct rb_context_struct) [IA64]: new members for register stack area. (cont_mark) [IA64]: GC mark from register stack area. (cont_free) [IA64]: free saved register stack. (cont_save_machine_stack) [IA64]: record the position and contents of the register stack. (cont_capture): store cont->self on stack to fix GC problem. (cont_restore_1) [IA64]: restore the register stack. [IA64] (register_stack_extend): new function. (cont_restore_0) [IA64]: call register_stack_extend instead of cont_restore_1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-13* gc.c (garbage_collect): update IA64 register stack code.matz
[ruby-dev:30971] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10* include/ruby: moved public headers.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-29* gc.c (rb_source_filename, obj_free): supress warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-29* gc.c (garbage_collect, yarv_machine_stack_mark): fixed typo.nobu
http://bugs.debian.org/426267 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-24* gc.c, yarvcore.c: fix to mark VM structure on startup.ko1
* yarvcore.h: disable USE_CACHED_VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24* file.c, gc.c, io.c, ruby.h, rubyio.h, win32/win32.h (rb_io_t):nobu
renamed from OpenFile. * ext/dl/cptr.c, ext/io/wait/wait.c, ext/openssl/ossl.h, ext/openssl/ossl_bio.c, ext/openssl/ossl_ssl.c, ext/pty/pty.c, ext/readline/readline.c, ext/socket/socket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24* parse.y, node.h, compile.c: change node tree structure. a purposeko1
of this change is to unify argument structure of method and block. this change prohibits duplicate block parameter name. new argument infromation: NODE_ARGS [m: int, o: NODE_OPT_ARG, ->] NODE_ARGS_AUX [r: ID, b: ID, ->] NODE_ARGS_AUX [Pst: id, Plen: int, init: NODE*] optarg information: NODE_OPT_ARGS [idx, expr, ->] * vm_macro.def: ditto. * gc.c: ditto. * iseq.c: ditto. * compile.h: fix debug function name. * test/ripper/test_scanner_events.rb: |_,_,foo| -> |_1,_2,foo| * test/ruby/test_lambda.rb: disalbe test temporarily. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-23* parse.y, compile.c, gc.c, insns.def, intern.h, iseq.c, node.h,matz
object.c, string.c, variable.c, vm_macro.def: revert private instance variable feature, which is postponed until next major release. * marshal.c: TYPE_SYMBOL2 removed; MARSHAL_MINOR reverted back to 8th version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-08* blockinlining.c, error.c, eval.c, eval_error.h, eval_intern.h,ko1
eval_jump.h, eval_load.c, eval_safe.h, gc.c, proc.c, signal.c, thread.c, thread_pthread.ci, thread_win32.ci, vm.c, vm.h, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: fix typo (rb_thead_t -> rb_thread_t). * eval_intern.h: remove unused definitions. * common.mk: fix around vm_opts.h path and remove harmful argument passed to insns2vm.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06* blockinlining.c, compile.c, compile.h, error.c, eval.c,ko1
eval_intern.h, eval_jump.h, eval_load.c, eval_method.h, eval_safe.h, gc.c, insnhelper.h, insns.def, iseq.c, proc.c, process.c, signal.c, thread.c, thread_pthread.ci, thread_win32.ci, vm.c, vm.h, vm_dump.c, vm_evalbody.ci, vm_macro.def, yarv.h, yarvcore.h, yarvcore.c: change type and macro names: * yarv_*_t -> rb_*_t * yarv_*_struct -> rb_*_struct * yarv_tag -> rb_vm_tag * YARV_* -> RUBY_VM_* * proc.c, vm.c: move functions about env object creation from proc.c to vm.c. * proc.c, yarvcore.c: fix rb_cVM initialization place. * inits.c: change Init_ISeq() order (after Init_VM). * ruby.h, proc.c: change declaration place of rb_cEnv from proc.c to ruby.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-05* eval_thread.c, common.mk: remove eval_thread.c.ko1
* yarvcore.c: rename cYarvThread to rb_cThread. * gc.c: remove YARV_* prefix. * gc.h: add an include guard and prototype of rb_gc_set_stack_end(). * inits.c: fix to ANSI prototype style and reorder Init_*(). * io.c (pipe_finalize): TODO: comment out last_status. * process.c, yarvcore.h: fix to use yarv_vm_t#last_status instead of rb_last_status and make last_status_get() to access $?. * yarvcore.c (vm_mark): mark yarv_vm_t#last_status. * ruby.h: add declarations of rb_cISeq and rb_cVM. * thread.c: move eval_thread.c codes to thread.c and remove yarv_* function prefix. * thread.c (thread_start_func_2): use yarv_thread_t#first_func if it is not null. * vm.c: fix copyright year. * yarvcore.c (Init_vm): rename to Init_VM(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-04* parse.y (rb_compose_ivar2): function to create a new ivar2matz
symbol from a symbol and a class. back-ported from matzruby. * parse.y (rb_decompose_ivar2): reverse function of rb_compose_ivar2(). * marshal.c (w_symbol): support class local instance variables. * marshal.c (r_object0): ditto. * compile.c (defined_expr): ditto. * compile.c (iseq_compile_each): ditto. * insns.def: add two new instructions: getinstancevariable2 and setinstancevariable2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-02* call_cfunc.ci, compile.c, compile.h, debug.h, eval.c,nobu
eval_error.h, eval_jump.h, eval_load.c, eval_thread.c, gc.c, insnhelper.h, insns.def, iseq.c, main.c, numeric.c, parse.y, range.c, regenc.h, ruby.h, signal.c, thread.c, thread_win32.ci, vm.c, vm.h, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: fixed indents and non-C90 comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-02* parse.y (assignable_gen): no need to generate NODE_CVDECL.matz
* compile.c (iseq_compile_each): no NODE_CVDECL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-31 * Merge YARVko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-01* ruby.h (struct RArray): revert embedding ptr in RVALUE.matz
* array.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-30* eval.c (rb_eval): fix commit miss. [ruby-dev:29707]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-26* array.c (rb_ary_shift): shift/unshift performance boost patch,matz
based on the patch from Eric Mahurin <eric_mahurin at yahoo.com>. [ruby-core:05861] * array.c (rb_ary_unshift_m): ditto. * array.c (ary_make_shared): ditto. * array.c (RESIZE_CAPA): ditto. * array.c (rb_ary_free): new function to free memory. code moved from gc.c. * string.c (rb_str_free): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-24* array.c (rb_ary_shift): should clear shifting top element.matz
[ruby-talk:216055] * array.c (rb_ary_shift): avoid creating shared object if array size is small. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-24* gc.c (gc_mark_children): NODE_POSTEXE holds Ruby VALUE.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-20* string.c (sym_eql): fail early to gain performance.matz
* string.c (sym_hash): cache hash value in aux.shared if possible. * gc.c (rb_obj_id): no need to treat symbols specially. * lib/fileutils.rb (FileUtils::FileUtils): singleton_methods() no longer return an array of strings, but of symbols. * lib/delegate.rb (DelegateClass): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-18* dir.c (dir_s_glob): remove unused variable.matz
* math.c (math_log): ditto. * re.c (rb_reg_regcomp): ditto. * eval.c (break_jump): ditto. * eval.c (rb_thread_yield_0): remove unused function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-13* gc.c (ruby_init_stack): decrease "stack level too deep" in Windows.usa
[ruby-dev:29569] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02* object.c (Init_Object): move symbol related code to string.cmatz
* string.c (Init_String): Symbol as subclass of String. * parse.y (rb_intern2): handle symbol as strings. * string.c (str_new): substring of symbols are mere strings, not symbols. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02* ruby.h (struct RArray): embed small arrays.matz
(RARRAY_LEN): defined for accessing array members. (RARRAY_PTR): ditto. * array.c: use RARRAY_LEN and RARRAY_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31* ruby.h (struct RString): embed small strings.matz
(RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-30* gc.c (gc_sweep): typo fixed.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-13ansificated.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-07* dln.c, eval.c, gc.c, ruby.h: shut up AIX alloca warning.matz
[ruby-dev:29191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-10* gc.c (gc_sweep): expand heap earlier.akr
reported by MORITA Naoyuki. [ruby-dev:28960] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-29* gc.c (gc_mark_children): a bug in NODE_BLOCK_PASS marking.matz
[ruby-dev:28908] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-29* parse.y: use ARGSPUSH instead of ARGSCAT to prevent too muchmatz
splat expansion. * eval.c (when_check): need to handle ARGSPUSH as well. * eval.c (block_orphan): lambda and proc from method are always orphan. * gc.c (gc_mark_children): proper marking for NODE_BLOCK_PASS and NODE_LAMBDA. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e