summaryrefslogtreecommitdiff
path: root/vm.c
AgeCommit message (Collapse)Author
2013-05-19fix typos. Patch by k_takata.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-17vm.c: narrow variable scopenobu
* vm.c (vm_exec): move escape_ep into exception block, since it is updated every time entering the block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-15revert r40760nobu
* vm.c (vm_invoke_proc): revert r40760 partially, which causes timeout in test/ruby/test_thread.rb:test_stack_size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-15vm.c: suppress warningsnobu
* vm.c (vm_invoke_proc, vm_exec), vm_eval.c (rb_eval_cmd): add volatile to suppress -Wclobbered warnings by gcc 4.9.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: constify RBasic::klass and addko1
RBASIC_CLASS(obj) macro which returns a class of `obj'. This change is a part of RGENGC branch [ruby-trunk - Feature #8339]. * object.c: add new function rb_obj_reveal(). This function reveal interal (hidden) object by rb_obj_hide(). Note that do not change class before and after hiding. Only permitted example is: klass = RBASIC_CLASS(obj); rb_obj_hide(obj); .... rb_obj_reveal(obj, klass); TODO: API design. rb_obj_reveal() should be replaced with others. TODO: modify constified variables using cast may be harmful for compiler's analysis and optimizaton. Any idea to prohibt inserting RBasic::klass directly? If rename RBasic::klass and force to use RBASIC_CLASS(obj), then all codes such as `RBASIC(obj)->klass' will be compilation error. Is it acceptable? (We have similar experience at Ruby 1.9, for example "RARRAY(ary)->ptr" to "RARRAY_PTR(ary)". * internal.h: add some macros. * RBASIC_CLEAR_CLASS(obj) clear RBasic::klass to make it internal object. * RBASIC_SET_CLASS(obj, cls) set RBasic::klass. * RBASIC_SET_CLASS_RAW(obj, cls) same as RBASIC_SET_CLASS without write barrier (planned). * RCLASS_SET_SUPER(a, b) set super class of a. * array.c, class.c, compile.c, encoding.c, enum.c, error.c, eval.c, file.c, gc.c, hash.c, io.c, iseq.c, marshal.c, object.c, parse.y, proc.c, process.c, random.c, ruby.c, sprintf.c, string.c, thread.c, transcode.c, vm.c, vm_eval.c, win32/file.c: Use above macros and functions to access RBasic::klass. * ext/coverage/coverage.c, ext/readline/readline.c, ext/socket/ancdata.c, ext/socket/init.c, * ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* *.c, parse.y, insns.def: use RARRAY_AREF/ASET macroko1
instead of using RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-02thread.c: id localsnobu
* thread.c (id_locals): use cached ID. * vm.c (ruby_thread_init): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-01eval.c: use predefined IDsnobu
* eval.c (frame_func_id): use predefined IDs. * vm.c (rb_vm_control_frame_id_and_class): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-01proc.c: use predefined IDsnobu
* defs/id.def (predefined): add "idProc". * proc.c (mnew, mproc, mlambda): use predefined IDs. * vm.c (Init_VM): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-30proc.c: frozen core methodsnobu
* proc.c (mproc, mlambda): use frozen core methods instead of plain global methods, so that methods cannot be overridden. [ruby-core:54687] [Bug #8345] * vm.c (Init_VM): define proc and lambda on the frozen core object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-29* vm.c (VM_EP_LEP): simplify infinite loop.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-22load.c: loaded_features_index st_tablenobu
* load.c (rb_feature_p), vm_core.h (rb_vm_struct): turn loaded_features_index into st_table. patches by tmm1 (Aman Gupta) in [ruby-core:53251] and [ruby-core:53274] [Bug #8048] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-06prefix global symbolsnobu
* iseq.c (rb_insn_operand_intern): prefix global symbols. * numeric.c (ruby_num_interval_step_size): ditto. * vm_backtrace.c (rb_vm_backtrace_str_ary), (rb_vm_backtrace_location_ary, rb_vm_thread_backtrace), (rb_vm_thread_backtrace_locations): ditto. * vm_trace.c (rb_vm_trace_mark_event_hooks): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05class.c: check redefinitionnobu
* class.c (rb_prepend_module): check redefinition of built-in opimized methods. [ruby-dev:47124] [Bug #7983] * vm.c (rb_vm_check_redefinition_by_prepend): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27* vm.c: Typo in overview for example of Thread#status returning falsezzak
Reported by Lee Jarvis git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27* vm.c (Thread): fix typos in overvieweregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27* vm.c (Thread): Typo in overview, swap setting and gettingzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27* vm.c (Thread): Documentation overview of Thread classzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16* vm.c (ENV_IN_HEAP_P): fix off-by-one error.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16* vm.c (rb_thread_mark): mark a working Proc of bmethodko1
(a method defined by define_method) even if the method was removed. We could not trace working Proc object which represents the body of bmethod if the method was removed (alias/undef/overridden). Simply, it was mark miss. This patch by Kazuki Tsujimoto. [Bug #7825] NOTE: We can brush up this marking because we do not need to mark `me' on each living control frame. We need to mark `me's only if `me' was free'ed. This is future work after Ruby 2.0.0. * test/ruby/test_method.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05* vm.c (rb_vm_stack_to_heap): call rb_vm_get_binding_creatable_next_cfpktsj
instead of rb_vm_get_ruby_level_next_cfp to prevent a segfault by calling Kernel#callcc. See r39067 for more details. [ruby-dev:46908] [ruby-trunk - Bug #7774] * test/ruby/test_settracefunc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05* proc.c (rb_binding_new_with_cfp): permit to create binding objectko1
of IFUNC frame. When `rb_binding_new_with_cfp()' is called, VM finds out the first normal (has iseq) frame and create a binding object of this frame and create Env objects. `ep's of related frames are updated (`ep's point Env object managed spaces). However, `ep' of skipped IFUNC frame was not updated and old invalid `ep' was remained. It causes serious problems. To solve this issue, permit IFUNC to create binding. (Maybe there is no problem on it) [ruby-dev:46908] [ruby-trunk - Bug #7774] * test/ruby/test_settracefunc.rb: add a test. * vm.c (rb_vm_get_binding_creatable_next_cfp), vm_core.h: added. * vm_trace.c: fix to use `rb_vm_get_binding_creatable_next_cfp()'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-29* vm_backtrace.c: fix issue of rb_debug_inspector_open().ko1
The order of making binding should be stack (frame) top to bottom. [Bug #7635] And also fix issue of collecting klass. Collecting klass is same as TracePoint#defined_class. (previous version, it returns T_ICLASS (internal objects). * test/-ext-/debug/test_debug.rb: add a test. * ext/-test-/debug/extconf.rb, init.c, inspector.c: ditto. * vm_backtrace.c: remove magic number and add enum CALLER_BINDING_*. * vm_backtrace.c, include/ruby/debug.h: add new C api (experimental) rb_debug_inspector_frame_self_get(). * vm.c, vm_core.h, vm_trace.c: move decl. of rb_vm_control_frame_id_and_class() and constify first parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-09vm.c: initialize root_svarnobu
* vm.c (th_init, ruby_thread_init): initialize root_svar with Qnil, since lep_svar_place() expects uninitialized svar to be nil, not 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28vm.c: suppress warningnobu
* vm.c (check_machine_stack_size): ifdef a variable which is unused on non-pthread platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-25* vm_trace.c (rb_threadptr_exec_event_hooks_and_pop_frame):ko1
pop a frame before JUMP_TAG() if exception occurred. This change fix bug of Ruby 1.9. [ruby-core:51128] [ruby-trunk - Bug #7624] * vm_core.h (EXEC_EVENT_HOOK_AND_POP_FRAME): add to use `rb_threadptr_exec_event_hooks_and_pop_frame()'. * vm.c (vm_exec): use EXEC_EVENT_HOOK_AND_POP_FRAME() while exception handling. While exception hadnling, if an exception is raised in hooks, need to pop current frame and raise this raised exception by hook. * test/ruby/test_settracefunc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38601 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-12-23* thread.c: rename methods:ko1
from Thread.async_interrupt_timing to Thread.handle_interrupt, from Thread.async_interrupted? to Thread.pending_interrupt?. Also rename option from `defer' to `never'. [ruby-core:51074] [ruby-trunk - Feature #6762] * vm_core.c, thread.c: rename functions and data structure `async_errinfo' to `pending_interrupt'. * thread.c: add global variables sym_immediate, sym_on_blocking and sym_never. * cont.c, process.c, vm.c, signal.c: ditto. * lib/sync.rb, lib/thread.rb: catch up this renaming. * test/ruby/test_thread.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22* cont.c (rb_fiber_start): in case of jump with TAG_FATAL,nagachika
enqueue error into async_errinfo_queue, because you cannot call TH_TAG_JUMP() in this function. [ruby-dev:45218] [Bug #5993] * thread.c (rb_threadptr_execute_interrupts): now INT2FIX(TAG_FATAL) can be popped from async_errinfo_queue. * vm.c (rb_vm_make_jump_tag_but_local_jump): revert r38441. rb_vm_make_jump_tag_but_local_jump() shouldn't return exception in case of state == TAG_FATAL. * test/ruby/test_fiber.rb (test_exit_in_fiber): fix a test to illuminate Thread.exit should terminate current Thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20vm.c: fix formatnobu
* vm.c (get_param): fix format specifier for size_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-19* vm.c: support variable VM/Machine stack sizes.ko1
Specified by the following environment variaables: - RUBY_THREAD_VM_STACK_SIZE: vm stack size used at thread creation. default: 128KB (32bit CPU) or 256KB (64bit CPU). - RUBY_THREAD_MACHINE_STACK_SIZE: machine stack size used at thread creation. default: 512KB or 1024KB. - RUBY_FIBER_VM_STACK_SIZE: vm stack size used at fiber creation. default: 64KB or 128KB. - RUBY_FIBER_MACHINE_STACK_SIZE: machine stack size used at fiber creation. default: 256KB or 256KB. This values are specified at launched timing. You can not change these values at running time. Environ variables are only *hints* because: - They are aligned to 4KB. - They have minimum values (depend on OSs). - Machine stack settings are ignored by some OSs. Default values especially fiber stack sizes are increased. This change affect Fiber's behavior: (1) You can run more complex program on a Fiber. (2) You can not make many (thousands) Fibers because of lack of address space (on 32bit CPU). If (2) bothers you, (a) Use 64bit CPU with big memory, or (b) Specify RUBY_FIBER_(VM|MACHINE)_STACK_SIZE correctly. You need to choose correct stack size carefully. These values are completely rely on systems (OS/compiler and so on). * vm_core.h (rb_vm_t::default_params): add to record above settings. * vm.c (RubyVM::DEFAULT_PARAMS): add new constant to see above setting. * thread_pthread.c: support RUBY_THREAD_MACHINE_STACK_SIZE. * cont.c: support RUBY_FIBER_(VM|MACHINE)_STACK_SIZE. * test/ruby/test_fiber.rb: add tests for above. * test/ruby/test_thread.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-18* vm.c (rb_vm_jump_tag_but_local_jump): remove unnessesary 2ndnagachika
argument. * load.c (rb_load_internal): ditto. * eval_intern.h (rb_vm_jump_tag_but_local_jump): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-18* vm.c (rb_vm_make_jump_tag_but_local_jump): take care of the casenagachika
TAG_JUMP() with TAG_FATAL (ex. rb_fatal()). * test/ruby/test_fiber.rb (test_fatal_in_fiber): add a test for above. * ext/-test-/fatal/extconf.rb, ext/-test-/fatal/rb_fatal.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-15* signal.c (rb_sigaltstack_size): new. calculate stack size forkosaki
sigsegv handler. enlarge value when x86 or x86_64 on Linux. Linux has very small MINSIGSTKSZ size (2048 bytes) and our sigsegv routine need 5KiB at least. [Bug #7141] * internal.h: add declaration of rb_sigaltstack_size(). * vm_core.h: remove ALT_STACK_SIZE definition. * signal.c (rb_register_sigaltstack): replace ALT_STACK_SIZE with rb_sigaltstack_size(); * gc.c (Init_heap): ditto. * vm.c (th_init): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-11vm.c: pass exceptions while handling an exceptionnobu
* vm.c (vm_exec): pass exceptions while handling an exception. * vm_trace.c (rb_threadptr_exec_event_hooks): propagate exceptions. revert r38293 partially. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-11probes_helper.h: RUBY_DTRACE_HOOKnobu
* probes_helper.h (RUBY_DTRACE_HOOK): surround with do..while. * vm.c (vm_exec): supply semicolon. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-06* revised r37993 to avoid SEGV/ILL in tests. In r37993, a methodshugo
entry with VM_METHOD_TYPE_REFINED holds only the original method definition, so ci->me is set to a method entry allocated in the stack, and it causes SEGV/ILL. In this commit, a method entry with VM_METHOD_TYPE_REFINED holds the whole original method entry. Furthermore, rb_thread_mark() is changed to mark cfp->klass to avoid GC for iclasses created by copy_refinement_iclass(). * vm_method.c (rb_method_entry_make): add a method entry with VM_METHOD_TYPE_REFINED to the class refined by the refinement if the target module is a refinement. When a method entry with VM_METHOD_TYPE_UNDEF is invoked by vm_call_method(), a method with the same name is searched in refinements. If such a method is found, the method is invoked. Otherwise, the original method in the refined class (rb_method_definition_t::body.orig_me) is invoked. This change is made to simplify the normal method lookup and to improve the performance of normal method calls. * vm_method.c (EXPR1, search_method, rb_method_entry), vm_eval.c (rb_call0, rb_search_method_entry): do not use refinements for method lookup. * vm_insnhelper.c (vm_call_method): search methods in refinements if ci->me is VM_METHOD_TYPE_REFINED. If the method is called by super (i.e., ci->call == vm_call_super_method), skip the same method entry as the current method to avoid infinite call of the same method. * class.c (include_modules_at): add a refined method entry for each method defined in a module included in a refinement. * class.c (rb_prepend_module): set an empty table to RCLASS_M_TBL(klass) to add refined method entries, because refinements should have priority over prepended modules. * proc.c (mnew): use rb_method_entry_with_refinements() to get a refined method. * vm.c (rb_thread_mark): mark cfp->klass for iclasses created by copy_refinement_iclass(). * vm.c (Init_VM), cont.c (fiber_init): initialize th->cfp->klass. * test/ruby/test_refinement.rb (test_inline_method_cache): do not skip the test because it should pass successfully. * test/ruby/test_refinement.rb (test_redefine_refined_method): new test for the case a refined method is redefined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-05vm.c: save blockprocvalnobu
* vm.c (rb_vm_make_proc): save the proc made from the given block so that it will not get collected. [ruby-core:50545] [Bug #7507] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-01adjust style.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29 [EXPERIMENTAL: NEED DISCUSS]ko1
* vm_trace.c: add events * :thread_begin - hook at thread beggining. * :thead_end - hook at thread ending. * :b_call - hook at block enter. * :b_return - hook at block leave. This change slow down block invocation. Please try and give us feedback until 2.0 code freeze. * include/ruby/ruby.h: ditto. * compile.c (rb_iseq_compile_node): ditto. * insns.def: ditto. * thread.c: ditto. * vm.c: ditto. * include/ruby/debug.h: add a comment. * test/ruby/test_settracefunc.rb: add a tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29* vm.c: add a return hook when a method raises an exception.tenderlove
* probes_helper.h: look up klass and method if none are provided. * eval.c: update macro usage. * vm_eval.c: ditto. * vm_insnhelper.c: ditto. * test/dtrace/test_function_entry.rb: test for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29* compile.c (compile_array_): refix r37991 remove assertion:naruse
it is true only if type == COMPILE_ARRAY_TYPE_HASH. [ruby-dev:46658] [Bug #7466] * vm.c (m_core_hash_from_ary): add assertion instead of above. * vm.c (m_core_hash_merge_ary): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29* include/ruby/debug.h: add rb_debug_inspector_* APIs.ko1
* vm_backtrace.c: ditto. * common.mk: add dpendency from vm_backtrace.o to include/ruby/debug.h. * proc.c (rb_binding_new_with_cfp): constify. * vm.c (rb_vm_get_ruby_level_next_cfp): consitify. * vm_core.h, vm_trace.c: move decls. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28* probes.d: Change function-entry probe to method-entry.tenderlove
* insns.def: ditto * probes_helper.h: ditto * test/dtrace/test_function_entry.rb: ditto * test/dtrace/test_singleton_function.rb: ditto * vm.c: ditto * vm_eval.c: ditto * vm_insnhelper.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27* vm.c (rb_vm_make_env_object): make Proc object if Env is possibleko1
to point block. [ruby-core:41038] [ruby-trunk - Bug #5634] * vm.c (rb_vm_make_proc): No need to make Proc object here. * bootstraptest/test_proc.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-22* Makefile.in: run preprocessor when making probe.hkosaki
* probes.d: define probe insn and insn__operand only when VM_COLLECT_USAGE_DETAILS is 1. [Bug #7370] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-22* vm.c: Don't define vm_collect_usage_operand() andkosaki
static void vm_collect_usage_insn() when disabling VM_COLLECT_USAGE_DETAILS. (refix r37796) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-20* vm_trace.c: add two methods:ko1
(1) TracePoint#return_value which returns return value on the :return and :c_return event. (2) TracePoint#raised_exception which returns raised exception value on the :raise event. Eeach methods raise RuntimeError if it is called at unsupported event. Please review and give us feedback until next preview release (Dec/2012) of Ruby 2.0.0. * insns.def, vm.c, vm_eval.c, vm_insnhelper.c, eval.c, thread.c: ditto. * vm_trace.c, vm_core.h: move definition of rb_trace_arg_t from vm_trace.c to vm_core.h. Caller fills rb_trace_arg_t and pass the pointer of this variable. * test/ruby/test_settracefunc.rb: fix tests to test this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-18* vm_core.h, probes_helper.h (RUBY_DTRACE_FUNC_ENTRY_HOOK,ngoto
RUBY_DTRACE_FUNC_RETURN_HOOK): move from vm_core.h to new file probes_helper.h for narrowing dependency to probes.h. * common.mk (VM_CORE_H_INCLUDES): remove dependency to probes.h. * common.mk (vm.$(OBJEXT)): add dependency to probes_helper.h. * vm.c, vm_insnhelper.c: include probes_helper.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-16vm.c: gc guardnobu
* vm.c (vm_collect_usage_operand): prevent from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e