Commit Graph

111 Commits

Author SHA1 Message Date
Yuichi Nishiwaki 4fea9169cc error when argument of apply is not a proper list 2013-11-11 08:01:08 +09:00
Yuichi Nishiwaki fd3300f9db emit int result in int-int division if possible 2013-11-09 16:32:13 +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 84c1156b9d add unary minus operator 2013-11-07 12:17:37 +09:00
Yuichi Nishiwaki 9bba0353e8 add some bytevector primitives 2013-11-04 22:58:16 -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 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
Yuichi Nishiwaki 86458359e3 reduce allocation size when creating pic_env object in OP_CALL 2013-11-04 20:23:06 -05:00
Yuichi Nishiwaki d0602303e3 s/num_val/valuec/g 2013-11-04 16:07:36 -05:00
Yuichi Nishiwaki 346b159e7e add some debug prints 2013-11-01 19:02:46 +09:00
Yuichi Nishiwaki 1f0d096ed6 protect return values from gc at the end of VM 2013-11-01 18:56:17 +09:00
Yuichi Nishiwaki 8007baf011 [bugfix] allocate space to hold closed rest args variable in pic_env 2013-11-01 18:55:23 +09:00
Yuichi Nishiwaki 75667d7649 [bugfix] push nil_value even if ci->argc equals varg proc's argc 2013-11-01 15:09:20 +09:00
Yuichi Nishiwaki 5a7b19b348 save each opcode currently fetched into 'c' 2013-11-01 14:44:26 +09:00
Yuichi Nishiwaki abd5bc9216 fix a bug introded in prev prev commit 2013-10-30 15:40:40 +09:00
Yuichi Nishiwaki d4001a70ae VM works with procs not terminated with OP_STOP 2013-10-30 15:36:28 +09:00
Yuichi Nishiwaki 76ec63d1ca adjust callinfo when OP_STOP 2013-10-30 10:05:47 +09:00
Yuichi Nishiwaki 9bc172bde5 add stack underflow detector 2013-10-30 10:05:21 +09:00
Yuichi Nishiwaki e4b913cb15 add OP_TAILCALL 2013-10-30 10:03:46 +09:00
Yuichi Nishiwaki 35bbd66812 fix gc bug: ci->env and env-up are nullable 2013-10-29 16:39:57 +09:00
Yuichi Nishiwaki 49072bf5e4 [bugfix] fix closure issue 2013-10-29 10:16:56 +09:00
Yuichi Nishiwaki 9a20b50fc5 [vm] take care of int overflow 2013-10-28 21:26:39 +09:00
Yuichi Nishiwaki 4fa2bad5fa add pic_apply function (and remove pic_run) 2013-10-28 17:45:13 +09:00
Yuichi Nishiwaki c77b8be011 insert type checks in pic_get_args 2013-10-28 00:40:10 +09:00
Yuichi Nishiwaki 5133e04c39 bugfix in pic_get_args 2013-10-28 00:33:24 +09:00
Yuichi Nishiwaki 350f4d1abd [bugfix] support 'I' format in pic_get_args 2013-10-28 00:24:51 +09:00
Yuichi Nishiwaki d3df6dcbf2 support exact integer 2013-10-28 00:21:24 +09:00
Yuichi Nishiwaki f3041b7ebc support rest arguments 2013-10-27 18:13:36 +09:00
Yuichi Nishiwaki 9cb28f3156 add OP_EQ/OP_LT/OP_LE 2013-10-24 21:10:13 +09:00
Yuichi Nishiwaki 2732a5a4ec inti env->value with undef objects 2013-10-24 20:53:27 +09:00
Yuichi Nishiwaki 411395995c s/env.numcv/env.num_val/g 2013-10-24 03:41:48 +09:00
Yuichi Nishiwaki a926c54be3 warn invalid application 2013-10-24 03:38:29 +09:00
Yuichi Nishiwaki d75b624b4a add OP_LSET and OP_CSET 2013-10-24 03:14:32 +09:00
Yuichi Nishiwaki 337b54dc40 initial closure support 2013-10-24 02:51:02 +09:00
Yuichi Nishiwaki 4b31901bce add OP_CREF 2013-10-24 02:04:49 +09:00
Yuichi Nishiwaki bd851318d1 add pic_env struct 2013-10-24 02:02:07 +09:00
Yuichi Nishiwaki 0fd1bbeae9 throw wrong number of arguments error for user defined lambda call 2013-10-24 00:09:40 +09:00
Yuichi Nishiwaki 035de0016b evaluate arguments in normal (lexical) order 2013-10-23 15:55:42 +09:00
Yuichi Nishiwaki d12ed0a139 rename pic_scope -> codegen_scope 2013-10-23 15:52:14 +09:00
Yuichi Nishiwaki 828606aed5 throw an error when finding invalid argument specifier 2013-10-22 17:44:47 +09:00
Yuichi Nishiwaki d696339577 [bugfix] pic_get_args should ignore optional args when i > argc 2013-10-22 17:23:21 +09:00
Yuichi Nishiwaki 114d6b708b since pic_string is a first-class value, move it to value.h 2013-10-21 17:38:05 +09:00
Yuichi Nishiwaki f5154625ba add aux object field to proc object 2013-10-21 17:35:14 +09:00
Yuichi Nishiwaki 86177b7c4e pic_get_args supports optional argument 2013-10-21 13:57:02 +09:00
Yuichi Nishiwaki b02f81760c pic_get_args supports strings 2013-10-21 11:42:21 +09:00
Yuichi Nishiwaki a49675c322 add OP_PUSHCONST 2013-10-21 09:29:56 +09:00