summaryrefslogtreecommitdiff
path: root/vm_eval.c
AgeCommit message (Collapse)Author
2010-04-15* vm.c (vm_backtrace_each): get rid of use of malloc from signalnobu
handler by using ruby_engine_name. [ruby-core:29497] * vm_eval.c (print_backtrace): file may be nil when segfaulted in very early stage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27345 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-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-02-17* vm_insnhelper.c (vm_call_cfunc): removed unused variable.nobu
* vm.c (vm_frametype_name): define only when VMDEBUG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-27* vm_eval.c (rb_backtrace): "circular require" warning was output tomame
stdout except the first line. All line is output to stderr now. [ruby-dev:40147] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-24* eval.c, vm.c, vm_eval.c, vm_insnhelper.c: fix issues aboutko1
return and c-return trace. This issue skips (c-)return event with global jump such as break or return. This fix make vm invoke hooks at stack rewind timing. fix [ruby-core:27606] [Bug #2610]. * test/ruby/test_settracefunc.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-20* vm_eval.c (rb_iterate): remove SEGV (retry).mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-20* vm_eval.c (rb_iterate): remove SEGV (use the original patch).mame
[ruby-dev:39874] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-20* vm_eval.c (rb_iterate): pass current block when the argument bl_procmame
is NULL. This behavior can be used to make enumerator faster [ruby-dev:39874] * enumerator.c (enumerator_each): pass current block directly instead of trampoline block (enumerator_each_i). * io.c (argf_each_line, argf_each_byte, argf_each_char): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-19* vm_eval.c (check_funcall): reset method_missing_reason beforenobu
trying the call. based on a patch from Yehuda Katz in [ruby-core:27219]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-10* vm_eval.c (yield_under): yields self the same as 1.8.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-04avoid SEGV in instance_eval without block.shugo
instance_eval does not yield self. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25988 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-11-29* vm_eval.c (check_funcall_failed): pass ID. [ruby-core:26934]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-28* vm_eval.c (check_funcall_failed): should rescue user raisedmatz
NoMethodError. rescue all NoMethodError if receiver does not respond to the method name. [ruby-dev:39796] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-25* vm_eval.c (rb_search_method_entry): refine error message.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-21* vm_eval.c (rb_search_method_entry): show flags and klass value inakr
not implemented error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-20* vm_eval.c (rb_search_method_entry): avoid trigraph.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-18* vm_eval.c (rb_search_method_entry): show the type of the hiddenakr
object. (rb_type_str): new function for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-16* vm_insnhelper.c (vm_call_method): protected singleton methods ofshugo
an object should not be able to called from other instances of the class of the object. [ruby-core:26761] * vm_eval.c (rb_method_call_status): ditto. * test/ruby/test_module.rb (test_protected_singleton_method): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03fix typos.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-31* enum.c (enum_count): remove optimization using #size.matz
revert r25560. * vm_eval.c (rb_funcall_no_recursive): remove method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-31* vm_eval.c (check_funcall): logic updated according tomatz
[ruby-dev:39594]. search method entry, call if it exists; otherwise check method_missing, call if it was overridden, protecting exceptions; if NoMethodError happens, check method name. * vm_eval.c (vm_call0): use idMethodMissing. * vm_eval.c (rb_search_method_entry): typo fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-30* vm_eval.c (enum call_type): get rid of last comma.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-30* vm_eval.c (vm_call0, vm_call_super, rb_f_send, rb_f_public_send):nobu
fixed call_type. [ruby-dev:39581] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-30* vm_eval.c (rb_search_method_emtry, rb_method_call_status): splitnobu
from rb_call0(). * vm_eval.c (rb_check_funcall): get rid of raising exceptions and hiding further exceptions. [ruby-dev:39584] * vm_eval.c (rb_funcall_no_recursive): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-29* enum.c (enum_count): call #size using rb_funcall_no_recursive()matz
to prevent infinite recursive calls. [ruby-core:24794] * vm_eval.c (rb_funcall_no_recursive): utility function to check direct recursive call. * vm_eval.c (rb_check_funcall): move from eval.c. [refactoring] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-29* array.c (rb_ary_to_ary): do not use #respond_to? to detectmatz
to_ary. Just call. [ruby-core:23738] * eval.c (rb_check_funcall): new function with method existence check. returns Qundef when the method does not exist. * enumerator.c (enumerator_rewind): just call method, using rb_check_funcall(). [ruby-core:23738] * error.c (exc_equal): ditto. * object.c (convert_type): ditto. * error.c (rb_name_err_mesg_new): export function. * eval.c (make_exception): ditto. * io.c (pop_last_hash): return early when the last argument is nil. * io.c (rb_io_puts): treat T_STRING specially for small optimization. * vm_eval.c (raise_method_missing): skip method call if possible using rb_method_basic_definition_p(). * vm_eval.c (method_missing): ditto. * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_debug): test suites changed to ignore exceptions caused by just-call policy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-14* vm_eval.c (eval_string): rdoc fix [ruby-core:26086]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25335 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-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-15* vm_eval.c (rb_catch_obj, rb_catch, rb_f_catch): No longer use the obsolete ↵marcandre
function rb_iterate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-01* vm_eval.c (eval_string_with_cref): fix to check local_table_size.ko1
[ruby-dev:39205] [Bug #2024] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-29Doxygen comment.yugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24703 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-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-16* vm_eval.c: adjusted indent.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24139 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-06-15* vm_eval.c (rb_call0): refine exception message for hidden objects.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-14* thread.c, vm_eval.c: add Thread.backtrace.ko1
* test/ruby/test_thread.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-12* vm_eval.c (rb_f_local_variables): now returns symbols. a patch fromnobu
Run Paint Run Run at [ruby-core:23828]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-12* vm_eval.c (rb_f_catch): updated rdoc about generalized argument,nobu
and the case without arguments. [ruby-core:23827] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-12* vm_eval.c (rb_f_throw): fixed rdoc about execption.nobu
[ruby-core:23824] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-20* include/ruby/ruby.h (rb_long2int, RARRAY_LENINT): check long tonobu
cast to int. [ruby-dev:38508] * struct.c, vm_eval.c, vm_insnhelper.c: use RARRAY_LENINT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-20* vm_eval.c, vm_insnhelper.c: argument number is restricted tonobu
int, and fixed overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-09* vm_eval.c (rb_f_catch): gets rid of issue with gcc 4.4. a patchnobu
from Alexey Froloff in [ruby-core:23398]. [ruby-core:22924] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-30* vm_eval.c (eval_string_with_cref): replaces the message ifnobu
frozen. [ruby-dev:38208] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13* vm_eval.c (rb_throw_obj): inverted call flow. [ruby-core:22872]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-28* vm_eval.c (rb_iterate): use volatile to suppress warnings.akr
* eval.c (ruby_cleanup): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e