summaryrefslogtreecommitdiff
path: root/vm.c
AgeCommit message (Collapse)Author
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
2008-05-07* vm.c (vm_eval_body): initialize retval. [ruby-dev:34576]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-30* load.c (rb_load_path), vm_core.h (rb_vm_t): moved to VM.nobu
* load.c (rb_get_load_path): returns absolute load path. * load.c (load_path_getter): $LOAD_PATH getter. * file.c (rb_find_file_ext, rb_find_file), ruby.c (push_include, ruby_init_loadpath): use the accessor. * vm.c (rb_vm_mark): mark load_path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-27* vm_core.h (rb_vm_t), gc.c (rb_objspace, rb_newobj), vm.cnobu
(Init_BareVM): per-VM object space support, which is disabled now. * gc.c (rb_objspace_alloc), vm.c (Init_BareVM): should not use ruby malloc here. * gc.c (garbage_collect, etc): performance improvement by passing the reference instead of refering the global variable in each functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16218 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-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
2008-02-05* vm.c (rb_call_super): pass a passed block when super is called viamame
rb_call_super. [ruby-dev:33598] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* iseq.c: all methods need $SAFE < 1.ko1
vm.c: comment out debug functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* vm.c (rb_frame_method_id_and_class): new function to get theshugo
method id and class of the current frame. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* vm.c (Init_VM): remove unused code.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* vm.c: check frame is FINAL when creating env.ko1
[ruby-core:14395] * bootstraptest/test_block.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* vm.c: add dummy toplevel frame.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* compile.c (iseq_compile): clear local table if node == 0.ko1
a patch from Yusuke ENDOH <mame AT tsg.ne.jp> * vm.c: clear VM stack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* proc.c (method_name): preserve Symbol's encoding.matz
* numeric.c (fix_id2name): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* proc.c (rb_proc_new), vm.c (invoke_block): removed u3.state magic.nobu
[ruby-core:14310] * test/ruby/test_symbol.rb (test_to_proc): a test from Frederick Cheung <frederick.cheung AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* vm.c, vm_dump.c: fix typo.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* regerror.c, string.c, io.c, lib/getoptlong.rb, lib/net/imap.rb,akr
compile.c, sprintf.c, parse.y, ext/win32ole/win32ole.c, ext/tk/sample/demos-en/entry3.rb, ext/tk/lib/tcltk.rb, ext/openssl/ossl_bn.c, numeric.c, vm.c, benchmark/bm_so_meteor_contest.rb, bignum.c, ruby.c: don't "illegal" for non law violation context. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-20* common.mk, *.ci: renamed to *.c.ko1
* eval_laod.c: renamed to load.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-20* insnhelper.ci, vm.c, vm_core.h: change interface ofko1
vm_invoke_block() to specify block ptr. [ruby-talk:266422] * cont.c, eval_jump.ci, insns.def, proc.c, signal.c, thread.c: apply above change. * bootstraptest/test_knownbug.rb: move fixed bug. * bootstraptest/test_block.rb: ditto. and add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18* insnhelper.ci, vm.c: rewrite sp manipulation around method/blockko1
invocation. [ruby-dev:32547] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18* vm.c (invoke_block): merge 2 stack overflow checks.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-15* vm_core.h (rb_thread_t): new member machine_stack_maxsize andakr
machine_register_stack_maxsize. * gc.c (rb_gc_stack_maxsize): new global variable for the thread size of the main thread. (STACK_LEVEL_MAX): use machine_stack_maxsize of current thread. (ruby_stack_check): check IA64 register stack. (ruby_set_stack_size): set rb_gc_stack_maxsize. (Init_stack): set rb_gc_stack_maxsize. * thread_pthread.ci (native_thread_create): initialize th->machine_stack_maxsize and th->machine_register_stack_maxsize. * vm.c (Init_BareVM): initialize th->machine_stack_maxsize and th->machine_register_stack_maxsize. * thread_win32.ci (native_thread_create): initialize th->machine_stack_maxsize. not tested. just a guess at all. [ruby-dev:32604] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-09* vm.c (rb_thread_mark): use rb_gc_mark_maybe() forko1
VM stack specified by mark_stack_len. * insnhelper.ci: clear vm stack extended by opt value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-05* proc.c (rb_proc_s_new): call initialize. [ruby-core:13824]nobu
* proc.c (rb_proc_location): return file name and line number where the proc is defined. * thread.c (thread_s_new): call initialize. [ruby-core:13835] * thread.c (thread_initialize): split initialize method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23* vm.c: fix comment.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-22* insnhelper.ci (vm_search_normal_superclass): rename function.matz
* insnhelper.ci (vm_search_superclass): ditto. * proc.c (struct METHOD): rename rklass -> rclass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-21* vm.c: fix to recycle thread data (VM stack).ko1
* thread.c: ditto. * benchmark/bm_vm3_thread_create_join.rb: add loop count. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-11* insnhelper.ci (vm_call_method): pass mn->nd_clss toshugo
vm_call_cfunc() instead of klass. * vm.c (rb_thread_method_id_and_klass): traverse parent_iseq. * thread.c (call_trace_proc): use rb_thread_method_id_and_klass(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-09* eval.c (rb_invoke_method): check if invoked in function style.nobu
[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
2007-09-28* include/ruby/intern.h: export rb_ivar_foreach.akr
* 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
2007-09-26* encoding.c (rb_enc_check): check for ASCII-compatibilities.nobu
* parse.y (parser_tokadd_string, parser_parse_string, parser_here_document, parser_yylex): set encoding to US-ASCII. * parse.y (rb_enc_symname_p): check if valid with encoding. * parse.y (rb_intern3): let symbols have encoding. * string.c (rb_str_hash): add encoding index. * string.c (rb_str_comparable, rb_str_equal, rb_str_eql): check if compatible encoding. * string.c (sym_inspect): made encoding aware. * insns.def (opt_eq): compare with encoding. * include/ruby/encoding.h (rb_enc_asciicompat): check if ASCII compatible. * include/ruby/encoding.h (rb_enc_get_index): added prototype. * include/ruby/intern.h (rb_str_comparable, rb_str_equal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-20* vm_core.h (struct rb_thread_struct): removed first_func_arg andnobu
reuse first_args instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-19* insnhelper.ci (vm_call_bmethod): fix to propagate informationko1
that this proc is "from Method". [ruby-dev:31490] * proc.c (method_proc, rb_mod_define_method): ditto. * vm.c (vm_invoke_proc_core): removed. * vm_core.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18* insnhelper.ci (vm_call_bmethod),ko1
vm.c (vm_invoke_proc_core): fix to do not restore $SAFE when proc invoked by bmethod. * vm_core.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-16* configure.in (aix): enable shared by default.nobu
* configure.in (aix): for 64bit-mode AIX. [ruby-dev:31401] + use CC for LDSHARED if non-gcc, + moved -G option from *LDFLAGS to LDSHARED, + set -brtl only in XLDFLAGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-06* insnhelper.ci, insns.def: move some statements to functions.ko1
* vm.c, vm.h, vm_evalbody.ci: fix include/typedef places. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12887 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