mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
Different PRE_GC and POST_GC attempt, floating 0 bug is present again
This commit is contained in:
parent
8c02877974
commit
c61159cfc6
1 changed files with 9 additions and 0 deletions
|
|
@ -37,6 +37,12 @@ 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(); \
|
||||||
|
|
@ -46,6 +52,9 @@ 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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue