Yuichi Nishiwaki
563b65efde
s/expand.c/macro.c/
2013-11-22 07:22:52 -08:00
Yuichi Nishiwaki
579735d16e
s/heap_page/pic_heap/g
2013-11-22 07:19:31 -08:00
Yuichi Nishiwaki
e6523730a4
pluggable heap pages
2013-11-22 07:12:03 -08:00
Yuichi Nishiwaki
1be72f1e18
rewrite gc!
2013-11-22 06:38:29 -08:00
Yuichi Nishiwaki
2dd293c0f9
[workaround] add stack overflow detector
2013-11-22 06:37:57 -08:00
Yuichi Nishiwaki
0a521c2314
add overflow guards to some global stacks (or value pools)
2013-11-22 06:35:51 -08:00
Yuichi Nishiwaki
23b806cc41
print propagated error messages when stdlib failed to build
2013-11-22 06:34:34 -08:00
Yuichi Nishiwaki
4b326e4f6e
add new compilation flag GC_DEBUG_DETAIL
2013-11-22 03:29:05 -08:00
Yuichi Nishiwaki
4004282e50
alloc stacks by calloc, not malloc
2013-11-22 03:28:09 -08:00
Yuichi Nishiwaki
626c0adb3a
fix broken pic_type_repr
2013-11-22 03:27:09 -08:00
Yuichi Nishiwaki
f610424ae5
remove unnecessary protect
2013-11-22 01:53:22 -08:00
Yuichi Nishiwaki
05b2717b9e
less memory usage of pic_reverse
2013-11-21 06:32:56 -08:00
Yuichi Nishiwaki
00fc0ee931
protect more objects during expansion
2013-11-21 06:31:32 -08:00
Yuichi Nishiwaki
f146287eff
load_stdlib releases arena objects every time evaluating exprssion
2013-11-21 06:30:33 -08:00
Yuichi Nishiwaki
6581177ec5
realloc pic->irep when exhausted
2013-11-21 06:28:43 -08:00
Yuichi Nishiwaki
58b9e2cb60
debug prints when a global stack is realloc'ed
2013-11-21 06:28:06 -08:00
Yuichi Nishiwaki
e49ddbd13b
[bugfix] makeing a shared library failure under the version 3 of bison
2013-11-18 20:47:20 +09:00
Yuichi Nishiwaki
ed0b02ecfa
fixed #5 (again)
2013-11-18 20:38:03 +09:00
Yuichi Nishiwaki
d2bb4ad4f2
Revert "(maybe) fix #5 "
...
This reverts commit a3ac65a75f
.
2013-11-18 20:36:30 +09:00
Yuichi Nishiwaki
a3ac65a75f
(maybe) fix #5
2013-11-18 20:35:27 +09:00
Yuichi Nishiwaki
d5f01595b0
fixed #4
2013-11-18 20:24:09 +09:00
Yuichi Nishiwaki
6f94202e13
s/pic_expand/pic_macroexpand/g
2013-11-18 16:36:44 +09:00
Yuichi Nishiwaki
a3c2dabcc7
add feature function
2013-11-18 01:46:28 +09:00
Yuichi Nishiwaki
0d952d3639
add string functions
2013-11-18 01:09:54 +09:00
Yuichi Nishiwaki
6cfbe51c87
pic_get_args: change type of argc
2013-11-18 01:07:51 +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
d4188e0969
add error function
2013-11-17 18:16:03 +09:00
Yuichi Nishiwaki
5ffb4eb6c9
add string?
2013-11-17 17:42:52 +09:00
Yuichi Nishiwaki
9526ca789a
free as many as possible!
2013-11-17 17:33:28 +09:00
Yuichi Nishiwaki
fdc9bfea4e
initial exception handling support
2013-11-17 17:25:26 +09:00
Yuichi Nishiwaki
5668ae1b29
[bugfix] local variables should be initialized before copied to env object
2013-11-17 17:24:37 +09:00
Yuichi Nishiwaki
737f916a8c
add pic_errorf
2013-11-17 17:23:13 +09:00
Yuichi Nishiwaki
224b08fb92
[bugfix] after save_cont any local variable must not be modified!
...
If save_cont returns a cont object, a local variable will receive the
object and the machine stack state will have just been changed then.
To avoid that, we need set cont object to the local before the machine
stack is copied.
2013-11-17 17:20:19 +09:00
Yuichi Nishiwaki
38988b7770
add global exception handler stack
2013-11-17 16:02:58 +09:00
Yuichi Nishiwaki
c79e08632c
when restoring continuation sp and ci must be re-allocated
2013-11-17 15:58:53 +09:00
Yuichi Nishiwaki
5947240614
[bugfix] fix crash on deeply nested lambdas
2013-11-17 13:12:59 +09:00
Yuichi Nishiwaki
14ad038051
wipe reallocated cv_tbl
2013-11-17 13:10:36 +09:00
Yuichi Nishiwaki
242a366cbf
check vector index out of range
2013-11-17 02:32:27 +09:00
Yuichi Nishiwaki
1ef3ed91a2
fix for-each compilation bug
2013-11-16 23:32:34 +09:00
Yuichi Nishiwaki
a68b470e06
pic_get_args can parse '*'
2013-11-15 22:53:41 +09:00
Yuichi Nishiwaki
c57f1bfbe1
define math comp predicates as C functions
2013-11-15 22:51:51 +09:00
Yuichi Nishiwaki
e94aaffd34
shrink default arena size!
2013-11-15 19:54:47 +09:00
Yuichi Nishiwaki
9cdca8bc70
implement yy arena gc
2013-11-15 19:40:31 +09:00
Yuichi Nishiwaki
690f66dd76
s/is_marked/gc_is_marked/g
2013-11-15 19:32:01 +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
c62505b930
initialize newly allocated vector with falses
2013-11-15 19:29:54 +09:00
Yuichi Nishiwaki
73d9b0dc79
use strndup if possible
2013-11-15 17:08:18 +09:00
Yuichi Nishiwaki
93e5758e4c
[bugfix] gc may enter an infinite loop
2013-11-15 16:11:54 +09:00
Yuichi Nishiwaki
a2f022df4e
implement native version of some primitive functions such as car,crd...
2013-11-15 16:07:03 +09:00
Yuichi Nishiwaki
984588b1b6
add reference count GC for pic_block objects
2013-11-15 11:51:58 +09:00
Yuichi Nishiwaki
c22f566c06
arena stash can be statically allocated
2013-11-15 10:54:56 +09:00
Yuichi Nishiwaki
066575fa1c
error when apply got non-proc at the first place of arguments
2013-11-14 20:42:14 +09:00
Yuichi Nishiwaki
850290dda3
add some char primitives
2013-11-14 20:41:22 +09:00
Yuichi Nishiwaki
7f35eb7daa
support named characters
2013-11-14 19:45:38 +09:00
Yuichi Nishiwaki
6de5bc7550
propagate jmp_bufs (useful when C stack and scheme stack interleave)
2013-11-14 19:26:06 +09:00
Yuichi Nishiwaki
e68c69ceb1
support datum comment
2013-11-14 17:31:40 +09:00
Yuichi Nishiwaki
48c5c6b17c
add vector-set!
2013-11-14 16:57:07 +09:00
Yuichi Nishiwaki
b56b86aae2
[bugfix] variables defined by internal definitions may be referred from
...
inner environments
2013-11-14 16:52:49 +09:00
Yuichi Nishiwaki
b9fce69c61
support internal definitions
2013-11-13 18:08:22 +09:00
Yuichi Nishiwaki
2fb4720e22
[bugfix] (= 1 1.0) doesn't work
2013-11-13 17:40:31 +09:00
Yuichi Nishiwaki
5479e7c6ba
[bugfix] atan and log functions doesn't accept single argument
2013-11-13 17:38:54 +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
8c40fc8d9e
add square bracket notation
2013-11-11 11:57:01 +09:00
Yuichi Nishiwaki
8b484b69d7
rename fields in struct pic_cont
2013-11-11 10:14:42 +09:00
Yuichi Nishiwaki
4fea9169cc
error when argument of apply is not a proper list
2013-11-11 08:01:08 +09:00
Yuichi Nishiwaki
7f3d3ac11b
copy stacks to restore a continuation
2013-11-11 07:59:52 +09:00
Yuichi Nishiwaki
96d75b3c06
add apply function
2013-11-10 00:41:59 +09:00
Yuichi Nishiwaki
fd3300f9db
emit int result in int-int division if possible
2013-11-09 16:32:13 +09:00
Yuichi Nishiwaki
0d2e49c17e
cleanup
2013-11-09 15:29:58 +09:00
Yuichi Nishiwaki
9d467e4d14
change some function names in cont.c
2013-11-09 15:25:19 +09:00
Yuichi Nishiwaki
76990d512f
suppress warnings
2013-11-09 15:24:58 +09:00
Yuichi Nishiwaki
64ae8bd7b0
initial call/cc support
2013-11-09 14:14:25 +09:00
Yuichi Nishiwaki
e373aa7b92
add missing pic_apply_argv definition
2013-11-09 14:13:14 +09:00
Yuichi Nishiwaki
0d28f246de
add pic_get_proc
2013-11-09 14:12:59 +09:00
Yuichi Nishiwaki
89eceec7f8
fix a bug that pic_apply faults when cfunc proc is given in DEBUG mode
2013-11-09 14:12:36 +09:00
Yuichi Nishiwaki
125189e25e
fix a bug in initial ciend setting
2013-11-09 14:11:54 +09:00
Yuichi Nishiwaki
d973f41d84
values of some compound types can reach to expanstion phase
2013-11-09 14:11:19 +09:00
Yuichi Nishiwaki
d3ed7bce53
eq? and eqv? return true when the pointers are equal
2013-11-09 13:41:11 +09:00
Yuichi Nishiwaki
62f19e85c5
varg * and / operators
2013-11-07 12:52:59 +09:00
Yuichi Nishiwaki
9d304be02e
varg - operator
2013-11-07 12:18:00 +09:00
Yuichi Nishiwaki
84c1156b9d
add unary minus operator
2013-11-07 12:17:37 +09:00
Yuichi Nishiwaki
ae376b4903
fix broken pic_float_p
2013-11-07 12:17:16 +09:00
Yuichi Nishiwaki
b0a4249220
varg + operator
2013-11-06 18:55:06 +09:00
Yuichi Nishiwaki
8a0b8da884
missing pic_eqv_p (when PIC_NAN_BOXING disabled)
2013-11-06 18:54:46 +09:00
Yuichi Nishiwaki
fc42c71304
add eqv? and equal?
2013-11-06 16:12:31 +09:00
Yuichi Nishiwaki
27dc840118
eq? predicate supports nan-boxing
2013-11-06 16:06:31 +09:00
Yuichi Nishiwaki
ac14a2271b
fix a bug in pic_false_value
2013-11-05 21:08:32 +09:00
Yuichi Nishiwaki
d9cb5d4eee
nan-boxing support
2013-11-05 20:33:24 +09:00
Yuichi Nishiwaki
e056586ab9
add pic_init_value macro
2013-11-05 00:42:44 -05:00
Yuichi Nishiwaki
46fccff806
cleanup
2013-11-05 00:30:03 -05:00
Yuichi Nishiwaki
5850699d75
force indirect reference to pic_value vtype
2013-11-04 23:37:08 -05:00
Yuichi Nishiwaki
9bba0353e8
add some bytevector primitives
2013-11-04 22:58:16 -05:00
Yuichi Nishiwaki
aebf7f00f7
initial bytevector support
2013-11-04 22:38:23 -05:00
Yuichi Nishiwaki
1675ad9f52
initial char support
2013-11-04 21:37:18 -05:00
Yuichi Nishiwaki
8aca1ebc96
rename pic_code.u.c -> pic_code.u.r
2013-11-04 21:32:09 -05:00
Yuichi Nishiwaki
5bb762b6e3
[bugfix] crash on calling vector-ref
2013-11-04 20:59:43 -05:00
Yuichi Nishiwaki
01a5819706
add vector primitives
2013-11-04 20:55:57 -05:00
Yuichi Nishiwaki
fb66791216
do not create pic_env object when not needed
2013-11-04 20:27:44 -05:00