remove // comments, uneeded checks

This commit is contained in:
Alex Shinn 2016-02-20 23:35:41 +09:00
parent 6fc3d15653
commit 8ff6d7f4b8
4 changed files with 4 additions and 7 deletions

4
gc.c
View file

@ -356,7 +356,7 @@ sexp sexp_finalize (sexp ctx) {
for (r=q->next; r && ((char*)r<(char*)p); q=r, r=r->next)
;
if ((char*)r == (char*)p) { /* this is a free block, skip it */
p = (sexp) (((char*)p) + (r ? r->size : 0));
p = (sexp) (((char*)p) + r->size);
continue;
}
size = sexp_heap_align(sexp_allocated_bytes(ctx, p));
@ -401,7 +401,7 @@ sexp sexp_sweep (sexp ctx, size_t *sum_freed_ptr) {
for (r=q->next; r && ((char*)r<(char*)p); q=r, r=r->next)
;
if ((char*)r == (char*)p) { /* this is a free block, skip it */
p = (sexp) (((char*)p) + (r ? r->size : 0));
p = (sexp) (((char*)p) + r->size);
continue;
}
size = sexp_heap_align(sexp_allocated_bytes(ctx, p));

View file

@ -729,5 +729,3 @@ void sexp_gc_heap_stats_print(sexp ctx)
printf(" ========================================\n");
printf(" %6zu %7zu\n", total_count, total_size);
}

4
main.c
View file

@ -70,9 +70,9 @@ void sexp_usage(int err) {
void sexp_segfault_handler(int sig) {
void *array[10];
size_t size;
// get void*'s for all entries on the stack
/* get void*'s for all entries on the stack */
size = backtrace(array, 10);
// print out all the frames to stderr
/* print out all the frames to stderr */
fprintf(stderr, "Error: signal %d:\n", sig);
backtrace_symbols_fd(array, size, STDERR_FILENO);
exit(1);

1
vm.c
View file

@ -1136,7 +1136,6 @@ sexp sexp_apply (sexp ctx, sexp proc, sexp args) {
bc = sexp_procedure_code(self);
cp = sexp_procedure_vars(self);
ip = sexp_bytecode_data(bc) + sexp_unbox_fixnum(_ARG3);
// TODO - value stored here never read, verify i = sexp_unbox_fixnum(_ARG4);
top -= 4;
_ARG1 = tmp1;
break;