yarv-diff:229
From: ko1 atdot.net
Date: 12 Feb 2006 15:28:52 -0000
Subject: [yarv-diff:229] r388 - trunk
Author: ko1
Date: 2006-02-13 00:28:52 +0900 (Mon, 13 Feb 2006)
New Revision: 388
Modified:
trunk/
trunk/ChangeLog
trunk/blockinlining.c
trunk/eval.c
trunk/eval_intern.h
trunk/eval_load.c
trunk/eval_method.h
trunk/eval_proc.c
trunk/eval_thread.c
trunk/insns.def
trunk/parse.y
trunk/thread.c
trunk/vm.c
Log:
r570@leremita: ko1 | 2006-02-13 00:23:57 +0900
* blockinlining.c : refoctoring with CFLAGS+=-Wunused
* eval.c : ditto
* eval_intern.h : ditto
* eval_load.c : ditto
* eval_method.h : ditto
* eval_proc.c : ditto
* eval_thread.c : ditto
* insns.def : ditto
* parse.y : ditto
* thread.c : ditto
* vm.c : ditto
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 81cd9672-7512-7e48-ae48-6936450e977d:/local/yarv/trunk:566
+ 81cd9672-7512-7e48-ae48-6936450e977d:/local/yarv/trunk:570
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-02-12 13:25:01 UTC (rev 387)
+++ trunk/ChangeLog 2006-02-12 15:28:52 UTC (rev 388)
@@ -4,6 +4,31 @@
# from Mon, 03 May 2004 01:24:19 +0900
#
+2006-02-13(Mon) 00:11:17 +0900 Koichi Sasada <ko1 atdot.net>
+
+ * blockinlining.c : refoctoring with CFLAGS+=-Wunused
+
+ * eval.c : ditto
+
+ * eval_intern.h : ditto
+
+ * eval_load.c : ditto
+
+ * eval_method.h : ditto
+
+ * eval_proc.c : ditto
+
+ * eval_thread.c : ditto
+
+ * insns.def : ditto
+
+ * parse.y : ditto
+
+ * thread.c : ditto
+
+ * vm.c : ditto
+
+
2006-02-12(Sun) 22:22:35 +0900 Koichi Sasada <ko1 atdot.net>
* array.c : revert last commit
Modified: trunk/blockinlining.c
===================================================================
--- trunk/blockinlining.c 2006-02-12 13:25:01 UTC (rev 387)
+++ trunk/blockinlining.c 2006-02-12 15:28:52 UTC (rev 388)
@@ -8,10 +8,9 @@
static VALUE
yarv_iseq_special_block(yarv_iseq_t *iseq, void *builder)
{
+#if OPT_BLOCKINLINING
VALUE parent = Qfalse;
VALUE iseqval;
-
-#if OPT_BLOCKINLINING
if (iseq->argc > 1 || iseq->arg_simple == 0) {
/* argument check */
return 0;
Modified: trunk/eval.c
===================================================================
--- trunk/eval.c 2006-02-12 13:25:01 UTC (rev 387)
+++ trunk/eval.c 2006-02-12 15:28:52 UTC (rev 388)
@@ -212,7 +212,6 @@
{
int state;
volatile VALUE err = GET_THREAD()->errinfo;
- VALUE st = 0;
yarv_vm_t *vm = GET_VM();
if (RTEST(err) && rb_obj_is_kind_of(err, rb_eSystemExit)) {
@@ -351,7 +350,6 @@
{
int state;
VALUE val = Qnil; /* OK */
- struct SCOPE *saved_scope;
volatile int safe = ruby_safe_level;
if (OBJ_TAINTED(cmd)) {
@@ -435,7 +433,6 @@
VALUE klass;
VALUE cbase = 0;
void *data = 0;
- int i;
while (cref) {
klass = cref->nd_clss;
@@ -628,15 +625,9 @@
}
static void
-call_trace_func(event, node, self, id, klass)
- rb_event_t event;
- NODE *node;
- VALUE self;
- ID id;
- VALUE klass; /* OK */
+call_trace_func(rb_event_t event, NODE *node, VALUE self, ID id, VALUE klass)
{
int state, raised;
- struct FRAME *prev;
NODE *node_save;
VALUE srcfile;
char *event_name;
@@ -1465,15 +1456,10 @@
}
VALUE
-rb_ensure(b_proc, data1, e_proc, data2)
- VALUE (*b_proc) ();
- VALUE data1;
- VALUE (*e_proc) ();
- VALUE data2;
+rb_ensure(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*e_proc)(ANYARGS), VALUE data2)
{
int state;
volatile VALUE result = Qnil;
- VALUE retval;
PUSH_TAG(PROT_NONE);
if ((state = EXEC_TAG()) == 0) {
@@ -1944,7 +1930,6 @@
static VALUE
eval(VALUE self, VALUE src, VALUE scope, char *file, int line)
{
- volatile int safe = ruby_safe_level;
int state;
VALUE result = Qundef;
VALUE envval;
@@ -1952,7 +1937,6 @@
yarv_thread_t *th = GET_THREAD();
yarv_env_t *env = NULL;
NODE *stored_cref_stack = 0;
- volatile VALUE stored_special_cref_stack = Qundef;
if (file == 0) {
ruby_set_current_source();
Modified: trunk/eval_intern.h
===================================================================
--- trunk/eval_intern.h 2006-02-12 13:25:01 UTC (rev 387)
+++ trunk/eval_intern.h 2006-02-12 15:28:52 UTC (rev 388)
@@ -243,9 +243,10 @@
#define TAG_THREAD 0xa
#define TAG_MASK 0xf
-static int scope_vmode;
+#define SCOPE_TEST(f) \
+ (ruby_cref()->nd_visi & (f))
-#define SCOPE_TEST(f) \
+#define SCOPE_CHECK(f) \
(ruby_cref()->nd_visi == (f))
#define SCOPE_SET(f) \
@@ -319,10 +320,6 @@
VALUE th_get_cbase(yarv_thread_t *th);
-static VALUE
-ruby_cbase()
-{
- return th_get_cbase(GET_THREAD());
-}
+#define ruby_cbase() th_get_cbase(GET_THREAD())
#endif /* EVAL_INTERN_H_INCLUDED */
Modified: trunk/eval_load.c
===================================================================
--- trunk/eval_load.c 2006-02-12 13:25:01 UTC (rev 387)
+++ trunk/eval_load.c 2006-02-12 15:28:52 UTC (rev 388)
@@ -118,7 +118,6 @@
{
VALUE tmp;
int state;
- volatile ID callee, this_func;
volatile VALUE self = ruby_top_self;
yarv_thread_t *th = GET_THREAD();
NODE *stored_cref_stack = th->cref_stack;
Modified: trunk/eval_method.h
===================================================================
--- trunk/eval_method.h 2006-02-12 13:25:01 UTC (rev 387)
+++ trunk/eval_method.h 2006-02-12 15:28:52 UTC (rev 388)
@@ -198,7 +198,6 @@
NODE *
rb_get_method_body(VALUE klass, ID id, ID *idp)
{
- VALUE origin;
NODE *volatile fbody, *body;
NODE *method;
@@ -237,7 +236,6 @@
NODE *
rb_method_node(VALUE klass, ID id)
{
- int noex;
struct cache_entry *ent;
ent = cache + EXPR1(klass, id);
@@ -348,8 +346,6 @@
int
rb_method_boundp(VALUE klass, ID id, int ex)
{
- struct cache_entry *ent;
- int noex;
NODE *method;
if ((method = rb_method_node(klass, id)) != 0) {
@@ -376,7 +372,7 @@
else {
if (SCOPE_TEST(NOEX_PRIVATE)) {
noex = NOEX_PRIVATE;
- rb_warning((scope_vmode == NOEX_MODFUNC) ?
+ rb_warning((SCOPE_CHECK(NOEX_MODFUNC)) ?
"attribute accessor as module_function" :
"private attribute?");
}
Modified: trunk/eval_proc.c
===================================================================
--- trunk/eval_proc.c 2006-02-12 13:25:01 UTC (rev 387)
+++ trunk/eval_proc.c 2006-02-12 15:28:52 UTC (rev 388)
@@ -105,35 +105,6 @@
#define SAFE_LEVEL_MAX PROC_TMASK
-#define proc_safe_level_p(data) (!(RBASIC(data)->flags & PROC_NOSAFE))
-
-static void
-proc_save_safe_level(data)
- VALUE data;
-{
- int safe = ruby_safe_level;
- if (safe > PROC_TMAX)
- safe = PROC_TMAX;
- FL_SET(data, (safe << PROC_TSHIFT) & PROC_TMASK);
-}
-
-static int
-proc_get_safe_level(VALUE data)
-{
- yarv_proc_t *proc;
- GetProcVal(data, proc);
- return proc->safe_level;
-}
-
-static void
-proc_set_safe_level(VALUE data)
-{
- yarv_proc_t *proc;
-
- GetProcVal(data, proc);
- UNSUPPORTED(proc_set_safe_level);
-}
-
static VALUE
proc_alloc(VALUE klass, int is_lambda)
{
Modified: trunk/eval_thread.c
===================================================================
--- trunk/eval_thread.c 2006-02-12 13:25:01 UTC (rev 387)
+++ trunk/eval_thread.c 2006-02-12 15:28:52 UTC (rev 388)
@@ -358,36 +358,6 @@
return 0;
}
-static void rb_thread_ready _((rb_thread_t));
-
-static VALUE run_trap_eval _((VALUE));
-static VALUE
-run_trap_eval(arg)
- VALUE arg;
-{
- VALUE *p = (VALUE *)arg;
- return rb_eval_cmd(p[0], p[1], (int)p[2]);
-}
-
-static VALUE
-rb_trap_eval(cmd, sig, safe)
- VALUE cmd;
- int sig, safe;
-{
- UNSUPPORTED(rb_trap_eval);
- return 0;
-}
-
-
-/* Return the current time as a floating-point number */
-static double
-timeofday()
-{
- struct timeval tv;
- gettimeofday(&tv, NULL);
- return (double)tv.tv_sec + (double)tv.tv_usec * 1e-6;
-}
-
#define STACK(addr) (th->stk_pos<(VALUE*)(addr) && (VALUE*)(addr)<th->stk_pos+th->stk_len)
#define ADJ(addr) (void*)(STACK(addr)?(((VALUE*)(addr)-th->stk_pos)+th->stk_ptr):(VALUE*)(addr))
@@ -397,21 +367,6 @@
// TODO: remove
}
-static rb_thread_t
-rb_thread_check(data)
- VALUE data;
-{
- // TODO: fix me
- static struct thread dummy = { 0 };
- return &dummy;
-}
-
-static VALUE th_raise_exception;
-static NODE *th_raise_node;
-static VALUE th_cmd;
-static int th_sig, th_safe;
-static char *th_signm;
-
#define RESTORE_NORMAL 1
#define RESTORE_FATAL 2
#define RESTORE_INTERRUPT 3
@@ -422,77 +377,6 @@
extern VALUE *rb_gc_stack_start;
-static void
-rb_thread_save_context(th)
- rb_thread_t th;
-{
- VALUE *pos;
- int len;
- static VALUE tval;
-
- len = ruby_stack_length(&pos);
- th->stk_len = 0;
- th->stk_pos = pos;
- if (len > th->stk_max) {
- VALUE *ptr = realloc(th->stk_ptr, sizeof(VALUE) * len);
- if (!ptr)
- rb_memerror();
- th->stk_ptr = ptr;
- th->stk_max = len;
- }
- th->stk_len = len;
- FLUSH_REGISTER_WINDOWS;
- MEMCPY(th->stk_ptr, th->stk_pos, VALUE, th->stk_len);
-#ifdef __ia64__
- {
- VALUE *top, *bot;
-#if defined(HAVE_UNWIND_H) && defined(HAVE__UNW_CREATECONTEXTFORSELF)
- _Unwind_Context *unwctx = _UNW_createContextForSelf();
-
- _UNW_currentContext(unwctx);
- bot = (VALUE *)(long)_UNW_getAR(unwctx, _UNW_AR_BSP);
- top = (VALUE *)(long)_UNW_getAR(unwctx, _UNW_AR_BSPSTORE);
- _UNW_destroyContext(unwctx);
-#else
- ucontext_t ctx;
-
- getcontext(&ctx);
- bot = (VALUE *)__libc_ia64_register_backing_store_base;
- top = (VALUE *)ctx.uc_mcontext.IA64_BSPSTORE;
-#endif
- th->bstr_len = top - bot;
- REALLOC_N(th->bstr_ptr, VALUE, th->bstr_len);
- MEMCPY(th->bstr_ptr, bot, VALUE, th->bstr_len);
- }
-#endif
-#ifdef SAVE_WIN32_EXCEPTION_LIST
- th->win32_exception_list = win32_get_exception_list();
-#endif
-
- th->flags &= THREAD_FLAGS_MASK;
- //th->tag = prot_tag;
- // th->tracing = tracing;
- th->errinfo = GET_THREAD()->errinfo;
- th->last_status = rb_last_status;
- tval = rb_lastline_get();
- rb_lastline_set(th->last_line);
- th->last_line = tval;
- tval = rb_backref_get();
- rb_backref_set(th->last_match);
- th->last_match = tval;
- th->safe = ruby_safe_level;
-
- th->node = ruby_current_node;
-}
-
-static int
-rb_thread_switch(n)
- int n;
-{
- // TODO: fix me
- return 1;
-}
-
#define THREAD_SAVE_CONTEXT(th) \
(rb_thread_save_context(th),\
rb_thread_switch((FLUSH_REGISTER_WINDOWS, ruby_setjmp((th)->context))))
@@ -586,16 +470,6 @@
}
static void
-rb_thread_ready(th)
- rb_thread_t th;
-{
- th->wait_for = 0;
- if (th->status != THREAD_TO_KILL) {
- th->status = THREAD_RUNNABLE;
- }
-}
-
-static void
rb_thread_die(th)
rb_thread_t th;
{
@@ -606,19 +480,6 @@
th->stk_ptr = 0;
}
-static void
-rb_thread_remove(th)
- rb_thread_t th;
-{
- if (th->status == THREAD_KILLED)
- return;
-
- rb_thread_ready(th);
- rb_thread_die(th);
- th->prev->next = th->next;
- th->next->prev = th->prev;
-}
-
void
rb_thread_fd_close(fd)
int fd;
@@ -650,67 +511,6 @@
rb_thread_main_jump(e, RESTORE_RAISE);
}
-static void
-copy_fds(dst, src, max)
- rb_fdset_t *dst, *src;
- int max;
-{
- int n = 0;
- int i;
-
- if (max >= rb_fd_max(src))
- max = rb_fd_max(src) - 1;
- for (i = 0; i <= max; i++) {
- if (FD_ISSET(i, src)) {
- n = i;
- FD_SET(i, dst);
- }
- }
-}
-
-static int
-match_fds(dst, src, max)
- rb_fdset_t *dst, *src;
- int max;
-{
- int i;
-
- if (max >= rb_fd_max(src))
- max = rb_fd_max(src) - 1;
- if (max >= rb_fd_max(dst))
- max = rb_fd_max(dst) - 1;
- for (i = 0; i <= max; i++) {
- if (FD_ISSET(i, src) && FD_ISSET(i, dst)) {
- return Qtrue;
- }
- }
- return Qfalse;
-}
-
-static int
-intersect_fds(src, dst, max)
- rb_fdset_t *src, *dst;
- int max;
-{
- int i, n = 0;
-
- if (max >= rb_fd_max(dst))
- max = rb_fd_max(dst) - 1;
- for (i = 0; i <= max; i++) {
- if (FD_ISSET(i, dst)) {
- if (FD_ISSET(i, src)) {
- /* Wake up only one thread per fd. */
- FD_CLR(i, src);
- n++;
- }
- else {
- FD_CLR(i, dst);
- }
- }
- }
- return n;
-}
-
void
rb_thread_schedule()
{
@@ -783,18 +583,7 @@
return 0;
}
-static int thread_init = 0;
-
#if defined(_THREAD_SAFE)
-static void
-catch_timer(sig)
- int sig;
-{
-#if !defined(POSIX_SIGNAL) && !defined(BSD_SIGNAL)
- signal(sig, catch_timer);
-#endif
- /* cause EINTR */
-}
void
rb_thread_start_timer()
@@ -883,27 +672,6 @@
* abxyzc
*/
-static VALUE
-rb_thread_s_new(argc, argv, klass)
- int argc;
- VALUE *argv;
- VALUE klass;
-{
- rb_thread_t th = rb_thread_alloc(klass);
- volatile VALUE *pos;
-
- pos = th->stk_pos;
- rb_obj_call_init(th->thread, argc, argv);
- if (th->stk_pos == 0) {
- rb_raise(rb_eThreadError,
- "uninitialized thread - check `%s#initialize'",
- rb_class2name(klass));
- }
-
- return th->thread;
-}
-
-
/*
* call-seq:
* Thread.new([arg]*) {|args| block } => thread
@@ -922,14 +690,6 @@
* abxyzc
*/
-static VALUE
-rb_thread_initialize(VALUE thread, VALUE args)
-{
- // TODO
- return Qnil;
-}
-
-
/*
* call-seq:
* Thread.start([args]*) {|args| block } => thread
@@ -940,14 +700,6 @@
* subclass will not invoke the subclass's <code>initialize</code> method.
*/
-static VALUE
-rb_thread_start(VALUE klass, VALUE args)
-{
- // TODO
- return Qnil;
-}
-
-
void
rb_thread_wait_other_threads()
{
@@ -957,7 +709,6 @@
void
rb_thread_cleanup()
{
- rb_thread_t curr, th;
// TODO: fix me
}
@@ -971,13 +722,7 @@
* Returns the status of the global ``thread critical'' condition.
*/
-static VALUE
-rb_thread_critical_get()
-{
- return rb_thread_critical ? Qtrue : Qfalse;
-}
-
/*
* call-seq:
* Thread.critical= boolean => true or false
@@ -992,13 +737,7 @@
* threading libraries.
*/
-static VALUE
-rb_thread_critical_set(obj, val)
- VALUE obj, val;
-{
- rb_thread_critical = RTEST(val);
- return val;
-}
+/***/
void
rb_thread_interrupt()
@@ -1146,12 +885,6 @@
rb_cThread = rb_define_class("Thread", rb_cObject);
rb_undef_alloc_func(rb_cThread);
- rb_define_singleton_method(rb_cThread, "critical", rb_thread_critical_get, 0);
- rb_define_singleton_method(rb_cThread, "critical=", rb_thread_critical_set, 1);
-
- rb_define_singleton_method(rb_cThread, "abort_on_exception", rb_thread_s_abort_exc, 0);
- rb_define_singleton_method(rb_cThread, "abort_on_exception=", rb_thread_s_abort_exc_set, 1);
-
rb_cCont = rb_define_class("Continuation", rb_cObject);
rb_undef_alloc_func(rb_cCont);
rb_undef_method(CLASS_OF(rb_cCont), "new");
Modified: trunk/insns.def
===================================================================
--- trunk/insns.def 2006-02-12 13:25:01 UTC (rev 387)
+++ trunk/insns.def 2006-02-12 15:28:52 UTC (rev 388)
@@ -1089,7 +1089,6 @@
{
/* val is dummy. classdef returns class scope value */
yarv_iseq_t *klass_iseq;
- int i;
VALUE klass;
if (super == Qnil) {
@@ -1154,7 +1153,6 @@
{
/* val is dummy. classdef returns class scope value */
yarv_iseq_t *klass_iseq;
- int i;
VALUE klass;
klass = rb_singleton_class(obj);
@@ -1186,7 +1184,6 @@
(VALUE val)
{
yarv_iseq_t *module_iseq;
- int i;
VALUE module;
if (mbase == Qnil) {
@@ -1298,7 +1295,6 @@
{
yarv_iseq_t *iseq = GET_ISEQ();
yarv_iseq_t *ip = iseq->local_iseq;
- VALUE *sp;
num = tmp_num;
flag = VM_CALL_FCALL_BIT;
@@ -1385,11 +1381,8 @@
(VALUE val) // inc += 1 - num;
{
yarv_block_t *block = GET_BLOCK_PTR();
- VALUE *prev_dfp, *prev_lfp;
- VALUE prev_self;
-
yarv_iseq_t *iseq;
- int i, argc = num;
+ int argc = num;
if (block == 0) {
localjump_error("no block given (yield)", Qnil, 0);
Modified: trunk/parse.y
===================================================================
--- trunk/parse.y 2006-02-12 13:25:01 UTC (rev 387)
+++ trunk/parse.y 2006-02-12 15:28:52 UTC (rev 388)
@@ -8108,8 +8108,6 @@
static int
local_id_gen(struct parser_params *parser, ID id)
{
- int i, max;
-
if (lvtbl == 0) return Qfalse;
return vtable_included(lvtbl->tbl, id);
}
@@ -8153,7 +8151,6 @@
struct parser_params *parser;
ID id;
{
- int i;
if(!POINTER_P(lvtbl->dvars)){
lvtbl->dvars = vtable_alloc(lvtbl->dvars);
}
Modified: trunk/thread.c
===================================================================
--- trunk/thread.c 2006-02-12 13:25:01 UTC (rev 387)
+++ trunk/thread.c 2006-02-12 15:28:52 UTC (rev 388)
@@ -780,8 +780,6 @@
VALUE
rb_thread_stop(void)
{
- yarv_thread_t *th = GET_THREAD();
-
if (rb_thread_alone()) {
rb_raise(rb_eThreadError,
"stopping only thread\n\tnote: use sleep to stop forever");
@@ -1374,7 +1372,6 @@
rb_thread_select(int max, fd_set * read, fd_set * write, fd_set * except,
struct timeval *timeout)
{
- yarv_thread_t *th = GET_THREAD();
struct timeval tv, *tvp = timeout;
int lerrno, n;
#ifndef linux
@@ -1516,16 +1513,18 @@
static void
timer_function(void)
{
- struct yarv_signal_thread_list *list;
// TODO: GET_VM() should not be used
GET_VM()->running_thread->interrupt_flag = 1;
#ifndef _WIN32
- list = signal_thread_list_anchor.next;
- while (list) {
- native_thread_send_interrupt_signal(list->th);
- list = list->next;
+ {
+ struct yarv_signal_thread_list *list;
+ list = signal_thread_list_anchor.next;
+ while (list) {
+ native_thread_send_interrupt_signal(list->th);
+ list = list->next;
+ }
}
#endif
}
@@ -1612,7 +1611,6 @@
static VALUE
thgroup_list(VALUE group)
{
- yarv_thread_t *th;
VALUE ary = rb_ary_new();
struct thgroup_list_params param = {
ary, group,
@@ -1798,7 +1796,6 @@
mutex_try_lock(VALUE self)
{
mutex_t *mutex;
- VALUE result = Qfalse;
GetMutexVal(self, mutex);
if (native_mutex_trylock(&mutex->lock) != EBUSY) {
@@ -1813,7 +1810,6 @@
mutex_lock(VALUE self)
{
mutex_t *mutex;
- VALUE result = Qfalse;
GetMutexVal(self, mutex);
if (mutex->th == GET_THREAD()) {
@@ -1829,7 +1825,6 @@
mutex_unlock(VALUE self)
{
mutex_t *mutex;
- VALUE result = Qfalse;
GetMutexVal(self, mutex);
mutex->th = 0;
@@ -1874,19 +1869,17 @@
rb_define_singleton_method(cYarvThread, "start", yarv_thread_s_new, -2);
rb_define_singleton_method(cYarvThread, "fork", yarv_thread_s_new, -2);
rb_define_singleton_method(cYarvThread, "main", yarv_thread_s_main, 0);
- rb_define_singleton_method(cYarvThread, "current", yarv_thread_s_current,
- 0);
+ rb_define_singleton_method(cYarvThread, "current", yarv_thread_s_current, 0);
rb_define_singleton_method(cYarvThread, "stop", rb_thread_stop, 0);
rb_define_singleton_method(cYarvThread, "kill", rb_thread_s_kill, 1);
rb_define_singleton_method(cYarvThread, "exit", rb_thread_exit, 0);
- rb_define_singleton_method(cYarvThread, "current", yarv_thread_s_current,
- 0);
+ rb_define_singleton_method(cYarvThread, "current", yarv_thread_s_current, 0);
rb_define_singleton_method(cYarvThread, "pass", yarv_thread_s_pass, 0);
rb_define_singleton_method(cYarvThread, "list", rb_thread_list, 0);
- rb_define_singleton_method(cYarvThread, "critical", rb_thread_s_critical,
- 0);
- rb_define_singleton_method(cYarvThread, "critical=", rb_thread_s_critical,
- 1);
+ rb_define_singleton_method(cYarvThread, "critical", rb_thread_s_critical, 0);
+ rb_define_singleton_method(cYarvThread, "critical=", rb_thread_s_critical, 1);
+ rb_define_singleton_method(cYarvThread, "abort_on_exception", rb_thread_s_abort_exc, 0);
+ rb_define_singleton_method(cYarvThread, "abort_on_exception=", rb_thread_s_abort_exc_set, 1);
rb_define_method(cYarvThread, "raise", yarv_thread_raise_m, -1);
rb_define_method(cYarvThread, "join", yarv_thread_join, -1);
Modified: trunk/vm.c
===================================================================
--- trunk/vm.c 2006-02-12 13:25:01 UTC (rev 387)
+++ trunk/vm.c 2006-02-12 15:28:52 UTC (rev 388)
@@ -447,7 +447,6 @@
case NODE_BMETHOD:{
yarv_control_frame_t *reg_cfp;
int i;
- const int flag = 0;
th_set_finish_env(th);
@@ -570,7 +569,6 @@
if (block->iseq->arg_rest != 0) {
int rest = block->iseq->arg_rest - 1;
- int alen;
if (argc <= rest) {
VALUE ary = rb_ary_new4(argc, argv);
@@ -705,7 +703,6 @@
VALUE *
th_cfp_svar(yarv_control_frame_t *cfp, int cnt)
{
- NODE *node;
while (cfp->pc == 0) {
cfp++;
}
@@ -880,7 +877,6 @@
VALUE
th_get_cbase(yarv_thread_t *th)
{
- int i;
NODE *cref = th->cref_stack;
VALUE klass = Qundef;
while (cref) {
@@ -892,12 +888,6 @@
return klass;
}
-static int
-th_get_visibility(yarv_thread_t *th)
-{
- return th->cref_stack->nd_visi;
-}
-
void
rb_thread_push_cref(yarv_thread_t *th, VALUE klass, int noex)
{
@@ -921,7 +911,6 @@
if (klass == Qnil) {
/* in current lexical scope */
NODE *cref = get_cref(iseq, th->cfp->lfp);
- int i;
while (cref && cref->nd_next) {
klass = cref->nd_clss;
@@ -1288,7 +1277,6 @@
VALUE
th_eval_body(yarv_thread_t *th)
{
- struct yarv_tag _tag;
int state;
VALUE result, err;
VALUE initial = 0;
@@ -1456,7 +1444,6 @@
if (catch_iseqval != 0) {
/* found catch table */
yarv_iseq_t *catch_iseq;
- VALUE *sp;
/* enter catch scope */
GetISeqVal(catch_iseqval, catch_iseq);
--
ML: yarv-diff quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml