Commit Graph

1355 Commits

Author SHA1 Message Date
Sunrim KIM (keen) c8de0ad4ce fix misaligned assertion 2014-05-29 01:10:59 +09:00
Sunrim KIM (keen) fc6a919914 fix errer message of `u8-ready?` 2014-05-29 01:04:37 +09:00
Sunrim KIM (keen) 86a27e95b7 add alias of `modulo`, `remainder`, `quotient` 2014-05-28 22:49:53 +09:00
Sunrim KIM (keen) dcef9579f5 check length before compare contents 2014-05-28 02:55:19 +09:00
Sunrim KIM (keen) 0ebaf98409 resolve confrict 2014-05-28 02:36:23 +09:00
Sunrim KIM (keen) a9ef840df9 vectors, blobs, strings with equal contets are equal 2014-05-27 21:35:19 +09:00
Sunrim KIM (keen) cb3a975ed6 fix analyze errer for (+) and (*) 2014-05-27 18:53:13 +09:00
Yuichi Nishiwaki 2155a0c8f1 declare arena_idx as a size_t 2014-05-26 16:06:41 +09:00
Yuichi Nishiwaki 826eb4415d automatic arena extend 2014-05-26 15:56:51 +09:00
Yuichi Nishiwaki a003b42435 dynamically allocate GC arena 2014-05-26 15:51:18 +09:00
Sunrim KIM (keen) a73a92cfdb make `read-bytevector(!)` efficint, export `u8-ready?`. 2014-05-26 04:08:39 +09:00
Sunrim KIM (keen) cffaccf8ef implement the rest procedures of `input` but `u8-ready?` is incomlete like `char-ready?` 2014-05-26 03:21:26 +09:00
Yuichi Nishiwaki af921a9df8 set rpath properly 2014-05-21 15:38:12 +09:00
Yuichi Nishiwaki 5f84c781c0 cleanup 2014-05-21 01:34:32 +09:00
Yuichi Nishiwaki e78ad9f452 split into piclib/CMakeLists.txt 2014-05-21 00:48:56 +09:00
Yuichi Nishiwaki cefe1d8879 display libray specs in 'library not found' error 2014-05-21 00:37:15 +09:00
Yuichi Nishiwaki 3232f20936 add DEPENDS option 2014-05-21 00:29:33 +09:00
Yuichi Nishiwaki 5ba1d4eb39 add partcont library 2014-05-19 14:38:32 +09:00
Yuichi Nishiwaki 10db8b9a2b let embedding files be configurable 2014-05-19 13:39:28 +09:00
Yuichi Nishiwaki 7431eaf71c mv libemb.pl mkloader.pl 2014-05-19 13:23:10 +09:00
Yuichi Nishiwaki 52c175a4fe port libemb.py to perl 2014-05-19 08:40:22 +09:00
Yuichi Nishiwaki f2d56714b3 [bugfix] close #107. On DLL platforms, cmake treats shared library files as same as
BINARY targets, not as LIBRARY targets. Thanks a lot, @ktakashi!
2014-05-18 16:21:54 +09:00
Yuichi Nishiwaki 085d3e198c check if python is installed before running libemb.py 2014-05-18 16:13:29 +09:00
Yuichi Nishiwaki 1ff408b59b cosmetic changes 2014-04-12 08:25:17 +09:00
Yuichi Nishiwaki 183935a31e [bugfix] fix GC fault. call pic_get_backtrace function *before* you
allocate new area for error object.
2014-04-10 22:31:05 +09:00
Yuichi Nishiwaki f5a4047e28 unwind picrin VM registers when pic_pop_try is called 2014-04-06 14:02:50 +09:00
Yuichi Nishiwaki 5893dd5b5c save stacktrace in error objects 2014-04-06 14:02:21 +09:00
Yuichi Nishiwaki 920524dc40 add pic_print_backtrace function 2014-04-06 14:00:45 +09:00
Yuichi Nishiwaki a8de062bcb rename backtrace.c to debug.c 2014-04-06 13:36:02 +09:00
Yuichi Nishiwaki bc7291a176 add support for `make install` 2014-04-06 12:36:08 +09:00
Yuichi Nishiwaki d143da430a use absolute path to specify libemb.py output path 2014-04-06 12:17:08 +09:00
Yuichi Nishiwaki 2c79e1874c run load_piclib.c generator at every build time 2014-04-06 10:05:15 +09:00
Yuichi Nishiwaki 1d40eb0dea supply substring function 2014-04-06 09:52:13 +09:00
Yuichi Nishiwaki ecd533babd run piclib generator at cmake run 2014-04-06 02:47:40 +09:00
Yuichi Nishiwaki 4f4c3e24c5 embed scheme library files into a c source file 2014-04-06 02:47:14 +09:00
Yuichi Nishiwaki d0e14a4acb s/pic_load_stdlib/pic_load_piclib/g 2014-04-06 02:44:38 +09:00
Yuichi Nishiwaki 74b44f4d84 add pic_load_cstr 2014-04-06 02:43:49 +09:00
Yuichi Nishiwaki 0977c4e325 use unreachable macro 2014-04-06 00:44:05 +09:00
Yuichi Nishiwaki 8750b9b4dd add pic_define_syntactic_keyword 2014-04-05 04:01:42 +09:00
Yuichi Nishiwaki 708f348674 s/pic_null_syntactic_env/pic_null_syntactic_environment/g 2014-04-05 03:50:38 +09:00
Yuichi Nishiwaki b9125caa3d remove pic_(minimal|core)_syntactic_env 2014-04-05 03:49:20 +09:00
Yuichi Nishiwaki b64b2c3074 bugfix 2014-04-05 02:44:30 +09:00
Yuichi Nishiwaki 7386460253 s/pic_symbol_value/pic_sym_value/g 2014-04-05 02:21:07 +09:00
Yuichi Nishiwaki eb990b4399 cleanup 2014-04-05 01:30:51 +09:00
Yuichi Nishiwaki 16ad48aade add sc_ prefix to identifer? and identifier=? functions 2014-04-05 01:28:57 +09:00
Yuichi Nishiwaki 1215202f66 cleanup 2014-04-05 01:23:20 +09:00
Yuichi Nishiwaki 9d2ac6b994 inline senv_new 2014-04-05 01:21:16 +09:00
Yuichi Nishiwaki 0d0d4e6482 s/senv_new_local/push_scope/g 2014-04-05 01:20:19 +09:00
Yuichi Nishiwaki 1e5c6d899e s/pic_sc/pic_sc_ptr/g. s/pic_senv/pic_senv_ptr/g. 2014-04-04 13:07:16 +09:00
Yuichi Nishiwaki 4ec8398118 inline macro_new and add_macro 2014-04-04 12:58:28 +09:00
Yuichi Nishiwaki 845778eefb add define_macro 2014-04-04 12:55:51 +09:00
Yuichi Nishiwaki 0823149e4f cleanup 2014-04-04 12:48:26 +09:00
Yuichi Nishiwaki 880c8c2b03 add macroexpand_quote 2014-04-03 22:27:36 +09:00
Yuichi Nishiwaki aba1f5139b remove senv_add_core 2014-04-03 22:26:30 +09:00
Yuichi Nishiwaki 030c7f9034 refactor macro use expander 2014-04-03 22:16:09 +09:00
Yuichi Nishiwaki 113ae32e47 separate macroexpand processing into functions 2014-04-03 22:01:25 +09:00
Yuichi Nishiwaki ffd962290f s/symbol_rename/macroexpand_symbol/g 2014-04-03 01:15:39 +09:00
Yuichi Nishiwaki c0378cb9ae [refactor] use senv_add_core to register core syntaxes 2014-04-03 00:55:34 +09:00
Yuichi Nishiwaki 28edfb5023 implement numerical I/O 2014-04-02 00:06:38 +09:00
Yuichi Nishiwaki b5a307aa88 error on macroexpanding circular objects 2014-04-01 11:40:36 +09:00
Yuichi Nishiwaki e32e42c5f9 support datum label reader 2014-04-01 11:40:20 +09:00
Yuichi Nishiwaki f66c48cc6f load 26.scm at init. 2014-03-31 22:26:31 +09:00
Yuichi Nishiwaki 43071d2c84 refactoring. use boxes. 2014-03-31 22:03:03 +09:00
Yuichi Nishiwaki 01ed285d40 fix #36 2014-03-31 21:59:36 +09:00
Yuichi Nishiwaki 2151640331 add native box API 2014-03-31 21:50:08 +09:00
Yuichi Nishiwaki 3e8d64fdb7 initial regexp support 2014-03-31 20:43:36 +09:00
Yuichi Nishiwaki 4549625182 cleanup 2014-03-31 08:27:04 +09:00
Yuichi Nishiwaki d91ae885b6 add fixed-arity pic_values function 2014-03-31 08:13:06 +09:00
Yuichi Nishiwaki 812ec3a87b fix #84 2014-03-30 14:45:40 +09:00
Yuichi Nishiwaki c3b737037a refactor native_stack_length 2014-03-30 14:45:24 +09:00
Yuichi Nishiwaki a1101296aa refactor pic_gensym 2014-03-29 20:53:20 +09:00
Yuichi Nishiwaki d8c182bc69 add user-defined data type API 2014-03-29 20:42:06 +09:00
Yuichi Nishiwaki 38c4e7e6de implemented simple backtrace 2014-03-29 20:02:11 +09:00
Yuichi Nishiwaki 7b73b37bec cleanup 2014-03-29 09:04:14 +09:00
Yuichi Nishiwaki 0b58624864 no need to handle set!/if/begin syntaces at macroexpansion stage 2014-03-29 09:00:37 +09:00
Yuichi Nishiwaki c5d9972d2e macro transformer should never return macro objects 2014-03-29 08:57:15 +09:00
Yuichi Nishiwaki 464ecdd452 call symbol_rename as much as possible 2014-03-29 08:53:24 +09:00
Yuichi Nishiwaki cf1e1a8746 add pic_proc_name 2014-03-28 12:34:54 +09:00
Yuichi Nishiwaki a304feaa28 show irep names in debug print 2014-03-28 12:29:00 +09:00
Yuichi Nishiwaki 24d6540d56 record procedure name in irep 2014-03-28 12:26:07 +09:00
Yuichi Nishiwaki aeaf33ff47 print cfunction name in debug print 2014-03-28 12:18:32 +09:00
Yuichi Nishiwaki b7d8a2c724 record cfunc procedure names 2014-03-28 12:18:32 +09:00
Yuichi Nishiwaki fbbbf7b019 cleanup 2014-03-28 12:18:24 +09:00
Yuichi Nishiwaki cea7b73840 add pic_list7 2014-03-28 12:11:59 +09:00
Yuichi Nishiwaki 010ee9ddb6 get rid of redundant symbol to value cast 2014-03-28 12:10:09 +09:00
Yuichi Nishiwaki c86c153e53 when procedual-define is analyzed, don't create a lambda expression
inside, call analyze_procedure directly instead.
2014-03-28 12:10:09 +09:00
Yuichi Nishiwaki 3215ba2677 cleanup. move analyze_lambda 2014-03-28 12:10:09 +09:00
Yuichi Nishiwaki e47bd63762 [refactor] add analyze_declare 2014-03-28 12:10:09 +09:00
Yuichi Nishiwaki e2741f8580 [refactor] analyze_define 2014-03-28 12:10:09 +09:00
Yuichi Nishiwaki 9742689c40 Revert "reserve the 0 symbol for system use"
This reverts commit 816343bd31.

Conflicts:
	include/picrin/value.h
	src/state.c
2014-03-27 16:23:22 +09:00
Yuichi Nishiwaki c10f40acd4 change pic_find_rename API 2014-03-27 16:19:55 +09:00
Yuichi Nishiwaki 4cd217937f if rest argument value is captured, copy it to capture area. close #78. 2014-03-26 21:02:43 +09:00
Yuichi Nishiwaki 6ea78fbf27 delete pic_apply_argv 2014-03-25 21:04:30 +09:00
Yuichi Nishiwaki e51f0d6dc3 add arity-fixed apply functions 2014-03-25 20:54:57 +09:00
Yuichi Nishiwaki 4b13848cbc separate macroexpansion and arena management 2014-03-25 15:42:20 +09:00
Yuichi Nishiwaki ca42b44921 update xhash uses 2014-03-25 15:29:26 +09:00
Yuichi Nishiwaki 594742f845 refine variabe redefinitino error message 2014-03-25 14:31:32 +09:00
Yuichi Nishiwaki c3240b9133 add pic_warnf 2014-03-25 14:31:24 +09:00
Yuichi Nishiwaki 8d63fffe87 don't create duplicate slots 2014-03-25 14:25:48 +09:00
Yuichi Nishiwaki 88a7d1f2b9 s/senv->name/senv->renames/g 2014-03-25 14:21:23 +09:00
Yuichi Nishiwaki b757368748 add renamer APIs 2014-03-25 14:12:53 +09:00
Yuichi Nishiwaki 816343bd31 reserve the 0 symbol for system use 2014-03-25 13:37:20 +09:00
Yuichi Nishiwaki 514937662e renamed symbols must be always greater than or equal to 0 2014-03-25 13:26:42 +09:00
Yuichi Nishiwaki abefda9ee9 avoid lcm overflow 2014-03-25 12:25:08 +09:00
Yuichi Nishiwaki bccfc1f08d throw error when macro definition evaluates to non-procedure object 2014-03-24 15:30:44 +09:00
Yuichi Nishiwaki b61da9bc47 use UNREACHABLE macro 2014-03-24 15:30:32 +09:00
Yuichi Nishiwaki b29832d2c5 refactor macroexpand 2014-03-24 15:27:03 +09:00
Yuichi Nishiwaki 9dcdc45ab6 cleanup 2014-03-24 15:15:08 +09:00
Yuichi Nishiwaki af80ba6b36 pic_gc_protect now returns a value 2014-03-24 15:14:54 +09:00
Yuichi Nishiwaki f2717910d0 remove error handling stuff from the VM 2014-03-24 15:12:01 +09:00
Yuichi Nishiwaki 1821039e78 pic->rescue is no longer used 2014-03-24 15:00:55 +09:00
Yuichi Nishiwaki 8451bd5c19 cleanup 2014-03-24 14:58:09 +09:00
Yuichi Nishiwaki 0fcd1a3e10 inline pic_error definition 2014-03-24 14:57:10 +09:00
Yuichi Nishiwaki bb7e35ca0e pic_raise is equivalent to pic_throw. remove it. 2014-03-24 14:55:41 +09:00
Yuichi Nishiwaki 6448a36db5 don't use pic->rescue stack in with-exception-handler 2014-03-24 14:54:03 +09:00
Yuichi Nishiwaki 4d56ebf634 drop support for raise-continuable for a moment 2014-03-24 14:52:52 +09:00
Yuichi Nishiwaki edb4f61d5e error function is no longer used 2014-03-24 14:24:53 +09:00
Yuichi Nishiwaki daa7513be5 add pic_throw function 2014-03-24 14:09:28 +09:00
Yuichi Nishiwaki 136980ae2e rewrite define-library expander with pic_try/catch 2014-03-24 13:25:37 +09:00
Yuichi Nishiwaki 3d465f21dc now you can 'throw' exceptions from catch clause 2014-03-24 13:24:37 +09:00
Yuichi Nishiwaki 4a2cb90095 move pic_try/pic_catch macros to error.h 2014-03-24 12:30:21 +09:00
Yuichi Nishiwaki 6d0e147f3d Merge branch 'master' of github.com:wasabiz/picrin 2014-03-24 10:38:45 +09:00
koba-e964 30cc6998de [bugfix] macroexpand
macroexpand restores pic->lib in the case of an error
2014-03-23 20:58:28 +09:00
Yuichi Nishiwaki b12be97194 cleanup 2014-03-23 18:47:55 +09:00
Yuichi Nishiwaki 12728df36f perform tear-off operation lazily 2014-03-23 13:09:35 +09:00
Yuichi Nishiwaki 93414fac52 s/env.values/env.regs/g 2014-03-23 12:45:36 +09:00
Yuichi Nishiwaki 4a1809a9c5 get access to captured local variables with OP_LREF/OP_LSET 2014-03-23 12:18:41 +09:00
Yuichi Nishiwaki 1b6f1db1c0 s/create_cv_table/create_activation/g 2014-03-23 12:10:34 +09:00
Yuichi Nishiwaki cac31845d0 cv_tbl is no longer used 2014-03-23 12:10:34 +09:00
Yuichi Nishiwaki c9eb612561 do variable closing operation not in OP_CALL but in OP_RET 2014-03-23 12:10:34 +09:00
Yuichi Nishiwaki 74294c819f remove resolver pass 2014-03-23 11:55:06 +09:00
Yuichi Nishiwaki 312c977c17 distinguish lref and cref at analysis stage 2014-03-23 11:28:11 +09:00
Yuichi Nishiwaki 0bcb970842 handle grefs at analyzing stage 2014-03-23 11:10:27 +09:00
Yuichi Nishiwaki d8ab5cadd1 cleanup. rename local variable. 2014-03-22 19:19:49 +09:00
Yuichi Nishiwaki ac4e46783c remove unused property 2014-03-22 19:13:46 +09:00
Yuichi Nishiwaki 12852b0628 s/cv_num/capturec/g 2014-03-22 19:13:07 +09:00
Yuichi Nishiwaki bdcf8a4bcb change ugly implementation; don't call realloc for each puching! 2014-03-22 19:04:42 +09:00
Yuichi Nishiwaki cb2f9fece3 separate cv table creation 2014-03-22 18:58:25 +09:00
Yuichi Nishiwaki 5a56f57782 hold local variables information in codegen_context 2014-03-22 18:46:57 +09:00
Yuichi Nishiwaki 046fae1adb grammer error fix 2014-03-22 18:41:46 +09:00
Yuichi Nishiwaki 510af57ce5 explict type cast for return valus from pic_*allloc family is not mandatory 2014-03-22 18:29:14 +09:00
Yuichi Nishiwaki a9e98b1c31 small CSE optimize for irep 2014-03-22 18:23:33 +09:00
Yuichi Nishiwaki 189487b026 [bugfix] don't push symbols doubly to captured variable list 2014-03-21 12:51:57 +09:00
Yuichi Nishiwaki 9a3ff987af define pic_push/pic_pop macro in pair.h 2014-03-21 12:36:46 +09:00
Yuichi Nishiwaki a9a530c9bd memorize only list of captured symbols 2014-03-21 12:34:45 +09:00
Yuichi Nishiwaki 91065a7c25 add commentary to lambda analyzer to avoid regression 2014-03-21 08:20:33 +09:00
Yuichi Nishiwaki b6b47943bb use enum value for variable marking 2014-03-21 08:17:52 +09:00
Yuichi Nishiwaki cfde253f26 split xvect module 2014-03-20 23:09:45 +09:00
Yuichi Nishiwaki 53cd2942d1 change xvect API 2014-03-20 22:12:20 +09:00
Yuichi Nishiwaki 0c12784da5 use xvect 2014-03-20 21:56:49 +09:00
Yuichi Nishiwaki 0b4cb76834 add xvect 2014-03-20 21:17:28 +09:00
Yuichi Nishiwaki 1548a17b35 cleanup 2014-03-20 13:48:51 +09:00
Yuichi Nishiwaki 37a87046b7 remove redundant arena management 2014-03-20 13:48:32 +09:00
Yuichi Nishiwaki 3158a41772 refactor analyze_args 2014-03-20 13:41:47 +09:00
Yuichi Nishiwaki 6d6420f2b9 refactor analyze_var 2014-03-20 11:44:12 +09:00
Yuichi Nishiwaki 0cb8920276 refactor analyzer 2014-03-19 21:45:02 +09:00
Yuichi Nishiwaki 5776940420 POPN macro was not used 2014-03-19 19:49:09 +09:00
Yuichi Nishiwaki bc602aa767 pic_state is not used in pic_dump_* 2014-03-19 19:44:45 +09:00
Yuichi Nishiwaki e80c3cc60b move irep dump function definitions to irep.h 2014-03-19 19:41:24 +09:00
Yuichi Nishiwaki fc5ea838ab move global variable accessor/mutator definitions to vm.c 2014-03-19 19:38:40 +09:00
Yuichi Nishiwaki ef7d01971b publish UNREACHABLE macro 2014-03-19 17:40:31 +09:00
Yuichi Nishiwaki acfa79bc62 s/NORETURN/noreturn/g 2014-03-19 17:37:06 +09:00
Yuichi Nishiwaki 41a3e17904 no unistd.h in lex.yy.c 2014-03-19 17:35:54 +09:00
Yuichi Nishiwaki 04375c3056 [bugfix] propagate errors through the VM 2014-03-16 23:32:28 +09:00
Yuichi Nishiwaki 00d92c79bf pic_length is now unsafe to circular list 2014-03-16 23:13:03 +09:00
Yuichi Nishiwaki 8598042deb pic_list_p don't need to take pic_state *. 2014-03-16 23:12:07 +09:00
Yuichi Nishiwaki 27d4853aef refactor pic_list_p 2014-03-16 22:51:33 +09:00
Yuichi Nishiwaki 6cc6046ea3 Merge pull request #69 from koba-e964/master
list? for circular lists (Issue #17)
2014-03-16 22:39:57 +09:00
koba-e964 c23e3254fb cleanup
Re-format the code so that it complies with the C coding rule of picrin.
2014-03-16 21:55:50 +09:00
koba-e964 138ac70130 list? for circular lists
pic_list_p() detects circular lists using Floyd's cycle-finding algorithm.
2014-03-16 01:38:12 +09:00
Yuichi Nishiwaki 0e1b6d93b4 load srfi files at init. close #61 2014-03-15 20:53:07 +09:00
Yuichi Nishiwaki b4609aafb7 refine pic_load error message 2014-03-15 20:52:34 +09:00
Yuichi Nishiwaki a785719ccc [bugfix] pic_close broken 2014-03-10 01:53:09 +09:00
Yuichi Nishiwaki 68ea22f6eb add pic_blk_exit 2014-03-10 01:51:27 +09:00
Yuichi Nishiwaki 851187f7bb use pic_try/catch in stdlib_load 2014-03-10 01:12:19 +09:00
Yuichi Nishiwaki d227c22379 change native_stack marker type to char * 2014-03-10 01:11:01 +09:00
Yuichi Nishiwaki 920674a6ef typedef struct pic_block pic_block 2014-03-07 22:09:12 +09:00
Yuichi Nishiwaki 751d0f87f8 typedef struct pic_code pic_code 2014-03-07 22:06:43 +09:00
Yuichi Nishiwaki 488a2c902c mmm, cmake on travis seems earlier than 2.8.8... 2014-03-05 23:00:24 +09:00
Yuichi Nishiwaki 19371d1d81 some compilers don't support liking a static library into another shared
library. compiling xfile into an object file instead.
2014-03-05 16:06:35 +09:00
Yuichi Nishiwaki f0367d95a0 cleanup 2014-03-04 23:58:07 +09:00
Yuichi Nishiwaki 818fb41f77 fix #63. process escape sequences in string 2014-03-04 23:45:55 +09:00
Yuichi Nishiwaki f8b3f5f1fd don't rename unbound symbols 2014-03-04 00:45:47 +09:00
Yuichi Nishiwaki 6fbfd15011 formatter support display syntax (~a) 2014-03-04 00:32:55 +09:00
Yuichi Nishiwaki 4bf2262605 pic_alloc is the right name, not pic_malloc 2014-03-04 00:30:11 +09:00
Yuichi Nishiwaki 8f5c053bd8 add display function API 2014-03-04 00:28:39 +09:00
Yuichi Nishiwaki 5b2898ae5c rename read functions which return a list of multiple expressions to 'parse' 2014-03-04 00:26:33 +09:00
Yuichi Nishiwaki 8a9bd366a1 define display function in C 2014-03-04 00:12:28 +09:00
Yuichi Nishiwaki 1de4073212 cleanup 2014-03-03 23:13:32 +09:00
Yuichi Nishiwaki 5d4d90228d update read error message 2014-03-03 23:02:52 +09:00
Yuichi Nishiwaki 777f951caf pic_compile now unsafe to compilation error 2014-03-03 22:49:59 +09:00
Yuichi Nishiwaki 306a5f53a5 string formatter follow srfi-28's spec 2014-03-03 22:44:38 +09:00
Yuichi Nishiwaki a9d3d847af add pic_printf 2014-03-03 22:43:59 +09:00
Yuichi Nishiwaki 408255381c add pic_eval 2014-03-03 22:39:38 +09:00
Yuichi Nishiwaki 34bcabf5bc s/pic_trampoline/pic_apply_trampoline/g 2014-03-03 22:19:27 +09:00
Yuichi Nishiwaki 3302721c65 catch up to xrope API change 2014-03-02 19:26:37 +09:00
Yuichi Nishiwaki 0b4f65bf9e auto remove lex.yy.h 2014-03-02 19:03:01 +09:00
Yuichi Nishiwaki d01a29b0e0 use file glob 2014-03-02 18:50:35 +09:00
Yuichi Nishiwaki e4d4c51e78 use absolute path for flex output 2014-03-02 13:24:12 +09:00
Yuichi Nishiwaki d77035a537 fix flex problem 2014-03-02 13:21:26 +09:00
Yuichi Nishiwaki e30529d629 Add experimental cmake support 2014-03-02 01:52:41 +09:00
Yuichi Nishiwaki 3b8868c577 typedef pic_value pic_list 2014-03-01 20:54:02 +09:00
Yuichi Nishiwaki c357a9302d remove pic_list, and add pic_listn 2014-03-01 20:46:08 +09:00
Yuichi Nishiwaki dfb6eeb72d cleanup 2014-03-01 20:25:58 +09:00
Yuichi Nishiwaki 6e7567a598 my own read impl. 2014-03-01 20:21:44 +09:00
Yuichi Nishiwaki 6cf6c72f84 change default library in repl 2014-03-01 19:55:52 +09:00
Yuichi Nishiwaki 6ddaa0eda0 use pic_deflibrary in init.c 2014-03-01 19:54:29 +09:00
Yuichi Nishiwaki 95dc14bac2 use yyfree/yyalloc during bytevector lex 2014-03-01 13:24:43 +09:00
Yuichi Nishiwaki 491fd81c97 add an alias 'yylval' linked to '*yylvalp' 2014-03-01 00:35:16 +09:00
Yuichi Nishiwaki cbad58f560 remove useless includes 2014-03-01 00:24:23 +09:00
Yuichi Nishiwaki 3bedc65d2b use yyrealloc 2014-03-01 00:20:19 +09:00
Yuichi Nishiwaki a51dc51a09 use volatile string 2014-03-01 00:19:57 +09:00
Yuichi Nishiwaki 0b8c7a8ccb add pic_intern 2014-03-01 00:13:11 +09:00
Yuichi Nishiwaki 81f839ea04 use yyget_extra function 2014-03-01 00:02:46 +09:00
Yuichi Nishiwaki 222c3bdcaa use noyywrap option 2014-02-28 23:59:50 +09:00
Yuichi Nishiwaki 513727f94c emit additional scanner header file 2014-02-28 22:38:12 +09:00
Yuichi Nishiwaki e781a063f8 scan.l cleanup 2014-02-28 22:35:38 +09:00
Yuichi Nishiwaki 1f858f05e3 avoid implicit int -> size_t cast 2014-02-27 22:14:21 +09:00
Yuichi Nishiwaki 7a1c04f1fa [bugfix] old proc#cfunc_p property remained in debug block 2014-02-27 22:00:48 +09:00
Yuichi Nishiwaki 8586dc9057 xrope is now the internal representation of pic_str 2014-02-27 21:54:37 +09:00
Yuichi Nishiwaki 8e511bc410 remove dependencies on pic_state from pic_strlen and pic_strcmp 2014-02-27 19:42:59 +09:00
Yuichi Nishiwaki 878370c29a gurantee allocators return NULL given size is zero 2014-02-27 13:55:19 +09:00
Yuichi Nishiwaki 06a7b0f5f6 add pic_func struct to hold native function name 2014-02-26 00:39:16 +09:00
Yuichi Nishiwaki bb93a8be14 catch up to XFILE changes 2014-02-25 21:07:32 +09:00
Yuichi Nishiwaki 9a73ba707c add pic_strcmp 2014-02-23 17:45:34 +09:00
Yuichi Nishiwaki 0fa61b6a4a change pic_get_args API. 'z' now returns a pointer to null terminated
cstr, 's' a pointer to pic_str
2014-02-23 11:52:15 +09:00
Yuichi Nishiwaki 9f240c191c add pic_str_new_fill 2014-02-23 11:25:39 +09:00
Yuichi Nishiwaki 349d7f1799 don't take int arguments with size_t 2014-02-23 10:51:21 +09:00
Yuichi Nishiwaki 067a4756ff fix #58 2014-02-23 09:16:29 +09:00
Yuichi Nishiwaki 7ac4cd9ded add 'pic_' prefix to heap manipulte functions 2014-02-22 16:54:12 +09:00
Yuichi Nishiwaki 5175f0bb8d change gc heap API and hide sturctures. 2014-02-22 15:53:59 +09:00
Yuichi Nishiwaki 56f5f4a1f5 move sturct definitions for basic types to type-specific headers respectively 2014-02-22 15:21:55 +09:00
Yuichi Nishiwaki a8aa6b2c5e add some string utility functions 2014-02-21 18:24:20 +09:00
Yuichi Nishiwaki 131440b1d0 s/struct pic_string/pic_str/g 2014-02-21 18:05:59 +09:00
Yuichi Nishiwaki 80a794310d call/cc must save pic->ip 2014-02-20 20:59:35 +09:00
Yuichi Nishiwaki 078b72ff17 cleanup 2014-02-20 20:44:30 +09:00
Yuichi Nishiwaki 19f426a4f4 [bugfix] segv on pic_receive 2014-02-20 18:57:01 +09:00
Yuichi Nishiwaki 7c5d337119 support call-with-values in VM level 2014-02-20 18:38:09 +09:00
Yuichi Nishiwaki 942e053cde compile values in tail position 2014-02-20 18:00:30 +09:00
Yuichi Nishiwaki 742be0b2c0 don't reset retc in pic_receive 2014-02-20 18:00:16 +09:00
Yuichi Nishiwaki acc3afc120 don't emit debug message into stderr 2014-02-20 17:58:00 +09:00
Yuichi Nishiwaki 85a766a242 adjust stack pointer to the next to the initial position after calling function 2014-02-20 17:41:59 +09:00
Yuichi Nishiwaki 213177eb10 reset ci->retc when pic_receive is called 2014-02-20 17:19:40 +09:00
Yuichi Nishiwaki bad8daa813 ci->retc is set to 1 by default 2014-02-20 17:19:28 +09:00
Yuichi Nishiwaki c9331fb59e [refactor] proceed return values from C functions in OP_RET block 2014-02-20 17:14:58 +09:00
Yuichi Nishiwaki 29b2d84268 show invalid application callee 2014-02-20 17:10:55 +09:00
Yuichi Nishiwaki 2d0faff732 VM end state shows info based on the position the VM entered 2014-02-20 17:09:55 +09:00
Yuichi Nishiwaki 82647584e8 [bugfix] handle 1-coarity native function 2014-02-20 16:50:14 +09:00
Yuichi Nishiwaki 7217baee0a add coarity register to the VM 2014-02-20 16:33:18 +09:00
Yuichi Nishiwaki 0f75a1b7cb let OP_RET take an argument 2014-02-20 16:01:29 +09:00
Yuichi Nishiwaki 16639a1764 fix #56. thank you @justinethier 2014-02-20 11:58:27 +09:00
Yuichi Nishiwaki d718490a03 (finally!) hunt the bug. no more segv on error in repl 2014-02-19 02:24:30 +09:00
Yuichi Nishiwaki b69b549fca delegate error handling to REPL when no exception handlers remain 2014-02-19 02:22:34 +09:00
Yuichi Nishiwaki 6e3a2b176a split error and raise 2014-02-19 02:11:29 +09:00
Yuichi Nishiwaki a1a0aff657 newlines are included in block comments 2014-02-19 01:58:40 +09:00
Yuichi Nishiwaki a5f5eb3b06 skip block comments 2014-02-19 01:53:47 +09:00
Yuichi Nishiwaki 844f25b5c1 [workaround] traverse_seq is broken, use traverse_shared instead 2014-02-19 01:15:30 +09:00
Yuichi Nishiwaki d5e27e0949 add char-ready? 2014-02-18 19:20:29 +09:00
Yuichi Nishiwaki cc97f857e1 add read-line 2014-02-18 18:56:14 +09:00
Yuichi Nishiwaki 17ae669b30 support nested comments 2014-02-18 17:24:08 +09:00
Yuichi Nishiwaki a078266c2d add pic_raise_continuable 2014-02-18 16:58:51 +09:00
Yuichi Nishiwaki c42090f0b7 cleanup 2014-02-18 04:40:19 +09:00
Yuichi Nishiwaki 80a7e31901 s/port_/write_/g 2014-02-18 04:24:41 +09:00
Yuichi Nishiwaki 26808c1f51 add write function in C level (must not enter into a infinite loop) 2014-02-18 04:22:58 +09:00
Yuichi Nishiwaki 52a89ef5c9 fix memory leak 2014-02-18 03:45:00 +09:00
Yuichi Nishiwaki b4166dde71 refactor tagged expression checker 2014-02-18 03:42:33 +09:00
Yuichi Nishiwaki cd34417c42 add write-shared 2014-02-18 03:40:03 +09:00
Yuichi Nishiwaki c6c88e976f add support for circular objects to write 2014-02-18 03:39:32 +09:00
Yuichi Nishiwaki 7358e0933c fix segv in is_quote etc 2014-02-18 03:38:12 +09:00
Yuichi Nishiwaki c3d221f2da revert prev commit 2014-02-17 23:31:12 +09:00
Yuichi Nishiwaki ad3aca95a3 [workaround] write function now stops in a certain recursion depth 2014-02-17 23:08:17 +09:00
Yuichi Nishiwaki ceef33af8a [bugfix] is_quote family don't stop when circular object is given 2014-02-17 23:07:46 +09:00
Yuichi Nishiwaki 3a8aa3e728 publish format function family 2014-02-15 19:53:16 +09:00
Yuichi Nishiwaki c4473335b4 add macroexpand function. close #46. 2014-02-15 13:02:06 +09:00
Yuichi Nishiwaki da7ec5b64f place `load` function under (scheme load) library 2014-02-15 12:53:07 +09:00
Yuichi Nishiwaki 95fae80658 pic->envp is nullable 2014-02-13 15:37:15 +09:00
Yuichi Nishiwaki 64cdd5f152 cleanup 2014-02-13 15:01:01 +09:00
Yuichi Nishiwaki f9046cc614 improve export error message 2014-02-13 15:00:48 +09:00
Yuichi Nishiwaki ac136bbc2e add gensym function 2014-02-13 14:59:51 +09:00
Yuichi Nishiwaki f32754c0f9 place define-macro syntax in (picrin macro) library 2014-02-13 14:59:17 +09:00
Yuichi Nishiwaki e5a84e3f4c refactor pic_gensym 2014-02-13 13:53:56 +09:00
Yuichi Nishiwaki 38bb76808b small comment fix 2014-02-13 13:52:11 +09:00
Yuichi Nishiwaki a5f93fbd30 Merge remote-tracking branch 'refs/remotes/origin/master' 2014-02-13 13:49:46 +09:00
Yuichi Nishiwaki aa48198270 cosmetic changes 2014-02-13 13:44:30 +09:00
Yuichi Nishiwaki 6c849bbac9 defsyntax functon no longer used 2014-02-13 13:42:17 +09:00
Yuichi Nishiwaki a16eee7e1e improve hygiene on define-macro 2014-02-13 13:26:32 +09:00
Yuichi Nishiwaki 923a762411 save symbol names in xhash 2014-02-13 00:14:03 +09:00
Yuichi Nishiwaki 907a6a1207 save memory consumption in macroexpand_list 2014-02-12 23:25:37 +09:00
Yuichi Nishiwaki 170a20ef1d write supports quote/quasiquote/unquote/unquote-splicing notations 2014-02-12 23:07:12 +09:00
Yuichi Nishiwaki 234c573bb6 add another debug print 2014-02-12 22:30:46 +09:00
Yuichi Nishiwaki edc91bd588 remove unneeded include 2014-02-12 21:50:28 +09:00
Yuichi Nishiwaki 910e006dc3 resolve symbols bound by define-syntax 2014-02-12 21:49:28 +09:00
Yuichi Nishiwaki 03ef82fd16 defmacro takes a symbol for the name 2014-02-12 11:32:17 +09:00
Yuichi Nishiwaki b24e1b05c4 cleanup 2014-02-12 11:30:32 +09:00
Yuichi Nishiwaki a40c79116f use symbol_rename function in macro transformers 2014-02-12 11:20:38 +09:00
Yuichi Nishiwaki 098d5dc022 s/syntax/macro/g 2014-02-12 11:13:29 +09:00
Yuichi Nishiwaki 8ea3a7b544 rename a property of pic_syntax s/macro/proc/g 2014-02-12 11:05:32 +09:00
Yuichi Nishiwaki 6b69e8e74b stx->sym property is no longer used 2014-02-12 11:02:59 +09:00
Yuichi Nishiwaki 3d97e7f749 syntax_new is a private API 2014-02-12 10:59:10 +09:00
Yuichi Nishiwaki 25ae2ef6b0 add identifier_eq_p 2014-02-12 10:57:58 +09:00
Yuichi Nishiwaki 93a259870c replace pic_syntax_new with pic_syntax_new_macro 2014-02-12 10:52:33 +09:00
Yuichi Nishiwaki a18fe136e1 cosmetic fixes 2014-02-12 10:50:26 +09:00
Yuichi Nishiwaki c759fee566 add new_senv 2014-02-12 10:48:44 +09:00
Yuichi Nishiwaki 9cf7d72e82 inline-expand a small function 2014-02-12 10:42:17 +09:00
Yuichi Nishiwaki 527f46480a rename symbols before macro lookup 2014-02-12 10:39:20 +09:00
Yuichi Nishiwaki 9c278889fc add partial apply funciton 2014-02-12 01:17:05 +09:00
Yuichi Nishiwaki 34c10b0054 unify includes of stdio and assert 2014-02-11 23:25:25 +09:00
Yuichi Nishiwaki 5be10aefc9 [bugfix] compiling big library faults with arena overflow 2014-02-11 22:44:04 +09:00
Yuichi Nishiwaki 855702716c clarify some error messages 2014-02-11 21:36:11 +09:00
Yuichi Nishiwaki c2a1ea6748 dont consume arena in pic_append 2014-02-11 16:22:17 +09:00
Yuichi Nishiwaki 93e7a1cf32 clarify wrong number of arguments error message 2014-02-11 13:52:03 +09:00
Yuichi Nishiwaki 7843dc1023 add pic_errorf 2014-02-11 13:47:11 +09:00
Yuichi Nishiwaki fc7b59100d add some user functions to manipulate ports 2014-02-11 13:45:41 +09:00
Yuichi Nishiwaki b404f30a50 pic_debug family return obj 2014-02-11 13:38:42 +09:00
Yuichi Nishiwaki 372fd3157b error report is propagated through pic->err 2014-02-11 13:21:00 +09:00
Yuichi Nishiwaki 468e1b4d1f add pic_fdebug 2014-02-11 00:47:57 +09:00
Yuichi Nishiwaki 7fe109a998 include xfile in picirn.h 2014-02-09 14:52:53 +09:00
Yuichi Nishiwaki 687706eaee fix error message 2014-02-09 14:29:51 +09:00
Yuichi Nishiwaki 241012d2f9 add output-bytevector 2014-02-09 14:29:28 +09:00
Yuichi Nishiwaki 49e5e3085b pic_str_new may take a NULL ptr 2014-02-09 03:11:08 +09:00
Yuichi Nishiwaki 668ace7901 implement some string functions in c 2014-02-09 03:10:58 +09:00
Yuichi Nishiwaki 39af5ca254 implement string-append in C 2014-02-09 02:42:50 +09:00
Yuichi Nishiwaki 7187e4e982 add open-input-bytevector 2014-02-09 02:41:52 +09:00
Yuichi Nishiwaki 3d0657074f first argument of get-output-string is optinoal 2014-02-09 02:41:20 +09:00
Yuichi Nishiwaki a666951f21 add open-output-string and get-output-string 2014-02-09 01:49:55 +09:00
Yuichi Nishiwaki 0e464b2f75 [bugfix] write-string doesn't detect given port 2014-02-09 01:21:44 +09:00
Yuichi Nishiwaki 8d067f66ed add open-input-string 2014-02-08 23:23:53 +09:00
Yuichi Nishiwaki dd0ed6bfea add write-string/write-u8/write-bytevector 2014-02-08 17:31:54 +09:00
Yuichi Nishiwaki 5efdf3cfcc write-simple support optional output port 2014-02-08 17:15:34 +09:00
Yuichi Nishiwaki 93f7270ea3 auto export symbols defined by pic_defmacro 2014-02-08 15:24:27 +09:00
Yuichi Nishiwaki 4cb661c252 add 'include' macro 2014-02-08 15:05:28 +09:00
Yuichi Nishiwaki b0d955c771 analyze in order 2014-02-08 03:17:49 +09:00
Yuichi Nishiwaki d100dde6b1 Merge branch 'master' into trampoline 2014-02-07 10:05:31 +09:00
Yuichi Nishiwaki 1afbfcda23 add 'static' 2014-02-07 10:02:09 +09:00
Yuichi Nishiwaki cd12977cfe receive values by trampoline 2014-02-07 09:59:02 +09:00
Yuichi Nishiwaki 1208fc9f0e execute procedure by trampoline in call/cc 2014-02-07 09:56:57 +09:00
Yuichi Nishiwaki 67a856b1db [bugfix] pic_trampoline was broken 2014-02-07 09:49:49 +09:00
Yuichi Nishiwaki 1c633b3cda cleanup 2014-02-07 02:23:55 +09:00
Yuichi Nishiwaki 7288cd0614 redefinition might be against a local variable 2014-02-07 02:15:08 +09:00
Yuichi Nishiwaki c4040949ff stop warning in macroexpand, and creating a duplicate slot 2014-02-07 02:14:39 +09:00
Yuichi Nishiwaki fd0553ac25 warn variable redefinition in macroexpansion level 2014-02-07 02:13:16 +09:00
Yuichi Nishiwaki d74b82b1a5 warn global variable redefinition 2014-02-07 02:12:43 +09:00
Yuichi Nishiwaki 620fee4236 refactor global_ref and global_def 2014-02-07 01:48:56 +09:00
Yuichi Nishiwaki c75d6e5789 refactor global_def 2014-02-07 01:42:28 +09:00
Yuichi Nishiwaki ae5acd005c refactor global_ref 2014-02-07 01:42:15 +09:00
Yuichi Nishiwaki e7d38ea165 rename scope_global_define -> global_def 2014-02-07 01:31:45 +09:00
Yuichi Nishiwaki faac3f7e9d include xhash in picrin.h 2014-02-07 01:24:51 +09:00
Yuichi Nishiwaki 53979bf848 prefer type alias to types with 'struct' 2014-02-07 01:15:17 +09:00
Yuichi Nishiwaki 1901a7ab30 e->key is no longer of const char * type 2014-02-07 01:09:05 +09:00
Yuichi Nishiwaki a4062b5b76 use xh_new_int 2014-02-07 01:08:57 +09:00