mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-05 22:38:44 +00:00
fix warnings
This commit is contained in:
parent
9170b9c860
commit
17a7aa0116
5 changed files with 14 additions and 13 deletions
|
|
@ -1,8 +1,10 @@
|
|||
FLAGS=-no-pie -m32 -g2 -fstack-protector-all
|
||||
|
||||
all: byterun.o
|
||||
$(CC) -m32 -g -o byterun byterun.o ../runtime/runtime.a
|
||||
$(CC) $(FLAGS) -o byterun byterun.o ../runtime/runtime.a
|
||||
|
||||
byterun.o: byterun.c
|
||||
$(CC) -g -fstack-protector-all -m32 -c byterun.c
|
||||
$(CC) $(FLAGS) -g -c byterun.c
|
||||
|
||||
clean:
|
||||
$(RM) *.a *.o *~
|
||||
$(RM) *.a *.o *~ byterun
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
CC=gcc
|
||||
FLAGS=-m32 -g2 -fstack-protector-all -DLAMA_ENV
|
||||
FLAGS=-no-pie -m32 -g2 -fstack-protector-all -DLAMA_ENV
|
||||
|
||||
all: gc_runtime.o gc.o runtime.o
|
||||
ar rc runtime.a gc_runtime.o runtime.o gc.o
|
||||
|
|
|
|||
|
|
@ -460,11 +460,11 @@ void physically_relocate (memory_chunk *old_heap) {
|
|||
#endif
|
||||
}
|
||||
|
||||
bool is_valid_heap_pointer (const size_t *p) {
|
||||
inline bool is_valid_heap_pointer (const size_t *p) {
|
||||
return !UNBOXED(p) && (size_t)heap.begin <= (size_t)p && (size_t)p <= (size_t)heap.current;
|
||||
}
|
||||
|
||||
bool is_valid_pointer (const size_t *p) { return !UNBOXED(p); }
|
||||
static inline bool is_valid_pointer (const size_t *p) { return !UNBOXED(p); }
|
||||
|
||||
static inline void queue_enqueue (heap_iterator *tail_iter, void *obj) {
|
||||
void *tail = tail_iter->current;
|
||||
|
|
|
|||
|
|
@ -65,8 +65,7 @@ void *gc_alloc_on_existing_heap(size_t);
|
|||
void mark (void *obj);
|
||||
void mark_phase (void);
|
||||
// written in ASM, scans stack for pointers to the heap and starts marking process
|
||||
extern void
|
||||
__gc_root_scan_stack (void);
|
||||
extern void __gc_root_scan_stack (void);
|
||||
// marks each pointer from extra roots
|
||||
void scan_extra_roots (void);
|
||||
#ifdef LAMA_ENV
|
||||
|
|
@ -93,9 +92,9 @@ extern void __pre_gc (void);
|
|||
extern void __post_gc (void);
|
||||
|
||||
// invoked from ASM
|
||||
extern void gc_test_and_mark_root (size_t **root);
|
||||
inline bool is_valid_heap_pointer (const size_t *);
|
||||
inline bool is_valid_pointer (const size_t *);
|
||||
extern void gc_test_and_mark_root (size_t **root);
|
||||
bool is_valid_heap_pointer (const size_t *);
|
||||
static inline bool is_valid_pointer (const size_t *);
|
||||
|
||||
void clear_extra_roots (void);
|
||||
|
||||
|
|
|
|||
|
|
@ -820,7 +820,7 @@ extern void *Bclosure (int bn, void *entry, ...) {
|
|||
for (i = 0; i < n; i++, argss++) { push_extra_root((void **)argss); }
|
||||
|
||||
r = (data *)alloc_closure(n + 1);
|
||||
push_extra_root(&r);
|
||||
push_extra_root((void **)&r);
|
||||
((void **)r->contents)[0] = entry;
|
||||
|
||||
va_start(args, entry);
|
||||
|
|
@ -834,7 +834,7 @@ extern void *Bclosure (int bn, void *entry, ...) {
|
|||
|
||||
POST_GC();
|
||||
|
||||
pop_extra_root(&r);
|
||||
pop_extra_root((void **)&r);
|
||||
argss--;
|
||||
for (i = 0; i < n; i++, argss--) { pop_extra_root((void **)argss); }
|
||||
return r->contents;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue