names. [ruby-core:24600]
* variable.c (rb_set_class_path_string): set class path with a
string value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
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
functions based on [ruby-dev:37983]
* insns.def (putstring, duparray): use rb_{ary,str}_resurrect().
* iseq.c (iseq_data_to_ary): needs to result TS_VALUE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* insns.def (toregexp): uses rb_ary_tmp_new(), and clears it after
used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
added.
* vm_insnhelper.h: ditto.
* variable.c (rb_const_get_0), insns.def: Constants should not be
cached if const_missing is called. [ruby-core:21059] [Bug #967]
* bootstraptest/test_class.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp>
in [ruby-dev:36102].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
COVERAGE__ and introduce coverage.so instead. How to measure
coverage: (1) require "coverage.so", (2) require or load Ruby source
file, and (3) Coverage.result will return the same hash as COVERAGE__.
[ruby-dev:35324]
* thread.c (rb_enable_coverages): start coverage measurement by using
rb_add_event_hook.
* thread.c (rb_get_coverages): returns current results of coverage
measurement.
* include/ruby/intern.h: add prototype for above two functions.
* vm_core.h, vm.c: add field of coverages to rb_vm_t.
* insns.def (trace): remove special handling for COVERAGE__.
* iseq.c (prepare_iseq_build): switch COVERAGE__ to
rb_get_coverages().
* parse.y (coverage): ditto.
* thread.c (clear_coverage): ditto.
* lib/coverage.rb: use coverage.so instead of COVERAGE__.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
for casual use. Usage: (1) assign {} to COVERAGE__, (2) require or
load Ruby source file, and (3) COVERAGE__["sourcefilepath"] will
return an array whose elements represent number of executions per
line of source code.
* vm_core.h: add field of coverage array to iseq.
* iseq.c (prepare_iseq_build): ditto.
* insns.def (trace): update coverage array.
* parse.y (coverage): create and initialize coverage array.
* compile.h (ADD_TRACE): add trace instruction to update covearge
array.
* thread.c (clear_coverage): delete coverage array when forking.
Otherwise, double count of coverage may occur.
* lib/coverage.rb: sample coverage measurement tool.
* error.c: distinguish explicitly between parse_in_eval and
mild_compile_error.
* load.c: ditto.
* vm_eval.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
instead to use "postexe" insn.
* id.c, id.h: add a prepared id for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
set a VM_FRAME_FLAG_PASSED flag to skip this frame when
searching ruby-level-cfp.
* eval.c, eval_intern.h, proc.c: fix to check cfp. if there is
no valid ruby-level-cfp, cause RuntimeError exception.
[ruby-dev:34128]
* vm_core.h, vm_evalbody.c, vm.c, vm_dump.c, vm_insnhelper.c,
insns.def: rename FRAME_MAGIC_* to VM_FRAME_MAGIC_*.
* KNOWNBUGS.rb, bootstraptest/test*.rb: move solved bugs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c, insns.def: fix to use putcbase instruction for
class search. Qundef should not be used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c (rb_f_raise): skip current control frame. [ruby-core:15589]
* insns.def (opt_div): raise as the ordinary method. [ruby-core:15589]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
some compilers cannot deal it collectly. use DEC_SP instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
string.
* re.c (rb_reg_new_ary): defined for toregexp. it concatenates
strings after each string is preprocessed.
* compile.c (compile_dstr_fragments): split from compile_dstr.
(compile_dstr): call compile_dstr_fragments.
(compile_dregx): defined for dynamic regexp.
(iseq_compile_each): use compile_dregx for dynamic regexp.
[ruby-dev:33400]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
for $&, $1, ... . If such variables are defined,
return "global-variable".
* test/ruby/test_defined.rb: add tests.
* bootstraptest/test_syntax.rb: fix a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e