Commit Graph

604 Commits

Author SHA1 Message Date
Doug Currie be33d016e9 Refactor read_unsigned to prepare for pluggable atod 2016-01-08 15:55:00 -05:00
Doug Currie 8bcfc139f7 Merge upstream. 2015-12-29 11:26:55 -05:00
Yuichi Nishiwaki cce4933430 use simplest version of error checking 2015-12-30 01:01:12 +09:00
Doug Currie 9fb7676b37 Convert tabs to spaces in string.c 2015-12-30 00:57:14 +09:00
Doug Currie 51ba443636 Check for valid indices in substring and string-copy. 2015-12-30 00:56:59 +09:00
Doug Currie 65429b4f10 Check for valid indices in substring and string-copy. 2015-12-27 23:47:29 -05:00
Doug Currie b585d89056 Fix for equal? bug #312 2015-12-27 21:27:26 -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
Sunrin SHIMURA (keen) df1a7b5fd5 add irritant to read error, fixing #310 2015-10-06 14:04:48 +09:00
Sunrin SHIMURA (keen) 5691739272 pic_errof requires pic_value 2015-10-02 13:49:32 +09:00
Yuichi Nishiwaki 333813d0ba unify more cases 2015-08-26 22:37:40 +09:00
Yuichi Nishiwaki 210fecab3f unify 'i' and 'I', and 'f' and 'F' 2015-08-26 22:25:56 +09:00
Yuichi Nishiwaki e841764b68 introduce PTR_CASE macro 2015-08-26 22:21:34 +09:00
Yuichi Nishiwaki ee2a4b92f5 more efficient arguments processing in pic_apply 2015-08-26 21:52:20 +09: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 98034b5038 suppress warnings 2015-08-26 17:50:28 +09:00
Yuichi Nishiwaki 06af0265f6 remove pic->sGREF, sLREF, sCREF, sCALL 2015-08-25 19:37:20 +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 52de9e860a inline codegen_call_vm 2015-08-10 23:53:36 +09:00
Yuichi Nishiwaki e0df3f1ecc remove pic_define_syntactic_keyword 2015-08-10 22:38:31 +09:00
Yuichi Nishiwaki c547d3a281 use pic_applyN if possible 2015-08-10 22:13:16 +09:00
Yuichi Nishiwaki 5a9958fccc cosmetic changes 2015-08-10 21:47:42 +09:00
Yuichi Nishiwaki c139bb0f08 simplify pic_default_alloc impl 2015-08-10 21:17:26 +09:00
Yuichi Nishiwaki c573f2c56e stateful allocator 2015-08-10 21:13:23 +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 a479ec21ec argument marked unused is used 2015-08-05 09:59:30 +09:00
Yuichi Nishiwaki 98662215e1 use pic_reg to implement pic->macros 2015-08-05 09:42:17 +09:00
Yuichi Nishiwaki 5fa24f9767 global variable table may be weak 2015-08-05 09:36:32 +09:00
Yuichi Nishiwaki a12be32f19 do not allocate symbols inside vm 2015-08-05 09:03:38 +09:00
Yuichi Nishiwaki 9d25be2e76 [bugfix] update prototype 2015-08-05 09:03:09 +09:00
Yuichi Nishiwaki 537e5b0eed use boxes for global variable cells 2015-08-05 08:52:28 +09:00
Yuichi Nishiwaki 987931bd0f add box.h 2015-08-05 08:52:28 +09:00
Yuichi Nishiwaki 261580309e clean up 2015-08-05 08:50:24 +09:00
Yuichi Nishiwaki 8767d57fbd cleanup vm 2015-07-30 02:55:37 +09:00
Yuichi Nishiwaki 1a71f3f578 move regs field from pic_state to pic_heap 2015-07-26 16:48:38 +09:00
Yuichi Nishiwaki da0c9d2594 cleanup 2015-07-23 17:10:53 +09:00
Yuichi Nishiwaki fae4e28396 shrink union header size 2015-07-23 17:10:53 +09:00
Yuichi Nishiwaki 470eaa485d [bugfix] wrong allocation size for pic_port 2015-07-23 17:10:53 +09:00
OGINO Masanori 16b427b8c4 Fix typo, alerm -> alarm.
This commit also enables some tests to catch more regressions.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2015-07-22 23:06:46 +09:00
Yuichi Nishiwaki ee9ee2f03e add inline expansion optimization 2015-07-22 16:09:41 +09:00
Yuichi Nishiwaki 5f9a6880e2 [bugfix] rest argument does not work with local definitions 2015-07-22 16:08:54 +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 d11b569abf keep (picrin user) empty unless picrin is started in repl mode 2015-07-20 19:26:33 +09:00
Yuichi Nishiwaki 6b42145e00 support '%c' specifier in xfprintf 2015-07-20 19:02:52 +09:00
Yuichi Nishiwaki 569b14d684 cosmetic changes 2015-07-20 15:18:12 +09:00
Yuichi Nishiwaki 7db74c4b7a rewrite gc.c with union object 2015-07-20 15:02:16 +09:00
Yuichi Nishiwaki e6c35764dd TCO for gc_mark_object 2015-07-20 14:24:58 +09:00
Yuichi Nishiwaki 7dc26dd674 don't use PIC_VTYPE_FOO constants outside type.h 2015-07-20 14:07:24 +09:00
Yuichi Nishiwaki f5b07cacd2 remove alignment field 2015-07-20 13:51:37 +09:00
Yuichi Nishiwaki 1258b8bff3 cosmetic chagnes 2015-07-20 13:51:37 +09:00
Yuichi Nishiwaki 3a96d093ed strict check 2015-07-20 02:52:47 +09:00
Yuichi Nishiwaki 86a056c70a [bugfix] some paths in no-libc mode depend on lib 2015-07-20 02:45:57 +09:00
Yuichi Nishiwaki c2754509f2 remove PIC_ENABLE_FLOAT flag 2015-07-20 02:19:41 +09:00
Yuichi Nishiwaki 5e13d35d10 cosmetic changes 2015-07-20 02:04:51 +09:00
Yuichi Nishiwaki 4a7c87eb84 rewrite arithmetic operators and comparators with pic_op 2015-07-20 02:03:56 +09:00
Yuichi Nishiwaki a5317898cb don't define number classifying procedures such as real? and complex? in C 2015-07-20 01:45:21 +09:00
Yuichi Nishiwaki ac10c3fcc1 remove unused function 2015-07-20 01:25:04 +09:00
Yuichi Nishiwaki 57e4942ae2 move abs and expt 2015-07-20 01:24:35 +09:00
Yuichi Nishiwaki 6551506160 move more procedures 2015-07-20 01:22:29 +09:00
Yuichi Nishiwaki d66ae479cc move some math procedures to math nitro 2015-07-20 01:12:37 +09:00
Yuichi Nishiwaki 18965f9ce7 remove undefined? procedure 2015-07-18 15:31:37 +09:00
Yuichi Nishiwaki 3739387160 register now returns #f or a pair 2015-07-18 15:28:53 +09:00
Yuichi Nishiwaki 238f5999bc dictionary-ref now returns a pair or #f 2015-07-18 15:22:33 +09:00
Yuichi Nishiwaki 22e85c159e cosmetic changes 2015-07-16 18:44:23 +09:00
Yuichi Nishiwaki 6fdd5ef05d [bugfix] don't melt base header into *backword* free chunk as well. 2015-07-16 17:11:55 +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 d43db5e9c8 [bugfix] change block layout in page 2015-07-16 16:13:30 +09:00
Yuichi Nishiwaki a58ebe91a8 cosmetic changes 2015-07-16 15:53:18 +09:00
Yuichi Nishiwaki 6d43b31a68 remove unnecessary prototype 2015-07-16 15:44:06 +09:00
Yuichi Nishiwaki b4f8d929ec don't cache freep 2015-07-16 15:42:44 +09:00
Yuichi Nishiwaki 0fc2a8e273 change heap_free prototype 2015-07-16 15:41:43 +09:00
Yuichi Nishiwaki 30efc25633 gc_alloc no longer takes care of mark property 2015-07-16 15:38:37 +09:00
Yuichi Nishiwaki 75d22404cb cleanup 2015-07-16 15:33:31 +09:00
Yuichi Nishiwaki 7b8c6df7bc don't need to clear out pages 2015-07-16 15:31:11 +09:00
Yuichi Nishiwaki 1c77115c56 [bugfix] memory leak 2015-07-16 15:28:30 +09:00
Yuichi Nishiwaki 46e3665970 inline heap_init 2015-07-15 23:32:31 +09:00
Yuichi Nishiwaki f9cfbba331 unalloced region may have any mark state 2015-07-15 23:30:49 +09:00
Yuichi Nishiwaki 13f16e3e09 Revert "remove unused guard"
This reverts commit ea90800e56.
2015-07-15 23:28:45 +09:00
Yuichi Nishiwaki ea90800e56 remove unused guard 2015-07-15 23:25:57 +09:00
Yuichi Nishiwaki f8ceef96d0 remove debug codes 2015-07-15 23:25:39 +09:00
Yuichi Nishiwaki 51a42708b5 saner redefinition warning 2015-07-14 07:12:57 +09:00
Yuichi Nishiwaki 072a32601f don't use VLA 2015-07-13 10:02:01 +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 0f55320a67 running map or foreach on multiple dictionaries does not make sense. 2015-07-13 09:32:27 +09:00
Yuichi Nishiwaki f6bb2ce178 don't use vla 2015-07-13 09:27:12 +09:00
Yuichi Nishiwaki 6363bd3f33 remove trailing comma 2015-07-13 09:15:51 +09:00
Yuichi Nishiwaki 03550bbf41 remove semicolon outside function definition 2015-07-13 09:15:34 +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 5c2cbb9e55 pic_load_port -> pic_load 2015-07-13 08:20:07 +09:00
Yuichi Nishiwaki 71d1d4837d pic_intern_cstr -> pic_intern 2015-07-13 08:16:04 +09:00
Yuichi Nishiwaki 81c38d8fa2 s/PICRIN_VALUE_H/PICRIN_TYPE_H/g 2015-07-13 08:10:30 +09:00
Yuichi Nishiwaki e944183e99 pic_obj_alloc_unsafe should be private 2015-07-13 08:05:46 +09:00
Yuichi Nishiwaki 40a4e2ead4 remove make-error-object 2015-07-13 07:59:57 +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 5f454626f6 move picrin/array to contrib/ 2015-07-09 01:51:55 +09:00
Yuichi Nishiwaki 1be4fd10f9 remove unnecessary exports 2015-07-08 18:57:53 +09:00
Yuichi Nishiwaki 976a44185d cache slot objects 2015-07-07 15:16:00 +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 acc1852400 remove unused symbols 2015-07-06 19:14:18 +09:00
Yuichi Nishiwaki 9e04a80636 add OP_GT and OP_GE 2015-07-06 19:13:00 +09:00
Yuichi Nishiwaki 055691ebfc [bugfix] t/escape.scm doesn't work 2015-07-06 14:19:12 +09:00
Yuichi Nishiwaki 5e6f6f85f4 [bugfix] pic_load_point should restore pic->cc 2015-07-06 14:18:49 +09:00
Yuichi Nishiwaki f210efd066 [bugfix] (set! symbol? list) doesn't work 2015-07-04 18:48:48 +09:00
Yuichi Nishiwaki e6719a43bb [bugfix] renaming import broken 2015-07-04 18:17:01 +09:00
Yuichi Nishiwaki 7e970258f4 cleanup 2015-07-04 18:14:31 +09:00
Yuichi Nishiwaki 1a886ee50f check number of arguments at runtime 2015-07-04 18:05:57 +09:00
Yuichi Nishiwaki 5e55668b92 [bugfix] sometimes OP_CSET doesn't push undef 2015-07-04 18:01:48 +09:00
Yuichi Nishiwaki 25f80dc87d don't cons in call-with-values 2015-07-04 18:01:30 +09:00
Yuichi Nishiwaki 3285cc021b use snprintf and atof if possible 2015-07-04 17:32:16 +09:00
Yuichi Nishiwaki 73b7d577d7 Revert "remove dead code"
This reverts commit 004e3eda48.
2015-07-04 17:24:53 +09:00
Yuichi Nishiwaki 1d1e41e122 refactor create_activation 2015-07-04 17:24:39 +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 07bb4a0f6b cache irep 2015-07-04 14:31:06 +09:00
Yuichi Nishiwaki 1c538a13f1 OP_RET's operand is no longer used 2015-07-04 14:04:16 +09:00
Yuichi Nishiwaki 18df88d457 optimize vm_get_irep 2015-07-04 14:04:16 +09:00
Yuichi Nishiwaki 004e3eda48 remove dead code 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 a6dbf0067b cosmetic changes 2015-07-04 14:04:16 +09:00
Yuichi Nishiwaki e812e8fb3d fix #282.
by following @keens' advice
2015-07-03 03:57:33 +09:00
Yuichi Nishiwaki 6e49d91e9f export core syntaxes 2015-07-03 03:16:47 +09:00
Yuichi Nishiwaki 4905aab416 remove pic->file and pic->read 2015-07-02 08:50:28 +09:00
Yuichi Nishiwaki 65ade266d1 remove pic_defun_vm 2015-07-02 06:17:27 +09:00
Yuichi Nishiwaki c9245bbe84 optimize vm set operators 2015-07-02 05:59:54 +09:00
Yuichi Nishiwaki f9df81f046 remove unused symbols 2015-07-02 05:36:09 +09:00
Yuichi Nishiwaki f622ba3db4 refactor codegen_call 2015-07-02 05:26:05 +09:00
Yuichi Nishiwaki 28b180ac3f split codegen function 2015-07-02 05:07:16 +09:00
Yuichi Nishiwaki 43f385760d simplify management of deferred forms 2015-07-02 04:36:21 +09:00
Yuichi Nishiwaki 0a0c94fb91 perform tail position analysis on the fly at codegen 2015-07-02 04:23:07 +09:00
Yuichi Nishiwaki 9c908b2622 cosmetic changes 2015-07-02 03:33:25 +09:00