diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-05 12:21:01 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-05 12:21:01 +0000 |
commit | 025cfde57d14b12504595130cb1b222372881143 (patch) | |
tree | 1b4233c4f6e2f26bce12f1815378457fbc2537ee /yarvcore.h | |
parent | 72f2d2a00d8ae3861a15ca92bf9322951a22b6cf (diff) | |
download | ruby-025cfde57d14b12504595130cb1b222372881143.tar.gz |
* eval_thread.c, common.mk: remove eval_thread.c.
* yarvcore.c: rename cYarvThread to rb_cThread.
* gc.c: remove YARV_* prefix.
* gc.h: add an include guard and prototype of rb_gc_set_stack_end().
* inits.c: fix to ANSI prototype style and reorder Init_*().
* io.c (pipe_finalize): TODO: comment out last_status.
* process.c, yarvcore.h: fix to use yarv_vm_t#last_status instead of
rb_last_status and make last_status_get() to access $?.
* yarvcore.c (vm_mark): mark yarv_vm_t#last_status.
* ruby.h: add declarations of rb_cISeq and rb_cVM.
* thread.c: move eval_thread.c codes to thread.c and remove yarv_*
function prefix.
* thread.c (thread_start_func_2): use yarv_thread_t#first_func if
it is not null.
* vm.c: fix copyright year.
* yarvcore.c (Init_vm): rename to Init_VM().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'yarvcore.h')
-rw-r--r-- | yarvcore.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/yarvcore.h b/yarvcore.h index f2c76b2f68..06b563ba2a 100644 --- a/yarvcore.h +++ b/yarvcore.h @@ -23,6 +23,7 @@ #endif #include "ruby.h" #include "st.h" +#include "node.h" #include "debug.h" #include "vm_opts.h" @@ -97,13 +98,7 @@ #define GCDEBUG 0 - - /* classes and modules */ -extern VALUE cYarvVM; -extern VALUE cYarvThread; -extern VALUE rb_cISeq; -extern VALUE rb_cVM; extern VALUE symIFUNC; extern VALUE symCFUNC; @@ -326,10 +321,11 @@ typedef struct yarv_vm_struct { st_table *living_threads; VALUE thgroup_default; + VALUE last_status; /* $? */ int thread_abort_on_exception; - int exit_code; unsigned long trace_flag; + int exit_code; /* object management */ VALUE mark_object_ary; @@ -457,6 +453,8 @@ typedef struct yarv_thread_struct VALUE first_proc; VALUE first_args; + VALUE (*first_func)(ANYARGS); + void *first_func_arg; /* for GC */ VALUE *machine_stack_start; @@ -612,7 +610,7 @@ extern void vm_stack_dump_raw(yarv_thread_t *, yarv_control_frame_t *); #define GVL_UNLOCK_BEGIN() do { \ yarv_thread_t *_th_stored = GET_THREAD(); \ - yarv_save_machine_context(_th_stored); \ + rb_gc_save_machine_context(_th_stored); \ native_mutex_unlock(&_th_stored->vm->global_interpreter_lock) #define GVL_UNLOCK_END() \ @@ -620,10 +618,8 @@ extern void vm_stack_dump_raw(yarv_thread_t *, yarv_control_frame_t *); yarv_set_current_running_thread(_th_stored); \ } while(0) -NOINLINE(void yarv_set_stack_end(VALUE **stack_end_p)); -NOINLINE(void yarv_save_machine_context(yarv_thread_t *)); - -extern int rb_thread_pending; +NOINLINE(void rb_gc_set_stack_end(VALUE **stack_end_p)); +NOINLINE(void rb_gc_save_machine_context(yarv_thread_t *)); void yarv_thread_execute_interrupts(yarv_thread_t *); |