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

* eval.c (stack_length): use __builtin_frame_address() only if

GCC and i386 CPU.
* gc.c (rb_gc, Init_stack): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2001-02-11 07:12:02 +00:00
parent 08f8ab9c37
commit c5254c68ad
4 changed files with 50 additions and 5 deletions

View file

@ -1,3 +1,10 @@
Sun Feb 11 16:00:30 2001 WATANABE Hirofumi <eban@ruby-lang.org>
* eval.c (stack_length): use __builtin_frame_address() only if
GCC and i386 CPU.
* gc.c (rb_gc, Init_stack): ditto.
Fri Feb 10 00:00:30 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* win32/win32.c (win32_stat): replace stat for enable when pathname

21
eval.c
View file

@ -22,6 +22,25 @@
#include "st.h"
#include "dln.h"
/* Make alloca work the best possible way. */
#ifdef __GNUC__
# ifndef atarist
# ifndef alloca
# define alloca __builtin_alloca
# endif
# endif /* atarist */
#else
# if defined(HAVE_ALLOCA_H)
# include <alloca.h>
# elif !defined(alloca)
char *alloca();
# endif
#endif /* __GNUC__ */
#ifdef _AIX
#pragma alloca
#endif
#ifdef HAVE_STDARG_PROTOTYPES
#include <stdarg.h>
#define va_init_list(a,b) va_start(a,b)
@ -4128,7 +4147,7 @@ stack_length(p)
alloca(0);
# define STACK_END (&stack_end)
#else
# if defined(__GNUC__) && !defined(__alpha__) && !defined(__APPLE__)
# if defined(__GNUC__) && defined(__i386__)
VALUE *stack_end = __builtin_frame_address(0);
# else
VALUE *stack_end = alloca(1);

23
gc.c
View file

@ -31,6 +31,25 @@ void rb_io_fptr_finalize _((struct OpenFile*));
#endif
#endif
/* Make alloca work the best possible way. */
#ifdef __GNUC__
# ifndef atarist
# ifndef alloca
# define alloca __builtin_alloca
# endif
# endif /* atarist */
#else
# if defined(HAVE_ALLOCA_H)
# include <alloca.h>
# elif !defined(alloca)
char *alloca();
# endif
#endif /* __GNUC__ */
#ifdef _AIX
#pragma alloca
#endif
#ifdef C_ALLOCA
#ifndef alloca
void *alloca();
@ -930,7 +949,7 @@ rb_gc()
alloca(0);
# define STACK_END (&stack_end)
#else
# if defined(__GNUC__) && !defined(__alpha__) && !defined(__APPLE__)
# if defined(__GNUC__) && defined(__i386__)
VALUE *stack_end = __builtin_frame_address(0);
# else
VALUE *stack_end = alloca(1);
@ -1010,7 +1029,7 @@ Init_stack(addr)
#if defined(__human68k__)
extern void *_SEND;
rb_gc_stack_start = _SEND;
#elif defined(__GNUC__) && !defined(__alpha__) && !defined(__APPLE__)
#elif defined(__GNUC__) && defined(__i386__)
rb_gc_stack_start = __builtin_frame_address(2);
#else
VALUE start;

View file

@ -1,4 +1,4 @@
#define RUBY_VERSION "1.7.0"
#define RUBY_RELEASE_DATE "2001-02-09"
#define RUBY_RELEASE_DATE "2001-02-11"
#define RUBY_VERSION_CODE 170
#define RUBY_RELEASE_CODE 20010209
#define RUBY_RELEASE_CODE 20010211