* gc.c, yarvcore.c: fix to mark VM structure on startup.
* yarvcore.h: disable USE_CACHED_VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7c4ff2d332
commit
7d200b94f9
@ -1,3 +1,9 @@
|
|||||||
|
Thu May 24 11:46:55 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* gc.c, yarvcore.c: fix to mark VM structure on startup.
|
||||||
|
|
||||||
|
* yarvcore.h: disable USE_CACHED_VALUE.
|
||||||
|
|
||||||
Thu May 24 01:54:53 2007 Koichi Sasada <ko1@atdot.net>
|
Thu May 24 01:54:53 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* cont.c: support callcc which everyone love.
|
* cont.c: support callcc which everyone love.
|
||||||
|
7
gc.c
7
gc.c
@ -504,7 +504,7 @@ rb_fill_value_cache(rb_thread_t *th)
|
|||||||
VALUE
|
VALUE
|
||||||
rb_newobj(void)
|
rb_newobj(void)
|
||||||
{
|
{
|
||||||
#if USE_VALUE_CACHE && 1
|
#if USE_VALUE_CACHE
|
||||||
rb_thread_t *th = GET_THREAD();
|
rb_thread_t *th = GET_THREAD();
|
||||||
VALUE v = *th->value_cache_ptr;
|
VALUE v = *th->value_cache_ptr;
|
||||||
|
|
||||||
@ -1333,6 +1333,8 @@ int rb_setjmp (rb_jmp_buf);
|
|||||||
|
|
||||||
#define GC_NOTIFY 0
|
#define GC_NOTIFY 0
|
||||||
|
|
||||||
|
void rb_vm_mark(void *ptr);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
garbage_collect(void)
|
garbage_collect(void)
|
||||||
{
|
{
|
||||||
@ -1358,8 +1360,7 @@ garbage_collect(void)
|
|||||||
|
|
||||||
init_mark_stack();
|
init_mark_stack();
|
||||||
|
|
||||||
rb_gc_mark(th->vm->self);
|
th->vm->self ? rb_gc_mark(th->vm->self) : rb_vm_mark(th->vm);
|
||||||
rb_gc_mark(th->vm->mark_object_ary);
|
|
||||||
|
|
||||||
if (finalizer_table) {
|
if (finalizer_table) {
|
||||||
mark_tbl(finalizer_table, 0);
|
mark_tbl(finalizer_table, 0);
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "node.h"
|
#include "node.h"
|
||||||
|
|
||||||
#include "yarvcore.h"
|
#include "yarvcore.h"
|
||||||
#include "gc.h"
|
#include "gc.h"
|
||||||
|
|
||||||
@ -192,6 +191,7 @@ vm_mark(void *ptr)
|
|||||||
MARK_UNLESS_NULL(vm->mark_object_ary);
|
MARK_UNLESS_NULL(vm->mark_object_ary);
|
||||||
MARK_UNLESS_NULL(vm->last_status);
|
MARK_UNLESS_NULL(vm->last_status);
|
||||||
MARK_UNLESS_NULL(vm->loaded_features);
|
MARK_UNLESS_NULL(vm->loaded_features);
|
||||||
|
|
||||||
if (vm->loading_table) {
|
if (vm->loading_table) {
|
||||||
rb_mark_tbl(vm->loading_table);
|
rb_mark_tbl(vm->loading_table);
|
||||||
}
|
}
|
||||||
@ -202,6 +202,12 @@ vm_mark(void *ptr)
|
|||||||
MARK_REPORT_LEAVE("vm");
|
MARK_REPORT_LEAVE("vm");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
rb_vm_mark(void *ptr)
|
||||||
|
{
|
||||||
|
vm_mark(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
vm_alloc(VALUE klass)
|
vm_alloc(VALUE klass)
|
||||||
{
|
{
|
||||||
|
@ -411,7 +411,7 @@ struct rb_vm_tag {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define RUBY_VM_VALUE_CACHE_SIZE 0x1000
|
#define RUBY_VM_VALUE_CACHE_SIZE 0x1000
|
||||||
#define USE_VALUE_CACHE 1
|
#define USE_VALUE_CACHE 0
|
||||||
|
|
||||||
struct rb_thread_struct
|
struct rb_thread_struct
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user