Commit Graph

429 Commits

Author SHA1 Message Date
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
OGINO Masanori 04dc5c3176 Add `ieee-float` feature iff PIC_ENABLE_FLOAT.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2015-06-30 10:06:11 +09:00
Yuichi Nishiwaki 6d2966e946 don't cons in pic_valuesN 2015-06-30 01:19:04 +09:00
Yuichi Nishiwaki f6a727beb4 cleanup pic_read 2015-06-30 01:17:13 +09:00
Yuichi Nishiwaki 5138ab4a8c save arena 2015-06-30 01:17:13 +09:00
Yuichi Nishiwaki d097a021e3 optimize begin emitter 2015-06-30 01:13:54 +09:00
Yuichi Nishiwaki f4b54c85ea invoke pic_panic when evalating pic_boot failed 2015-06-30 01:13:54 +09:00
Yuichi Nishiwaki e5f7eda432 more arena freeing during compilation 2015-06-30 01:13:54 +09:00
Yuichi Nishiwaki bda1b93ec2 [bugfix][critical] heap pollution while symbol allocation 2015-06-30 01:13:54 +09:00
Yuichi Nishiwaki 849032ef1a cosmetic changes 2015-06-30 01:13:54 +09:00
Yuichi Nishiwaki 1595be099b define emit_x functions as macros 2015-06-30 01:13:54 +09:00
Yuichi Nishiwaki 62dbdb79dd cleanup 2015-06-30 01:13:54 +09:00
Yuichi Nishiwaki 428e006098 add symbol macro 2015-06-29 18:26:12 +09:00
Yuichi Nishiwaki 3428803bdb less consing 2015-06-27 19:19:43 +09:00
Yuichi Nishiwaki 885942b541 more cleanup 2015-06-27 19:10:15 +09:00
Yuichi Nishiwaki ddcf96f689 remove pic_proc_name (for a moment) 2015-06-27 19:02:18 +09:00
Yuichi Nishiwaki 36c498e7d7 cleanup analyzer 2015-06-27 18:48:21 +09:00
Yuichi Nishiwaki 5633bbefae don't enclose load_cstr with try-catch 2015-06-27 18:38:16 +09:00
Yuichi Nishiwaki f98a5ab14d cleanup 2015-06-27 18:23:08 +09:00
Yuichi Nishiwaki 1bed1bd420 remove unnecessary error checks 2015-06-27 18:08:57 +09:00
Yuichi Nishiwaki 4d18610a79 refine error messages 2015-06-27 17:50:03 +09:00
Yuichi Nishiwaki bcf53b9883 reimplement core syntaxes in scheme 2015-06-27 17:43:42 +09:00
Yuichi Nishiwaki 8c6496ef24 remvoe dead code 2015-06-27 16:44:05 +09:00
Yuichi Nishiwaki ac094a9477 cosmetic changes 2015-06-27 16:33:31 +09:00
Yuichi Nishiwaki df645b68ae more optimization 2015-06-27 15:59:22 +09:00
Yuichi Nishiwaki 03792f85de fast compile 2015-06-27 15:30:17 +09:00
Yuichi Nishiwaki 4a8e59e04b don't run malloc while anazlyze/codegen 2015-06-27 14:23:31 +09:00
Yuichi Nishiwaki 8b550de06a [bugfix] port leaks 2015-06-26 23:45:56 +09:00
Yuichi Nishiwaki 8e90517224 [bugfix] port should be closed properly 2015-06-26 23:06:52 +09:00
Yuichi Nishiwaki d8e00f5725 don't malloc duplicated cstring 2015-06-26 02:32:59 +09:00
Yuichi Nishiwaki 33dfe2b5cc change pic_open interface 2015-06-26 02:13:48 +09:00
Yuichi Nishiwaki 8587fe6dfc fix benz's issue 29 2015-06-25 22:33:17 +09:00
Yuichi Nishiwaki df13e35044 fix dictionary conviersion procedures 2015-06-25 22:29:27 +09:00
Yuichi Nishiwaki b71c9dcbff cosmetic changes 2015-06-25 18:51:21 +09:00
Yuichi Nishiwaki cc9dd2aa30 saner output from write
No more insane output such as (#0=(1 2 3) #0#).
2015-06-25 18:43:06 +09:00
Yuichi Nishiwaki 032e40e963 cleanup write_core 2015-06-25 17:50:20 +09:00
Yuichi Nishiwaki 37902d38f7 cleanup traverse_shared 2015-06-25 17:28:48 +09:00
Yuichi Nishiwaki 3004f2106c write supports #' #` #, #,@ 2015-06-25 17:19:34 +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 d500dd5d76 don't use xhash in codegen 2015-06-25 07:19:11 +09:00
Yuichi Nishiwaki 11ed51b236 use khash for registers 2015-06-25 07:14:29 +09:00
Yuichi Nishiwaki 0fb87449fc use khash for pic->syms 2015-06-25 07:05:41 +09:00
Yuichi Nishiwaki 03a649ed23 use khash in equal? impl 2015-06-25 06:44:45 +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 a7475a66fe Merge branch 'master' into khash-kvec 2015-06-25 05:58:12 +09:00
Yuichi Nishiwaki 6b15304d85 [bugfix] ptable consists of registers 2015-06-25 05:56:47 +09:00
Yuichi Nishiwaki 5cf1822813 use khash for dictionary impl 2015-06-25 05:56:15 +09:00
Yuichi Nishiwaki 0daa4febb0 fix #270 2015-06-24 02:17:13 +09:00
Yuichi Nishiwaki f5789c7c6f added c functions to define private varaibles. see discussion on #271 2015-06-24 02:02:26 +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 aa79797334 fix #234 2015-06-22 17:41:17 +09:00
Yuichi Nishiwaki e730a314f4 [bugfix] memory leak of pic_checkpoint 2015-06-22 17:12:19 +09:00
Yuichi Nishiwaki a0323bd5fc print error irritants 2015-06-20 02:34:00 +09:00
Yuichi Nishiwaki 535cd0c21e don't reformat error message because it removes trace info 2015-06-20 02:32:25 +09:00
Yuichi Nishiwaki ad6833ac79 fix #230 2015-06-19 23:34:12 +09:00
Yuichi Nishiwaki 32653df178 cleanup 2015-06-19 21:21:04 +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 cf037f27db remove library-name 2015-06-19 03:31:24 +09:00
Yuichi Nishiwaki 4bc765da65 move include of gc.h 2015-06-19 03:27:03 +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 d1aa42cd7a [bugfix] double close should be safe 2015-06-19 01:04:04 +09:00
Yuichi Nishiwaki f2e6feea7f assert value bound to current-(input|output|error)-port is port 2015-06-19 00:02:24 +09:00
Yuichi Nishiwaki 0b66447e79 remove port->status property 2015-06-18 23:26:31 +09:00
Yuichi Nishiwaki b4c3e2cc4f small refactoring. use DEFINE_STANDARD_PORT_ACCESSOR macro to define pic_stdxx 2015-06-18 23:15:09 +09:00
Yuichi Nishiwaki 61ff69b968 remove pic->xSTDXX 2015-06-18 22:59:22 +09:00
Yuichi Nishiwaki 1d1210db09 cleanup lib.c 2015-06-17 01:52:20 +09:00
Yuichi Nishiwaki 29a966d678 define export in scheme 2015-06-17 01:44:11 +09:00
Yuichi Nishiwaki 52b03d928c define import in scheme 2015-06-17 00:59:19 +09:00
Yuichi Nishiwaki fa1c619633 define define-library and cond-expand in scheme 2015-06-17 00:14:12 +09:00
Yuichi Nishiwaki 63d3510de8 move features procedure defun to state.c benz 2015-06-17 00:13:00 +09:00
Yuichi Nishiwaki 62b7c1a0f9 warn macro redefinition only when transformer object slot is being overwritten 2015-06-17 00:11:02 +09:00
Yuichi Nishiwaki 490c97cd81 add library-name and current-library 2015-06-17 00:03:52 +09:00
Yuichi Nishiwaki 4f69cb8ec3 eval procedure now takes environment object for the second argument 2015-06-16 22:51:49 +09:00
Yuichi Nishiwaki eef74604d0 add library operators 2015-06-16 22:51:05 +09:00
Yuichi Nishiwaki a88b5e193f remove #. reader 2015-06-16 21:39:41 +09:00
Yuichi Nishiwaki 7dd0e01b70 support (equal? identifier1 identifier2) 2015-06-16 21:13:41 +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 2e5b66fabd s/macroexpand/expand/g 2015-06-16 20:27:58 +09:00
Yuichi Nishiwaki 2c269b4f0e syntax-quote and syntax-quasiquote should create identifiers at runtime,
not at compile time
2015-06-16 19:16:23 +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 a10ac3b770 rewrite boot.c. add syntax-quote family
[boot.c] (cond) should be expanded into #undefined

update boot.c

[boot.c] bugfix

boot.c bugfix
2015-06-15 02:52:37 +09:00
Yuichi Nishiwaki 25c0eb125e add identifier-variable and identifier-environment 2015-06-15 02:52:37 +09:00
Yuichi Nishiwaki 181d120f09 reader support of (#' #` #, #,@) 2015-06-15 02:52:37 +09:00
Yuichi Nishiwaki 6d80b58060 assume all symbols are bound at the toplevel 2015-06-15 02:52:36 +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
Yuichi Nishiwaki 454146ab52 s/rXXX/uXXX/g 2015-06-15 02:30:05 +09:00
Yuichi Nishiwaki 015971ffc4 remove define-record-writer 2015-06-15 02:25:09 +09:00
Yuichi Nishiwaki 6c1abe32fe s/registry/register/g 2015-06-15 02:17:27 +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 483edb5708 flush all xFILEs at exit 2015-06-10 22:37:05 +09:00
Yuichi Nishiwaki 191d3067f8 Revert "Revert "remove in-library""
This reverts commit 77d3b0b41e.
2015-06-09 23:02:06 +09:00
Yuichi Nishiwaki 2b1fa0692d fix debug print 2015-06-09 22:49:49 +09:00
Yuichi Nishiwaki cf411fd62a lazy export 2015-06-09 22:36:04 +09:00
Yuichi Nishiwaki 98857c0726 change pic_find_rename interface 2015-06-09 22:26:21 +09:00
Yuichi Nishiwaki 6af9a3ee7d remove pic_warn 2015-06-09 22:13:46 +09:00
Yuichi Nishiwaki 30cbdd5c4f cleanup macro.h 2015-06-09 20:20:56 +09:00
Yuichi Nishiwaki 6af60c9e2b don't use static non-const local variable 2015-06-09 19:19:27 +09:00
Yuichi Nishiwaki 44887cdd0c add make-registry procedure 2015-06-09 18:50:46 +09:00
Yuichi Nishiwaki b983c77767 use registries for parameter table 2015-06-09 18:36:39 +09:00
Yuichi Nishiwaki 111779c39e add pic_reg 2015-06-09 18:31:46 +09:00
Yuichi Nishiwaki 448bbf679d change dictionary interface.
use #undefined object as sentinel
2015-06-09 17:06:19 +09:00
Yuichi Nishiwaki 5185a73cd2 replace none with undef 2015-06-09 16:34:45 +09:00
Yuichi Nishiwaki 084d39cd9e let undefined be public API 2015-06-09 16:19:57 +09:00
Yuichi Nishiwaki 2c9a19acf5 introduce pic_invalid_value 2015-06-09 16:02:23 +09:00
Yuichi Nishiwaki df56a8c154 cleanup 2015-06-08 22:41:43 +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 77d3b0b41e Revert "remove in-library"
This reverts commit 8604e18719.
2015-06-06 13:48:31 +09:00
Yuichi Nishiwaki 8604e18719 remove in-library 2015-06-04 14:17:37 +09:00
Yuichi Nishiwaki 531187bb2a speed up bytecode compilation 2015-06-04 13:53:41 +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 8f891c00c6 fix build 2015-06-02 07:20:47 +09:00