elk (3.0-11) unstable; urgency=low
* Fixed a compilation issue in src/load-dl.c:Load_Lib().
* Fixed more pointer/integer type confusions, used ptrdiff_t where possible.
* Fixed a register mangling issue in heap.c:Visit_GC_List() and
heap.c:Visit_Wind() (Really fixes #59893).
-- Samuel Hocevar <sam@zoy.org> Fri, 4 Apr 2003 02:48:29 +0200
git-svn-id: svn://svn.zoy.org/elk/trunk@5 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
+3
-3
@@ -38,13 +38,13 @@ extern Object False2;
|
||||
|
||||
/* Align heap addresses */
|
||||
#ifdef ALIGN_8BYTE
|
||||
# define ALIGN(ptr) ((ptr) = (char *)(((long)(ptr) + 7) & ~7))
|
||||
# define ALIGN(ptr) ((ptr) = (void *)(((ptrdiff_t)(ptr) + 7) & ~7))
|
||||
#else
|
||||
# define ALIGN(ptr) ((ptr) = (char *)(((long)(ptr) + 3) & ~3))
|
||||
# define ALIGN(ptr) ((ptr) = (void *)(((ptrdiff_t)(ptr) + 3) & ~3))
|
||||
#endif
|
||||
|
||||
/* Normalize stack addresses */
|
||||
#define NORM(addr) ((long)(addr) + delta)
|
||||
#define NORM(addr) ((ptrdiff_t)(addr) + delta)
|
||||
|
||||
|
||||
/* Used in special forms: */
|
||||
|
||||
+8
-5
@@ -2,8 +2,11 @@
|
||||
* data types.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <malloc.h>
|
||||
|
||||
typedef struct {
|
||||
unsigned long int data;
|
||||
int64_t data;
|
||||
int tag;
|
||||
} Object;
|
||||
|
||||
@@ -21,9 +24,9 @@ typedef struct {
|
||||
#define FIXNUM(x) ((int)(x).data)
|
||||
#define CHAR(x) ((int)(x).data)
|
||||
|
||||
#define POINTER(x) ((x).data)
|
||||
#define SETPOINTER(x,p) ((x).data = (unsigned long int)(p))
|
||||
#define SET(x,t,p) ((x).tag = (int)t << 1, (x).data = (unsigned long int)(p))
|
||||
#define POINTER(x) ((void *)(ptrdiff_t)(x).data)
|
||||
#define SETPOINTER(x,p) ((x).data = (ptrdiff_t)(void *)(p))
|
||||
#define SET(x,t,p) ((x).tag = (int)t << 1, (x).data = (p))
|
||||
|
||||
#define ISCONST(x) ((x).tag & CONSTBIT)
|
||||
#define SETCONST(x) ((x).tag |= CONSTBIT)
|
||||
@@ -207,7 +210,7 @@ struct S_Control {
|
||||
Object gcsave; /* vector */
|
||||
WIND *firstwind, *lastwind;
|
||||
int tailcall;
|
||||
unsigned int delta;
|
||||
ptrdiff_t delta;
|
||||
#ifdef GENERATIONAL_GC
|
||||
int reloc;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user