Commit Graph

433 Commits

Author SHA1 Message Date
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 93a259870c replace pic_syntax_new with pic_syntax_new_macro 2014-02-12 10:52:33 +09:00
Yuichi Nishiwaki 013d734033 remove unused constant 2014-02-12 10:39:35 +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 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 b8d4461401 add a comment 2014-02-09 13:35:55 +09:00
Yuichi Nishiwaki e52614a51e dont write argument name on prototype 2014-02-08 02:48:38 +09:00
Yuichi Nishiwaki d100dde6b1 Merge branch 'master' into trampoline 2014-02-07 10:05:31 +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 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 dd547ac093 add OP_NOP 2014-02-04 16:58:50 +09:00
Yuichi Nishiwaki 7837a30d53 add OP_NOP 2014-02-04 16:20:17 +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 0592c977da GC_DEBUG off by default 2014-01-19 01:14:45 -08:00
Yuichi Nishiwaki 122c09d91e add logic flaw gate in pic_type_repr 2014-01-19 00:55:19 -08:00
Yuichi Nishiwaki ec00ec0257 add pic_test macro 2014-01-19 00:33:33 -08:00
Yuichi Nishiwaki ab411cc298 gcc complains that he can't assure if switch-enum is complete 2014-01-19 00:32:43 -08:00
Yuichi Nishiwaki 4a01b8296f emit OP_NOT 2014-02-02 14:55:46 +09:00
Yuichi Nishiwaki 0fec56362d add OP_NOT instruction 2014-02-02 14:54:47 +09:00
Yuichi Nishiwaki 116a65cdee add pic_receive 2014-02-02 12:38:46 +09:00
Yuichi Nishiwaki 19db4bb6b2 rest array got by pic_get_args has a dynamic extent; that is, we cannot
store it to a heap object when we are going to rewind that stack and
restore an old continuation.
2014-02-02 12:27:48 +09:00
Yuichi Nishiwaki f2507b5cbf rename ..._from_... to ..._by_... 2014-02-02 12:26:43 +09:00
Yuichi Nishiwaki 2373e7a067 continuation now can take more than 1 arguments 2014-02-02 12:11:15 +09:00
Yuichi Nishiwaki 7547b83515 add pic_values functions 2014-02-02 12:10:31 +09:00
Yuichi Nishiwaki b19631f18f use submodule 2014-02-01 22:16:09 +09:00
Yuichi Nishiwaki d48ae9227a impl strdup and strndup by myself 2014-02-01 19:31:59 +09:00
Yuichi Nishiwaki a4a63314a9 add pic_for_each macro 2014-02-01 16:04:57 +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 3b53cc8a6b get struct pic_code diet 2014-01-31 03:14:02 +09:00
Yuichi Nishiwaki 53fe18a94e delete OP_PUSHFLOAT 2014-01-31 03:11:28 +09:00
Yuichi Nishiwaki d70d96cb34 cosmetic changes 2014-01-31 03:04:00 +09:00
Yuichi Nishiwaki 9172dc9f31 remove old pic_symbol_p macro 2014-01-31 03:03:36 +09:00
Yuichi Nishiwaki 52fc58b55e use a portable way: append 'static' designator everywhere 'inline' is added 2014-01-31 02:58:53 +09:00
Yuichi Nishiwaki beca90cdf0 remove forward declarations of inline functions. gcc provide inline keyword by
their own way with major differences from C99.
2014-01-31 02:53:09 +09:00
Yuichi Nishiwaki 2dd8d2746d move all contents in value.c to value.h 2014-01-30 21:51:26 +09:00
Yuichi Nishiwaki f29e7b9cf1 inline definitions for pic_*_value()s 2014-01-30 20:58:27 +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 6de7d610ee Merge branch 'analyzer' 2014-01-30 13:28:44 +09:00
Yuichi Nishiwaki b1ccc54151 rename include guards 2014-01-23 16:47:13 +09:00
Yuichi Nishiwaki 2e28f604a6 Merge branch 'master' into analyzer
Conflicts:
	include/picrin/pair.h
	src/pair.c
2014-01-23 16:21:10 +09:00
Yuichi Nishiwaki 5dd66cbcd1 replace list-copy and make-list impls by scheme with ones by C 2014-01-22 22:37:27 +09:00
Yuichi Nishiwaki 74088d0130 replace list-set! impl with C impl 2014-01-22 21:35:13 +09:00
Yuichi Nishiwaki 7865cfe9b3 add pic_append 2014-01-22 20:57:14 +09:00
Yuichi Nishiwaki a443d9e3f6 add pic_list_ref and pic_list_tail 2014-01-22 20:57:05 +09:00
Yuichi Nishiwaki 799e26cff0 increate gc header alignment size 2014-01-22 20:44:55 +09:00
Yuichi Nishiwaki 655eb7a3bd add pic_compile 2014-01-20 16:57:39 +09:00
Yuichi Nishiwaki 293fef5235 add pic_list_ref 2014-01-20 16:43:54 +09:00
OGINO Masanori 9be7ffc5fc Define the type of marking flags as unsigned int.
We could define it as _Bool since we are going to use C99, but unsigned
int is more portable (even in C89!) and extensible (when we decide to
use tri-color marking GC.)

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-01-20 14:31:01 +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 c85e07b7ee shrink default pool/irep size 2014-01-18 23:02:08 +09:00
Yuichi Nishiwaki a315f518d2 auto-extend constant pool array 2014-01-18 22:56:43 +09:00
Yuichi Nishiwaki 9fadf16fdb make iseq length configurable 2014-01-18 22:54:28 +09: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 53e3e019de ccapa property no longer used 2014-01-18 21:03:12 +09:00
Yuichi Nishiwaki 11e4f1644b irep object is now controlled under GC 2014-01-18 16:53:39 +09:00
Yuichi Nishiwaki 586b228156 add PIC_TT_IREP 2014-01-18 16:51:54 +09:00
Yuichi Nishiwaki b62374b4b4 s/print_irep/pic_dump_irep/g 2014-01-18 16:23:12 +09:00
Yuichi Nishiwaki acb513aa16 publish pic_callcc 2014-01-18 16:08:07 +09:00
Yuichi Nishiwaki 4522dd47af do not put includes in header, but put it in c file 2014-01-18 12:43:38 +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 dc773f9560 decl indicator positioning functions 2014-01-17 20:11:06 +09:00
Yuichi Nishiwaki dfd5f96e7e change memory open API 2014-01-17 13:11:52 +09:00
Yuichi Nishiwaki db75df2624 add heap finializer 2014-01-16 22:02:30 +09:00
Yuichi Nishiwaki 1433698fe5 publish pic_gc_run 2014-01-16 22:02:09 +09:00
Yuichi Nishiwaki eaf79ce757 cosmetic changes 2014-01-16 21:00:55 +09:00
Yuichi Nishiwaki 94b2a68f7f change mwopen's API 2014-01-16 20:36:22 +09:00
Yuichi Nishiwaki 9fbf7e1914 cleanup 2014-01-16 20:27:39 +09:00
Yuichi Nishiwaki 8709ada140 replace fpos_t with long since old versions of clang and gcc seem claim
that fpos_t and long are not convertible
2014-01-16 20:13:13 +09:00
Yuichi Nishiwaki df313b5bd9 decl memory access functions 2014-01-16 20:04:27 +09:00
Yuichi Nishiwaki 6f32cbdea3 handle end-of-file while reading file object 2014-01-16 19:56:45 +09:00
Yuichi Nishiwaki 4e495c6fcc [WIP] add a buffer for ungetc 2014-01-16 18:42:10 +09:00
Yuichi Nishiwaki 9897f7581f impl pic_fread with buffering 2014-01-16 18:41:10 +09:00
Yuichi Nishiwaki ce21353d50 impl pic_fwrite with simple buffering 2014-01-16 18:39:03 +09:00
Yuichi Nishiwaki eca456f875 add IO buffering (setvbuf) 2014-01-16 18:36:47 +09:00
Yuichi Nishiwaki 392549b315 replace old stdio functions with picrin's wrapper impls 2014-01-16 18:32:05 +09:00
Yuichi Nishiwaki 86eb4bb64b add string IO wrapper function prototypes 2014-01-16 18:30:03 +09:00
Yuichi Nishiwaki 8ce83bdbe7 declare some low-level file IO operation methods 2014-01-16 18:28:37 +09:00
Yuichi Nishiwaki 63d23bdeda [WIP] add generic file object constructor (pic_funopen) 2014-01-16 18:27:05 +09:00
Yuichi Nishiwaki 1cb9b0347d [WIP] replace FILE* with my own FILE structure (pic_file *) 2014-01-16 18:24:25 +09:00
Yuichi Nishiwaki 8ad90e8c17 add missing trailing comma 2014-01-16 18:21:00 +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 1c14feffa4 add accessors of stdio ports 2014-01-13 00:51:19 +09:00
Yuichi Nishiwaki d9911cabc8 publish pic_eof_object() 2014-01-13 00:49:25 +09:00
Yuichi Nishiwaki 6b808354c0 global variable accessors don't require library object 2014-01-13 00:45:49 +09:00
Yuichi Nishiwaki 11ead27614 wrapper/unwrapper for var-proc conversion 2014-01-12 16:08:27 +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 68f0eb97c9 pic_symbol_p macro is replaced with pic_sym_p 2014-01-12 13:15:41 +09:00
Yuichi Nishiwaki 825cde998b s/pic_proc_cv_reserve/pic_proc_cv_init/g 2014-01-12 13:02:16 +09:00
Yuichi Nishiwaki 9b02247082 initial explicit renaming macro prototype 2014-01-09 16:34:22 +09:00
Yuichi Nishiwaki a9f4eff13e add parameter primitives: (picrin parameter) library 2014-01-09 00:39:13 +09:00
Yuichi Nishiwaki d7c510ae40 parameter implementation prototype 2014-01-09 00:38:09 +09:00
Yuichi Nishiwaki 88ce10e9fe add defvar declaration (just a prototype. no definition) 2014-01-09 00:36:44 +09:00
Yuichi Nishiwaki 92ceedbd15 add accessor functions to modify closed variables 2014-01-08 22:45:28 +09:00
Yuichi Nishiwaki e3e1ba4c11 rename procedure creation functions 2014-01-08 22:44:53 +09:00
Yuichi Nishiwaki dccc234fd9 add pic_import 2014-01-08 15:38:31 +09:00
Yuichi Nishiwaki 33cbf5ff6a configurable none value 2014-01-08 15:22:23 +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 7cdcbd4604 set name to each library 2013-12-07 18:59:13 -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 1ac5b6458c add pic_null_syntactic_env and pic_minimal_syntactic_env 2013-12-07 07:04:26 -08:00
Yuichi Nishiwaki b70aa8a21c s/PICCONF/config/g 2013-12-07 07:03:30 -08:00
Yuichi Nishiwaki aac2082991 add pic_assoc 2013-12-07 06:30:21 -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 931565d4ce add pic_lib 2013-12-07 03:58:18 -08:00
Yuichi Nishiwaki acbcde3b6a initial library support 2013-12-07 03:04:27 -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 00514dcd15 GC_STRESS off by default 2013-12-03 11:54:10 +09:00
Yuichi Nishiwaki 62f0a50faf set bitfield to union header.mark 2013-12-03 11:53:36 +09:00
Yuichi Nishiwaki b5b30de05a remove a field for debug of union header 2013-12-03 11:49:32 +09:00
Yuichi Nishiwaki 7685afdb79 fix logic flaw in GC 2013-12-03 11:45:38 +09:00
Yuichi Nishiwaki a43e3248e8 calloc should take size_t 2013-12-01 12:44:43 +09:00
Yuichi Nishiwaki 21f2c58a53 [gc][bugfix] sweeping failed when the heap gets completely
exhausted (i.e. all blocks' size are zero)
2013-11-29 12:10:10 +09:00
Yuichi Nishiwaki 8e84242626 increase default heap size 2013-11-28 18:38:25 +09:00
Yuichi Nishiwaki 2a32de55b6 increase default heap size 2013-11-28 12:58:02 +09:00
Yuichi Nishiwaki f6506a4828 turn off PIC_NAN_BOXING flag by default (for 32bit env) 2013-11-27 06:32:07 -08:00
Yuichi Nishiwaki 1ab588d21f added hygienic macro facility! Fooo! 2013-11-27 15:58:28 +09:00
Yuichi Nishiwaki 78cafe3db7 add make-syntactic-closure function 2013-11-27 15:04:44 +09:00