Yuichi Nishiwaki
d30cdf7409
add picrin/setup.h and picrin/state.h
2016-02-15 00:50:02 +09:00
Yuichi Nishiwaki
4a3104187e
cosmetic changes
2016-02-15 00:33:59 +09:00
Yuichi Nishiwaki
a92e70a610
remove typedefs of struct pic_string and struct pic_blob
2016-02-15 00:20:49 +09:00
Yuichi Nishiwaki
780df6275b
move more decls to picrin.h
2016-02-15 00:10:12 +09:00
Yuichi Nishiwaki
f70dd4d376
add pic_closure_ref, pic_closure_set, and pic_lambda
2016-02-14 22:23:14 +09:00
Yuichi Nishiwaki
b577b2d453
reg -> weak
2016-02-10 21:50:39 +09:00
Yuichi Nishiwaki
3bc55b8b62
unwrap union fields
2016-02-08 13:51:41 +09:00
Yuichi Nishiwaki
c7f8293368
add pic_intern_(str|cstr|lit)
2016-02-08 04:10:22 +09:00
Yuichi Nishiwaki
fd248d31bd
optimize symbol->string
2016-02-08 03:36:20 +09:00
Yuichi Nishiwaki
3e4abf8949
optimize string construction from literal
2016-02-08 02:33:22 +09:00
Yuichi Nishiwaki
0d8d7d5b91
remove xformat family
2016-02-08 01:32:13 +09:00
Yuichi Nishiwaki
f263e9432e
remove gref slot
2016-02-07 22:17:56 +09:00
Yuichi Nishiwaki
cc75877a76
simplify struct pic_record
2016-02-07 02:58:18 +09:00
Yuichi Nishiwaki
2c09114cf3
move the expander to macro.c
2016-02-07 00:07:29 +09:00
Yuichi Nishiwaki
de7fb0c4b2
codegen.c -> eval.c
2016-02-06 23:55:39 +09:00
Yuichi Nishiwaki
e51d3db812
symbol is an identifier
2016-02-06 23:15:53 +09:00
Yuichi Nishiwaki
12f999d608
temporarily disable offset fields
2016-02-06 21:18:38 +09:00
Yuichi Nishiwaki
497595a0f7
pool now only contains heap objects
2016-02-06 21:11:22 +09:00
Yuichi Nishiwaki
62cc05f978
add OP_PUSHFLOAT
2016-02-06 20:52:36 +09:00
Yuichi Nishiwaki
93105dc2a6
add OP_PUSHEOF
2016-02-06 20:43:21 +09:00
Yuichi Nishiwaki
5af1b44456
wrap irep fields with unions
2016-02-06 18:37:40 +09:00
Yuichi Nishiwaki
0fd529c968
change mangling rule for global variables
2016-02-06 04:07:37 +09:00
Yuichi Nishiwaki
1fbc38fe55
serializable code representation
2016-02-05 21:53:25 +09:00
Yuichi Nishiwaki
600a92835e
add irep->ints
2016-02-05 21:41:20 +09:00
Yuichi Nishiwaki
0499b5ffb0
move pic_resolve to macro.c
2016-02-05 21:01:36 +09:00
Yuichi Nishiwaki
e96465f724
remove pic_irep.ilen
2016-02-05 20:47:08 +09:00
Yuichi Nishiwaki
64788af4b9
manage ireps using reference count
2016-02-05 00:31:57 +09:00
Yuichi Nishiwaki
6488e315d3
kvec.h is not used
2016-02-04 17:48:25 +09:00
Yuichi Nishiwaki
5637b3e435
unify emit_c and emit_i
2016-02-02 22:34:18 +09:00
Doug Currie
6881ac6d4d
Reduce size of data object by removing unused dict field
2016-01-15 23:44:07 -05:00
Doug Currie
3f7c5034d7
Fix some c99isms
2016-01-08 23:47:16 -05:00
Doug Currie
bfe1db8d16
Add benz compile time hooks PIC_DOUBLE_TO_CSTRING and PIC_CSTRING_TO_DOUBLE
2016-01-08 23:06:14 -05:00
Doug Currie
4ef9394c0b
Refactor xvfprintf to prepare for pluggable dtoa
2016-01-08 17:30:21 -05:00
Doug Currie
be33d016e9
Refactor read_unsigned to prepare for pluggable atod
2016-01-08 15:55:00 -05:00
Doug Currie
17d731228a
Use pic_eq_p to compare pic_values; move reverse lookup out of khash.h
2015-12-27 10:11:47 -05:00
Doug Currie
6e879dbe87
Better error reporting for uninitialized global.
2015-12-26 22:19:05 -05:00
Yuichi Nishiwaki
6f3083c3ca
never use size_t
2015-08-26 19:04:27 +09:00
Yuichi Nishiwaki
cc952404c5
pic_length should return int type
2015-08-26 18:16:33 +09:00
Yuichi Nishiwaki
b96846dc6e
don't use @@type property
2015-08-11 01:34:45 +09:00
Yuichi Nishiwaki
c336e89e72
I dislike newlines
2015-08-11 00:25:07 +09:00
Yuichi Nishiwaki
3a1bf08a78
long int has at least 32 bits (as specified by ISO C)
2015-08-11 00:18:35 +09:00
Yuichi Nishiwaki
9919dee174
define int32_t and uint32_t
2015-08-11 00:16:51 +09:00
Yuichi Nishiwaki
50dce97bac
unify struct pic_object and union object
2015-08-05 10:59:52 +09:00
Yuichi Nishiwaki
ceafb6b600
remove typedef of pic_list
2015-08-05 10:36:28 +09:00
Yuichi Nishiwaki
fa8557823f
remove unused filed in pic_irep
2015-08-05 10:32:01 +09:00
Yuichi Nishiwaki
987931bd0f
add box.h
2015-08-05 08:52:28 +09:00
Yuichi Nishiwaki
34d93682a9
bitmap marking
2015-07-24 15:42:30 +09:00
Yuichi Nishiwaki
3b333c2b47
define int32_t and uint32_t
2015-07-24 15:14:52 +09:00
Yuichi Nishiwaki
fae4e28396
shrink union header size
2015-07-23 17:10:53 +09:00
Yuichi Nishiwaki
a6aa479b61
refine pic_dump_irep format
2015-07-22 16:00:30 +09:00
Yuichi Nishiwaki
2848e2fe9e
improve error message
2015-07-22 15:59:04 +09:00
Yuichi Nishiwaki
7db74c4b7a
rewrite gc.c with union object
2015-07-20 15:02:16 +09:00
Yuichi Nishiwaki
c2754509f2
remove PIC_ENABLE_FLOAT flag
2015-07-20 02:19:41 +09:00
Yuichi Nishiwaki
ebcf6d00fb
set default page size to 4MB
2015-07-16 16:36:57 +09:00
Yuichi Nishiwaki
6b50ebba2b
early morecore request
2015-07-16 16:34:59 +09:00
Yuichi Nishiwaki
9f3fefd606
Merge branch 'master' into api-change
2015-07-13 09:59:59 +09:00
Yuichi Nishiwaki
269f4719f4
Revert "int div int becomes float"
...
This reverts commit 15411c9777
.
2015-07-13 09:56:59 +09:00
Yuichi Nishiwaki
15411c9777
int div int becomes float
2015-07-13 09:50:18 +09:00
Yuichi Nishiwaki
ecd21ffb5a
suppress unused-value warning
2015-07-13 09:45:14 +09:00
Yuichi Nishiwaki
c30392b0c3
remove unused variable f
2015-07-13 09:39:26 +09:00
Yuichi Nishiwaki
6363bd3f33
remove trailing comma
2015-07-13 09:15:51 +09:00
Yuichi Nishiwaki
d1e5e81580
khash doesn't need to require int32
2015-07-13 09:13:45 +09:00
Yuichi Nishiwaki
5635661b3c
remove pic_make_str_fill
2015-07-13 09:03:32 +09:00
Yuichi Nishiwaki
cbe5e81b28
remove pic_make_vec_from_list
2015-07-13 09:03:12 +09:00
Yuichi Nishiwaki
5c5066bfa0
Revert "add box type"
...
This reverts commit d53f0cf9e4
.
2015-07-13 08:24:06 +09:00
Yuichi Nishiwaki
42ec53d73f
remove pic_errmsg
2015-07-13 08:22:19 +09:00
Yuichi Nishiwaki
81c38d8fa2
s/PICRIN_VALUE_H/PICRIN_TYPE_H/g
2015-07-13 08:10:30 +09:00
Yuichi Nishiwaki
d0c442d451
add picrin/opcode.h
2015-07-09 04:40:15 +09:00
Yuichi Nishiwaki
2def465705
value.h -> type.h
2015-07-09 04:36:03 +09:00
Yuichi Nishiwaki
1e104921eb
cache gref slot
2015-07-07 14:42:50 +09:00
Yuichi Nishiwaki
d53f0cf9e4
add box type
2015-07-06 21:32:42 +09:00
Yuichi Nishiwaki
9e04a80636
add OP_GT and OP_GE
2015-07-06 19:13:00 +09:00
Yuichi Nishiwaki
5e6f6f85f4
[bugfix] pic_load_point should restore pic->cc
2015-07-06 14:18:49 +09:00
Yuichi Nishiwaki
8ba4c0305d
bugfix
2015-07-04 16:07:21 +09:00
Yuichi Nishiwaki
046fa0adad
fix build
2015-07-04 15:30:02 +09:00
Yuichi Nishiwaki
1c538a13f1
OP_RET's operand is no longer used
2015-07-04 14:04:16 +09:00
Yuichi Nishiwaki
10522b54e9
add pic_add, pic_sub, ..., pic_eq, pic_lt, ...
2015-07-04 14:04:16 +09:00
Yuichi Nishiwaki
b01042505f
remove OP_MINUS
2015-07-04 14:04:16 +09:00
Yuichi Nishiwaki
0a0c94fb91
perform tail position analysis on the fly at codegen
2015-07-02 04:23:07 +09:00
Yuichi Nishiwaki
6d2966e946
don't cons in pic_valuesN
2015-06-30 01:19:04 +09:00
Yuichi Nishiwaki
ddcf96f689
remove pic_proc_name (for a moment)
2015-06-27 19:02:18 +09:00
Yuichi Nishiwaki
d8e00f5725
don't malloc duplicated cstring
2015-06-26 02:32:59 +09:00
Yuichi Nishiwaki
9db8b33c61
abandon xhash
2015-06-25 07:58:58 +09:00
Yuichi Nishiwaki
42794ebbff
use khash for reader
2015-06-25 07:34:10 +09:00
Yuichi Nishiwaki
5cbb44d6b8
use khash for env
2015-06-25 07:26:48 +09:00
Yuichi Nishiwaki
11ed51b236
use khash for registers
2015-06-25 07:14:29 +09:00
Yuichi Nishiwaki
d6edf41305
kh_resize operation never fail
2015-06-25 06:39:13 +09:00
Yuichi Nishiwaki
2e1280ce5c
don't use malloc/realloc/free in khash.h
2015-06-25 06:13:20 +09:00
Yuichi Nishiwaki
5cf1822813
use khash for dictionary impl
2015-06-25 05:56:15 +09:00
Yuichi Nishiwaki
07fc2bb98e
cleanup
2015-06-24 01:13:18 +09:00
Yuichi Nishiwaki
f0434a8b37
abandon xvect.h, move on to kvec.h
2015-06-23 22:08:18 +09:00
Yuichi Nishiwaki
e2ad39074b
cleanup
2015-06-23 04:01:25 +09:00
Yuichi Nishiwaki
777ba0ff6a
[bugfix] don't compare continuation objects by pointers. They may be
...
reused when it reenters the same stack position.
2015-06-23 03:14:00 +09:00
Yuichi Nishiwaki
aae1b8792a
remove struct pic_picjmp
2015-06-23 03:14:00 +09:00
Yuichi Nishiwaki
e730a314f4
[bugfix] memory leak of pic_checkpoint
2015-06-22 17:12:19 +09:00
Yuichi Nishiwaki
7ec81ab1d5
add pic_resolve
2015-06-19 17:31:47 +09:00
Yuichi Nishiwaki
3021e7f2b9
add PIC_ENABLE_STDIO flag
2015-06-19 14:03:52 +09:00
Yuichi Nishiwaki
20cb77bbbe
file.h is now stdio.h-free
2015-06-19 05:14:18 +09:00
Yuichi Nishiwaki
a0d6c5800c
add pic_open_file
2015-06-19 05:00:36 +09:00
Yuichi Nishiwaki
19c09ba643
move contents of util.h to compat.h
2015-06-19 03:23:07 +09:00
Yuichi Nishiwaki
10f81512d8
don't malloc pic_reader
2015-06-19 03:14:55 +09:00
Yuichi Nishiwaki
db0767c931
don't malloc pic->iseq
2015-06-19 03:10:11 +09:00
Yuichi Nishiwaki
78bd3047f8
don't use global mutable variable!
2015-06-19 03:06:57 +09:00
Yuichi Nishiwaki
e43a9c7881
pass pic_state object to vtable functions
2015-06-19 02:29:17 +09:00
Yuichi Nishiwaki
3df7d1dd71
use pic_malloc and pic_free in file.c
2015-06-19 02:05:56 +09:00
Yuichi Nishiwaki
2e59b6ab04
rename xfile.[ch] to file.[ch]
2015-06-19 01:11:04 +09:00
Yuichi Nishiwaki
0b66447e79
remove port->status property
2015-06-18 23:26:31 +09:00
Yuichi Nishiwaki
eef74604d0
add library operators
2015-06-16 22:51:05 +09:00
Yuichi Nishiwaki
cf66d600bb
move macroexpander to codegen.c
2015-06-16 21:01:46 +09:00
Yuichi Nishiwaki
85e8d1511b
remove defer property from pic_env
...
explicitly pass deferred lambda list to expand functions
2015-06-16 20:57:18 +09:00
Yuichi Nishiwaki
84a3eaee35
change eval interface: eval takes an expression and an environment
...
macroexpand should be done in the context in which the expansion is
running. As of now I only changed c interface of eval but should change
the scheme interface as well ASAP.
2015-06-16 19:16:06 +09:00
Yuichi Nishiwaki
3a59a95960
[WIP] replace macro expander
...
remove define-syntax, add define-macro instead
saner display when writing identifiers
2015-06-15 02:48:31 +09:00
OGINO Masanori
2816f206fb
Define GCC_VERSION in util.h temporarily.
...
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2015-06-12 18:59:59 +09:00
Yuichi Nishiwaki
98857c0726
change pic_find_rename interface
2015-06-09 22:26:21 +09:00
Yuichi Nishiwaki
30cbdd5c4f
cleanup macro.h
2015-06-09 20:20:56 +09:00
Yuichi Nishiwaki
111779c39e
add pic_reg
2015-06-09 18:31:46 +09:00
Yuichi Nishiwaki
5185a73cd2
replace none with undef
2015-06-09 16:34:45 +09:00
Yuichi Nishiwaki
2c9a19acf5
introduce pic_invalid_value
2015-06-09 16:02:23 +09:00
Yuichi Nishiwaki
53a9e72413
optimize var implementation
2015-06-08 22:28:17 +09:00
Yuichi Nishiwaki
5def1df320
s/pic_winder/pic_checkpoint/g
2015-06-08 21:04:04 +09:00
Yuichi Nishiwaki
72baa9a52d
remove pic_throw function
2015-06-04 13:23:20 +09:00
Yuichi Nishiwaki
34b6585287
cleanup
2015-06-02 07:57:52 +09:00
Yuichi Nishiwaki
fc957da920
add 'env' property to struct pic_proc
...
Using attribute to make closure from c function is unsafe because closed
variables are visible from the scheme world. Use env property instead
from now.
2015-06-02 06:53:16 +09:00
Yuichi Nishiwaki
ce0c737c95
cleanup
2015-06-02 06:53:16 +09:00
Yuichi Nishiwaki
88092044d7
shrink pic_proc size
2015-06-02 06:53:16 +09:00
Yuichi Nishiwaki
5df4e4f64e
rename functions related to continuation
2015-06-02 06:18:09 +09:00
Yuichi Nishiwaki
dbcd81c8c1
[bugfix] calling dead escape continuation causes segv
2015-06-02 06:01:16 +09:00
Yuichi Nishiwaki
1e3bb6f1bb
cleanup pic_push_try
2015-06-02 05:14:43 +09:00
Sunrim KIM (keen)
221f089716
remove prototype declaration of function macro
2015-05-30 23:45:54 +09:00
Yuichi Nishiwaki
599d8f5980
pic_senv -> pic_env
2015-05-30 22:39:03 +09:00
Yuichi Nishiwaki
d0e10b49a7
pic_env -> pic_context
2015-05-30 22:34:51 +09:00
Yuichi Nishiwaki
334ceb9e7c
fix bugs unveiled by the previous commit
2015-05-30 19:57:32 +09:00
Yuichi Nishiwaki
9b7eb2f996
unify all headers into picrin.h
2015-05-28 23:57:10 +09:00
Yuichi Nishiwaki
00cde353ba
xfile completely refactored
2015-05-28 23:28:55 +09:00
Yuichi Nishiwaki
e30f1a11dc
more strict unused variable check
2015-05-28 17:06:41 +09:00
Yuichi Nishiwaki
d11da3a400
move complex macros from picrin.h to util.h
2015-05-28 16:54:36 +09:00
Yuichi Nishiwaki
6a692541a6
s/pic_alloc/pic_malloc/g
2015-05-28 16:42:16 +09:00
Yuichi Nishiwaki
278075910a
custom allocator and custom abort
2015-05-28 02:12:26 +09:00
Yuichi Nishiwaki
304664eaf0
add libc fallback
2015-05-28 01:55:55 +09:00
Yuichi Nishiwaki
7dcd050e1a
add PIC_ENABLE_FLOAT and PIC_WORD_BOXING
2015-05-28 01:48:38 +09:00
Yuichi Nishiwaki
b9dde91123
allow custom setjmp/longjmp
2015-05-28 00:41:55 +09:00
Yuichi Nishiwaki
9885bdd982
explicit cast to size_t
2015-05-28 00:17:12 +09:00
Yuichi Nishiwaki
15449354c6
switch string implementation to picrin's
2015-05-27 23:34:40 +09:00
Yuichi Nishiwaki
81be1b9e3e
define pic_dump_irep only if DEBUG is defined
2015-05-27 22:10:51 +09:00
Syohei YOSHIDA
919675670f
Correct cast type
2015-05-22 14:59:01 +09:00
Sunrin SHIMURA (keen)
8a7f61bf01
use correct vars
2015-02-01 12:25:48 +00:00
Yuichi Nishiwaki
154d987294
don't use C99's designated initializer
2015-01-28 00:46:51 +09:00
Yuichi Nishiwaki
32d6760d4f
portable xprintf implementation
2015-01-28 00:28:54 +09:00
Yuichi Nishiwaki
914c295177
don't use variable length array
2015-01-27 13:54:41 +09:00
Yuichi Nishiwaki
03a4f1a871
don't use flexible array member
2015-01-26 23:07:27 +09:00