1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/syck/rubyext.c (syck_emitter_write_m): forgot to declare

"self", making it default to "int".

* ext/syck/rubyext.c (syck_emitter_simple_write): ditto.

* gc.c (rb_gc): should mark backing store region on IA64.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-08-01 10:57:32 +00:00
parent a222ce3000
commit 070fcde39d
3 changed files with 35 additions and 7 deletions

View file

@ -1,3 +1,12 @@
Fri Aug 1 19:48:56 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* ext/syck/rubyext.c (syck_emitter_write_m): forgot to declare
"self", making it default to "int".
* ext/syck/rubyext.c (syck_emitter_simple_write): ditto.
* gc.c (rb_gc): should mark backing store region on IA64.
Fri Aug 1 17:13:23 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/openssl/extconf.rb: should replace literally.

View file

@ -1104,11 +1104,11 @@ syck_emitter_flush_m( self )
*/
VALUE
syck_emitter_write_m( self, str )
VALUE str;
VALUE self, str;
{
SyckEmitter *emitter;
Data_Get_Struct(self, SyckEmitter, emitter);
Data_Get_Struct(self, SyckEmitter, emitter);
syck_emitter_write( emitter, RSTRING(str)->ptr, RSTRING(str)->len );
return self;
}
@ -1118,11 +1118,11 @@ syck_emitter_write_m( self, str )
*/
VALUE
syck_emitter_simple_write( self, str )
VALUE str;
VALUE self, str;
{
SyckEmitter *emitter;
Data_Get_Struct(self, SyckEmitter, emitter);
Data_Get_Struct(self, SyckEmitter, emitter);
syck_emitter_simple( emitter, RSTRING(str)->ptr, RSTRING(str)->len );
return self;
}

25
gc.c
View file

@ -30,6 +30,11 @@
#include <sys/resource.h>
#endif
#ifdef __ia64__
#include <ucontext.h>
extern unsigned long __libc_ia64_register_backing_store_base;
#endif
void re_free_registers _((struct re_registers*));
void rb_io_fptr_finalize _((struct OpenFile*));
@ -367,7 +372,7 @@ static unsigned int STACK_LEVEL_MAX = 655300;
# define SET_STACK_END VALUE stack_end; alloca(0);
# define STACK_END (&stack_end)
#else
# if defined(__GNUC__) && defined(USE_BUILTIN_FRAME_ADDRESS)
# if defined(__GNUC__) && defined(USE_BUILTIN_FRAME_ADDRESS) && !defined(__ia64__)
# define SET_STACK_END VALUE *stack_end = __builtin_frame_address(0)
# else
# define SET_STACK_END VALUE *stack_end = alloca(1)
@ -1236,7 +1241,7 @@ rb_gc()
}
FLUSH_REGISTER_WINDOWS;
/* This assumes that all registers are saved into the jmp_buf */
/* This assumes that all registers are saved into the jmp_buf (and stack) */
setjmp(save_regs_gc_mark);
mark_locations_array((VALUE*)save_regs_gc_mark, sizeof(save_regs_gc_mark) / sizeof(VALUE *));
#if STACK_GROW_DIRECTION < 0
@ -1249,6 +1254,20 @@ rb_gc()
else
rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END);
#endif
#ifdef __ia64__
/* mark backing store (flushed register window on the stack) */
/* the basic idea from guile GC code */
{
ucontext_t ctx;
VALUE *top, *bot;
getcontext(&ctx);
rb_gc_mark_locations((VALUE*)&ctx.uc_mcontext,
((size_t)(sizeof(VALUE)-1 + sizeof ctx.uc_mcontext)/sizeof(VALUE)));
bot = (VALUE*)__libc_ia64_register_backing_store_base;
top = (VALUE*)ctx.uc_mcontext.sc_ar_bsp;
rb_gc_mark_locations(bot, top);
}
#endif
#if defined(__human68k__) || defined(__mc68000__)
rb_gc_mark_locations((VALUE*)((char*)STACK_END + 2),
(VALUE*)((char*)rb_gc_stack_start + 2));
@ -1322,7 +1341,7 @@ Init_stack(addr)
/* ruby crashes on IA64 if compiled with optimizer on */
/* when if STACK_LEVEL_MAX is greater than this magic number */
/* I know this is a kludge. I suspect optimizer bug */
#define IA64_MAGIC_STACK_LIMIT 32768
#define IA64_MAGIC_STACK_LIMIT 49152
if (STACK_LEVEL_MAX > IA64_MAGIC_STACK_LIMIT)
STACK_LEVEL_MAX = IA64_MAGIC_STACK_LIMIT;
#endif