summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
AgeCommit message (Collapse)Author
2011-06-22* cont.c (cont_capture): add volatile.naruse
On clang -O, it is needed to avoid the optimization. With this and llvm/clang's recent fix, clang 3.0 can build ruby-trunk with -O option. * cont.c (cont_capture): use for-loop. * array.c (rb_ary_each): add volatile and use it. * vm_insnhelper.c (vm_call_cfunc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18* method.h, internal.h iseq.h: declare internal functions.akr
* compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c, thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't declare internal functions. Note that rb_method_entry_eq() is defined in vm_method.c but there was a declaration in proc.c with different const-ness. Now it is declared in method.h with same const-ness to the definition. * object.c (rb_mod_module_exec): don't declare functions declared in include/ruby/intern.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-16* thread.c (rb_thread_schedule_rec): fix {UN,}LIKELY macro misuse.kosaki
* gc.c (rb_newobj): ditto. * vm_insnhelper.c (vm_method_search): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18* internal.h: add for internal use only.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-31* vm_insnhelper.c (vm_get_ev_const): should ignore crefs withshugo
the NODE_FL_CREF_PUSHED_BY_EVAL flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-31* vm_insnhelper.c (vm_get_ev_const): search root cref properly.shugo
[ruby-dev:43365] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-24* vm_insnhelper.c (vm_get_ev_const): should not autoload innobu
defined? mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-20* prevent temporary objects from GC, and should not usenobu
RSTRING_PTR() for function calls since it evaluates the argument a couple of times. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-19 * vm_insnhelper.c (vm_check_if_namespace): guard temporary objectnagachika
from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-29* vm_insnhelper.c (vm_get_ev_const): no-scope reference to toplevelmame
private constant has been prohibited incorrectly. * test/ruby/test_module.rb (test_toplevel_private_constant): add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28* constant.h, variable.c: to ensure compatibility, rb_const_get_* mustmame
not raise an exception even when the constant is private. Instead, rb_public_const_get_* and rb_public_const_defined_* are introduced, which raise an exception when the referring constant is private. see [ruby-core:32912]. * vm_insnhelper.c (vm_get_ev_const): use rb_public_const_get_* instead of rb_const_get_* to follow the constant visibility when user code refers a constant. * test/ruby/test_marshal.rb (test_marshal_private_class): add a test. This test had failed because of incompatibility of rb_const_get. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-13* vm_insnhelper.c: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-20* compile.c (setup_args), vm.c (invoke_block_from_c),nobu
vm_insnhelper.c (caller_setup_args): reverted r30241 and r30243 except for the test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-18* compile.c (setup_args), vm.c (invoke_block_from_c),nobu
vm_insnhelper.c (caller_setup_args): fix of r30241. lambda block shoud check argument number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-15* iseq.c (set_relation), vm_insnhelper.c (vm_cref_push): nd_filenobu
is always zero-cleared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-03* vm_insnhelper.c (vm_call_method): revert r30064 and r30071,nobu
because of [ruby-core:26761]. Bug#4106 rejected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-03* vm_insnhelper.c (vm_call_method): protected methods should benobu
checked against the real class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-03* vm_insnhelper.c (vm_call_method): protected singleton methods shouldnobu
be visible from same real class methods. [ruby-core:33506] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-16* vm_insnhelper.c (vm_throw): remove fear of undefined behavior :-)mame
Coverity Scan found this bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-26* class.c, constant.h, gc.c, method.h, object.c, variable.c,mame
vm_insnhelper.c: use struct rb_constant_entry_t as entry of RCLASS_CONST_TBL. RCLASS_CONST_TBL has contained VALUE of constant directly. Now instead rb_const_entry_t is contained in RCLASS_CONST_TBL, rb_const_entry_t is managed by malloc, and have not only the value itself but also visibility flag. This is another preparation for private constant (see [ruby-dev:39685][ruby-core:32698]). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-26* class.c, gc.c, object.c, variable.c, vm_insnhelper.c,mame
include/ruby/ruby.h: separate RCLASS_CONST_TBL from RCLASS_IV_TBL. RCLASS_IV_TBL has contained not only instance variable table but also constant table. Now the two table are separated to RCLASS_CONST_TBL and RCLASS_IV_TBL. This is a preparation for private constant (see [ruby-dev:39685][ruby-core:32698]). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-24* array.c, gc.c, hash.c, object.c, string.c, struct.c,nobu
transcode.c, variable.c, vm.c, vm_insnhelper.c, vm_method.c: replace calls to rb_error_frozen() with rb_check_frozen(). a patch from Run Paint Run Run at [ruby-core:32014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-19Commit miss.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-19* test/ruby/test_sprintf.rb: fix ML ref. [ruby-core:32848]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-14* insns.def, iseq.c, vm_insnhelper.c: rename variable nameko1
(ip -> iseq). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12* compile.c (iseq_build_body), error.c (set_syserr, get_syserr),nobu
(syserr_initialize), gc.c (define_final, rb_gc_copy_finalizer), (run_final), hash.c (rb_hash_aref, rb_hash_lookup2), (rb_hash_fetch_m, rb_hash_clear, rb_hash_aset, eql_i), iseq.c (iseq_load, iseq_data_to_ary), marshal.c (r_symlink), thread.c (rb_thread_local_aref), variable.c (generic_ivar_remove, ivar_get, rb_const_get_0), (rb_cvar_get), vm.c (rb_vm_check_redefinition_opt_method), vm_insnhelper.c (vm_get_ev_const), vm_method.c (remove_method), ext/iconv/iconv.c (map_charset): use st_data_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-27* insns.def (opt_case_dispatch), vm_insnhelper.c:ko1
execute the procedures of "when" clauses by bytecode instead of st_foreach() when the object does not hit prepared hash. [ruby-dev:42304] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-24* string.c (sym_call), vm.c (invoke_block_from_c),nobu
vm_insnhelper.c (vm_yield_with_cfunc): pass given block. [ruby-core:32075] * vm_eval.c (rb_funcall_passing_block): new function to call method with passing given block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-23* vm_insnhelper.c (vm_get_cref0): cref is stacked only in normalnobu
iseqs, so check if it is the case first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-23* vm_insnhelper.c (vm_cref_push): no outer cref is needed for procnobu
from method. Bug #3786, Bug #3860, [ruby-core:32501] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-18* vm_insnhelper.c (vm_push_frame): initialize block_iseq. a patchnobu
from Peter Weldon at [ruby-core:31757]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-14* eval.c (frame_func_id), vm_eval.c (rb_iterate),nobu
vm_insnhelper.c (vm_yield_with_cfunc): as the name of a C-level block, use the current method ID at the creation point. [ruby-dev:41852] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29* removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-27* insns.def (invokesuper): check consistency between class of self andmame
class of method being invoked by super. This is temporary measure for YARV. See [ruby-core:30313] in detail. See [ruby-dev:40959] [ruby-dev:39772] [ruby-core:27000] [ruby-core:27230] * vm_insnhelper.c (vm_search_superclass): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13* vm_insnhelper.c (vm_invoke_block): iseq_t.type is VALUE.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-09* compile.c (iseq_compile_each), vm_insnhelper.c (vm_invoke_block,mame
vm_throw): allow "return" and "yield" even in singleton class definition. based on a patch from wanabe <s.wanabe AT gmail.com> for "return". [ruby-core:21379] [ruby-dev:40975] * insns.def (defineclass): ditto (straightforwardly push block ptr, instead of dfp ptr with special flag). * vm_core.h (RUBY_VM_CLASS_SPECIAL_P): ditto (no longer needed). * proc.c (proc_new): ditto (remove handling for special flag). * bootstraptest/test_jump.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-08* vm_insnhelper.c (vm_call_bmethod): removed unused variable.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-05* vm_method.c (rb_unlink_method_entry, rb_sweep_method_entry):ko1
added. Unlinked method entries are collected to vm->unlinked_method_entry_list. On the GC timing, mark all method entries which are on all living threads. Only non-marked method entries are collected. This hack prevents releasing living method entry. [Performance Consideration] Since this Method Entry GC (MEGC) doesn't occuer frequently, MEGC will not be a performance bottleneck. However, to traverse living method entries, every control frame push needs to clear cfp->me field. This will be a performance issue (because pushing control frame is occurred frequently). Bug #2777 [ruby-dev:40457] * cont.c (fiber_init): init cfp->me. * gc.c (garbage_collect): kick rb_sweep_method_entry(). * method.h (rb_method_entry_t): add a mark field. * vm.c (invoke_block_from_c): set passed me. * vm.c (rb_thread_mark): mark cfp->me. * vm_core.h (rb_thread_t): add a field passed_me. * vm_core.h (rb_vm_t): add a field unlinked_method_entry_list. * vm_insnhelper.c (vm_push_frame): clear cfp->me at all times. * vm_insnhelper.c (vm_call_bmethod): pass me. * bootstraptest/test_method.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04* vm_insnhelper.c (argument_error): removed unused variable.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04* vm_insnhelper.c (argument_error): never return.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04* vm_insnhelper.c (argument_error): push correct backtrace.ko1
Bug #2281 [ruby-core:26333] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22* proc.c (rb_method_location): return attr's location if it is setup.wanabe
[Feature #2084] * NEWS: follow above. * vm_method.c (rb_add_method): save attr's location. * gc.c (mark_method_entry): mark attr's location. * method.h (rb_method_definition_t): add member to save attr's location. * vm_eval.c (vm_call0): follow above. * vm_insnhelper.c (vm_call_method): ditto. * vm_method.c (rb_method_definition_eq): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-17* vm_insnhelper.c (vm_call_cfunc): removed unused variable.nobu
* vm.c (vm_frametype_name): define only when VMDEBUG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-31* vm_insnhelper.c (vm_throw): fixed infinite loop. [ruby-core:27969]mame
(re-commit of r26522 since forgot to add a change, sorry) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-24* eval.c, vm.c, vm_eval.c, vm_insnhelper.c: fix issues aboutko1
return and c-return trace. This issue skips (c-)return event with global jump such as break or return. This fix make vm invoke hooks at stack rewind timing. fix [ruby-core:27606] [Bug #2610]. * test/ruby/test_settracefunc.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-03* compile.c (compile_cpath, iseq_compile_each): revertedshugo
constant/class variable lookup in instance_eval etc. to the behavior of 1.8. * eval.c (rb_mod_nesting): ditto. * insns.def (putspecialobject, defineclass): ditto. * node.h (NODE_FL_CREF_PUSHED_BY_EVAL): ditto. * vm_core.h (VM_SPECIAL_OBJECT_CONST_BASE): ditto. * vm_eval.c (yield_under, eval_under): ditto. * vm_insnhelper.c (vm_cref_push, vm_get_const_base, vm_get_ev_const, vm_get_cvar_base): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-17* insns.def (opt_case_dispatch): runtime value cannot be used asnobu
an element initializer. * vm_insnhelper.c (opt_case_dispatch_i): gets rid of type-punning calls. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-16* vm_insnhelper.c (vm_call_method): protected singleton methods ofshugo
an object should not be able to called from other instances of the class of the object. [ruby-core:26761] * vm_eval.c (rb_method_call_status): ditto. * test/ruby/test_module.rb (test_protected_singleton_method): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-07* vm_insnhelper.c (vm_push_frame): get rid of out-of-boundsnobu
access. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-07* vm_insnhelper.c (VM_CALLEE_SETUP_ARG): revert r25521.matz
[ruby-core:26427] [ruby-core:26447] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e