summaryrefslogtreecommitdiffstats
path: root/vm_core.h
Commit message (Collapse)AuthorAgeFilesLines
* * compile.c (compile_cpath, iseq_compile_each): revertedshugo2009-12-031-2/+3
| | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@25984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (rb_name_err_mesg_new): added prototype.nobu2009-10-291-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, cont.c, gc.c, insns.def, iseq.c, iseq.h, process.c,nobu2009-09-211-3/+3
| | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@25030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (ENABLE_VM_OBJSPACE): socklist needs st_table innobu2009-09-191-0/+11
| | | | | | | rb_w32_sysinit(), before object space initialization. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk (eval.o): needs vm.h.nobu2009-09-181-0/+9
| | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@25000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: change members of iseq_inline_cache_entry.ko12009-09-121-3/+5
| | | | | | | | | | make cache value members to one union member "ic_value". * insns.def: ditto. * vm_insnhelper.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h ({GET,INC}_VM_STATE_VERSION): moved from vm_insnhelper.h.nobu2009-08-281-0/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (vm_backtrace_each, vm_backtrace_push),nobu2009-08-161-1/+1
| | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@24549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h, vm_insnhelper.c (vm_call_method): reviveko12009-07-281-0/+1
| | | | | | | | VM_CALL_OPT_SEND_BIT and use it to recognize "send" method. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (struct rb_iseq_t): add a new field line_no. This fieldmame2009-07-221-2/+3
| | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@24243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * node.h, vm_core.h, variable.c: rename global_entry to rb_global_entry.ko12009-07-161-10/+0
| | | | | | | | * compile.c, insns.def, iseq.c, vm_insnhelper.h: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * method.h, vm_core.h: add rb_method_entry_t. Remove nodes aroundko12009-07-151-22/+17
| | | | | | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@24128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h, compile.c: declare struct iseq_inline_cache_entry.ko12009-07-131-7/+17
| | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@24085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_threadptr_exec_event_hooks): new function tonobu2009-07-051-19/+3
| | | | | | | execute event hooks, with preserving errinfo. [ruby-core:24118] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (struct rb_iseq_struct): fixed types.nobu2009-07-031-3/+3
| | | | | | | * vm_core.h (ic_vmstat): VM state version is VALUE. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c: rename functions which require a parameterko12009-06-081-2/+4
| | | | | | | | | | | | | | | "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: http://svn.ruby-lang.org/repos/ruby/trunk@23651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: add longlife garbage collection. [ruby-dev:38423]nari2009-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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: http://svn.ruby-lang.org/repos/ruby/trunk@23421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_resurrect), string.c (rb_str_resurrect): newnobu2009-02-181-0/+3
| | | | | | | | | | | functions based on [ruby-dev:37983] * insns.def (putstring, duparray): use rb_{ary,str}_resurrect(). * iseq.c (iseq_data_to_ary): needs to result TS_VALUE. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_eval.c (eval_string_with_cref): use rb_vm_get_ruby_level_next_cfp()ko12009-02-131-0/+1
| | | | | | | | | | | instead of vm_get_ruby_level_caller_cfp(). checking a upper frame is not enough. [ruby-dev:37984] * proc.c, vm_core.h: declare rb_vm_get_ruby_level_next_cfp() on vm_core.h. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (vm_backtrace_each): now takes an iterator function.nobu2009-02-011-0/+3
| | | | | | | | | | | | | | * vm_core.h (rb_make_backtrace, rb_backtrace_each): added prototypes. * vm_dump.c (rb_vm_bugreport), vm_eval.c (rb_backtrace): gets rid of allocating objects. * vm_eval.c (rb_backtrace_each): new function which iterates over each backtrace info. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c: add a prefix "rb_" to exposed functionsko12009-01-191-4/+4
| | | | | | | | | | | | | | | | | vm_get_ruby_level_next_cfp(), rb_vm_make_env_object(), vm_stack_to_heap(), vm_make_proc(), vm_invoke_proc(), vm_get_sourceline(), vm_cref(), vm_localjump_error(), vm_make_jump_tag_but_local_jump(), vm_jump_tag_but_local_jump(). This changes may affect only core because most of renamed functions require a pointer of not-exposed struct such as rb_thread_t or NODE. In short, they are core functions. * cont.c, eval.c, eval_intern.h, load.c, proc.c, thread.c, vm_core.h, vm_dump.c, vm_eval.c, vm_exec.c, vm_insnhelper.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_dump.c: add a prefix "rb_vmdebug_" toko12009-01-191-3/+3
| | | | | | | | | | | | | | | | vm_stack_dump_raw(), vm_stack_dump_raw_current(), vm_env_dump_raw(), vm_proc_dump_raw(), vm_stack_dump_th(), vm_debug_print_register(), vm_thread_dump_regs(), vm_debug_print_pre(), vm_debug_print_post(), vm_thread_dump_state(). This change also may affect core (in fact, user of above functions may be only ko1). * vm_core.h: ditto. * vm_exec.h (SDR2): remove duplicate definition. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c:ko12009-01-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | rename ruby_iseq_disasm_insn() -> rb_iseq_disasm_insn(). rename ruby_iseq_disasm() -> rb_iseq_disasm(). * compile.c: rename ruby_iseq_compile() -> rb_iseq_compile_node(). rename ruby_iseq_translate_threaded_code() -> rb_iseq_translate_threaded_code(). rename ruby_insns_name_array() -> rb_insns_name_array(). rename ruby_iseq_build_from_ary() -> rb_iseq_build_from_ary(). * iseq.c, compile.c: remove ruby_insn_make_insn_table() and make static function insn_make_insn_table(). * iseq.h, ruby.c, vm.c, vm_core.h, vm_eval.c, vm_dump.c, blockinlining.c: ditto. Rename strange "ruby_" prefix to "rb_" prefix. This changes may affect only core because renamed functions require a pointer of rb_iseq_t which is not exposed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c: fix comment (terminology: Global VM Lock).ko12009-01-121-0/+3
| | | | | | | | | | | | * thread.c (blocking_region_begin, blocking_region_end): save and clear th->blocking_region_buffer. * thread.c (rb_thread_call_with_gvl): check if it has GVL. * thread.c (ruby_thread_has_gvl_p): added. * vm_core.h: add decls. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_thread_blocking_region): add a comment.ko12008-12-301-0/+1
| | | | | | | | | | | | * thread.c (rb_thread_call_without_gvl): added as a alias of rb_thread_blocking_region(). * thread.c (rb_thread_call_with_gvl): added. * vm_core.h (rb_thread_t#blocking_region_buffer): added for rb_thread_call_with_gvl(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (Init_VM): create and define TOPLEVEL_BINDING at first.ko12008-12-271-0/+2
| | | | | | | | | | | | | | | | | | * vm.c (vm_set_main_stack, rb_iseq_eval_main): added. * parse.y (rb_parser_compile_file): fix to check parse_in_eval flag. * eval.c (ruby_exec_node): use rb_iseq_eval_main() instead of rb_iseq_eval(). * iseq.c (rb_iseq_new_main), vm_core.h: added. main script (specified by -e or script name) should be run under TOPLEVEL_BINDING using Kernel#eval. Above changes simulate Kernel#eval behaviour. [ruby-dev:37240] * compile.c (make_name_for_block): skip iseq except block type. this fix is needed for [ruby-dev:37240], and also fixes [ruby-dev:35392]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (invoke_block_from_c): fix to point right cfp.ko12008-12-241-1/+1
| | | | | | | | | | * vm.c (vm_make_proc, vm_make_proc_from_block), vm_core.h: remove unused parameter cfp. * vm_insnhelper.c, proc.c (proc_new): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: removed trailing garbage spaces.nobu2008-12-091-5/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/vm.h: write a comment.ko12008-10-211-4/+2
| | | | | | | | | | * common.mk: remove vm.h from any rules. vm.h is not needed on this version. * vm_core.h: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dln.c: Ruby no longer supports MacOS 9 or before.yugui2008-10-041-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * eval.c: ditto. * eval_intern.h: ditto. * ext/extmk.rb: ditto. * ext/tk/sample/tkextlib/treectrl/demo.rb: ditto. * ext/tk/stubs.c: ditto. * file.c: ditto. * hash.c: ditto. * include/ruby/defines.h: ditto. * ruby.c: ditto. * signal.c: ditto. * vm_core.h: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.yugui2008-10-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * djgpp/README.djgpp: ditto. * djgpp/config.hin: ditto. * djgpp/config.sed: ditto. * djgpp/configure.bat: ditto. * djgpp/mkver.sed: ditto. * ext/Setup.dj: ditto. * dln.c: removed djgpp supports. * file.c: ditto. * gc.c: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * signal.c: ditto. * util.c: ditto. * vm_core.h: ditto. * lib/fileutils.rb: ditto. * lib/mkmf.rb: ditto. * ext/socket/socket.c: ditto. * test/fileutils/test_fileutils.rb: ditto. * test/ruby/test_env.rb: ditto. * test/ruby/test_path.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (RUBY_VM_CHECK_INTS_TH): add an UNLIKELY hint.ko12008-09-261-3/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: ruby/ruby.h should be included at the very firstshyouhei2008-09-231-2/+1
| | | | | | | | place in an entire compilation unit, as it includes ruby/config.h git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/node.h, node.h: move node.h from include path.ko12008-09-231-1/+1
| | | | | | | | | | | | | | This change stop to install node.h beacuase of saving ABI (node.h will be changed. Extensions should not depends on this file). * blockinlining.c, class.c, compile.c, debug.h, enum.c, gc.c, iseq.c, parse.y, ruby.c, signal.c, variable.c, vm.c, vm_core.h, vm_dump.c: ditto. * ext/ripper/depend: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: remove unused frame values.ko12008-09-231-9/+0
| | | | | | | (fix previous commit miss) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c, vm_core.h: move decl of rb_iseq_clone() to class.c.ko12008-09-231-1/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/node.h, vm_core.h: move definition ofko12008-09-231-79/+10
| | | | | | | | | | | | | | | | | | | | | RUBY_VM_METHOD_NODE to node.h. * class.c, common.mk: remove useless inclusion. * compile.h, iseq.h, vm_core.h: rename compile.h to iseq.h. move some definitions from vm_core.h to iseq.h. * compile.c, iseq.c, vm.c: ditto. * eval.c, compile.c: move some functions for parser from eval.c to compile.c. * eval_intern.h, vm_core.h: move va_init_list() macro to vm_core.h. * iseq.c (rb_iseq_new_top, rb_iseq_first_lineno): added. * load.c, ruby.c: use rb_iseq_new_top() instead of rb_iseq_new() with ISEQ_TYPE_TOP constant directly. * proc.c: use rb_iseq_first_lineno() instead of accessing iseq structure. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk: clean upko12008-09-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | - remove blockinlining.$(OBJEXT) to built - make ENCODING_H_INCLDUES variable (include/ruby/encoding.h) - make VM_CORE_H_INCLUDES variable (vm_core.h) - simplify rules. - make depends rule to output depend status using gcc -MM. * include/ruby/mvm.h, include/ruby/vm.h: rename mvm.h to vm.h. * include/ruby.h: ditto. * load.c: add inclusion explicitly. * enumerator.c, object.c, parse.y, thread.c, vm_dump.c: remove useless inclusion. * eval_intern.h: cleanup inclusion. * vm_core.h: rb_thread_t should be defined in this file. * vm_evalbody.c, vm_exec.c: rename vm_evalbody.c to vm_exec.c. * vm.h, vm_exec.h: rename vm.h to vm_exec.h. * insnhelper.h, vm_insnhelper.h: rename insnhelper.h to vm_insnhelper.h. * vm.c, vm_insnhelper.c, vm_insnhelper.h: - rename vm_eval() to vm_exec_core(). - rename vm_eval_body() to vm_exec(). - cleanup include order. * vm_method.c: fix comment. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (struct rb_vm_struct): replaced signal staff with trapnobu2008-09-041-3/+7
| | | | | | | | | | | | | | | | | | | | staff. * signal.c (signal_buff): per process resouce now. * signal.c (trap_list): moved to VM. * signal.c (rb_get_next_signal): reverted. * signal.c (rb_trap_exit): trap_pending_list was no longer used. * thread.c (timer_thread_function): delivers buffered per-process signals to each VMs. * vm.c (rb_vm_mark): marks trap_list. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/signal.h: removed.ko12008-09-031-3/+2
| | | | | | | | | | | | | | | * common.mk, class.c, eval.c, eval_intern.h, file.c, gc.c, hash.c, io.c, process.c, signal.c: vm_core.h: ditto. Some unused external global variables are also removed. (rb_prohibit_interrupt, rb_trap_immediate, rb_trap_pending, rb_thread_critical) * ext/openssl/ossl_ssl.c, ext/openssl/ossl_x509store.c, ext/readline/readline.c, ext/socket/depend, ext/socket/socket.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (proc_new): use the given class.nobu2008-08-201-1/+1
| | | | | | | * vm.c (vm_make_proc): added an argument for the class. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (exec_event_hooks): skips RubyVM::FrozenCore.nobu2008-08-151-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c, vm_core.h: add manual priority supportko12008-08-131-0/+1
| | | | | | | | | | | using time slice. if you enable USE_NATIVE_THREAD_PRIORITY macro, this mechanism is ignored. [ruby-dev:33124] * thread_pthread.c, thread_win32.c: ditto. * test/ruby/test_thread.rb: fix test parameter. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: Declare rb_iseq_clone, which is used in class.c.knu2008-08-131-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (clone_method): should copy cbase in cref as well.matz2008-08-111-0/+1
| | | | | | | | | | | | | [ruby-dev:35116] * iseq.c (iseq_mark): mark original iseq object. * iseq.c (iseq_free): do not free internal data if they have original iseq to belong. * iseq.c (rb_iseq_clone): a new function to clone iseq value. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: move the definition of struct rb_mutex_struct.mame2008-07-281-9/+0
| | | | | | | * thread.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h, thread.c: It is now prohibited to use Data_Get_Struct inmame2008-07-271-1/+12
| | | | | | | | | | *_free against an object that is going to be free'ed. So, change type of thread_t#keeping_mutexes from VALUE to mutex_t. * vm.c: remove mark to keeping_mutexes. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: add a type T_DEFERRED.ko12008-07-271-1/+2
| | | | | | | | | | | | | | * gc.c: fix deferred finalizer system. finalize processes of T_DATA and T_FILE are executed after gc process. And fix to use BUILTIN_TYPE() instead of seeing flag. * thread.c, vm_core.h: add RUBY_VM_SET_FINALIZER_INTERRUPT() and check intterupt_flag at rb_thread_execute_interrupts(). * thread.c (mutex_mark): fix to mark next_mutex. * vm.c (rb_thread_mark): fix to mark keeping_mutexes. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (rb_thread_t), vm.c (rb_thread_mark), process.cnobu2008-07-101-1/+1
| | | | | | | | | | (rb_last_status_get, rb_last_status_set, rb_last_status_clear): moved last_status from rb_vm_t. [ruby-dev:35414] * vm.c (th_init2): initialize last_status with nil. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/coverage/coverage.c, ext/coverage/extconf.rb: eliminatemame2008-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | COVERAGE__ and introduce coverage.so instead. How to measure coverage: (1) require "coverage.so", (2) require or load Ruby source file, and (3) Coverage.result will return the same hash as COVERAGE__. [ruby-dev:35324] * thread.c (rb_enable_coverages): start coverage measurement by using rb_add_event_hook. * thread.c (rb_get_coverages): returns current results of coverage measurement. * include/ruby/intern.h: add prototype for above two functions. * vm_core.h, vm.c: add field of coverages to rb_vm_t. * insns.def (trace): remove special handling for COVERAGE__. * iseq.c (prepare_iseq_build): switch COVERAGE__ to rb_get_coverages(). * parse.y (coverage): ditto. * thread.c (clear_coverage): ditto. * lib/coverage.rb: use coverage.so instead of COVERAGE__. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e