Commit Graph

55 Commits

Author SHA1 Message Date
Andrew Morris
296f24e6af Add const_apply instruction 2023-07-25 17:46:41 +10:00
Andrew Morris
581965e01b Make clippy a happy chappy 2023-07-07 16:08:28 +10:00
Andrew Morris
fcc140c46c Fix throw %!e 2023-07-06 14:27:01 +10:00
Andrew Morris
d217f60967 Add jmpif_not instruction 2023-07-03 09:33:47 +10:00
Andrew Morris
dada0cb779 Extract constants later so that simplify has more information 2023-07-01 17:12:41 +10:00
Andrew Morris
7ad17b73b6 Reduce exception copying 2023-07-01 09:21:47 +10:00
Andrew Morris
f20cbc9a36 Use register for this argument of Apply, SubCall, ThisSubCall 2023-06-30 11:47:18 +10:00
Andrew Morris
a8dbbe63a7 Prefer InternalError over panicking 2023-06-29 09:00:27 +10:00
Andrew Morris
a00a161973 instance_prototype -> prototype 2023-06-23 09:06:01 +10:00
Andrew Morris
a253ccbcea Fix rampant iterator copying 2023-06-22 19:54:30 +10:00
Andrew Morris
fdae0c5ff4 Use take on iter_res 2023-06-22 19:49:54 +10:00
Andrew Morris
7c217dd264 Fix copying on method calls 2023-06-22 18:13:01 +10:00
Andrew Morris
48433d650e Refactor - stop assuming assignment to target_register 2023-06-22 13:08:08 +10:00
Andrew Morris
910f6684f5 Use take for TakeRegister 2023-06-21 17:20:45 +10:00
Andrew Morris
b33ef2b5b0 Remove Vallish, use refs and clones 2023-06-21 17:16:03 +10:00
Andrew Morris
4e91cf3b20 Fix SubMov copying 2023-06-20 14:58:23 +10:00
Andrew Morris
7e16156933 Use &Val for submov key 2023-06-20 14:26:36 +10:00
Andrew Morris
13d782114f Fix return copying 2023-06-20 14:08:08 +10:00
Andrew Morris
0b98f41658 Move Vallish into file 2023-06-20 13:52:20 +10:00
Andrew Morris
6340db8794 Fix subscript copying 2023-06-20 13:50:15 +10:00
Andrew Morris
72191319b2 Make unary ops to &Val 2023-06-20 13:03:16 +10:00
Andrew Morris
97ac17e917 Partially implement yield* 2023-06-01 17:28:31 +10:00
Andrew Morris
5712221cd6 Generators now work 2023-06-01 11:53:36 +10:00
Andrew Morris
76f78eb8ec Add unimplemented yield* instruction 2023-06-01 09:05:55 +10:00
Andrew Morris
ea4571fe82 wip generators 2023-05-31 17:29:11 +10:00
Andrew Morris
12bfe5bf7f Add unimplemented yield instruction 2023-05-31 14:20:45 +10:00
Andrew Morris
7a8b388c69 Allow passing non-inline arrays as parameters 2023-05-30 16:47:17 +10:00
Andrew Morris
af6b90aed9 Fix spreadAndReturn 2023-05-30 15:35:00 +10:00
Andrew Morris
4729d006a3 Handle iterators in CatStackFrame 2023-05-30 14:00:51 +10:00
Andrew Morris
c12a27a1ff Implement cat as stack frame 2023-05-30 12:28:08 +10:00
Andrew Morris
4164f44ece Cat instruction with limited implementation 2023-05-30 11:22:50 +10:00
Andrew Morris
2a789486d6 Fix inc+dec for bigint 2023-05-30 10:43:12 +10:00
Andrew Morris
64caac9254 Implement next, unpack_iter_res, fix iteration.vsm 2023-05-29 13:59:11 +10:00
Andrew Morris
161ed1c6de Add next and unpack_iter_res instructions (unimplemented) 2023-05-29 13:19:04 +10:00
Andrew Morris
ea42e94d5d to_val refactor, remove error macros 2023-05-26 11:54:43 +10:00
Andrew Morris
706fb78442 Add symbols 2023-05-25 13:15:15 +10:00
Andrew Morris
0ee1f473ce this_subcall 2023-04-05 10:31:05 +10:00
Andrew Morris
dc685f5892 require_mutable_this 2023-04-05 10:15:19 +10:00
Andrew Morris
f728509db9 const_subcall, more tests 2023-04-04 13:49:46 +10:00
Andrew Morris
9084677dd4 Track const in stack frames 2023-04-04 09:51:49 +10:00
Andrew Morris
e54abc981f Make native functions const aware 2023-04-04 00:13:04 +10:00
Andrew Morris
45294cec47 Avoid throwing when register is void 2023-03-23 10:30:57 +11:00
Andrew Morris
ad478c0c4b Catch exceptions using .catch_setting 2023-03-23 10:11:10 +11:00
Andrew Morris
0daaf0f650 Implement stack unwinding 2023-03-23 09:57:40 +11:00
Andrew Morris
337c5c5296 Add set_catch, unset_catch instructions 2023-03-23 09:35:33 +11:00
Andrew Morris
feeb0594de Emit type and range errors 2023-03-21 16:44:41 +11:00
Andrew Morris
e657604cbe Error builtin 2023-03-21 16:06:53 +11:00
Andrew Morris
8b535f4f03 Throw instruction 2023-03-21 14:16:23 +11:00
Andrew Morris
cfb72fdbcd Dedupe InstructionByte 2023-03-21 14:00:33 +11:00
Andrew Morris
f75b0c7152 Convert most vm panics into exceptions 2023-03-21 13:45:22 +11:00