support set_trace_func (incomplete. id and klass
don't be passed). And support Thread#set_trace_func
which hook only specified thread and Thread#add_trace_func
which add new trace func instead of replace old one.
C level API was modified. See thread.c (logic) and
yarvcore.h (data structures).
* vm.c, vm_macro.def: add hook points.
* compile.c, insns.def: fix "trace" instruction.
* iseq.c, vm_macro.h: add compile option "trace_instruction".
* test/ruby/test_settracefunc.rb: hook "c-return" of set_trace_func.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
proc.c, vm.c, vm_macro.def, vm_macro.def, yarvcore.c, yarvcore.h,
debug.c, debug.h: merge half-baked-1.9 changes. The biggest change
is to change node structure around NODE_SCOPE, NODE_ARGS. Every
scope (method/class/block) has own NODE_SCOPE node and NODE_ARGS
represents more details of arguments information. I'll write a
document about detail of node structure.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
object.c, string.c, variable.c, vm_macro.def: revert private
instance variable feature, which is postponed until next major
release.
* marshal.c: TYPE_SYMBOL2 removed; MARSHAL_MINOR reverted back to
8th version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
moving definitions place, add/remove prototypes, deleting
unused variables and removing yarv.h.
This commit doesn't change any behavior of ruby/vm.
* yarv.h, common.mk: remove yarv.h (contents are moved to yarvcore.h).
* error.c, eval_intern.h: include yarvcore.h instead yarv.h
* rename some functions:
* debug.[ch]: debug_*() -> ruby_debug_*()
* iseq.c: iseq_*() -> rb_iseq_*(), ruby_iseq_disasm()
* iseq.c: node_name() -> ruby_node_name()
* vm.c: yarv_check_redefinition_opt_method() ->
rb_vm_check_redefinition_opt_method()
* some refactoring with checking -Wall.
* array.c: remove rb_ary_ptr() (unused) and remove unused
local variables.
* object.c: add a prototype of rb_mod_module_exec().
* eval_intern.h (ruby_cref): set it inline.
* eval_load.c (rb_load), yarvcore.c: yarv_load() -> rb_load_internal().
* parse.y: add a prototype of rb_parse_in_eval() (in eval.c).
* process.c: add a prototype of rb_thread_stop_timer_thread() (in thread.c).
* thread.c: remove raw_gets() function (unused) and fix some format
mismatch (format mismatchs have remained yet. this is todo).
* thread.c (rb_thread_wait_fd_rw): fix typo on label name.
* thread_pthread.ci: comment out codes with USE_THREAD_CACHE.
* vm.c (rb_svar, rb_backref_get, rb_backref_get,
rb_lastline_get, rb_lastline_set) : moved from yarvcore.c.
* vm.c (yarv_init_redefined_flag): add a prototype and rename
yarv_opt_method_table to vm_opt_method_table.
* vm.c (rb_thread_eval): moved from yarvcore.c.
* yarvcore.c: remove unused global variables and fix to use nsdr().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
symbol from a symbol and a class. back-ported from matzruby.
* parse.y (rb_decompose_ivar2): reverse function of
rb_compose_ivar2().
* marshal.c (w_symbol): support class local instance variables.
* marshal.c (r_object0): ditto.
* compile.c (defined_expr): ditto.
* compile.c (iseq_compile_each): ditto.
* insns.def: add two new instructions: getinstancevariable2 and
setinstancevariable2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval_proc.c: renamed to proc.c.
* common.mk: ditto.
* yarvcore.h, yarvcore.c: rename or remove some global variables
removed: mYarvCore, mYarvInsns
renamed: cYarvISeq -> rb_cISeq,
cYarvProc -> rb_cProc, cYarvBinding -> rb_cBinding
::YarvCore module is removed and ::YarvCore::VM class becomes ::VM.
And change/remove some functions which added with YARV.
* compile.c: ditto.
* eval.c: ditto.
* iseq.c: ditto.
* vm.c: ditto.
* inits.c: rename Init_yarvcore to Init_vm.
* yarvcore.c, proc.c: move some functions and initialization
from yarvcore.c to proc.c.
* intern.h, proc.c: add global function rb_binding_new(void).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e