diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-07 01:25:05 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-07 01:25:05 +0000 |
commit | 44aef0b53f3e73ec987a668a3284d5e28bdb8121 (patch) | |
tree | 4cbe7f49ca7c1b4be5f345870ef3d99126803a31 /yarv.h | |
parent | 8ee7d0767f7940baeae60ffa95afde93f3378c93 (diff) | |
download | ruby-44aef0b53f3e73ec987a668a3284d5e28bdb8121.tar.gz |
* 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
Diffstat (limited to 'yarv.h')
-rw-r--r-- | yarv.h | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/yarv.h b/yarv.h deleted file mode 100644 index 9fb8722666..0000000000 --- a/yarv.h +++ /dev/null @@ -1,104 +0,0 @@ -/********************************************************************** - - yarv.h - - - $Author$ - $Date$ - - Copyright (C) 2004-2006 Koichi Sasada - -**********************************************************************/ - - -#include <ruby.h> -#include <node.h> -#include "yarvcore.h" - -#ifndef _YARV_H_INCLUDED_ -#define _YARV_H_INCLUDED_ - - -VALUE yarv_yield(VALUE val); - -/* original API */ - -#if YARVEXT -RUBY_EXTERN int yarvIsWorking; -#define IS_YARV_WORKING() (yarvIsWorking) -#define SET_YARV_START() (yarvIsWorking = 1) -#define SET_YARV_STOP() (yarvIsWorking = 0) -#else -#define IS_YARV_WORKING() 1 -#define SET_YARV_START() -#define SET_YARV_STOP() -#endif - - -#if RUBY_VM_THREAD_MODEL == 2 - -extern rb_thead_t *yarvCurrentThread; -extern rb_vm_t *theYarvVM; - -static inline VALUE -yarv_get_current_running_thread_value(void) -{ - return yarvCurrentThread->self; -} - -static inline rb_thead_t * -yarv_get_current_running_thread(void) -{ - return yarvCurrentThread; -} - -#define GET_VM() theYarvVM -#define GET_THREAD() yarvCurrentThread - -static inline void -rb_thread_set_current_raw(rb_thead_t *th) -{ - yarvCurrentThread = th; -} - -static inline void -rb_thread_set_current(rb_thead_t *th) -{ - rb_thread_set_current_raw(th); - th->vm->running_thread = th; -} - -#else -#error "unsupported thread model" -#endif - -void rb_vm_change_state(); - -VALUE th_invoke_yield(rb_thead_t *th, int argc, VALUE *argv); - -VALUE th_call0(rb_thead_t *th, VALUE klass, VALUE recv, - VALUE id, ID oid, int argc, const VALUE *argv, - NODE * body, int nosuper); - -VALUE *yarv_svar(int); - -VALUE th_call_super(rb_thead_t *th, int argc, const VALUE *argv); - -VALUE yarv_backtrace(int lev); - -VALUE yarvcore_eval_parsed(NODE *node, VALUE file); - -VALUE th_invoke_proc(rb_thead_t *th, rb_proc_t *proc, - VALUE self, int argc, VALUE *argv); -VALUE th_make_proc(rb_thead_t *th, rb_control_frame_t *cfp, - rb_block_t *block); -VALUE th_make_env_object(rb_thead_t *th, rb_control_frame_t *cfp); -VALUE yarvcore_eval(VALUE self, VALUE str, VALUE file, VALUE line); - -int yarv_block_given_p(void); - -VALUE yarv_load(char *); -int th_get_sourceline(rb_control_frame_t *); -VALUE th_backtrace(rb_thead_t *, int); -void yarv_bug(void); - -#endif |