summaryrefslogtreecommitdiff
path: root/method.h
AgeCommit message (Collapse)Author
2011-07-10reverted Module#mix -- r31873, r31917 and r31918.yugui
-- * class.c (rb_mix_module): implement Module#mix. -- * class.c (check_mix_method_i, do_mix_method_i): not mix methods -- * test/ruby/test_module.rb (TestModule#test_mix_const): test for git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18* method.h, internal.h iseq.h: declare internal functions.akr
* compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c, thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't declare internal functions. Note that rb_method_entry_eq() is defined in vm_method.c but there was a declaration in proc.c with different const-ness. Now it is declared in method.h with same const-ness to the definition. * object.c (rb_mod_module_exec): don't declare functions declared in include/ruby/intern.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31* class.c (rb_mix_module): implement Module#mix.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-19* method.h: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-26* class.c, constant.h, gc.c, method.h, object.c, variable.c,mame
vm_insnhelper.c: use struct rb_constant_entry_t as entry of RCLASS_CONST_TBL. RCLASS_CONST_TBL has contained VALUE of constant directly. Now instead rb_const_entry_t is contained in RCLASS_CONST_TBL, rb_const_entry_t is managed by malloc, and have not only the value itself but also visibility flag. This is another preparation for private constant (see [ruby-dev:39685][ruby-core:32698]). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29602 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-05-04* gc.c (rb_mark_method_entry): renamed.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04* method.h (rb_gc_mark_method_entry): fixed typo.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04* method.h, vm_method.c: rename some internal functions related toko1
rb_method_entry_t. rb_add_method_me() -> rb_method_entry_set(). rb_get_method_entry() -> rb_method_entry_without_cache(). rb_gc_mark_method_entry() -> rb_mark_method_entry(). * class.c, proc.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22* proc.c (rb_method_location): return attr's location if it is setup.wanabe
[Feature #2084] * NEWS: follow above. * vm_method.c (rb_add_method): save attr's location. * gc.c (mark_method_entry): mark attr's location. * method.h (rb_method_definition_t): add member to save attr's location. * vm_eval.c (vm_call0): follow above. * vm_insnhelper.c (vm_call_method): ditto. * vm_method.c (rb_method_definition_eq): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-04* vm_method.c (basic_obj_respond_to): should not callmatz
#respond_to_missing? for not implemented methods. [ruby-core:25909] * vm_method.c (rb_method_boundp): returns exceptional value 2 for not-implemented methods when called from #respond_to? (specifies by new contant NOEX_RESPONDS). * method.h (enum): new constant NOEX_RESPONDS added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-02* method.h (rb_method_type_t): remove a comma at end ofnaruse
enumerator list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-28git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25129 ↵matz
b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-29* vm_eval.c (rb_call0): gets rid of checking method cache twice.yugui
* method.h (rb_get_method_entry): added a prototype of the function. (rb_method_entry_without_cache): more friendly name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-28* method.h (rb_method_definition_t): split from rb_method_entry_tnobu
to deal aliases. [ruby-dev:39165] * proc.c (struct METHOD): contains rb_method_entry_t copy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26* method.c (rb_method_entry_t): body.proc should be marked.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-22 * method.h : Commas at end of enum list not allowed as of C89shyouhei
* vm_method.c (rb_add_method): avoid C++ comment * vm_insnhelper.c (vm_call_cfunc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-16* method.h: properties.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24138 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