summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
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-04-19* eval.c (ruby_cleanup): the order of local variables on stack isnobu
undefined. should use outermost VALUE for ruby_init_stack. * gc.c (ruby_get_stack_grow_direction, Init_stack): allows volatile pointer. * thread_*.c (ruby_init_stack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02* eval.c (rb_longjmp), include/ruby/intern.h (ruby_cleanup): fixednobu
prototypes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22701 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
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-22* eval.c (ruby_options): evaluator now expects iseq instead of tree.yugui
* ruby.c (ruby_process_options): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-01* vm.c (vm_backtrace_each): now takes an iterator function.nobu
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@21932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-01* cont.c (rb_fiber_current), dln.c (dln_print_undef, dln_undefined),nobu
eval.c (rb_iterator_p, rb_need_block), load.c: (Init_load), ruby.c (uscore_get, rb_f_chop), st.c (stat_col), signal.c (rb_signal_buff_size, ruby_sig_finalize), thread.c (rb_thread_sleep_forever, rb_thread_sleep_deadly, rb_thread_alone): protoized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19* vm_eval.c, eval.c (rb_f_block_given_p): move definition ofko1
"iterator?" and "block_given?" to make static. * vm.c (vm_get_ruby_level_caller_cfp): make it static. * eval_intern.h, vm_insnhelper.c: move decl. of vm_get_ruby_level_caller_cfp() from eval_intern.h to vm_insnhelper.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19* vm.c: add a prefix "rb_" to exposed functionsko1
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@21659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19* eval.c, vm_eval.c (rb_f_local_variables): move definition from eval.cko1
to vm_eval.c because vm_collect_local_variables_in_heap() should be static function. * vm.c (vm_collect_local_variables_in_heap): make it static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12* eval.c: remove unused decl.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27* eval.c (rb_frame_callee, rb_frame_caller): rb_frame_callee()ko1
should return method id on current frame. add rb_frame_caller() to get method id on parent frame. Bug #884 [ruby-dev:37446] * eval.c (rb_f_method_name): use rb_frame_caller() instead of rb_frame_callee(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27* eval.c (get_errinfo): return th->errinfo valueko1
if normal errinfo place (dynamic local viriable) is not found. fixes Bug #732 [ruby-dev:37046]. * bootstraptest/test_proc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27* vm.c (Init_VM): create and define TOPLEVEL_BINDING at first.ko1
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@21079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-08* eval.c (rb_make_exception): single argument to raise may bematz
string compatible object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-05removed unsupported platforms from an ifdef macro.yugui
These lines were mistakenly removed at r19681 and recovered too much at r19684. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-05* eval.c: come back definition of environ.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* dln.c: Ruby no longer supports VMS.yugui
* error.c: ditto. * eval.c: ditto. * eval_intern.h: ditto. * include/ruby/defines.h: ditto. * include/ruby/ruby.h: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * vms/config.h: removed. * vms/vms.h: ditto. * vms/vmsruby_private.c: ditto. * vms/vmsruby_private.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* dln.c: Ruby no longer supports Windows CE.yugui
* eval.c: ditto. * include/ruby/defines.h: ditto. * include/ruby/win32.h: ditto. * ruby.c: ditto. * strftime.c: ditto. * win32/Makefile.sub: ditto. * win32/win32.c: ditto. * ext/tk/extconf.rb: ditto. * lib/fileutils.rb: ditto. * test/fileutils/test_fileutils.rb: ditto. * wince/*: removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* dln.c: Ruby no longer supports MacOS 9 or before.yugui
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-25* vm_eval.c (Init_vm_eval): define module_eval, class_eval and evalakr
here for rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* include/ruby/node.h, vm_core.h: move definition ofko1
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* eval_safe.c, safe.c: rename eval_safe.c to safe.c.ko1
* common.mk, eval.c, safe.c, inits.c: separate safe.c from eval.c and make Init_safe(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15* gc.c, include/ruby/ruby.h: rename rb_register_mark_object()ko1
to rb_gc_register_mark_object(). * eval.c, vm.c: initialize vm->mark_object_ary at Init_top_self(). * bignum.c, complex.c, encoding.c, ext/win32ole/win32ole.c, io.c, load.c, marshal.c, rational.c, ruby.c, vm.c: use rb_gc_register_mark_object() instead of rb_global_variable() or rb_gc_register_address(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03* include/ruby/signal.h: removed.ko1
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-03* eval.c (Init_eval): typo fixed in r17833.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-02* eval.c (Init_eval), gc.c (Init_GC), proc.c (Init_Proc): freezenobu
messages of preallocated special exceptions also. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 * eval.c (rb_interrupt): trick to suppress GCC warning.shyouhei
* sprintf.c (rb_str_format): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-15* eval.c (rb_f_block_given_p): fix to skip class frame.ko1
[ruby-core:14813] * KNOWNBUGS.rb, bootstraptest/test_method.rb: move solved test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-15* vm_core.h (rb_vm_t), vm.c (rb_vm_mark): moved preallocated specialnobu
exceptions. * eval.c (Init_eval), gc.c (Init_GC), proc.c (Init_Proc): freeze preallocated special exceptions. * eval.c (rb_longjmp): duplicate the thrown exception to set backtrace if it was frozen. * gc.c (rb_memerror): raise nomem_error without backtrace if failed to make backtrace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10* vm.c, eval_intern.h (PASS_PASSED_BLOCK):ko1
set a VM_FRAME_FLAG_PASSED flag to skip this frame when searching ruby-level-cfp. * eval.c, eval_intern.h, proc.c: fix to check cfp. if there is no valid ruby-level-cfp, cause RuntimeError exception. [ruby-dev:34128] * vm_core.h, vm_evalbody.c, vm.c, vm_dump.c, vm_insnhelper.c, insns.def: rename FRAME_MAGIC_* to VM_FRAME_MAGIC_*. * KNOWNBUGS.rb, bootstraptest/test*.rb: move solved bugs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* eval.c (Init_stack): don't declare. it is a macro now.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.nobu
* *.c: no cache in init functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-05* eval.c (ruby_finalize_0): clear trace_func after executing ENDmame
procs. * thread.c: fix typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16846 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-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-05-22* eval.c, eval_intern.h, include/ruby/intern.h, include/ruby/ruby.h,ko1
vm.c, vm_core.h, vm_insnhelper.c: remove pointless "const". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22* eval.c, vm.c, vm_core.h, vm_insnhelper.c: specify "const".ko1
* vm_opts.h: add a OPT_TOKEN_THREADED_CODE macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19* eval.c, vm_insnhelper.c: fix cref in instance_evalko1
and cvar_base search protocol. * bootstraptest/test_knownbug.rb, test_eval.rb: move soleved test and add new tests. * test/ruby/test_eval.rb: fix tests for spec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19* vm.c, insns.def, eval.c, vm_insnhelper.c: fix CREF handling.ko1
VM value stack frame of block contains cref information. (dfp[-1] points CREF) * compile.c, eval_intern.h, eval_method.c, load.c, proc.c, vm_dump.h, vm_core.h: ditto. * include/ruby/ruby.h, gc.c: remove T_VALUES because of above changes. * bootstraptest/test_eval.rb, test_knownbug.rb: move solved test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-13* eval.c (rb_call0): defer calling of rb_frame_self() until itmatz
become really necessary. * eval.c (rb_call): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05* eval.c (ruby_cleanup): wrap ruby_finalize_0 by SAVE_ROOT_JMPBUF toakr
avoid SEGV by at_exit { Fiber.new{}.resume } on IA64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-04* eval.c (rb_obj_respond_to): check the result of respond_to? methodakr
by RTEST. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-12* eval.c (ruby_exec_node, ruby_run_node), ruby.c (process_options):nobu
use iseq instead of NODE. * gc.c (source_filenames): removed. * include/ruby/intern.h, parse.y (yycompile, parser_mark, parser_free, ripper_initialize): rb_source_filename() is no longer used. * compile.c, compile.h (ERROR_ARGS), parse.y (node_newnode, fixpos, parser_warn, e_option_supplied, warn_unless_e_option, range_op, cond0): nd_file is no longer used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10* eval.c (rb_f_loop): Mention StopIteration in the document.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-01* include/ruby/node.h: add new constants for rb_call()'s scope.matz
* eval.c (iterate_method): use CALL_* scope constant to specify proper scope value. * eval.c (rb_each, rb_apply, rb_funcall, rb_funcall2, rb_funcall3): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-21* eval.c (rb_obj_instance_eval): invalid comment syntax.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-12* eval_intern.h (rb_thread_raised_set): use generic flags.nobu
* eval.c (rb_longjmp): clear all raised flags. * eval.c (stack_check): leave clearing flag to rb_longjmp. * gc.c (rb_memerror): use thread raised flag instead of static flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-10* eval.c (rb_f_local_variables): local_variables should return anmatz
array of symbols. [ruby-dev:34008] * vm.c (collect_local_variables_in_env): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e