summaryrefslogtreecommitdiff
path: root/eval.c
AgeCommit message (Collapse)Author
2007-08-24* enumerator.c (enumerator_next): stop pre-fetching.matz
* 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
2007-08-24* eval.c (rb_f_send_bang): abandon the name funcall for privatematz
aware method call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18* eval.c: $! should not be writable.ko1
* 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
2007-08-17* eval.c (frame_func_id): return proper method ID.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-17* eval.c (rb_call), eval_method.ci (rb_add_method, rb_alias),ko1
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
2007-08-14* proc.c (Init_Proc), eval.c (Init_eval), eval_intern.h: moveko1
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
2007-08-13* eval.c (rb_clear_trace_func, rb_thread_stop_timer_thread):nobu
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
2007-07-20* compile.c, compile.h (DECL_ANCHOR, INIT_ANCHOR): split not tonobu
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
2007-07-12* blockinlining.c: remove "yarv" prefix.ko1
* 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
2007-07-10* eval.c, insnhelper.ci, vm.c: change cref index (-1 -> 2).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-10* eval.c (exec_under): add proper casts.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-10* vm.c, insnhelper.ci: fix svar interface.ko1
* 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
2007-07-06* eval.c (rb_interrupt): suppress a gcc's officious warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05* include/ruby/{intern,ruby}.h, compile.[ch], error.c, eval.c,nobu
eval_load.c, gc.c, iseq.c, main.c, parse.y, re.c, ruby.c, yarvcore.[ch] (ruby_eval_tree, ruby_sourcefile, ruby_sourceline, ruby_nerrs): purge global variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-26* cont.c (rb_fiber_s_new): revert initializing VM stack.ko1
* yarvcore.c (th_init2): ditto. * vm.c, vm.h: fix to stop using Qundef on VM stack. According to this change, VM stack should not include Qundef value. * insns.def (putundef): removed. * compile.c (iseq_compile_each): ditto. * eval.c (eval): fix spacing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25* gc.h: add RUBY_ prefix to debug macros.ko1
* cont.c, proc.c, yarvcore.c, * gc.c: define ruby_gc_debug_indent variable to debug mark/free. * vm.c, insnhelper.ci: rename some functions to vm_* or rb_vm_*. move some functions, definitions, declarations to suitable files. * eval.c, yarvcore.h, eval_error.ci, insnhelper.ci: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* eval.c: remove ruby_current_node and change eval() prototype.ko1
fix to use rb_sourcefile/line() instead of ruby_sourcefile/line. * error.c, eval_error.ci, eval_load.c, eval_safe.ci, gc.c, include/ruby/intern.h, parse.y, process.c, ruby.c: ditto. * vm.c: fix spaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* eval_*.h: rename to eval_*.ci.ko1
* common.mk: ditto. * eval_error.ci: remove ruby_set_current_source(). * error.c, eval.c, ruby.c: ditto. * eval_safe.c, proc.c: remove unused macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* vm.c: some refactoring.ko1
* rename th_* to vm_*. * remove unused variables functions. * add prototypes. * blockinlining.c, compile.c, cont.c, eval.c, eval_intern.h, eval_jump.h, eval_load.c, inits.c, insns.def, iseq.c, parse.y, proc.c, process.c, signal.c, thread.c, vm.c, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-18* eval.c (ruby_cleanup): return EXIT_FAILURE if any exceptions occurednobu
in at_exit blocks. [ruby-core:11263] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-17* eval.c (rb_method_missing): avoid an warning "too many argumentsakr
for format string" on "./ruby -ve 'def m() super end; m'". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-15* eval.c (ruby_finalize_1): rb_thread_t#errinfo should be clear withko1
Qnil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06* eval_intern.h, eval.c (ruby_init): remove POP_TAG_INIT().ko1
* cont.c (rb_fiber_start): remove zero-clearing tag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06* eval.c (rb_yield): fix to check Qundef.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05* parse.y (new_yield), compile.c (iseq_compile_each): fixko1
passing parameter. * eval.c, eval_jump.h: simplify rb_yield*. * proc.c (proc_mark): fix to mark proc->block.proc. * proc.c (Init_Proc): add Proc#lambda? * test/ruby/test_lambda.rb: add some tests. * vm.c (invoke_block): fix to check lambda block or not. * vm.c (th_yield_setup_args): fix to check arguments size when lambda block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05* compile.c: fixed indentation.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05* compile.c, dir.c, eval.c, eval_jump.h, eval_method.h, numeric.c,nobu
pack.c, parse.y, re.c, thread.c, vm.c, vm_dump.c, call_cfunc.ci, thread_pthread.ci, thread_win32.ci: fixed indentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-29* eval.c (rb_eval_cmd): just return if no exceptions.nobu
[ruby-dev:30820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-27* cont.c: support Fiber. Check test/ruby/test_fiber.rb for detail.ko1
Fiber is known as "Micro Thread", "Coroutine", and other terms. At this time, only Fiber#pass is supported to change context. I want to know more suitable method name/API for Fiber (... do you know more suitable class name instead of Fiber?) as "suspend/resume", "call", "yield", "start/kick/stop/restart", .... * eval.c, eval_intern.h, thread.c, yarvcore.c, yarvcore.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-25* eval.c (ruby_exec_internal): do nothing if no code.nobu
* compile.c (rb_iseq_compile): check node if NULL before check nd_type. [ruby-talk:252956] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-24* cont.c: check across trap violation.ko1
* eval.c, yarvcore.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-25* eval_intern.h (PUSH_TAG): no argument now.nobu
* eval.c, eval_error.h, eval_jump.h, eval_load.c, proc.c, thread.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-20* eval.c (ruby_cleanup): inversed the order of errinfos.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-20* eval.c (ruby_cleanup): fixed access to out of bound, and inversednobu
the order of errinfos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-19* eval.c (ruby_cleanup): re-send signal. [ruby-dev:30516]nobu
* eval_error.h (error_handle): no message when exiting by signal. * intern.h (rb_thread_signal_raise, ruby_default_signal): prototypes. * signal.c (esignal_init): takes a signal number and an optional signal name. * signal.c (interrupt_init): pass SIGINT always. * signal.c (ruby_default_signal): invoke system default signal handler. * signal.c (rb_f_kill): use NUM2PIDT instead of NUM2INT. * signal.c (rb_signal_exec, trap): handle SIGTERM. [ruby-dev:30505] * thread.c (rb_thread_signal_raise): now takes signal number instead of signal name. * thread.c (rb_thread_signal_exit): since rb_make_exception() calls #exception method, rb_class_new_instance() is not needed here. * yarvcore.h (struct rb_vm_struct), eval_jump.h (terminate_process): exit_code is no longer stored in VM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-19* eval.c, node.h, thread.c, yarvcore.[ch], eval_intern.h:ko1
support set_trace_func (incomplete. id and klass don't be passed). And support Thread#set_trace_func which hook only specified thread and Thread#add_trace_func which add new trace func instead of replace old one. C level API was modified. See thread.c (logic) and yarvcore.h (data structures). * vm.c, vm_macro.def: add hook points. * compile.c, insns.def: fix "trace" instruction. * iseq.c, vm_macro.h: add compile option "trace_instruction". * test/ruby/test_settracefunc.rb: hook "c-return" of set_trace_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-12* eval.c (rb_rescue2): restore cfp ([ruby-dev:30582]).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-12* eval.c (rb_protect): restore cfp ([ruby-dev:30671]).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-21* compile.c, parse.y, eval.c, intern.h, iseq.c, lex.c, node.h,ko1
proc.c, vm.c, vm_macro.def, vm_macro.def, yarvcore.c, yarvcore.h, debug.c, debug.h: merge half-baked-1.9 changes. The biggest change is to change node structure around NODE_SCOPE, NODE_ARGS. Every scope (method/class/block) has own NODE_SCOPE node and NODE_ARGS represents more details of arguments information. I'll write a document about detail of node structure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-20* eval.c: just minor changes (rdoc).usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-20* eval.c (rb_f_callee_name): add __method__ and __callee__ again.matz
__callee__ need to rework to adopt YARV. [ruby-core:10671] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-26* yarvcore.h, vm.h: rename th_invoke_yield() to th_yield().ko1
* blockinlining.c: ditto. * eval.c: ditto. * vm.c, insns.def: rename th_invoke_yield_cfunc() to th_yield_with_cfunc(). * yarvcore.h, yarvcore.c: rename theYarvVM to ruby_current_vm and yarvCurrentThread to ruby_current_thread. remove yarvVMArray. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-25* yarvcore.h: add rb_thread_t#top_wrapper, top_self.ko1
* eval_load.c (rb_load): support eval in wrapper module (load(file, true)). * eval.c: ditto. * eval_jump.h: ditto. * iseq.c: ditto. * vm.c: ditto. * yarvcore.c: ditto. * insns.def: add a empty line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-25* yarvcore.h:ko1
rename: rb_iseq_t#file_name -> filename rb_iseq_t#local_tbl -> local_table add: rb_iseq_t#local_table_size * compile.c: separate local_table_size and local_size (local variable size) * blockinlining.c: apply above rename. * compile.h: ditto. * eval.c: ditto. * iseq.c: ditto. * proc.c: ditto. * vm.c: ditto. * vm_dump.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-20* eval.c, vm.c, yarvcore.h: move definition of rb_call_super() toko1
vm.c from eval.c. change th_call_super() to static function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-08* blockinlining.c, error.c, eval.c, eval_error.h, eval_intern.h,ko1
eval_jump.h, eval_load.c, eval_safe.h, gc.c, proc.c, signal.c, thread.c, thread_pthread.ci, thread_win32.ci, vm.c, vm.h, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: fix typo (rb_thead_t -> rb_thread_t). * eval_intern.h: remove unused definitions. * common.mk: fix around vm_opts.h path and remove harmful argument passed to insns2vm.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-07* eval.c (specific_eval): suppress warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-07* eval.c: fixed to use ANSI function style.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-07* this commit is a result of refactoring. only renaming functions,ko1
moving definitions place, add/remove prototypes, deleting unused variables and removing yarv.h. This commit doesn't change any behavior of ruby/vm. * yarv.h, common.mk: remove yarv.h (contents are moved to yarvcore.h). * error.c, eval_intern.h: include yarvcore.h instead yarv.h * rename some functions: * debug.[ch]: debug_*() -> ruby_debug_*() * iseq.c: iseq_*() -> rb_iseq_*(), ruby_iseq_disasm() * iseq.c: node_name() -> ruby_node_name() * vm.c: yarv_check_redefinition_opt_method() -> rb_vm_check_redefinition_opt_method() * some refactoring with checking -Wall. * array.c: remove rb_ary_ptr() (unused) and remove unused local variables. * object.c: add a prototype of rb_mod_module_exec(). * eval_intern.h (ruby_cref): set it inline. * eval_load.c (rb_load), yarvcore.c: yarv_load() -> rb_load_internal(). * parse.y: add a prototype of rb_parse_in_eval() (in eval.c). * process.c: add a prototype of rb_thread_stop_timer_thread() (in thread.c). * thread.c: remove raw_gets() function (unused) and fix some format mismatch (format mismatchs have remained yet. this is todo). * thread.c (rb_thread_wait_fd_rw): fix typo on label name. * thread_pthread.ci: comment out codes with USE_THREAD_CACHE. * vm.c (rb_svar, rb_backref_get, rb_backref_get, rb_lastline_get, rb_lastline_set) : moved from yarvcore.c. * vm.c (yarv_init_redefined_flag): add a prototype and rename yarv_opt_method_table to vm_opt_method_table. * vm.c (rb_thread_eval): moved from yarvcore.c. * yarvcore.c: remove unused global variables and fix to use nsdr(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06* blockinlining.c, compile.c, compile.h, error.c, eval.c,ko1
eval_intern.h, eval_jump.h, eval_load.c, eval_method.h, eval_safe.h, gc.c, insnhelper.h, insns.def, iseq.c, proc.c, process.c, signal.c, thread.c, thread_pthread.ci, thread_win32.ci, vm.c, vm.h, vm_dump.c, vm_evalbody.ci, vm_macro.def, yarv.h, yarvcore.h, yarvcore.c: change type and macro names: * yarv_*_t -> rb_*_t * yarv_*_struct -> rb_*_struct * yarv_tag -> rb_vm_tag * YARV_* -> RUBY_VM_* * proc.c, vm.c: move functions about env object creation from proc.c to vm.c. * proc.c, yarvcore.c: fix rb_cVM initialization place. * inits.c: change Init_ISeq() order (after Init_VM). * ruby.h, proc.c: change declaration place of rb_cEnv from proc.c to ruby.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e