summaryrefslogtreecommitdiff
path: root/eval_error.c
AgeCommit message (Collapse)Author
2013-06-24* eval_error.c (warn_printf): use rb_vsprintf instead so ruby specificcharliesome
extensions like PRIsVALUE can be used in format strings * eval_error.c (error_print): use warn_print_str (alias for rb_write_error_str) to print a string value instead of using RSTRING_PTR and RSTRING_LEN manually * eval.c (setup_exception): use PRIsVALUE instead of %s and RSTRING_PTR git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11* eval_error.c (error_print): reduce RARRAY_AREF().nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 * eval_error.c (error_print): keep that errat is non-shady object.tarui
and guard errat from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10eval_error.c: use checking functionsnobu
* eval_error.c (error_print): use checking functions instead of catching exceptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10eval_error.c: restore errinfonobu
* eval_error.c (error_print): restore errinfo for the case new excecption raised while printing the message. [ruby-core:55365] [Bug #8501] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10eval_error.c: reduce setjmpnobu
* eval_error.c (error_print): reduce calling setjmp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-24call rb_frame_callee() only oncenobu
* eval_error.c (error_pos): no needs to call rb_frame_callee() twice. * safe.c (rb_secure, rb_insecure_operation): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* *.c, parse.y, insns.def: use RARRAY_AREF/ASET macroko1
instead of using RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22internal.h: quote unprintablenobu
* internal.h (QUOTE, QUOTE_ID): quote unprintable chars in strings and IDs. [Bug #7574] [ruby-dev:46749] * string.c (rb_str_quote_unprintable): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-23* eval_error.c (error_print), vm_eval.c (eval_string_with_cref),ko1
vm_trace.c (rb_suppress_tracing): use TH_PUSH_TAG() instead of PUSH_TAG(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24* vm_method.c (rb_method_defined_by): removed.ko1
nobu pointed out that rb_method_basic_definition_p() is enough for last commit. * error.c, eval_error.c: change for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24* vm.c: add RubyVM::Backtrace object (btobj).ko1
Backtrace information contains an array consists of location information for each frames by string. RubyVM::Backtrace object is lightweight backtrace information, which contains complete information to generate traditional style backtrace (an array of strings) with faster generation. If someone accesses to backtrace information via Exception#backtrace, then convert a RubyVM::Backtrace object to traditonal style backtrace. This change causes incompatibility on marshal dumpped binary of Exception. If you have any trouble on it, please tell us before Ruby 2.0 release. Note that RubyVM::Backtrace object should not expose Ruby level. * error.c, eval.c, vm_eval.c: ditto. * internal.h: ditto. * eval_error.c: fix to skip "set_backtrace" method invocation in creating an exception object if it call a normal set_backtrace method (defined by core). * test/ruby/test_settracefunc.rb: fix for above change. * vm_method.c (rb_method_defined_by): added. This function checks that the given object responds with the given method by the given cfunc. * benchmark/bm_vm2_raise1.rb, benchmark/bm_vm2_raise2.rb: add to measure exception creation speed. raise1 create exception objects from shallow stack frame. raise2 create exception objects from deep stack frame. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13* eval_error.c (error_print): use RB_TYPE_P instead of TYPE.nobu
* error.c (rb_check_backtrace): ditto. * error.c (name_err_mesg_to_str): compare immediate values directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-29* use RB_TYPE_P which is optimized for constant types, instead ofnobu
comparison with TYPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26* eval_error.c (rb_print_undef_str): new function to raisenobu
NameError for undefined method. * load.c (rb_mod_autoload_p), object.c (rb_mod_const_get), variable.c (rb_f_untrace_var, set_const_visibility), vm_method.c (rb_mod_{remove,undef,alias}_method, set_method_visibility): remove inadvertent symbol creation. based on the first patch by Jeremy Evans at [ruby-core:38447]. [Feature #5089] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18* internal.h: declare more internal functions.akr
* iseq.h (rb_method_get_iseq): declared. * compile.c, eval.c, eval_error.c, iseq.c, parse.y, proc.c, range.c, ruby.c, time.c, util.c, vm.c: don't declare internal functions. * eval.c, parse.y, thread_pthread.c: non-existing function declarations removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-12* eval_error.c: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-21* eval_error.c (error_print): clear raised_flag while error-printingwanabe
to avoid hang. [ruby-core:27608] * test/ruby/test_beginendblock.rb (test_endblock_raise): add test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-06* eval_error.c (error_print): removed an extra argument.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-05* eval.c (rb_longjmp): reset raised flag before fatal error.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24401 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-02-28* eval_error.c (error_print): use volatile to suppress warnings.akr
* vm_eval.c (eval_string_with_cref): ditto. * thread.c (rb_exec_recursive): ditto. * eval_jump.c (rb_exec_end_proc): ditto. * eval.c (ruby_exec_node): ditto. (rb_longjmp): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22stripped trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31* suppress warnings with -Wwrite-string.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-27* eval_error.c (error_handle): SystemExit and SignalException throwsnobu
TAG_RAISE but not TAG_FATAL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-24* eval_method.c: renamed from vm_method.c. "vm_method.c" is includedko1
by "vm.c". * vm_eval.c: added. Some codes are moved from "eval.c" * common.mk: fix for above changes. * compile.c: make a vm_eval(0) * eval.c, eval_error.c, eval_intern.h, eval_jump.c, proc.c, vm.c, id.c, id.h, vm_core.h, vm_dump.c, vm_evalbody.c, vm_insnhelper.c, blockinlining.c: fix for above changes. and do some refactoring. this changes improve rb_yield() performance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-28* eval_error.c (error_handle): commit miss.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-14* eval_error.c (error_print): append a newline to rest lines.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-20* common.mk, *.ci: renamed to *.c.ko1
* eval_laod.c: renamed to load.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e