summaryrefslogtreecommitdiff
path: root/vm.c
AgeCommit message (Collapse)Author
2008-09-04* vm.c (rb_vm_mark): commit miss.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04* vm_core.h (struct rb_vm_struct): replaced signal staff with trapnobu
staff. * signal.c (signal_buff): per process resouce now. * signal.c (trap_list): moved to VM. * signal.c (rb_get_next_signal): reverted. * signal.c (rb_trap_exit): trap_pending_list was no longer used. * thread.c (timer_thread_function): delivers buffered per-process signals to each VMs. * vm.c (rb_vm_mark): marks trap_list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-20* proc.c (proc_new): use the given class.nobu
* vm.c (vm_make_proc): added an argument for the class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-15* vm.c (Init_VM): get rid of SEGV in a trace proc.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-14* vm.c (REWIND_CFP): get rid of statement expressions.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-14* vm.c (Init_VM): hide FrozenCore.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13* vm.c: rewind cfp to show proper backtrace.ko1
[ruby-dev:35820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12* vm.c, vm_insnhelper.c (vm_define_method): moveko1
function place. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-01* vm.c (Init_BareVM): check failure of malloc().mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-27* vm_core.h, thread.c: It is now prohibited to use Data_Get_Struct inmame
*_free against an object that is going to be free'ed. So, change type of thread_t#keeping_mutexes from VALUE to mutex_t. * vm.c: remove mark to keeping_mutexes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-27* include/ruby/ruby.h: add a type T_DEFERRED.ko1
* gc.c: fix deferred finalizer system. finalize processes of T_DATA and T_FILE are executed after gc process. And fix to use BUILTIN_TYPE() instead of seeing flag. * thread.c, vm_core.h: add RUBY_VM_SET_FINALIZER_INTERRUPT() and check intterupt_flag at rb_thread_execute_interrupts(). * thread.c (mutex_mark): fix to mark next_mutex. * vm.c (rb_thread_mark): fix to mark keeping_mutexes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-25* vm.c (vm_invoke_proc): skip setting safe_level ifko1
it from bmethod. This change makes test/ruby/test_proc.rb pass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-10* vm_core.h (rb_thread_t), vm.c (rb_thread_mark), process.cnobu
(rb_last_status_get, rb_last_status_set, rb_last_status_clear): moved last_status from rb_vm_t. [ruby-dev:35414] * vm.c (th_init2): initialize last_status with nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-08* thread.c (rb_set_coverages, rb_reset_coverages): enable and disablemame
coverage measurement. * thread.c (rb_get_coverages): rename and move from vm.c. * vm.c (rb_vm_get_coverages): ditto. * iseq.c (prepare_iseq_build): ditto. * thread.c (clear_coverage): ditto. * parse.y (coverage): ditto. * ext/coverage/coverage.c: use above functions, add new method Coverage.start and fix rdoc . git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-08* vm.c (rb_vm_mark): mark the last element of special_exceptions.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-03* include/ruby/intern.h: remove prototypes about coverage.mame
* iseq.c (prepare_iseq_build): add prototype. * parse.y (coverage): ditto. * thread.c (clear_coverage): ditto. * thread.c (update_coverage): use rb_sourceline. * thread.c (rb_get_coverages): rename and move to vm.c. * vm.c (rb_vm_get_coverages): ditto. * ext/coverage/coverage.c: add rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-03* ext/coverage/coverage.c, ext/coverage/extconf.rb: eliminatemame
COVERAGE__ and introduce coverage.so instead. How to measure coverage: (1) require "coverage.so", (2) require or load Ruby source file, and (3) Coverage.result will return the same hash as COVERAGE__. [ruby-dev:35324] * thread.c (rb_enable_coverages): start coverage measurement by using rb_add_event_hook. * thread.c (rb_get_coverages): returns current results of coverage measurement. * include/ruby/intern.h: add prototype for above two functions. * vm_core.h, vm.c: add field of coverages to rb_vm_t. * insns.def (trace): remove special handling for COVERAGE__. * iseq.c (prepare_iseq_build): switch COVERAGE__ to rb_get_coverages(). * parse.y (coverage): ditto. * thread.c (clear_coverage): ditto. * lib/coverage.rb: use coverage.so instead of COVERAGE__. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* proc.c, vm.c: fix to refer next ruby level cfp to make binding.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* compile.c, vm.c, insns.def: call FrozenCore.set_postexe methodko1
instead to use "postexe" insn. * id.c, id.h: add a prepared id for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* compile.c, insns.def, vm.c, vm_core.h: remove some insnsko1
(undef, alias, definemethod). Call RubyVM::FrozenCore's singleton method instead. Add "putiseq" and "putspecialobject" instructions. * id.c, id.h: add ids for above. * tool/parse.rb: "VM" no longer exists. Use RubyVM instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29* vm.c, vm_core.h,vm_core.h, vm_dump.c, iseq.c: rename class nameko1
VM -> RubyVM, and rename rb_cVM -> rb_cRubyVM. "VM" is too short name for class. * test/ruby/test_method.rb, test/ruby/test_settracefunc.rb: ditto. * include/ruby/ruby.h: rb_cRubyVM, rb_cEnv, rb_cISeq should not be exposed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-27* vm.c (vm_eval_body): if thrown exception is frozen, reraise it tonobu
create a new instance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-17* vm.c, vm_insnhelper.c: fix escape process with "braek" and "return"ko1
syntax in "lambda". [ ruby-Bugs-19304 ], [ruby-core:17164] * KNOWNBUGS.rb, bootstraptest/test_proc.rb: add/move solved test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17390 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-14* gc.h (STACK_UPPER): moved from gc.cnobu
* thread.c, thread_{pthread,win32}.c (ruby_init_stack, ruby_thread_init_stack): moved stack initialization from gc.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-12* thread.c, vm_core.h, vm.c, thread_pthread.c, thread_win32.c: addmame
deadlock detection. [ruby-dev:35044] * bootstraptest/test_thread.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17110 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* include/ruby/ruby.h, vm_core.h: add a type rb_blockptr.mame
* vm_insnhelper.c (vm_yield_with_cfunc): vm_yield_with_cfunc receives blockptr and passes it to iterating block. * proc.c (rb_proc_call), include/ruby/intern.h: rb_proc_call receives blockptr. "rb_proc_call(self, args, blockptr)" in C corresponds to "self.call(*args, &block)" in Ruby. * proc.c (proc_call): pass blockptr to block that is written in C. * proc.c (curry): receive blockptr and pass it to original proc. [ruby-core:15551] * vm.c (invoke_block_from_c): fix for change of vm_yield_with_cfunc. * thread.c (call_trace_proc), eval_jump.c (rb_call_end_proc): fix for change of rb_proc_call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17065 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-09* vm_core.h (struct rb_vm_struct): moved ruby_debug, ruby_verbose, andnobu
rb_progname. * ruby.c (rb_argv0): no longer used. * vm.c: getters/setters for ruby_{debug,verbose}. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* vm_core.h (struct rb_vm_struct): moved src_encoding_index.nobu
* ruby.c (struct cmdline_options): moved setids and req_list, and the latter is now an array, to prevent memory leak. * ruby.c (cmdline_options_init): added. * ruby.c (add_modules, require_libraries, init_ids, forbid_setid): use struct cmdline_options. * vm.c (vm_init2): initialize src_encoding_index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* vm.c (rb_thread_recycle_stack_release): reduce redundant code.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08* vm_insnhelper.c, vm.c, proc.c : revert r17021. [ruby-dev:34997]wanabe
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08* vm_insnhelper.c, vm.c, proc.c (proc_call): allow call method withwanabe
block that both is written in C. [ruby-dev:34273] [ruby-core:15551] * proc.c (curry): use proc_call instead of rb_proc_call. [ruby-dev:34273] [ruby-core:15551] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08* array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,ko1
enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c, io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c, string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c, vm.c, gc.c: allocated memory objects by xmalloc (ruby_xmalloc) should be freed by xfree (ruby_xfree). * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c, ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c, ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c, ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c, ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-05* gc.c (rb_objspace_alloc): this function is needed only whenmame
ENABLE_VM_OBJSPACE macro is defined. * vm.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-01* suppress warnings on cygwin, mingw and mswin.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16740 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-24* compile.c (iseq_set_exception_table, NODE_WHILE, NODE_NEXT): removemame
special handling that decrements sp in CATCH_TYPE_NEXT for NODE_WHILE. * vm.c (vm_eval_body), vm_insnhelper.c (vm_throw): remove unused code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16568 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* vm.c (sdr, nsdr): define methods only if VMDEBUG is defined.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22* vm.c (vm_get_ruby_level_cfp): moved from eval_intern.h.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 * eval_intern.h, vm_core.h, include/ruby/intern.h, include/ruby/ruby.h,usa
vm.c: need to add const to prototypes, of course. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16526 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* vm.c (invoke_block_from_c): fix call flow.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16483 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-17* vm.c (Init_VM): removed the definition of Thread#initialize,yugui
which is overwritten in Init_Thread and is never used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12* vm.c (collect_local_variables_in_env): remove unnecessary checkmame
which causes: x=1;proc{local_variables}.call #=> [] * test/ruby/test_variable.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-10* vm.c (env_mark): mark env->block.self. prevent SEGV when GC occurakr
in prepare_iseq_build with gcc version 3.4.6 [FreeBSD] 20060305 on FreeBSD/amd64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08* vm.c (rb_thread_mark): mark stat_insn_usage only when ptr is notnobu
null. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e