Some work
This commit is contained in:
+28
-22
@@ -1,30 +1,36 @@
|
||||
#include "byterun/assemble.h"
|
||||
#include "lisp.h"
|
||||
#include "read.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
DEFUN(cool_func, "cool-func", (LispVal * a, LispVal *b), "(a &optional b)",
|
||||
"") {
|
||||
printf("A: ");
|
||||
debug_obj_info(stdout, a);
|
||||
printf("B: ");
|
||||
debug_obj_info(stdout, b);
|
||||
return Qnil;
|
||||
}
|
||||
/* DEFUN(cool_func, "cool-func", (LispVal * a, LispVal *b), "(a &optional b)",
|
||||
*/
|
||||
/* "") { */
|
||||
/* printf("A: "); */
|
||||
/* debug_obj_info(stdout, a); */
|
||||
/* printf("B: "); */
|
||||
/* debug_obj_info(stdout, b); */
|
||||
/* return Qnil; */
|
||||
/* } */
|
||||
|
||||
int main(int argc, const char **argv) {
|
||||
LispGCStats gc_stats;
|
||||
lisp_init();
|
||||
REGISTER_GLOBAL_FUNCTION(cool_func);
|
||||
push_stack_frame(Qnil, Qnil, Qnil);
|
||||
ReadStream s;
|
||||
const char BUF[] = "(cool-func 1 (cons 1 2))";
|
||||
read_stream_init(&s, BUF, sizeof(BUF) - 1);
|
||||
LispVal *l = read(&s);
|
||||
Feval(l);
|
||||
lisp_gc_now(&gc_stats);
|
||||
debug_print_gc_stats(stdout, &gc_stats);
|
||||
pop_stack_frame();
|
||||
lisp_shutdown();
|
||||
/* int main(int argc, const cha-r **argv) { */
|
||||
/* LispGCStats gc_stats; */
|
||||
/* lisp_init(); */
|
||||
/* REGISTER_GLOBAL_FUNCTION(cool_func); */
|
||||
/* push_stack_frame(Qnil, Qnil, Qnil); */
|
||||
/* ReadStream s; */
|
||||
/* const char BUF[] = "(cool-func 1 (cons 1 2))"; */
|
||||
/* read_stream_init(&s, BUF, sizeof(BUF) - 1); */
|
||||
/* LispVal *l = read(&s); */
|
||||
/* Feval(l); */
|
||||
/* lisp_gc_now(&gc_stats); */
|
||||
/* debug_print_gc_stats(stdout, &gc_stats); */
|
||||
/* pop_stack_frame(); */
|
||||
/* lisp_shutdown(); */
|
||||
/* return 0; */
|
||||
/* } */
|
||||
|
||||
int main(int argc, const char **argvc) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user