summaryrefslogtreecommitdiffstats
path: root/eval.c
Commit message (Collapse)AuthorAgeFilesLines
* * eval_safe.c, safe.c: rename eval_safe.c to safe.c.ko12008-09-231-3/+0
| | | | | | | | | * common.mk, eval.c, safe.c, inits.c: separate safe.c from eval.c and make Init_safe(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c, include/ruby/ruby.h: rename rb_register_mark_object()ko12008-09-151-3/+0
| | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@19365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/signal.h: removed.ko12008-09-031-26/+0
| | | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@19080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (Init_eval): typo fixed in r17833.nobu2008-07-031-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (Init_eval), gc.c (Init_GC), proc.c (Init_Proc): freezenobu2008-07-021-1/+2
| | | | | | | messages of preallocated special exceptions also. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_interrupt): trick to suppress GCC warning.shyouhei2008-07-011-2/+1
| | | | | | | * sprintf.c (rb_str_format): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_block_given_p): fix to skip class frame.ko12008-06-151-2/+6
| | | | | | | | | [ruby-core:14813] * KNOWNBUGS.rb, bootstraptest/test_method.rb: move solved test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (rb_vm_t), vm.c (rb_vm_mark): moved preallocated specialnobu2008-06-151-3/+6
| | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@17165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c, eval_intern.h (PASS_PASSED_BLOCK):ko12008-06-101-6/+4
| | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@17084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (Init_stack): don't declare. it is a macro now.akr2008-06-091-1/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.nobu2008-06-091-1/+1
| | | | | | | * *.c: no cache in init functions. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_finalize_0): clear trace_func after executing ENDmame2008-06-051-1/+1
| | | | | | | | | procs. * thread.c: fix typo. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * suppress warnings with -Wwrite-string.nobu2008-05-311-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval_method.c: renamed from vm_method.c. "vm_method.c" is includedko12008-05-241-1523/+15
| | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@16576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, eval_intern.h, include/ruby/intern.h, include/ruby/ruby.h,ko12008-05-221-20/+20
| | | | | | | | vm.c, vm_core.h, vm_insnhelper.c: remove pointless "const". git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, vm.c, vm_core.h, vm_insnhelper.c: specify "const".ko12008-05-221-21/+22
| | | | | | | | * vm_opts.h: add a OPT_TOKEN_THREADED_CODE macro. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, vm_insnhelper.c: fix cref in instance_evalko12008-05-191-1/+1
| | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@16486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c, insns.def, eval.c, vm_insnhelper.c: fix CREF handling.ko12008-05-191-95/+36
| | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@16468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): defer calling of rb_frame_self() until itmatz2008-05-131-2/+5
| | | | | | | | become really necessary. * eval.c (rb_call): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_cleanup): wrap ruby_finalize_0 by SAVE_ROOT_JMPBUF toakr2008-05-051-1/+7
| | | | | | | avoid SEGV by at_exit { Fiber.new{}.resume } on IA64. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_obj_respond_to): check the result of respond_to? methodakr2008-05-041-1/+1
| | | | | | | by RTEST. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_exec_node, ruby_run_node), ruby.c (process_options):nobu2008-04-121-12/+9
| | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@15983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_loop): Mention StopIteration in the document.knu2008-04-101-0/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/node.h: add new constants for rb_call()'s scope.matz2008-04-011-9/+6
| | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@15884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_obj_instance_eval): invalid comment syntax.nobu2008-03-211-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval_intern.h (rb_thread_raised_set): use generic flags.nobu2008-03-121-11/+4
| | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@15756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_local_variables): local_variables should return anmatz2008-03-101-1/+1
| | | | | | | | array of symbols. [ruby-dev:34008] * vm.c (collect_local_variables_in_env): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix doc.akr2008-03-091-5/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (stack_check): made flag per threads.nobu2008-02-281-7/+9
| | | | | | | * thread.c (rb_thread_set_raised, rb_thread_reset_raised): prefixed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_raise_jump): moved adjustment for control frame.nobu2008-02-191-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_exec_node): no thread starts inside iseq compilation.nobu2008-02-191-3/+5
| | | | | | | | | * eval.c (rb_f_raise): skip current control frame. [ruby-core:15589] * insns.def (opt_div): raise as the ordinary method. [ruby-core:15589] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (eval): allow to eval in a binding that has a singleton method.mame2008-02-131-1/+1
| | | | | | | | | | | | [ruby-dev:33763] * test/ruby/test_proc.rb: add tests to achieve over 70% test coverage of time.c. * test/ruby/test_method.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (eval): check if backtrace is empty. [ruby-core:15040]nobu2008-01-141-4/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * $Date$ keyword removed to avoid inclusion of locale dependentakr2008-01-061-1/+0
| | | | | | | string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (Init_eval): move instance_eval and instance_exec tomatz2008-01-041-2/+2
| | | | | | | | BasicObject. [ruby-core:14747] * lib/delegate.rb: should preserve new methods in BasicObject. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * README.EXT.ja, dir.c, eval.c, eval_intern.h, lex.c.src,matz2007-12-251-5/+5
| | | | | | | | lex.c.blt, keywords, load.c, thread.c: more ANSI'ize. a patch from Tadashi Saito <shiba AT mail2.accsnet.ne.jp> in [ruby-dev:32725] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_exc_raise): ANSI style.akr2007-12-241-9/+5
| | | | | | | | | | | | (rb_exc_fatal): ditto. (rb_raise_jump): ditto. (rb_jump_tag): ditto. (rb_block_given_p): ditto. * variable.c (original_module): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval_method.c (Init_eval_method): extracted from Init_evalakr2007-12-241-3/+1
| | | | | | | | | | for rdoc to find rb_mod_remove_method, rb_mod_undef_method and rb_mod_alias_method. * eval.c (Init_eval): call Init_eval_method. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (function_call_may_return_twice_jmp_buf): removed.akr2007-12-241-3/+0
| | | | | | | | (function_call_may_return_twice_false): removed. [ruby-core:14335] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enable several rdoc.akr2007-12-241-2/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enable documents for raise and local_variables.akr2007-12-231-4/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_obj_instance_eval): use class of immediate objects.ko12007-12-221-1/+1
| | | | | | | | * test/ruby/test_eval.rb: fix a test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_method_name): now __method__ and __callee__ arematz2007-12-221-30/+2
| | | | | | aliases. [ruby-core:14244] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk, *.ci: renamed to *.c.ko12007-12-201-4/+4
| | | | | | | | * eval_laod.c: renamed to load.c. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (errinfo_place): skip if error is Fixnum. [ruby-dev:32608]ko12007-12-191-1/+2
| | | | | | | | * bootstraptest/test_exception.rb, test_known_bug.rb: move fixed bug. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_protect): restore root_jmpbuf even if proc exits byakr2007-12-131-3/+3
| | | | | | | break such as dbm.delete_if { break }. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_protect): restore root_jmpbuf to avoid SEGV byakr2007-12-131-0/+3
| | | | | | | | 'IO.pipe; [].each.next' with gcc version 3.3.5 (Debian 1:3.3.5-13) on IA64. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (Init_Object): singleton_method_{added,removed,undefined}matz2007-12-111-1/+2
| | | | | | | | | hooks should be defined for BasicObject. [ruby-dev:32531] * eval.c (Init_eval): method_missing should be defined for all objects; moved to BasicObject. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_method_missing): RDoc update patch from Hugh Sassematz2007-12-101-0/+3
| | | | | | <hgs AT dmu.ac.uk>. [ruby-core:12932] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_public_send): rename invoke_method to public_send.matz2007-12-101-15/+7
| | | | | | it now invokes public method only no matter how it's called. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e