summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
AgeCommit message (Collapse)Author
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
2009-11-07* vm_insnhelper.c (vm_push_frame): add CHECK_STACK_OVERFLOW.matz
[ruby-dev:39592] * eval.c (rb_longjmp): add 1 level backtrace for sysstack_error without calling any method to prevent further stack overflow. * eval.c (make_exception): don't call #exception for sysstack_error to prevent stack overflow. * proc.c (Init_Proc): don't freeze sysstack_error. * eval.c (rb_longjmp): move reentrant check after exception preparation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28* vm_insnhelper.c (vm_setup_method): should push call frame beforematz
raising exception, to put the Ruby-defined method name in the error message. [ruby-core:26333] * vm_insnhelper.c (VM_CALLEE_SETUP_ARG): macro modified. * vm_insnhelper.c (vm_yield_setup_args): modified for new VM_CALLEE_SETUP_ARG macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-28git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25129 ↵matz
b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21* compile.c, cont.c, gc.c, insns.def, iseq.c, iseq.h, process.c,nobu
thread.c, vm.c, vm_core.h, vm_dump.c, vm_eval.c, vm_insnhelper.c, vm_method.c, template/insns_info.inc.tmpl, tool/instruction.rb: fixed types. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-12* vm_core.h: change members of iseq_inline_cache_entry.ko1
make cache value members to one union member "ic_value". * insns.def: ditto. * vm_insnhelper.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-06* vm_insnhelper.c: rename macro name ENABLE_IC_FOR_IVARko1
to USE_IC_FOR_IVAR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-06* insns.def (setinstancevariable), vm_insnhelper.c (vm_setivar):ko1
fix to use inline cache (trivial optimization). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-28* method.h (rb_method_definition_t): split from rb_method_entry_tnobu
to deal aliases. [ruby-dev:39165] * proc.c (struct METHOD): contains rb_method_entry_t copy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-18* vm_insnhelper.c (vm_call_cfunc): ensure hook c-return.wanabe
[Bug #1588] * test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_raise): follow above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-15* vm_insnhelper.c (opt_eq_func): fix optimization bug. This issueko1
was found out and debugged with Takuto Hayashi at Security and Programming camp 2009. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-13* insns.def (opt_case_dispatch): suppressed a warning.nobu
* vm_insnhelper.c (opt_case_dispatch_i): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-12* insns.def, vm.c, vm_insnhelper.c, vm_insnhelper.h: checkko1
definition of (classes)#=== for case/when optimization. Fix Bug #1376 [ruby-core:23190]. * string.c (Init_String), bignum.c (Init_Bignum), numeric.c (Init_Numeric): define String#===, Symbol#===, Bignum#===, Fixnum#===, Float#=== as same as (classes)#==. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-10* gc.c: reject unused longlife gc.nari
* debug.c: ditto. * include/ruby/intern.h: ditto. * include/ruby/ruby.h: ditto. * iseq.c: ditto. * node.h: ditto. * vm_insnhelper.c: ditto. * vm_insnhelper.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-30* vm_insnhelper.c (vm_call_cfunc): let set_trace_func use called_idmame
instead of original_id. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-28* vm_core.h, vm_insnhelper.c (vm_call_method): reviveko1
VM_CALL_OPT_SEND_BIT and use it to recognize "send" method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-26* vm_insnhelper.c (vm_call_method): __send__ can call protectednobu
methods. [ruby-core:24500] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-26* vm_insnhelper.c (vm_call_method): fixed indent.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-22 * method.h : Commas at end of enum list not allowed as of C89shyouhei
* vm_method.c (rb_add_method): avoid C++ comment * vm_insnhelper.c (vm_call_cfunc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15* method.h, vm_core.h: add rb_method_entry_t. Remove nodes aroundko1
method management. This change affect some VM control stack structure. * vm.c, vm_insnhelper.c, vm_method.c, vm_eval.c: ditto. and make some refactoring. * insns.def, class.c, eval.c, proc.c, vm_dump.c : ditto. * vm_core.h, compile.c (iseq_specialized_instruction): remove VM_CALL_SEND_BIT. use another optimization tech for Kernel#send. * node.h: remove unused node types. * ext/objspace/objspace.c (count_nodes): ditto. * gc.c: add mark/free functions for method entry. * include/ruby/intern.h: remove decl of rb_define_notimplement_method_id(). nobody can use it because noex is not opend. * iseq.c (iseq_mark): fix to check ic_method is available. * iseq.c (rb_iseq_disasm): fix to use rb_method_get_iseq(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13* vm_core.h, compile.c: declare struct iseq_inline_cache_entry.ko1
Inline cache (IC) entries are no longer GC managed object. IC entries are freed when ISeq is freed. * iseq.c: fix mark, free, memsize functions for above change. * insns.def: remove rb_gc_write_barrier(). * vm_insnhelper.c (vm_method_search): ditto. * tool/instruction.rb, template/insns_info.inc.tmpl (insn_iclen): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13* insns.def, vm_insnhelper.c (getinstancevariable):ko1
fix to use inline cache. * compile.c: fix to skip inline cache entry (IC). IC is added automatically by compiler. * insns.def, vm_insnhelper.h: fix IC positions. * iseq.c: increment minor_version of ISeq because of above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10* vm_insnhelper.c (vm_search_superclass): checks for implicitnobu
argument passing before method search. [ruby-core:24244] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-04* vm_insnhelper.c (vm_yield_setup_block_args): restores the firstnobu
arg where is overwritten at funcall. [ruby-core:24139] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-24* vm_insnhelper.c (vm_setup_method): fixed format spec.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-20* include/ruby/ruby.h (rb_long2int, RARRAY_LENINT): check long tonobu
cast to int. [ruby-dev:38508] * struct.c, vm_eval.c, vm_insnhelper.c: use RARRAY_LENINT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-20* vm_eval.c, vm_insnhelper.c: argument number is restricted tonobu
int, and fixed overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-16* iseq.c (rb_iseq_clone): use longlife object and insert write barrier.nari
* vm_insnhelper.c (vm_cref_push): ditto. * vm_insnhelper.h (COPY_CREF): insert write barrier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-13* gc.c: add longlife garbage collection. [ruby-dev:38423]nari
(NORMAL_HEAPS_USED): new macro. (LONGLIFE_ALLOCATE_HEAPS_MIN): ditto. (add_longlife_heaps_slot): new function. (rb_newobj_from_longlife_heap): ditto. (rb_newobj_longlife): ditto. (rb_node_newnode_longlife): ditto. (rb_gc_write_barrier): ditto. (remembered_set_recycle): ditto. (rb_gc_mark_remembered_set): ditto. (clear_mark_longlife_heaps): ditto. (gc_sweep_for_longlife): ditto. (assign_heap_slot): new argumnent to longlife heaps slot. (add_freelist): ditto. (gc_sweep): avoid lonlife heap slot. set longlife_collection flag at add heap. (rb_gc_force_recycle): avoid mark object and remembered_set object. (garbage_collect): add longlife collection. (rb_gc_start): invoke longlife collection. (gc_profile_record_get): for longlife collction profile. (gc_profile_result): ditto. * include/ruby/intern.h (rb_gc_write_barrier): declared. * include/ruby/ruby.h (FL_REMEMBERED_SET): renamed from FL_RESERVED. * debug.c (FL_REMEMBERED_SET): ditto. * insns.def (setinlinecache): insert write barrier. * vm_insnhelper.c (vm_method_search): ditto. * set_relation (set_relation): use longlife object. * vm.c (vm_define_method): ditto. * vm_core.h (NEW_INLINE_CACHE_ENTRY): ditto. * vm_method.c (rb_add_method): ditto. * class.c (rb_add_method): ditto. * node.h (NEW_NODE_LONGLIFE): new macro. (rb_node_newnode_longlife): declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12* vm.c (rb_vm_get_sourceline), vm_insnhelper.c (vm_throw): usenobu
rb_num_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22stripped trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22* vm_eval.c (method_missing): should not pop cfp if missing methodnobu
is method_missing. [ruby-core:22298] * vm_eval.c (rb_raise_method_missing): new function to directly raise NoMethodError. * vm_insnhelper.c (vm_call_method): fixed the case method_missing is missing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e