summaryrefslogtreecommitdiff
path: root/vm_core.h
AgeCommit message (Collapse)Author
2011-02-12* thread.c (rb_thread_io_blocking_region): new function to runnobu
blocking region with GIL released, for fd. * thread.c (rb_thread_fd_close): implement. [ruby-core:35203] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-04* vm.c (ruby_thread_data_type): add prefix.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-04 * vm_core.h (GetThreadPtr): use TypedData_Get_Struct() insteadkosaki
CoreDataFromValue() because we need type check. Otherwise, type mismatch can cause segmentation fault crash. [ruby-core:35086] [Ruby 1.9-Bug#4367] * vm.c (thread_data_type): remove static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-21* vm_core.h: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-20* compile.c (setup_args), vm.c (invoke_block_from_c),nobu
vm_insnhelper.c (caller_setup_args): reverted r30241 and r30243 except for the test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-18* compile.c (setup_args), vm.c (invoke_block_from_c),nobu
vm_insnhelper.c (caller_setup_args): fix of r30241. lambda block shoud check argument number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-10remove a comma at end of enumerator list.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-04* vm_core.h (rb_vm_inc_const_missing_count): missing prototype.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-02 * vm.c (ruby_vm_at_exit): new API. This enables extension libs toshyouhei
hook a VM termination. Right now, because the VM we have is process global, most extensions do not deallocate resources and leave them to Operating System's reaping userland processes. But in a future we plan to have multiple VMs to run simultaneously in a single process (MVM project). At that stage we can no longer rely on OSes and have to manage every resources to be reclaimed properly. So it is. For a forward-compatibility reason this API is introduced now, encouraging you to be as gentle as you can for your resources; that is, tidy up your room. * include/ruby/vm.h: ditto. * vm_core.h (rb_vm_struct): new field. * vm.c (vm_init2): initialize above new field. * eval.c (ruby_cleanup): trigger those hooks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-28* thread_pthread.c (gvl_release, gvl_init): suppress warnings.nobu
* vm_core.h (rb_vm_gvl_destroy): add prototype. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-27* thread.c, vm_core.h: make gvl_acquire/release/init/destructko1
APIs to modularize GVL implementation. * thread_pthread.c, thread_pthread.h: Two GVL implementations. (1) Simple locking GVL which is same as existing GVL. (2) Wake-up queued threads. The wake-up order is simple FIFO. (We can make several queues to support exact priorities, however this causes some issues such as priority inversion and so on.) This impl. prevents spin-loop (*1) caused on SMP environemnts. *1: Only one Ruby thread acqures GVL again and again. Bug #2359 [ruby-core:26694] * thread_win32.c, thread_win32.h: Using simple lock not by CRITICAL_SECTION but by Mutex. Bug #3890 [ruby-dev:42315] * vm.c (ruby_vm_destruct): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-03* gc.c, vm.c, vm_core.h: remove USE_VALUE_CACHE option.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-31* compile.c (new_child_iseq): adjust argument types.nobu
* iseq.c (prepare_iseq_build, rb_iseq_new), (rb_iseq_new_with_bopt_and_opt, rb_iseq_new_with_opt), (rb_iseq_new_with_bopt): ditto. * compile.c (iseq_set_exception_table): suppress warnings. * insns.def (putspecialobject, defined): ditto. * iseq.c (iseq_load): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-31* vm_core.h: some refactoring.ko1
- move decl. of rb_compile_option_struct to iseq.h. - define enum iseq_type. - define enum vm_special_object_type. * compile.c: some refactoring. - apply above changes. - (struct iseq_link_element): change value of type. - remove unused decl. - fix comment. - rename iseq_build_body and iseq_build_exception to iseq_build_from_ary_body and iseq_build_from_ary_exception. * iseq.h: define enum catch_type and enum defined_type. * insns.def: apply above changes. * iseq.c: define ISEQ_MAJOR_VERSION and ISEQ_MINOR_VERSION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-09* vm_core.h (rb_signal_buff_size, rb_signal_exec): movednobu
declarations from thread.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-06* vm_core.h: add missing prototypes.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-04* load.c (ruby_init_ext): export for golfers.nobu
* vm_core.h (rb_iseq_eval, rb_iseq_compile_with_option): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* vm_core.h (rb_{get,set,reset}_coverages): used in coverage.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-02* insns.def, vm_core.h: fixed typo. reported by Rocky Bernsteinnobu
<rockyb AT rubyforge.org> at [ruby-core:31596]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-28* vm_core.h (rb_thread_check_trap_pending): hidden API for tcl/tk wrapper.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-22* include/ruby/{intern,io}.h: add missing prototypes.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13* vm_core.c (rb_thread_struct): add a field for sigaltstack.mame
* thread_pthread.c (thread_start_func_1): initialize machine stack information. * thread.c (thread_start_func_2): set sigaltstack for each sub thread. [ruby-core:24540] [ruby-core:30207] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13* vm_core.h (rb_vm_get_sourceline): moved from eval_intern.h fornobu
vm_dump.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-09* vm_eval.c (eval_string_with_cref): propagative filename and line_nomame
of binding. [ruby-dev:38767] [ruby-core:28307] * vm_core.h (rb_binding_t), proc.c: add filename and line_no fields to preserve them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-09* compile.c (iseq_compile_each), vm_insnhelper.c (vm_invoke_block,mame
vm_throw): allow "return" and "yield" even in singleton class definition. based on a patch from wanabe <s.wanabe AT gmail.com> for "return". [ruby-core:21379] [ruby-dev:40975] * insns.def (defineclass): ditto (straightforwardly push block ptr, instead of dfp ptr with special flag). * vm_core.h (RUBY_VM_CLASS_SPECIAL_P): ditto (no longer needed). * proc.c (proc_new): ditto (remove handling for special flag). * bootstraptest/test_jump.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-05* vm_method.c (rb_unlink_method_entry, rb_sweep_method_entry):ko1
added. Unlinked method entries are collected to vm->unlinked_method_entry_list. On the GC timing, mark all method entries which are on all living threads. Only non-marked method entries are collected. This hack prevents releasing living method entry. [Performance Consideration] Since this Method Entry GC (MEGC) doesn't occuer frequently, MEGC will not be a performance bottleneck. However, to traverse living method entries, every control frame push needs to clear cfp->me field. This will be a performance issue (because pushing control frame is occurred frequently). Bug #2777 [ruby-dev:40457] * cont.c (fiber_init): init cfp->me. * gc.c (garbage_collect): kick rb_sweep_method_entry(). * method.h (rb_method_entry_t): add a mark field. * vm.c (invoke_block_from_c): set passed me. * vm.c (rb_thread_mark): mark cfp->me. * vm_core.h (rb_thread_t): add a field passed_me. * vm_core.h (rb_vm_t): add a field unlinked_method_entry_list. * vm_insnhelper.c (vm_push_frame): clear cfp->me at all times. * vm_insnhelper.c (vm_call_bmethod): pass me. * bootstraptest/test_method.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-06 * vm_core.h: Introduce UNINITIALIZED_VAR() macro.kosaki
* thread.c (do_select): Use UNINITIALIZED_VAR() instead FAKE_FD_ZERO(). Also, remove FAKE_FD_ZERO completely. [Feature #3018] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-16* compile.c, iseq.c, ruby.c, vm.c, vm_core.h, vm_eval.c: add absolutemame
path field into rb_iseq_t. The field contains a string representing a path to corresponding source file. or nil when the iseq is created from -e, stdin, eval, etc. This field is used for require_relative. [ruby-dev:40004] * load.c (rb_f_require_relative): add C implementation of require_relative. * prelude.rb (require_relative): get rid of Ruby implementation of require_relative. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25* cont.c, vm_core.h, eval.c: because rb_protect must not be jumped bymame
callcc, revert r26407. And rename trap_tag to protect_tag and change exception message (across trap -> across stack rewinding barrier). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25* cont.c (rb_cont_call, cont_restore_1): remove trap_tag check becausemame
it seems not to make sense. [ruby-dev:40121] * vm_core.h, eval.c (rb_protect): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-23* thread.c (thread_start_func_2): unlock all locking mutexesnobu
before clean up. [ruby-core:26877] * thread.c (rb_thread_atfork): no other threads to be joined. * vm_core.h (rb_thread_lock_unlock, rb_thread_lock_destroy): new functions. * vm.c (ruby_vm_destruct): unlock and destroy global VM lock. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-05removes the dtrace support. reverts r26239, r26238 and r26235.yugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-03* trace.h: new file. wraps tracing mechanisms.yugui
* defs/dtrace.d: new file. defined a dtrace provider "ruby". * include/ruby/ruby.h (LIKELY): moved from vm.c. (UNLIKELY): ditto. (OBJSETUP): probe "object-create". (RUBY_EVENT_RESCUE): new event. * vm_exec.c (DEBUG_ENTER_INSN): embeded a probe insn-entry into it. (DEBUG_END_INSN): insn-return. * vm.c (LIKELY): moved into ruby.h. (UNLIKELY): ditto. (Init_BareVM): embeded a probe "raise" into it. * variable.c (rb_class2name_without_alloc): new utility function. * tool/rbinstall.rb (install?(:ext, :arch, :'ext-arch')): installs dtrace.d if necessary. * thread_pthread.c (add_signal_thread_list): probe "raise". (rb_thread_create_timer_thread): ditto. * thread.c (rb_thread_schedule_rec): probes "thread-enter" and "thread-leave", (thread_start_func_2): ditto. (thread_cleanup_func): probe "thread-term" * lib/mkmf.rb: supports dtrace postprocessor on making an extension. * iseq.c (rb_vm_insn_name): new utility function. (rb_vm_insn_len): ditto. * insns.def (hook): probes "method-etnry", "method-return", "line", and "rescue". * compile.c (iseq_compile_each): adds a trace op for "rescue" probe. * gc.c (garbage_collect): probes "gc-begin" and "gc-end". (obj_free): probe "object-free" (garbage_collect_with_gvl): probe "raise" (negative_size_allocation_error): ditto. (rb_memerror): ditto. * eval.c (rb_rescue2): probe "rescue" (rb_longjmp): probe "raise" * ext/probe/probe.c: new extension for application defined probes. * ext/probe/extconf.rb: ditto. * configure.in (--with-tracing-model): new option to choose a tracing mechanism. (DTRACE): new substitution. name of dtrace(1). (RUBY_TRACING_MODEL): new substitution. (DTRACE_OBJ): ditto. (MINIDTRACE_OBJ): ditto. (GOLFDTRACE_OBJ): ditto. (LIBRUBY_DTRACE_OBJ): ditto. (RUBY_DTRACE_POSTPROCESS): new macro. checks whether the dtrace on the system needs postprocessing. (RUBY_DTRACE_BSD_BROKEN): new macro. checks whether the dtrace supports USDT. * Makefile.in: (DTRACE): new variable. name of dtrace(1). (TRACING_MODEL): new variable. name of the chosen tracing mechanism. (DTRACE_OBJ): same as the one in configure.in. (MINIDTRACE_OBJ): ditto. (GOLFDTRACE_OBJ): ditto. (LIBRUBY_DTRACE_OBJ): ditto. (CPPOUTFILE): new substitution. necessary for generating dtrace.d (trace_none.h): new target for TRACING_MODEL=none (RUBY_H_INCLUDES): appended a header for tracing. (distclean-local): also removes preprocessed version of dtrace.d ($(LIBRUBY_A)): needs $(LIBRUBY_DTRACE_OBJ) if dtrace needs postprocessing. ($(PROGRAM)): ditto. (golf): ditto. (miniruby): ditto. ($(arch_hdrdir)/ruby/dtrace.d): new target. preprocessed verson of defs/dtrace.d. generated if necessary. ($(arch_hdrdir)/ruby/trace_dtrace.h): new target. definition of probes. ($(LIBRUBY_DTRACE_OBJ)): new target. generated if dtrace needs postprocessing. ($(DTRACE_OBJ)): ditto. ($(MINIDTRACE_OBJ)): ditto. ($(GOLFDTRACE_OBJ)): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-03* compile.c (compile_cpath, iseq_compile_each): revertedshugo
constant/class variable lookup in instance_eval etc. to the behavior of 1.8. * eval.c (rb_mod_nesting): ditto. * insns.def (putspecialobject, defineclass): ditto. * node.h (NODE_FL_CREF_PUSHED_BY_EVAL): ditto. * vm_core.h (VM_SPECIAL_OBJECT_CONST_BASE): ditto. * vm_eval.c (yield_under, eval_under): ditto. * vm_insnhelper.c (vm_cref_push, vm_get_const_base, vm_get_ev_const, vm_get_cvar_base): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-29* vm_core.h (rb_name_err_mesg_new): added prototype.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21* compile.c, cont.c, gc.c, insns.def, iseq.c, iseq.h, process.c,nobu
thread.c, vm.c, vm_core.h, vm_dump.c, vm_eval.c, vm_insnhelper.c, vm_method.c, template/insns_info.inc.tmpl, tool/instruction.rb: fixed types. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-19* vm_core.h (ENABLE_VM_OBJSPACE): socklist needs st_table innobu
rb_w32_sysinit(), before object space initialization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18* common.mk (eval.o): needs vm.h.nobu
* eval.c (ruby_cleanup): destruct current VM before exit. * gc.c (rb_objspace_free): free object space. * vm.c (ruby_vm_destruct): destruct and free VM struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-12* vm_core.h: change members of iseq_inline_cache_entry.ko1
make cache value members to one union member "ic_value". * insns.def: ditto. * vm_insnhelper.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-28* vm_core.h ({GET,INC}_VM_STATE_VERSION): moved from vm_insnhelper.h.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-16* vm.c (vm_backtrace_each, vm_backtrace_push),nobu
vm_eval.c (print_backtrace), vm_dump.c (bugreport_backtrace): rb_backtrace_iter_func now takes VALUE as file and method names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-28* vm_core.h, vm_insnhelper.c (vm_call_method): reviveko1
VM_CALL_OPT_SEND_BIT and use it to recognize "send" method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-22* vm_core.h (struct rb_iseq_t): add a new field line_no. This fieldmame
represents line number from which the original code of the iseq starts. [ruby-dev:38698] * iseq.c, compile.c: ditto. * parse.y: line number hack (for Proc#source_location) is no longer needed. * test/ruby/test_settracefunc.rb: line number of set_trace_func is now compatible with 1.8's. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-16* node.h, vm_core.h, variable.c: rename global_entry to rb_global_entry.ko1
* compile.c, insns.def, iseq.c, vm_insnhelper.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15* method.h, vm_core.h: add rb_method_entry_t. Remove nodes aroundko1
method management. This change affect some VM control stack structure. * vm.c, vm_insnhelper.c, vm_method.c, vm_eval.c: ditto. and make some refactoring. * insns.def, class.c, eval.c, proc.c, vm_dump.c : ditto. * vm_core.h, compile.c (iseq_specialized_instruction): remove VM_CALL_SEND_BIT. use another optimization tech for Kernel#send. * node.h: remove unused node types. * ext/objspace/objspace.c (count_nodes): ditto. * gc.c: add mark/free functions for method entry. * include/ruby/intern.h: remove decl of rb_define_notimplement_method_id(). nobody can use it because noex is not opend. * iseq.c (iseq_mark): fix to check ic_method is available. * iseq.c (rb_iseq_disasm): fix to use rb_method_get_iseq(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13* vm_core.h, compile.c: declare struct iseq_inline_cache_entry.ko1
Inline cache (IC) entries are no longer GC managed object. IC entries are freed when ISeq is freed. * iseq.c: fix mark, free, memsize functions for above change. * insns.def: remove rb_gc_write_barrier(). * vm_insnhelper.c (vm_method_search): ditto. * tool/instruction.rb, template/insns_info.inc.tmpl (insn_iclen): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-05* thread.c (rb_threadptr_exec_event_hooks): new function tonobu
execute event hooks, with preserving errinfo. [ruby-core:24118] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-03* vm_core.h (struct rb_iseq_struct): fixed types.nobu
* vm_core.h (ic_vmstat): VM state version is VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-08* thread.c: rename functions which require a parameterko1
"rb_thread_t *", the prefix to be rb_threadptr_ instead of rb_thread_. * thread.c (rb_thread_add_event_hook(), rb_thread_remove_event_hook): change the parameter type from rb_thread_t * to VALUE. * eval.c, eval_error.c, eval_intern.h, signal.c, vm_core.h, vm_eval.c: ditto. * include/ruby/intern.h: remove decl of rb_thread_signal_raise() and rb_thread_signal_exit(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-13* gc.c: add longlife garbage collection. [ruby-dev:38423]nari
(NORMAL_HEAPS_USED): new macro. (LONGLIFE_ALLOCATE_HEAPS_MIN): ditto. (add_longlife_heaps_slot): new function. (rb_newobj_from_longlife_heap): ditto. (rb_newobj_longlife): ditto. (rb_node_newnode_longlife): ditto. (rb_gc_write_barrier): ditto. (remembered_set_recycle): ditto. (rb_gc_mark_remembered_set): ditto. (clear_mark_longlife_heaps): ditto. (gc_sweep_for_longlife): ditto. (assign_heap_slot): new argumnent to longlife heaps slot. (add_freelist): ditto. (gc_sweep): avoid lonlife heap slot. set longlife_collection flag at add heap. (rb_gc_force_recycle): avoid mark object and remembered_set object. (garbage_collect): add longlife collection. (rb_gc_start): invoke longlife collection. (gc_profile_record_get): for longlife collction profile. (gc_profile_result): ditto. * include/ruby/intern.h (rb_gc_write_barrier): declared. * include/ruby/ruby.h (FL_REMEMBERED_SET): renamed from FL_RESERVED. * debug.c (FL_REMEMBERED_SET): ditto. * insns.def (setinlinecache): insert write barrier. * vm_insnhelper.c (vm_method_search): ditto. * set_relation (set_relation): use longlife object. * vm.c (vm_define_method): ditto. * vm_core.h (NEW_INLINE_CACHE_ENTRY): ditto. * vm_method.c (rb_add_method): ditto. * class.c (rb_add_method): ditto. * node.h (NEW_NODE_LONGLIFE): new macro. (rb_node_newnode_longlife): declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e