aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
Commit message (Collapse)AuthorAgeFilesLines
* * 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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/ruby/trunk@14591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enable several rdoc.akr2007-12-241-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enable documents for raise and local_variables.akr2007-12-231-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/ruby/trunk@14173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insnhelper.ci (vm_yield_with_cfunc): fix to passing argc on thirdko12007-12-011-0/+6
| | | | | | | | | | | | | parameter of IFUNC. [ruby-dev:32329] * enumerator.c: fix to pass exact number of argument. * eval.c (rb_yield_values2): added. * include/ruby/ruby.h: ditto. * bootstraptest/test_knownbug.rb: move a fixed test. * bootstraptest/test_block.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * signal.c (trap_signm): SIGVTALRM no longer used for greenmatz2007-11-301-1/+1
| | | | | | | | | thread. [ruby-talk:281318] * signal.c (ruby_sig_finalize): do not install SIG_DFL handler if previous handler is sighandler(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_method_missing): fix stack trace.ko12007-11-271-0/+2
| | | | | | | | | * bootstraptest/test_knownbug.rb: move solved tests. * bootstraptest/test_method.rb, test/ruby/test_regexp.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (eval): should be volatile value for GC.ko12007-11-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (send_internal): use self in the previous frame to check fornobu2007-11-091-4/+10
| | | | | | | | | protected methods. [ruby-core:13254] * insnhelper.ci (vm_call_method): send! method has gone. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_invoke_method): check if invoked in function style.nobu2007-11-091-2/+2
| | | | | | | | | | | | | [ruby-core:13245] * insnhelper.ci (vm_call_cfunc, vm_cfunc_flags): stores and returns VM calling flags. * vm.c (rb_vm_cfunc_funcall_p): returns if the current method is invoked in function style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c: fix typo in invoke_method documentationdavidflanagan2007-11-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (Init_eval): move #send to Kernel module from BasicObject.matz2007-11-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_send): allow send/__send__ to call methods of allmatz2007-11-041-24/+20
| | | | | | | | | | visibility again. we no longer provide __send, __send!. * eval.c (rb_invoke_method): new method to honor private visibility. if it's invoked in a function call style, it calls private methods as well (previous 1.9 send behavior). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_options), ruby.c (proc_options, process_options): notnobu2007-10-011-3/+10
| | | | | | | | | call exit(2) directly. [ruby-dev:31912] * eval.c (ruby_run_node): deal with direct exit code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h: export rb_ivar_foreach.akr2007-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/ruby/ruby.h: modify struct RObject and RClass for optimizing T_OBJECT space. [ruby-dev:31853] (ROBJECT_LEN, ROBJECT_PTR) (RCLASS_IV_TBL, RCLASS_M_TBL, RCLASS_SUPER, RCLASS_IV_INDEX_TBL) (RMODULE_IV_TBL, RMODULE_M_TBL, RMODULE_SUPER): abstract accessor defined. * variable.c: support the modified RObject and RClass. * object.c: ditto. * class.c: ditto. * gc.c: ditto. * marshal.c: ditto. * eval_method.ci: use the abstract accessor. * insns.def: ditto. * proc.c: ditto. * struct.c: ditto. * eval.c: ditto. * error.c: ditto. * vm.c: ditto. * insnhelper.ci: ditto. * ext/digest/digest.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (eval): fix to check stack overflow.ko12007-09-261-0/+1
| | | | | | | | * eval_intern.h, vm.h: move CHECK_STACK_OVERFLOW() macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_longjmp): source file information may be NULL.matz2007-09-251-4/+11
| | | | | | | | [ruby-dev:31849] * eval.c (ruby_finalize_0): clear trace_func before finalization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.h, eval_intern.h: move some macros to eval_intern.h.ko12007-09-141-2/+0
| | | | | | | | | * eval_jump.ci (rb_f_throw): fix to use NEW_THROW_OBJECT(). * eval.c (rb_f_loop): remove additional macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c: provide basic features for M17N.matz2007-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * parse.y: encoding aware parsing. * parse.y (pragma_encoding): encoding specification pragma. * parse.y (rb_intern3): encoding specified symbols. * string.c (rb_str_length): length based on characters. for older behavior, bytesize method added. * string.c (rb_str_index_m): index based on characters. rindex as well. * string.c (succ_char): encoding aware succeeding string. * string.c (rb_str_reverse): reverse based on characters. * string.c (rb_str_inspect): encoding aware string description. * string.c (rb_str_upcase_bang): encoding aware case conversion. downcase, capitalize, swapcase as well. * string.c (rb_str_tr_bang): tr based on characters. delete, squeeze, tr_s, count as well. * string.c (rb_str_split_m): split based on characters. * string.c (rb_str_each_line): encoding aware each_line. * string.c (rb_str_each_char): added. iteration based on characters. * string.c (rb_str_strip_bang): encoding aware whitespace stripping. lstrip, rstrip as well. * string.c (rb_str_justify): encoding aware justifying (ljust, rjust, center). * string.c (str_encoding): get encoding attribute from a string. * re.c (rb_reg_initialize): encoding aware regular expression * sprintf.c (rb_str_format): formatting (i.e. length count) based on characters. * io.c (rb_io_getc): getc to return one-character string. for older behavior, getbyte method added. * ext/stringio/stringio.c (strio_getc): ditto. * io.c (rb_io_ungetc): allow pushing arbitrary string at the current reading point. * ext/stringio/stringio.c (strio_ungetc): ditto. * ext/strscan/strscan.c: encoding support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (enumerator_next): stop pre-fetching.matz2007-08-241-3/+9
| | | | | | | | * enumerator.c (Init_Enumerator): remove next? method. * eval.c (rb_f_loop): now handles StopIteration exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_send_bang): abandon the name funcall for privatematz2007-08-241-11/+11
| | | | | | aware method call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c: $! should not be writable.ko12007-08-181-12/+42
| | | | | | | | | * eval.c (rb_rubylevel_errinfo): added. rb_errinfo() returns rb_threa_t#errinfo. rb_rubylevel_errinfo() returns $! value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (frame_func_id): return proper method ID.nobu2007-08-171-5/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call), eval_method.ci (rb_add_method, rb_alias),ko12007-08-171-15/+24
| | | | | | | | | | | insnhelper.ci (vm_call_method): fix to save safelevel for method node. * include/ruby/node.h: ditto. * bootstraptest/test_method.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (Init_Proc), eval.c (Init_eval), eval_intern.h: moveko12007-08-141-1/+6
| | | | | | | | | | | | init place of exception_error. * inits.c: ditto. * eval.c (Init_eval): set exception_error#throwed_state as TAG_FATAL. [ruby-dev:31407] * bootstraptest/test_exception.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_clear_trace_func, rb_thread_stop_timer_thread):nobu2007-08-131-12/+17
| | | | | | | | | | | declarations for forward refernces. * eval.c (rb_longjmp, eval): use local variable. * eval.c (rb_longjmp): string object not to be optimized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, compile.h (DECL_ANCHOR, INIT_ANCHOR): split not tonobu2007-07-201-3/+3
| | | | | | | | | | | | | | | | initialize aggregations with dynamic values. [ruby-talk:259306] * eval.c (rb_protect): not to initialize aggregations with dynamic values. [ruby-talk:259306] * gc.c (mark_current_machine_context): ditto. * thread.c (thgroup_list, call_trace_func): ditto. * vm.c (vm_init_redefined_flag): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * blockinlining.c: remove "yarv" prefix.ko12007-07-121-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * array.c, numeric.c: ditto. * insnhelper.ci, insns.def, vm_evalbody.ci: ditto. * yarvcore.c: removed. * yarvcore.h: renamed to core.h. * cont.c, debug.c, error.c, process.c, signal.c : ditto. * ext/probeprofiler/probeprofiler.c: ditto. * id.c, id.h: added. * inits.c: ditto. * compile.c: rename internal functions. * compile.h: fix debug flag. * eval.c, object.c, vm.c: remove ruby_top_self. use rb_vm_top_self() instead. * eval_intern.h, eval_load: ditto. * gc.c: rename yarv_machine_stack_mark() to rb_gc_mark_machine_stack(). * insnhelper.h: remove unused macros. * iseq.c: add iseq_compile() to create iseq object from source string. * proc.c: rename a internal function. * template/insns.inc.tmpl: remove YARV prefix. * thread.c: * vm.c (rb_iseq_eval): added. * vm.c: move some functions from yarvcore.c. * vm_dump.c: fix to remove compiler warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, insnhelper.ci, vm.c: change cref index (-1 -> 2).ko12007-07-101-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (exec_under): add proper casts.ko12007-07-101-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c, insnhelper.ci: fix svar interface.ko12007-07-101-6/+5
| | | | | | | | | | | | * compile.c (iseq_compile_each), yarvcore.h: fix to use new svar interface for flip flop. * eval.c: ditto. * insns.def: ditto. * include/ruby/intern.h: remove "rb_svar()" declaration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_interrupt): suppress a gcc's officious warning.nobu2007-07-061-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e