mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
Fixed bug for version without extra word for sexp
This commit is contained in:
parent
c61159cfc6
commit
52ef663986
1 changed files with 4 additions and 13 deletions
|
|
@ -37,12 +37,6 @@ void __post_gc_subst () { }
|
||||||
assert(__gc_stack_top != 0); \
|
assert(__gc_stack_top != 0); \
|
||||||
assert(__builtin_frame_address(0) <= (void *)__gc_stack_top);
|
assert(__builtin_frame_address(0) <= (void *)__gc_stack_top);
|
||||||
|
|
||||||
//#define PRE_GC() \
|
|
||||||
// bool flag = true; \
|
|
||||||
// if (__gc_stack_top == 0) { flag = false; } \
|
|
||||||
// if (!flag) __gc_stack_top = (size_t)__builtin_frame_address(0); \
|
|
||||||
// assert(__builtin_frame_address(0) <= (void *)__gc_stack_top);
|
|
||||||
|
|
||||||
#define POST_GC() \
|
#define POST_GC() \
|
||||||
assert(__builtin_frame_address(0) <= (void *)__gc_stack_top); \
|
assert(__builtin_frame_address(0) <= (void *)__gc_stack_top); \
|
||||||
__post_gc(); \
|
__post_gc(); \
|
||||||
|
|
@ -52,9 +46,6 @@ void __post_gc_subst () { }
|
||||||
assert(false); \
|
assert(false); \
|
||||||
}
|
}
|
||||||
|
|
||||||
//#define POST_GC() \
|
|
||||||
// if (!flag) { __gc_stack_top = 0; }
|
|
||||||
|
|
||||||
extern size_t __gc_stack_top, __gc_stack_bottom;
|
extern size_t __gc_stack_top, __gc_stack_bottom;
|
||||||
|
|
||||||
static void vfailure (char *s, va_list args) {
|
static void vfailure (char *s, va_list args) {
|
||||||
|
|
@ -434,13 +425,13 @@ static void stringcat (void *p) {
|
||||||
char *tag = de_hash(TO_SEXP(p)->tag);
|
char *tag = de_hash(TO_SEXP(p)->tag);
|
||||||
|
|
||||||
if (strcmp(tag, "cons") == 0) {
|
if (strcmp(tag, "cons") == 0) {
|
||||||
data *b = a;
|
sexp *b = (sexp *)a;
|
||||||
|
|
||||||
while (LEN(b->data_header)) {
|
while (LEN(b->data_header)) {
|
||||||
stringcat((void *)((int *)b->contents)[0]);
|
stringcat((void *)((int *)b->contents)[0]);
|
||||||
b = (data *)((int *)b->contents)[1];
|
int next_b = ((int *)b->contents)[1];
|
||||||
if (!UNBOXED(b)) {
|
if (!UNBOXED(next_b)) {
|
||||||
b = TO_DATA(b);
|
b = TO_SEXP(next_b);
|
||||||
} else break;
|
} else break;
|
||||||
}
|
}
|
||||||
} else printStringBuf("*** non-list data_header: %s ***", tag);
|
} else printStringBuf("*** non-list data_header: %s ***", tag);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue