Commit Graph

175 Commits

Author SHA1 Message Date
Yuichi Nishiwaki 53979bf848 prefer type alias to types with 'struct' 2014-02-07 01:15:17 +09:00
Yuichi Nishiwaki b50006381b remove unnecessary argument names in prototype 2014-02-06 14:23:29 +09:00
Yuichi Nishiwaki 2ef426d90b add trampoline helper 2014-02-06 14:22:29 +09:00
Yuichi Nishiwaki a3b0fa701b rename pic_callinfo.pc -> ip 2014-02-04 10:46:36 +09:00
Yuichi Nishiwaki 018db310d3 save instruction pointer to pic_state 2014-02-04 10:40:03 +09:00
Yuichi Nishiwaki 4a01b8296f emit OP_NOT 2014-02-02 14:55:46 +09:00
Yuichi Nishiwaki d48ae9227a impl strdup and strndup by myself 2014-02-01 19:31:59 +09:00
Yuichi Nishiwaki 47f4060086 rewrite deflibrary using gensym 2014-02-01 15:41:30 +09:00
Yuichi Nishiwaki c789200f5b add gensym macro 2014-02-01 15:40:43 +09:00
Yuichi Nishiwaki 8ae55bd9b6 unification uses of int and size_t. use size_t for every variable that
can possibly be used as an array index.
2014-01-30 18:14:33 +09:00
Yuichi Nishiwaki 223c531a3c add UNUSED macro 2014-01-30 18:11:41 +09:00
Yuichi Nishiwaki 4d95707db5 add FALLTHROUGH macro 2014-01-30 14:13:01 +09:00
Yuichi Nishiwaki 7c35e50260 add NORETURN macro 2014-01-30 14:08:36 +09:00
Yuichi Nishiwaki 655eb7a3bd add pic_compile 2014-01-20 16:57:39 +09:00
Yuichi Nishiwaki ae933252c9 add analyzer prototype 2014-01-18 20:20:28 -08:00
Yuichi Nishiwaki 0ceb9c9953 add sSYMBOLs to pic_state 2014-01-18 11:47:32 -08:00
Yuichi Nishiwaki 395f48bc81 move rSYMBOLs from pic_state to codegen_state 2014-01-18 11:47:18 -08:00
Yuichi Nishiwaki 494989ff3e embed constant pool into irep object 2014-01-18 22:32:41 +09:00
Yuichi Nishiwaki 5e616e7774 store irep objects inside parent irep object 2014-01-18 21:48:50 +09:00
Yuichi Nishiwaki 1aa47ad45a add 'extern "C"' to all header files 2014-01-18 12:41:39 +09:00
Yuichi Nishiwaki ca068f560b clarify license information 2014-01-17 20:58:31 +09:00
Yuichi Nishiwaki 1433698fe5 publish pic_gc_run 2014-01-16 22:02:09 +09:00
Yuichi Nishiwaki 9ecbd9e7bb publish pic_load 2014-01-13 14:51:52 +09:00
Yuichi Nishiwaki 0753b12f60 [bugfix] native operators such as = or + are not inline-expanded 2014-01-13 14:39:21 +09:00
Yuichi Nishiwaki 6b808354c0 global variable accessors don't require library object 2014-01-13 00:45:49 +09:00
Yuichi Nishiwaki fadcad2d7f C APIs to modify global varaibles 2014-01-12 16:06:57 +09:00
Yuichi Nishiwaki 944111ba09 make gensym API public 2014-01-12 16:03:36 +09:00
Yuichi Nishiwaki 88ce10e9fe add defvar declaration (just a prototype. no definition) 2014-01-09 00:36:44 +09:00
Yuichi Nishiwaki dccc234fd9 add pic_import 2014-01-08 15:38:31 +09:00
Yuichi Nishiwaki 76f5cbf0b3 ENDLIBRARY requires a trailing semicolon 2013-12-10 07:26:43 -08:00
Yuichi Nishiwaki 5035831d84 [bugfix] syntax objects should be brought to imported library's
senv->stx holder
2013-12-08 00:52:34 -08:00
Yuichi Nishiwaki dda8ad367c split built-in functins into libraries 2013-12-07 23:17:28 -08:00
Yuichi Nishiwaki 01e60b5d8e add pic_export and pic_export_as 2013-12-07 20:44:39 -08:00
Yuichi Nishiwaki 35b99d11a8 let make_library return a library 2013-12-07 18:44:14 -08:00
Yuichi Nishiwaki c764d28878 add pic_parse 2013-12-07 18:38:47 -08:00
Yuichi Nishiwaki 6b2d6a98eb Revert "change APIs of library functions"
This reverts commit 0115ede4de.

Conflicts:
	include/picrin.h
2013-12-07 18:27:08 -08:00
Yuichi Nishiwaki 818430bb81 implement import/export syntax 2013-12-07 09:42:34 -08:00
Yuichi Nishiwaki 0115ede4de change APIs of library functions 2013-12-07 07:11:22 -08:00
Yuichi Nishiwaki 7c6ba80581 add library operation methods 2013-12-07 07:05:06 -08:00
Yuichi Nishiwaki dcb5b448cd add pic_equal_p 2013-12-07 06:29:29 -08:00
Yuichi Nishiwaki 381ed58bff add global library table 2013-12-07 05:36:14 -08:00
Yuichi Nishiwaki a1e2e41840 add some symbols about library 2013-12-07 02:31:04 -08:00
Yuichi Nishiwaki ef04e3f02c add pic_core_syntactic_env 2013-12-06 18:04:36 +09:00
Yuichi Nishiwaki a43e3248e8 calloc should take size_t 2013-12-01 12:44:43 +09:00
Yuichi Nishiwaki c336a354e4 publish pic_defmacro as a public API 2013-11-26 09:09:15 -08:00
Yuichi Nishiwaki be311cb96f replace old macroexpand facility with new renamer implementation 2013-11-26 08:43:58 -08:00
Yuichi Nishiwaki a2e1f21b29 add global identifier table 2013-11-26 08:30:30 -08:00
Yuichi Nishiwaki 72cf45d4ea add `new_uniq_sym` function 2013-11-25 23:38:39 -08:00
Yuichi Nishiwaki 579735d16e s/heap_page/pic_heap/g 2013-11-22 07:19:31 -08:00
Yuichi Nishiwaki 6f94202e13 s/pic_expand/pic_macroexpand/g 2013-11-18 16:36:44 +09:00
Yuichi Nishiwaki 6ac3055816 change return type of pic_str_new to struct pic_string * 2013-11-18 00:28:42 +09:00
Yuichi Nishiwaki 737f916a8c add pic_errorf 2013-11-17 17:23:13 +09:00
Yuichi Nishiwaki 38988b7770 add global exception handler stack 2013-11-17 16:02:58 +09:00
Yuichi Nishiwaki f506eac3dd add pic_obj_alloc_unsafe; preparation for yy_arena 2013-11-15 19:31:17 +09:00
Yuichi Nishiwaki 9662ab30ec add pic_vec_extend_ip (for internal API) 2013-11-15 19:30:25 +09:00
Yuichi Nishiwaki ae9d1621d3 rename picconf.h to config.h 2013-11-15 16:52:08 +09:00
Yuichi Nishiwaki 984588b1b6 add reference count GC for pic_block objects 2013-11-15 11:51:58 +09:00
Yuichi Nishiwaki 223e873ff0 accept empty lines in repl 2013-11-13 17:37:05 +09:00
Yuichi Nishiwaki d6c377a33b native support for dynamic-wind 2013-11-11 18:04:21 +09:00
Yuichi Nishiwaki 64ae8bd7b0 initial call/cc support 2013-11-09 14:14:25 +09:00
Yuichi Nishiwaki 0d28f246de add pic_get_proc 2013-11-09 14:12:59 +09:00
Yuichi Nishiwaki 27dc840118 eq? predicate supports nan-boxing 2013-11-06 16:06:31 +09:00
Yuichi Nishiwaki d0602303e3 s/num_val/valuec/g 2013-11-04 16:07:36 -05:00
Yuichi Nishiwaki ee92e523b4 fix grammatical error 2013-11-04 15:49:54 -05:00
Yuichi Nishiwaki 98a41314fe parser returns multiple expressions in a call 2013-10-30 17:06:01 +09:00
Yuichi Nishiwaki b7e55b043f introduce legacy macros 2013-10-30 16:42:44 +09:00
Yuichi Nishiwaki edcd060a8a initial vector support 2013-10-29 15:51:37 +09:00
Yuichi Nishiwaki 49072bf5e4 [bugfix] fix closure issue 2013-10-29 10:16:56 +09:00
Yuichi Nishiwaki 0bf0c29af2 fix a typo 2013-10-29 02:12:37 +09:00
Yuichi Nishiwaki 63b52991da introduce immediate symbol value 2013-10-29 02:11:31 +09:00
Yuichi Nishiwaki 4fa2bad5fa add pic_apply function (and remove pic_run) 2013-10-28 17:45:13 +09:00
Yuichi Nishiwaki f192c96650 parse-from-file facility 2013-10-27 18:38:41 +09:00
Yuichi Nishiwaki 7bb27295c0 warn global redefinition 2013-10-24 22:29:40 +09:00
Yuichi Nishiwaki 9cb28f3156 add OP_EQ/OP_LT/OP_LE 2013-10-24 21:10:13 +09:00
Yuichi Nishiwaki d75b624b4a add OP_LSET and OP_CSET 2013-10-24 03:14:32 +09:00
Yuichi Nishiwaki ec0f0d3572 add pic_calloc 2013-10-24 00:32:03 +09:00
Yuichi Nishiwaki 035de0016b evaluate arguments in normal (lexical) order 2013-10-23 15:55:42 +09:00
Yuichi Nishiwaki dd7958c3d6 reader supports quasiquote abbrev 2013-10-23 12:39:48 +09:00
Yuichi Nishiwaki dd3adf30e6 use xhash to manage scopes during codegin 2013-10-22 22:22:35 +09:00
Yuichi Nishiwaki 86177b7c4e pic_get_args supports optional argument 2013-10-21 13:57:02 +09:00
Yuichi Nishiwaki adab797391 add system.c 2013-10-21 11:51:02 +09:00
Yuichi Nishiwaki ba78a00d5c take care of escaped characters in string 2013-10-21 11:12:34 +09:00
Yuichi Nishiwaki 8f4788ca27 read strings 2013-10-21 10:48:03 +09:00
Yuichi Nishiwaki a49675c322 add OP_PUSHCONST 2013-10-21 09:29:56 +09:00
Yuichi Nishiwaki 05eb62cc4d do not abort when meet a compilation error 2013-10-20 18:17:12 +09:00
Yuichi Nishiwaki 4f8aa03b24 clarify the meanings of error functions 2013-10-20 17:41:48 +09:00
Yuichi Nishiwaki 7322271d65 intern symbols using hash table 2013-10-20 14:05:48 +09:00
Yuichi Nishiwaki 50b9c2bd97 add pair.h 2013-10-20 12:34:57 +09:00
Yuichi Nishiwaki cfae6f3c59 add OP_NILP 2013-10-20 03:53:02 +09:00
Yuichi Nishiwaki 78f301794a add OP_CAR/OP_CDR 2013-10-20 03:48:06 +09:00
Yuichi Nishiwaki e7a5784fd7 allocate global variable entry area by malloc and save it into pic_state 2013-10-18 00:15:15 +09:00
Yuichi Nishiwaki c92a672e01 change the stack layout: to hold proc object on the stack when procedure
call is invoked
2013-10-17 23:29:18 +09:00
Yuichi Nishiwaki 1a6c8a3cca support multi-line input in REPL 2013-10-17 20:48:50 +09:00
Yuichi Nishiwaki d9e47bdd05 add begin syntax 2013-10-17 17:54:28 +09:00
Yuichi Nishiwaki 6c903db758 if syntax 2013-10-16 17:42:47 +09:00
Yuichi Nishiwaki 5c8d81e8b5 support closure call 2013-10-16 15:30:52 +09:00
Yuichi Nishiwaki f6eddbc6d3 save all ireps into pic_state
in order to decrease the stress GC will get, restore irep structures
under pic_state instead of under each procs and making it collectable object
2013-10-16 11:53:25 +09:00
Yuichi Nishiwaki c593a46a62 add OP_LAMBDA (lambda object creation) 2013-10-16 11:32:30 +09:00
Yuichi Nishiwaki b60e4df3d9 add pic_realloc 2013-10-16 11:21:41 +09:00
Yuichi Nishiwaki 22abdae12a add callinfo 2013-10-15 23:29:34 +09:00