mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_core.h (struct rb_thread_struct): removed first_func_arg and
reuse first_args instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cf82149d21
commit
f2f08335df
5 changed files with 17 additions and 15 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Aug 20 23:17:14 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm_core.h (struct rb_thread_struct): removed first_func_arg and
|
||||
reuse first_args instead.
|
||||
|
||||
Sun Aug 19 13:31:40 2007 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* gc.c: use VALGRIND_MAKE_MEM_UNDEFINED to detect use of collected
|
||||
|
|
9
thread.c
9
thread.c
|
@ -321,7 +321,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
|
|||
RARRAY_LEN(args), RARRAY_PTR(args));
|
||||
}
|
||||
else {
|
||||
th->value = (*th->first_func)(th->first_func_arg);
|
||||
th->value = (*th->first_func)((void *)th->first_args);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
|
|||
}
|
||||
|
||||
static VALUE
|
||||
thread_create_core(VALUE klass, VALUE args, VALUE (*fn)(ANYARGS), void *arg)
|
||||
thread_create_core(VALUE klass, VALUE args, VALUE (*fn)(ANYARGS))
|
||||
{
|
||||
rb_thread_t *th;
|
||||
VALUE thval;
|
||||
|
@ -378,7 +378,6 @@ thread_create_core(VALUE klass, VALUE args, VALUE (*fn)(ANYARGS), void *arg)
|
|||
th->first_args = args;
|
||||
th->first_proc = fn ? Qfalse : rb_block_proc();
|
||||
th->first_func = fn;
|
||||
th->first_func_arg = arg;
|
||||
|
||||
th->priority = GET_THREAD()->priority;
|
||||
|
||||
|
@ -402,13 +401,13 @@ thread_create_core(VALUE klass, VALUE args, VALUE (*fn)(ANYARGS), void *arg)
|
|||
static VALUE
|
||||
thread_s_new(VALUE klass, VALUE args)
|
||||
{
|
||||
return thread_create_core(klass, args, 0, 0);
|
||||
return thread_create_core(klass, args, 0);
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_thread_create(VALUE (*fn)(ANYARGS), void *arg)
|
||||
{
|
||||
return thread_create_core(rb_cThread, 0, fn, arg);
|
||||
return thread_create_core(rb_cThread, (VALUE)arg, fn);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.9.0"
|
||||
#define RUBY_RELEASE_DATE "2007-08-19"
|
||||
#define RUBY_RELEASE_DATE "2007-08-20"
|
||||
#define RUBY_VERSION_CODE 190
|
||||
#define RUBY_RELEASE_CODE 20070819
|
||||
#define RUBY_RELEASE_CODE 20070820
|
||||
#define RUBY_PATCHLEVEL 0
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
|
@ -9,7 +9,7 @@
|
|||
#define RUBY_VERSION_TEENY 0
|
||||
#define RUBY_RELEASE_YEAR 2007
|
||||
#define RUBY_RELEASE_MONTH 8
|
||||
#define RUBY_RELEASE_DAY 19
|
||||
#define RUBY_RELEASE_DAY 20
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
11
vm.c
11
vm.c
|
@ -180,7 +180,7 @@ check_env_value(VALUE envval)
|
|||
if (check_env(env)) {
|
||||
return envval;
|
||||
}
|
||||
rb_bug("invalid env\n");
|
||||
rb_bug("invalid env");
|
||||
return Qnil; /* unreachable */
|
||||
}
|
||||
|
||||
|
@ -209,8 +209,7 @@ vm_make_env_each(rb_thread_t *th, rb_control_frame_t *cfp,
|
|||
pcfp++;
|
||||
if (pcfp->dfp == 0) {
|
||||
SDR();
|
||||
printf("[BUG] orz\n");
|
||||
exit(0);
|
||||
rb_bug("invalid dfp");
|
||||
}
|
||||
}
|
||||
penvval = vm_make_env_each(th, pcfp, penvptr, endptr);
|
||||
|
@ -485,7 +484,7 @@ vm_call0(rb_thread_t *th, VALUE klass, VALUE recv,
|
|||
break;
|
||||
}
|
||||
default:
|
||||
rb_bug("unsupported: vm_call0");
|
||||
rb_bug("unsupported: vm_call0(%s)", ruby_node_name(nd_type(body)));
|
||||
}
|
||||
RUBY_VM_CHECK_INTS();
|
||||
return val;
|
||||
|
@ -501,7 +500,7 @@ vm_call_super(rb_thread_t *th, int argc, const VALUE *argv)
|
|||
int nosuper = 0;
|
||||
rb_control_frame_t *cfp = th->cfp;
|
||||
|
||||
if (!th->cfp->iseq) {
|
||||
if (!cfp->iseq) {
|
||||
klass = cfp->method_klass;
|
||||
klass = RCLASS(klass)->super;
|
||||
|
||||
|
@ -1572,7 +1571,7 @@ rb_thread_mark(void *ptr)
|
|||
|
||||
/* mark ruby objects */
|
||||
RUBY_MARK_UNLESS_NULL(th->first_proc);
|
||||
RUBY_MARK_UNLESS_NULL(th->first_args);
|
||||
if (th->first_proc) RUBY_MARK_UNLESS_NULL(th->first_args);
|
||||
|
||||
RUBY_MARK_UNLESS_NULL(th->thgroup);
|
||||
RUBY_MARK_UNLESS_NULL(th->value);
|
||||
|
|
|
@ -447,7 +447,6 @@ struct rb_thread_struct
|
|||
VALUE first_proc;
|
||||
VALUE first_args;
|
||||
VALUE (*first_func)(ANYARGS);
|
||||
void *first_func_arg;
|
||||
|
||||
/* for GC */
|
||||
VALUE *machine_stack_start;
|
||||
|
|
Loading…
Add table
Reference in a new issue