chibi-scheme/lib/chibi/optimize/profile.c
Alex Shinn 1b4cc2ad14 Removing uses of sexp_api_params and sexp_api_pass which were ugly and no longer supported anyway.
The definitions are still provided for backwards compatibility.
2011-11-07 01:30:55 +09:00

16 lines
623 B
C

/* profile.c -- low-level utilities for VM profiling */
/* Copyright (c) 2011 Alex Shinn. All rights reserved. */
/* BSD-style license: http://synthcode.com/license.txt */
#include <chibi/eval.h>
static sexp sexp_increment_cdr (sexp ctx, sexp self, sexp_sint_t n, sexp pair) {
sexp_assert_type(ctx, sexp_pairp, SEXP_PAIR, pair);
sexp_cdr(pair) = sexp_make_fixnum(1 + sexp_unbox_fixnum(sexp_cdr(pair)));
return SEXP_VOID;
}
sexp sexp_init_library (sexp ctx, sexp self, sexp_sint_t n, sexp env) {
sexp_define_foreign(ctx, env, "increment-cdr!", 1, sexp_increment_cdr);
return SEXP_VOID;
}