summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
AgeCommit message (Collapse)Author
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
2009-01-31* variable.c (rb_const_get_0), vm_insnhelper.c (vm_get_ev_const):nobu
avoids infinite self recursion autoload. [ruby-core:21696] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19* vm_eval.c, eval.c (rb_f_block_given_p): move definition ofko1
"iterator?" and "block_given?" to make static. * vm.c (vm_get_ruby_level_caller_cfp): make it static. * eval_intern.h, vm_insnhelper.c: move decl. of vm_get_ruby_level_caller_cfp() from eval_intern.h to vm_insnhelper.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19* vm.c: add a prefix "rb_" to exposed functionsko1
vm_get_ruby_level_next_cfp(), rb_vm_make_env_object(), vm_stack_to_heap(), vm_make_proc(), vm_invoke_proc(), vm_get_sourceline(), vm_cref(), vm_localjump_error(), vm_make_jump_tag_but_local_jump(), vm_jump_tag_but_local_jump(). This changes may affect only core because most of renamed functions require a pointer of not-exposed struct such as rb_thread_t or NODE. In short, they are core functions. * cont.c, eval.c, eval_intern.h, load.c, proc.c, thread.c, vm_core.h, vm_dump.c, vm_eval.c, vm_exec.c, vm_insnhelper.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27* vm_insnhelper.c (vm_yield_with_cfunc): rename parameter nameko1
"blockptr" to "blockargptr". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27* vm_insnhelper.c (vm_call_method, vm_call_cfunc): use original id instead ofko1
calling id when NODE_CFUNC or NODE_BMETHOD. fixes Bug #632 [ruby-core:19282]. * vm_eval.c (vm_call0, vm_call_super): ditto. * vm_method.c (rb_add_method, rb_alias): store original id in nd_file field of NODE_METHOD. * test/stringio/test_stringio.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* vm_insnhelper.c (vm_method_search): fix control flow bug.ko1
(commited at r20981) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* vm_insnhelper.c (vm_method_search): return rb_cObject if there is noko1
super class. [ruby-dev:37587] * bootstraptest/test_method.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* vm_insnhelper.c (vm_yield_with_cfunc): check block has Proc.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-24* vm.c (invoke_block_from_c): fix to point right cfp.ko1
* vm.c (vm_make_proc, vm_make_proc_from_block), vm_core.h: remove unused parameter cfp. * vm_insnhelper.c, proc.c (proc_new): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-24* vm_insnhelper.c (vm_call_method): use class of method definedko1
instead of receiver's class on bmethod. fixes [ruby-core:20786] * bootstraptest/test_method.rb: add a test for above. * vm_insnhelper.c (vm_setup_method): remove unused parameter klass. * vm_insnhelper.h (CALL_METHOD): ditto. * insns.def, vm_eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15* vm_insnhelper.c (vm_callee_setup_arg_complex): uses cfp fromnobu
blockptr instead of the current cfp. [ruby-core:20544] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-09* vm_insnhelper.c (check_cfunc): use function pointer.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-14* README.EXT, README.EXT.ja, vm_exec.c, vm_insnhelper.c: updatemame
filenames. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27* vm_insnhelper.c (vm_yield_setup_args): supports optional parameters.yugui
Fixed [ruby-core:19503]. * vm_insnhelper.c (vm_yield_setup_block_args): a new function. extracted from vm_yield_setup_args. * vm_insnhelper.c (vm_yield_setup_block_args_complex): ditto. * test/ruby/test_proc.rb: added tests for arguments on a Proc from Kernel#proc called. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22* vm_insnhelper.c (vm_yield_setup_args): should not drop argumentsnobu
corresponding to default paramters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* common.mk: clean upko1
- remove blockinlining.$(OBJEXT) to built - make ENCODING_H_INCLDUES variable (include/ruby/encoding.h) - make VM_CORE_H_INCLUDES variable (vm_core.h) - simplify rules. - make depends rule to output depend status using gcc -MM. * include/ruby/mvm.h, include/ruby/vm.h: rename mvm.h to vm.h. * include/ruby.h: ditto. * load.c: add inclusion explicitly. * enumerator.c, object.c, parse.y, thread.c, vm_dump.c: remove useless inclusion. * eval_intern.h: cleanup inclusion. * vm_core.h: rb_thread_t should be defined in this file. * vm_evalbody.c, vm_exec.c: rename vm_evalbody.c to vm_exec.c. * vm.h, vm_exec.h: rename vm.h to vm_exec.h. * insnhelper.h, vm_insnhelper.h: rename insnhelper.h to vm_insnhelper.h. * vm.c, vm_insnhelper.c, vm_insnhelper.h: - rename vm_eval() to vm_exec_core(). - rename vm_eval_body() to vm_exec(). - cleanup include order. * vm_method.c: fix comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03 * vm_insnhelper.c (vm_method_missing): C99.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-02* vm_insnhelper.c (vm_method_missing): copy arguments to allocatedmame
memory from machine stack. [ruby-dev:36064] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-29* vm_insnhelper.c (vm_call_method): copy arguments to allocatedko1
memory from machine stack. [ruby-dev:36028] * KNOWNBUGS.rb, bootstraptest/test_method.rb: move fixed test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-28* vm_insnhelper.c (vm_yield_setup_args): object with to_ary shouldmatz
behave like array. a patch from Yusuke Endoh <mame at tsg.ne.jp> in [ruby-dev:35988]. [ruby-dev:35977] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18894 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-13* vm_insnhelper.c (caller_setup_args): should ensure if the valuematz
from to_proc is a real Proc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18575 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-08* vm_insnhelper.c (opt_eq_func): large function to make inline.nobu
* bcc32/Makefile.sub (config.h): cannot compile a big inline function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-19* vm_insnhelper.c (vm_throw): fix "return" process from "lambda".ko1
* bootstraptest/test_proc.rb: add a test. * bootstraptest/pending.rb: add a pending bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17421 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