Граф коммитов

73 Коммитов

Автор SHA1 Сообщение Дата
ko1 6b6bf4dd48 * blockinlining.c: remove "yarv" prefix.
* array.c, numeric.c: ditto.
* insnhelper.ci, insns.def, vm_evalbody.ci: ditto.
* yarvcore.c: removed.
* yarvcore.h: renamed to core.h.
* cont.c, debug.c, error.c, process.c, signal.c : ditto.
* ext/probeprofiler/probeprofiler.c: ditto.
* id.c, id.h: added.
* inits.c: ditto.
* compile.c: rename internal functions.
* compile.h: fix debug flag.
* eval.c, object.c, vm.c: remove ruby_top_self.
  use rb_vm_top_self() instead.
* eval_intern.h, eval_load: ditto.
* gc.c: rename yarv_machine_stack_mark() to
  rb_gc_mark_machine_stack().
* insnhelper.h: remove unused macros.
* iseq.c: add iseq_compile() to create iseq object
  from source string.
* proc.c: rename a internal function.
* template/insns.inc.tmpl: remove YARV prefix.
* thread.c:
* vm.c (rb_iseq_eval): added.
* vm.c: move some functions from yarvcore.c.
* vm_dump.c: fix to remove compiler warning.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12 04:25:46 +00:00
ko1 ee457d92c2 * compile.c: rename iseq_translate_direct_threaded_code()
to iseq_translate_threaded_code().
* eval_intern.h, yarvcore.h: mv EXEC_EVENT_HOOK() and
  exec_event_hooks() to yarvcore.h.
* insnhelper.ci, vm.c: mv yarv_finish_insn_seq to vm.c.
* insns.def (opt_call_c_function): fix to use RESTORE_REGS().
* iseq.c (rb_iseq_build_for_ruby2cext): fix to allocate iseq.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-02 12:49:35 +00:00
ko1 9c708baa2d * eval_intern.h, yarvcore.h: move declaration of sysstack_error
to yarvcore.h.
* iseq.c: fix symbol name (:toplevel -> :top).
* lib/vm/instruction.rb, template/vm.inc.tmpl: replacable
  current file name.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-01 23:57:04 +00:00
ko1 4bdb5ced9a * gc.h: add RUBY_ prefix to debug macros.
* cont.c, proc.c, yarvcore.c,
* gc.c: define ruby_gc_debug_indent variable to debug mark/free.
* vm.c, insnhelper.ci: rename some functions to vm_* or rb_vm_*.
  move some functions, definitions, declarations to suitable files.
* eval.c, yarvcore.h, eval_error.ci, insnhelper.ci: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25 02:44:20 +00:00
ko1 f58eb1e276 * eval.c: remove ruby_current_node and change eval() prototype.
fix to use rb_sourcefile/line() instead of ruby_sourcefile/line.
* error.c, eval_error.ci, eval_load.c, eval_safe.ci, gc.c,
  include/ruby/intern.h, parse.y, process.c, ruby.c: ditto.
* vm.c: fix spaces.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24 20:33:04 +00:00
ko1 97ba019c94 * vm.c: some refactoring.
* rename th_* to vm_*.
  * remove unused variables functions.
  * add prototypes.
* blockinlining.c, compile.c, cont.c, eval.c, eval_intern.h,
  eval_jump.h, eval_load.c, inits.c, insns.def, iseq.c, parse.y,
  proc.c, process.c, signal.c, thread.c, vm.c, vm_dump.c,
  vm_evalbody.ci, yarvcore.c, yarvcore.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24 15:42:41 +00:00
nobu 1c03862049 * eval_load.c (rb_require_safe, ruby_init_ext): load with ruby level
cfp.  [ruby-core:10779]

* eval_intern.h, vm.c (rb_vm_call_cfunc): new function to call a
  function with ruby level cfp.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-18 08:02:30 +00:00
nobu 2b592580bf * include/ruby: moved public headers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10 03:06:15 +00:00
ko1 ed88975237 * eval_intern.h, eval.c (ruby_init): remove POP_TAG_INIT().
* cont.c (rb_fiber_start): remove zero-clearing tag.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 16:04:02 +00:00
ko1 64ffdb4440 * cont.c (rb_fiber_start): clear th->tag and check error to fix
[ruby-dev:30888] and [ruby-dev:30889].
* eval_intern.h: fix rb_fiber_start() prototype.
* test/ruby/test_fiber.rb: add tests for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 17:55:07 +00:00
ko1 284565992f * cont.c (cont_capture): store all local variables in heap
([ruby-dev:30832]).
* vm.c (th_stack_to_heap): added.
* test/ruby/test_continuation.rb: add a test for above.
* eval_intern.h (th_get_ruby_level_cfp): fix to clean code.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-30 05:56:13 +00:00
ko1 57062d91b9 * cont.c: support Fiber. Check test/ruby/test_fiber.rb for detail.
Fiber is known as "Micro Thread", "Coroutine", and other terms.
  At this time, only Fiber#pass is supported to change context.
  I want to know more suitable method name/API for Fiber (... do you
  know more suitable class name instead of Fiber?) as "suspend/resume",
  "call", "yield", "start/kick/stop/restart", ....
* eval.c, eval_intern.h, thread.c, yarvcore.c, yarvcore.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-27 19:12:43 +00:00
ko1 abcbd7ea38 * yarvcore.h: remove rb_control_frame_t#callee_id.
* vm_macro.def: ditto.
* eval_intern.h (exec_event_hooks): fix to check event flags
* eval_intern.h (EXEC_EVENT_HOOK): fix to re-check event flags.
* ext/probeprofiler : added.  this profiler is sampling based
  profiler.
* vm.c: add rb_thread_current_status() API for probeprofiler.
* thread.c (rb_thread_execute_interrupts): add comments.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-25 03:50:00 +00:00
nobu 354844be45 * eval_intern.h (PUSH_TAG): no argument now.
* eval.c, eval_error.h, eval_jump.h, eval_load.c, proc.c, thread.c:
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-25 01:35:13 +00:00
ko1 52ecaf65b0 * eval_intern.h: add prototypes of rb_sourceline() and
rb_sourcefile().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-20 01:34:41 +00:00
ko1 a73894337a * eval.c, node.h, thread.c, yarvcore.[ch], eval_intern.h:
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
2007-04-19 10:37:08 +00:00
ko1 ea2dd2e805 * process.c: fix to use rb_status_line_set/get/clear().
* eval_intern.h: fix line break.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-08 06:48:34 +00:00
ko1 9c574383a4 * blockinlining.c, error.c, eval.c, eval_error.h, eval_intern.h,
eval_jump.h, eval_load.c, eval_safe.h, gc.c, proc.c, signal.c,
  thread.c, thread_pthread.ci, thread_win32.ci, vm.c, vm.h,
  vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h:
  fix typo (rb_thead_t -> rb_thread_t).

* eval_intern.h: remove unused definitions.

* common.mk: fix around vm_opts.h path
  and remove harmful argument passed to insns2vm.rb.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-08 06:37:46 +00:00
ko1 0eaefd202a * eval_intern.h: remove UNSUPPORTED() macro.
* thread.c: fix to define Continuation methods
  (they only do rb_notimplement()).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-07 13:44:11 +00:00
ko1 0b91bd56c2 * eval_intern.h, yarvcore.h: remove unused macro definition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-07 13:38:29 +00:00
ko1 44aef0b53f * this commit is a result of refactoring. only renaming functions,
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
2007-02-07 01:25:05 +00:00
ko1 8ee7d0767f * blockinlining.c, compile.c, compile.h, error.c, eval.c,
eval_intern.h, eval_jump.h, eval_load.c, eval_method.h,
  eval_safe.h, gc.c, insnhelper.h, insns.def, iseq.c, proc.c,
  process.c, signal.c, thread.c, thread_pthread.ci, thread_win32.ci,
  vm.c, vm.h, vm_dump.c, vm_evalbody.ci, vm_macro.def,
  yarv.h, yarvcore.h, yarvcore.c: change type and macro names:
  * yarv_*_t -> rb_*_t
  * yarv_*_struct -> rb_*_struct
  * yarv_tag -> rb_vm_tag
  * YARV_* -> RUBY_VM_*
* proc.c, vm.c: move functions about env object creation
  from proc.c to vm.c.
* proc.c, yarvcore.c: fix rb_cVM initialization place.
* inits.c: change Init_ISeq() order (after Init_VM).
* ruby.h, proc.c: change declaration place of rb_cEnv
  from proc.c to ruby.c.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06 19:00:03 +00:00
ko1 a3e1b1ce7e * Merge YARV
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-31 15:02:22 +00:00