summaryrefslogtreecommitdiff
path: root/vm_method.c
AgeCommit message (Collapse)Author
2010-11-02* vm_method.c (rb_clear_cache_by_class): just return if the class hasakr
no method. reported by Eric Wong. [ruby-core:32689] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-24* array.c, gc.c, hash.c, object.c, string.c, struct.c,nobu
transcode.c, variable.c, vm.c, vm_insnhelper.c, vm_method.c: replace calls to rb_error_frozen() with rb_check_frozen(). a patch from Run Paint Run Run at [ruby-core:32014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-19Commit miss.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-19* test/ruby/test_sprintf.rb: fix ML ref. [ruby-core:32848]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12* compile.c (iseq_build_body), error.c (set_syserr, get_syserr),nobu
(syserr_initialize), gc.c (define_final, rb_gc_copy_finalizer), (run_final), hash.c (rb_hash_aref, rb_hash_lookup2), (rb_hash_fetch_m, rb_hash_clear, rb_hash_aset, eql_i), iseq.c (iseq_load, iseq_data_to_ary), marshal.c (r_symlink), thread.c (rb_thread_local_aref), variable.c (generic_ivar_remove, ivar_get, rb_const_get_0), (rb_cvar_get), vm.c (rb_vm_check_redefinition_opt_method), vm_insnhelper.c (vm_get_ev_const), vm_method.c (remove_method), ext/iconv/iconv.c (map_charset): use st_data_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-21* vm_method.c (rb_method_boundp): revert r28543, r28564.naruse
They may be merged in Ruby 2.0. [ruby-core:31217] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07* vm_method.c (rb_method_boundp): respond_to?(:protected_method,knu
true) should return true. Pointed out by Marc-Andre Lafortune. [ruby-dev:41837] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-05* vm_method.c (rb_method_boundp): Return false for protectedknu
methods when called from Kernel#respond_to?. [ruby-dev:40461] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29* removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* array.c: Documentation: change => in call-seq to ->.marcandre
Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-11* eval_intern.h (rb_vm_get_sourceline): add prototype.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27729 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* 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-04-20* vm_method.c (rb_add_method_def): decrement alias count ofmame
rb_method_definition_t to prevent memory leak. see [ruby-dev:41021]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-18* vm_method.c (rb_add_method_def): workarond fix for redefinitionnaruse
of methods. This is because cfp->me uses the rb_method_entry which is freed by redefinition of remove_method. Note that reusing may cause another problem when the usage is changed. [ruby-core:27320] [ruby-core:29464] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-09* vm_method.c (rb_add_method): clear attr.location before rb_ary_new3.wanabe
a patch from Masaya TARUI in [Bug #3108] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-24* vm_method.c (rb_add_method): prototype of rb_vm_get_sourceline.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27030 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
2010-01-20 * common.mk (compile.$(OBJEXT)): dependencies lacking.shyouhei
* vm_method.c (rb_add_method_cfunc): invalid initializer for C89 * compile.c (iseq_insns_unification): int might be smaller than int* git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-08* vm_method.c (rb_alias): skip ZSUPER method when searching body ofmame
source method. [ruby-dev:39760] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-26* removed spaces just before tabs.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-18* vm_method.c (rb_undef): should raise TypeError if klass is nil.shugo
1.instance_eval { undef to_s } causes SEGV before this fix. * test/ruby/test_undef.rb: new tests for undef. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-17* vm_method.c (rb_alias): should raise TypeError if klass is nil.shugo
1.instance_eval { alias to_string to_s } causes SEGV before this fix. * test/ruby/test_alias.rb (test_special_const_alias): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-17* vm_method.c (basic_obj_respond_to): call #respond_to_missing?matz
always with two arguments. [ruby-core:26090] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-09* vm_method.c (rb_method_boundp): should exclude NOEX_RESPONDS.matz
based on the patch from Nikolai Lugovoi. [ruby-core:25949] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25274 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-03* vm_method.c (rb_add_method_def): no redefinition warning onnobu
undef. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-30* vm_method.c (rb_add_method_def): show the location wherenobu
overwritten method was defined. [ruby-dev:39400] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29* vm_method.c (rb_method_definition_eq): non-null definition isnobu
not equal to null definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29* vm_method.c (rb_add_method_def): nothing to do if old method hadnobu
same definition. [ruby-dev:39397] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29* vm_method.c (rb_method_entry_eq): fixed a message.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25146 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-09-27* vm_method.c (rb_method_entry_eq): suppressed a warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-26* vm_method.c (rb_method_entry_eq): method defined from samematz
block/proc should be equal. [ruby-core:25755] [ruby-core:24791] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-25* vm_method.c (check_definition): fixed typo.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-25* vm_method.c (obj_respond_to_missing): added rdoc.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-25* vm_method.c (rb_mod_method_defined): should return true or false.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-25* vm_method.c (rb_mod_method_defined): should return true or false.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-23* vm_method.c (basic_obj_respond_to): new function to fundamentalmatz
behavior for #respond_to? * vm_method.c (basic_obj_respond_to): calls #respond_to_missing method if overridden, to check responsiveness of methods implemented by #method_missing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25054 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-13* vm_method.c (rb_add_method_def): no warning for inheritednobu
method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-12* vm_method.c (CALL_METHOD_HOOK): refined with macro.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-12* vm_method.c (remove_method): typo fixed.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-12* vm_method.c (rb_remove_method_id): no definition body isnobu
undefined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-12* vm_method.c (rb_alias): hooks are called from rb_add_method_def.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-12* vm_method.c (rb_add_method, rb_add_method_me): call method addednobu
hook after definition. [ruby-core:25536] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24867 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-27* vm_method.c (rb_remove_method_id): exported.nobu
* numeric.c (num_sadded): fix for non-ascii method name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-06* vm_method.c (rb_method_entry_eq): deals with optimized methodnobu
properly. [ruby-core:24789] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24421 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