summaryrefslogtreecommitdiff
path: root/compile.c
AgeCommit message (Collapse)Author
2010-08-05* compile.c (NODE_ARGSCAT, NODE_ARGSPUSH): drop unused ARGSCATmame
results when poped is true. [ruby-dev:41933], [Bug #3658] This is retry of r28870 and r28873 which were reverted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05* compile.c (NODE_ARGSCAT, NODE_ARGSPUSH): revert r28870 and r28873mame
which involuntarily changed semantics of type conversion. I'll re-commit a correct patch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05* compile.c (iseq_compile_each): to_a method should be called.nobu
[Bug #3658] * compile.c (iseq_compile_each): ditto for ARGSPUSH. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05* compile.c (iseq_compile_each): drop unused ARGSCAT results.nobu
fix [ruby-dev:41933], [Bug #3658] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-27* class.c, compile.c, dir.c, file.c, iseq.c, parse.y, random.c:naruse
clean unused-value warnings. * cont.c, process.c, vm_exec.h: clean cast warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-26* compile.c (rb_iseq_translate_threaded_code): removed duplicated code.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-02* compile.c (iseq_compile_each): should consider block on stack,matz
if block argument is passed. [ruby-core:30534] * parse.c (arg_concat_gen): should append to nd_head, not to nd_iter for NODE_BLOCK_PASS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-19* iseq_compile_each (NODE_DEFINED): put nil first to fix stackmame
consistency. [ruby-core:30293] Now, lfinish[0] of defined_expr seems not to be used. Refactoring may be needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27892 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-05* compile.c (iseq_set_sequence): fix check range of ic_index.wanabe
a patch from Tomoyuki Chikanaga. #3236 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04* compile.c (iseq_build_body): update iseq->ic_size.wanabe
a patch from Tomoyuki Chikanaga. see #3236. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-20* compile.c (NODE_NEXT, NODE_REDO): add dummy putnil instruction tomame
fix stack consistency error. [ruby-core:28172] * bootstraptest/test_jump.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-17* compile.c (iseq_compile_each): fix splat condition in NODE_WHEN.wanabe
[Bug #2226] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-09* compile.c (iseq_compile_each): stop hiding, and freeze unpopped string ↵muraken
nodes to allow method redefinition. [ruby-dev:40641] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-17* compile.c (iseq_build_body): add mark to jump table hash of case.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-16* compile.c, iseq.c, ruby.c, vm.c, vm_core.h, vm_eval.c: add absolutemame
path field into rb_iseq_t. The field contains a string representing a path to corresponding source file. or nil when the iseq is created from -e, stdin, eval, etc. This field is used for require_relative. [ruby-dev:40004] * load.c (rb_f_require_relative): add C implementation of require_relative. * prelude.rb (require_relative): get rid of Ruby implementation of require_relative. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-14* compile.c (insn_data_to_s_detail), iseq.c (insn_operand_intern):nobu
fixed format specifiers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-09* compile.c (defined_expr), insns.def (defined): fix to pass a Symbolko1
object such as :$foo for the "defined?($foo)" expression on defined instruction. This patch fixes ISeq#to_a/load. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26862 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
2010-01-20 * common.mk (compile.$(OBJEXT)): dependencies lacking.shyouhei
* vm_method.c (rb_add_method_cfunc): invalid initializer for C89 * compile.c (iseq_insns_unification): int might be smaller than int* git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-05removes the dtrace support. reverts r26239, r26238 and r26235.yugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-03* trace.h: new file. wraps tracing mechanisms.yugui
* defs/dtrace.d: new file. defined a dtrace provider "ruby". * include/ruby/ruby.h (LIKELY): moved from vm.c. (UNLIKELY): ditto. (OBJSETUP): probe "object-create". (RUBY_EVENT_RESCUE): new event. * vm_exec.c (DEBUG_ENTER_INSN): embeded a probe insn-entry into it. (DEBUG_END_INSN): insn-return. * vm.c (LIKELY): moved into ruby.h. (UNLIKELY): ditto. (Init_BareVM): embeded a probe "raise" into it. * variable.c (rb_class2name_without_alloc): new utility function. * tool/rbinstall.rb (install?(:ext, :arch, :'ext-arch')): installs dtrace.d if necessary. * thread_pthread.c (add_signal_thread_list): probe "raise". (rb_thread_create_timer_thread): ditto. * thread.c (rb_thread_schedule_rec): probes "thread-enter" and "thread-leave", (thread_start_func_2): ditto. (thread_cleanup_func): probe "thread-term" * lib/mkmf.rb: supports dtrace postprocessor on making an extension. * iseq.c (rb_vm_insn_name): new utility function. (rb_vm_insn_len): ditto. * insns.def (hook): probes "method-etnry", "method-return", "line", and "rescue". * compile.c (iseq_compile_each): adds a trace op for "rescue" probe. * gc.c (garbage_collect): probes "gc-begin" and "gc-end". (obj_free): probe "object-free" (garbage_collect_with_gvl): probe "raise" (negative_size_allocation_error): ditto. (rb_memerror): ditto. * eval.c (rb_rescue2): probe "rescue" (rb_longjmp): probe "raise" * ext/probe/probe.c: new extension for application defined probes. * ext/probe/extconf.rb: ditto. * configure.in (--with-tracing-model): new option to choose a tracing mechanism. (DTRACE): new substitution. name of dtrace(1). (RUBY_TRACING_MODEL): new substitution. (DTRACE_OBJ): ditto. (MINIDTRACE_OBJ): ditto. (GOLFDTRACE_OBJ): ditto. (LIBRUBY_DTRACE_OBJ): ditto. (RUBY_DTRACE_POSTPROCESS): new macro. checks whether the dtrace on the system needs postprocessing. (RUBY_DTRACE_BSD_BROKEN): new macro. checks whether the dtrace supports USDT. * Makefile.in: (DTRACE): new variable. name of dtrace(1). (TRACING_MODEL): new variable. name of the chosen tracing mechanism. (DTRACE_OBJ): same as the one in configure.in. (MINIDTRACE_OBJ): ditto. (GOLFDTRACE_OBJ): ditto. (LIBRUBY_DTRACE_OBJ): ditto. (CPPOUTFILE): new substitution. necessary for generating dtrace.d (trace_none.h): new target for TRACING_MODEL=none (RUBY_H_INCLUDES): appended a header for tracing. (distclean-local): also removes preprocessed version of dtrace.d ($(LIBRUBY_A)): needs $(LIBRUBY_DTRACE_OBJ) if dtrace needs postprocessing. ($(PROGRAM)): ditto. (golf): ditto. (miniruby): ditto. ($(arch_hdrdir)/ruby/dtrace.d): new target. preprocessed verson of defs/dtrace.d. generated if necessary. ($(arch_hdrdir)/ruby/trace_dtrace.h): new target. definition of probes. ($(LIBRUBY_DTRACE_OBJ)): new target. generated if dtrace needs postprocessing. ($(DTRACE_OBJ)): ditto. ($(MINIDTRACE_OBJ)): ditto. ($(GOLFDTRACE_OBJ)): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26235 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-03fix typos.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-08* compile.c (ADD_TRACE): fire coverage event in ensure clause.mame
[ruby-dev:39303] * iseq.h, iseq.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25266 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-18* compile.c (iseq_compile_each), parse.y (stmt, arg): arg_concat()nobu
on op_asgn was inversed. [ruby-core:25629] [Bug #2050] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08* include/ruby/st.h (st_hash_func): use st_index_t.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-06* compile.c (iseq_specialized_instruction), insns.def (opt_size):ko1
optimize #size methods (by specialized instruction). * id.c, id.h, vm.c, vm_insnhelper.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-05* compile.c (iseq_compile_each): op_asgn to aref should return rhs.nobu
[ruby-core:25387] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-05* compile.c (FIXNUM_OR): typo.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-05* compile.c (FIXNUM_INC, FIXNUM_OR): trivial optimizations.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-05* compile.c (iseq_compile_each): &&= and ||= should return rhs.nobu
[ruby-dev:39163] (#1996), [ruby-core:25143] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-18* compile.c (NODE_RETURN): fire return event at explicit return.mame
[ruby-dev:38701] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-31* compile.c (iseq_compile_each): used more appropriate construct.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-30* compile.c (iseq_compile_each): fix stack consistency error.mame
[ruby-core:24611] * bootstraptest/test_method.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-22* vm_core.h (struct rb_iseq_t): add a new field line_no. This fieldmame
represents line number from which the original code of the iseq starts. [ruby-dev:38698] * iseq.c, compile.c: ditto. * parse.y: line number hack (for Proc#source_location) is no longer needed. * test/ruby/test_settracefunc.rb: line number of set_trace_func is now compatible with 1.8's. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-20* compile.c (compile_dstr_fragments): reduced needless literal.nobu
* parse.y (xstring, regexp, dsym, literal_concat, evstr2dstr): literal at the top of dstr is no longer needed if it is empty, since concatstrings and toregexp always create new strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-16* node.h, vm_core.h, variable.c: rename global_entry to rb_global_entry.ko1
* compile.c, insns.def, iseq.c, vm_insnhelper.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24135 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-06-22* compile.c (iseq_set_arguments, iseq_compile_each): internalnobu
arrays must be hidden. [ruby-dev:38613] * vm.c (Init_top_self): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-22* compile.c: fixed types.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-17* compile.c: fixed types.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-17* compile.c (rb_parse_in_eval): returns true in true eval, not innobu
main. [ruby-dev:38382] * parse.y (program): inherits dvars in eval or main. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-27* compile.c (cdhash_type, iseq_set_sequence): should not callnobu
methods of the argument of case, to keep the semantics of case/when. [ruby-dev:38079] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22662 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-16* compile.c: fix to add "ensure" codes across "while" clauseko1
before "return" expression. [ruby-dev:37967] * bootstraptest/test_flow.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-12* compile.c (iseq_compile_each): just freeze xstr.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e