summaryrefslogtreecommitdiff
path: root/tool/instruction.rb
AgeCommit message (Collapse)Author
2015-09-19* vm_core.h: split rb_call_info_t into several structs.ko1
* rb_call_info (ci) has compiled fixed information. * if ci->flag & VM_CALL_KWARG, then rb_call_info is also rb_call_info_with_kwarg. This technique reduce one word for major rb_call_info data. * rb_calling_info has temporary data (argc, blockptr, recv). for each method dispatch. This data is allocated only on machine stack. * rb_call_cache is for inline method cache. Before this patch, only rb_call_info_t data is passed. After this patch, above three structs are passed. This patch improves: * data locarity (rb_call_info is now read-only data). * reduce memory consumption (rb_call_info_with_kwarg, rb_calling_info). * compile.c: use above data. * insns.def: ditto. * iseq.c: ditto. * vm_args.c: ditto. * vm_eval.c: ditto. * vm_insnhelper.c: ditto. * vm_insnhelper.h: ditto. * iseq.h: add iseq_compile_data::ci_index and iseq_compile_data::ci_kw_indx. * tool/instruction.rb: introduce TS_CALLCACHE operand type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-02tool/instruction.rb: remove extra blank linesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-02tool/instruction.rb: remove trailing spacesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-14vm.inc.tmpl + instruction.rb: typo fixesnormal
* template/vm.inc.tmpl: "insns.c" => "insns.def" * tool/instruction.rb: typo fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14[DOC] Correct a couple of typos in comments by @dvsuresh [Fixes GH-482]a_matsuda
* doc/ChangeLog-YARV: Correct a typo in comment * lib/rubygems/specification.rb: ditto. * test/rexml/data/tutorial.xml: ditto. * test/ruby/test_settracefunc.rb: ditto. * tool/instruction.rb: ditto. https://github.com/ruby/ruby/pull/482 [ci-skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-20 * tool/instruction.rb : fix typo.tarui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26* vm_exec.h, tool/instruction.rb: not an error, but a BUG if stackko1
overflow checking failed just before/after the beginning of an instruction. It should be treated as a BUG. Please tell us if your code cause BUG with this problem. This check will removed soon (for performance). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-25* vm_core.h, eval_intern.h (CHECK_STACK_OVERFLOW): moveko1
CHECK_STACK_OVERFLOW() to vm_core.h and rename to CHECK_VM_STACK_OVERFLOW(). This change is only move and rename. * tool/instruction.rb: catch up above changes. * vm.c, vm_insnhelper.c: ditto. * vm_insnhelper.c (vm_stackoverflow): add a function to unify raising vm stackoverflow exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29tool/vpath.rbnobu
* tool/generic_erb.rb, tool/id2token.rb: add --path-separator option for mingw where make and built ruby live in different world. * tool/vpath.rb: extract from tool/instruction.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14remove garbage linenobu
* compile.c (new_insn_send): remove garbage line. * tool/instruction.rb (sp_increase_c_expr): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14* insns.def (send, invokesuper, invokeblock, opt_*), vm_core.h:ko1
use only a `ci' (rb_call_info_t) parameter instead of using parameters such as `op_id', 'op_argc', `blockiseq' and flag. These information are stored in rb_call_info_t at the compile time. This technique simplifies parameter passings at related function calls (~10% speedups for simple mehtod invocation at my machine). `rb_call_info_t' also has new function pointer variable `call'. This `call' variable enables to customize method (block) invocation process for each place. However, it always call `vm_call_general()' at this changes. `rb_call_info_t' also has temporary variables for method (block) invocation. * vm_core.h, compile.c, insns.def: introduce VM_CALL_ARGS_SKIP_SETUP VM_CALL macro. This flag indicates that this call can skip caller_setup (block arg and splat arg). * compile.c: catch up above changes. * iseq.c: catch up above changes (especially for TS_CALLINFO). * tool/instruction.rb: catch up above chagnes. * vm_insnhelper.c, vm_insnhelper.h: ditto. Macros and functions parameters are changed. * vm_eval.c (vm_call0): ditto (it will be rewriten soon). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-09* vm_core.h (rb_call_info_t): add new type `rb_call_inf_t'.ko1
This data structure contains information including inline method cache. After that, `struct iseq_inline_cache_entry' does not need to contain inline cache for method invocation. Other information will be added to this data structure. * vm_core.h (rb_iseq_t): add `callinfo_entries' and `callinfo_size' members to `rb_iseq_t'. * insns.def, compile.c: Use CALL_INFO instead of IC. * tool/instruction.rb: support CALL_INFO as operand type. * vm_insnhelper.c, vm_insnhelper.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04* insns.def (getlocal, setlocal): remove old getlocal/setlocalko1
instructions and rename getdaynmic/setdynamic instructions to getlocal/setlocal. * compile.c: ditto. * iseq.c: remove TS_DINDEX. * vm_exec.h (dindex_t): remove type definition of `dindex_t'. * tool/instruction.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04* vm.c (VM_COLLECT_USAGE_DETAILS): make new VM usage analysisko1
hooks (old macro name is COLLECT_USAGE_ANALYSIS). This feature is only for VM developers. (I'm not sure I can use `VM developers' (the plural form) in this sentence). If VM_COLLECT_USAGE_DETAILS is not 0, VM enables the following usage collection features: (1) insntruction: collect intruction usages. (2) operand: collect operand usages. (3) register: collect register usages. The results are stored in RubyVM::USAGE_ANALYSIS_INSN for (1, 2), RubyVM::USAGE_ANALYSIS_INSN_BIGRAM for (1) and RubyVM::USAGE_ANALYSIS_REGS for (3). You can stop collecting usages with RubyVM::USAGE_ANALYSIS_INSN_STOP(), RubyVM::USAGE_ANALYSIS_OPERAND_STOP(), RubyVM::USAGE_ANALYSIS_REGISTER_STOP() for (1), (2), (3) respectively. You can also change the hook functions by setting C level global variables `ruby_vm_collect_usage_func_(insn|operand|register)' for (1), (2), (3) respectively. See codes for more details. * tool/instruction.rb: fix macro names. * iseq.c (insn_operand_intern): make it export (used in vm.c). fix to skip several processes if not needed (pointer is 0). * vm_dump.c: move codes for collection features to vm.c. * vm_exec.h: rename macro and function names. * vm_insnhelper.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-24* insns.def: Change the operand type of setinlinecacheko1
(OFFSET to IC). This IC must be same as corresponding getinlinecache instruction's IC operand. This change is for a little performance improvement (getting IC directly) and is for the AOT compilation development. * compile.c, iseq.c, insns.def: Change the approach to handling inline cahce (IC) type operand to enable the above change. This change also affects ISeq#to_a method. The inline cache operand will be dumped by fixnum, the index of inline cache, in other words, inline cache identity. * template/insns_info.inc.tmpl, tool/instruction.rb: No need to count inline cache size (insn_iclen()). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-23* tool/instruction.rb (make_header_prepare_stack): check stacknobu
overflow. [ruby-core:25714] * tool/instruction.rb (make_footer_stack_val): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25048 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-21* tool/instruction.rb (make_insn_operand_optimized): fixed typo.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-06* insns.def (opt_*): add IC operands.ko1
* vm_insnhelper.h (CALL_SIMPLE_METHOD): add a version which use an inline cache. USE_IC_FOR_SPECIALIZED_METHOD macro switchs the behaviour. This change also removes CALL_SIMPLE_METHOD_IC() macro. * tool/instruction.rb: fix elimination process to ignore variable "ic". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-02* tool/instruction.rb: executable.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-01* tool/instruction.rb (RubyVM::InstructionsLoader#make_stackcaching_insns):nobu
simplified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24731 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-06-30* insns.def, tool/instruction.rb: fixed types.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18* keywords, lex.c.src, opt_insn_unif.def, opt_operand.def: moved rarely changedyugui
input files for code generators into defs/ directory. * Makefile.in (lex.c): followed keywords and lex.c.src. * common.mk (parser.o): followed keywords. (INSNS): followed opt_*.def * tools/instruction.rb: followed opt_*.def. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* tool/instruction.rb: RubyVM is not module.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-23* vm_core.h (rb_num_t): moved form vm.h.nobu
* tool/instruction.rb (RubyVM::Instruction#sp_increase_c_expr), tool/instruction.rb (RubyVM::VmBodyGenerator#make_header_operands): omit unused variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-03* compile.c (iseq_set_sequence, iseq_insns_unification,nobu
insn_data_to_s_detail): constified. * iseq.c (insn_operand_intern, ruby_iseq_disasm_insn): ditto. * template/{insns_info,opt_sc,optunifs}.inc.tmpl: ditto. * tool/instruction.rb (OptUnifsIncGenerator): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* tool/insns2vm.rb: moved from lib/vm/instruction.rb.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e