Commit Graph

109 Commits

Author SHA1 Message Date
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
98d1488aff CopyCounter 2023-06-20 11:39:42 +10:00
Andrew Morris
d136593fa7 Debug.log multiple params on one line 2023-06-20 10:38:34 +10:00
Andrew Morris
c6b438d776 compile_to_rust_tests 2023-06-16 09:42:46 +10:00
Andrew Morris
1340b80bed Use range more in projEuler 2023-06-04 17:48:33 +10:00
Andrew Morris
97ac17e917 Partially implement yield* 2023-06-01 17:28:31 +10:00
Andrew Morris
9663de9384 Fix factorizeAsPowers 2023-06-01 13:32:37 +10:00
Andrew Morris
5712221cd6 Generators now work 2023-06-01 11:53:36 +10:00
Andrew Morris
95e702b85e Generators make regular calls and regular returns 2023-06-01 11:08:33 +10:00
Andrew Morris
6710d98476 Make placeholder generator finite 2023-06-01 09:44:13 +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
2267226d6b Implement [Symbol.iterator]() for iterators 2023-05-30 09:49:19 +10:00
Andrew Morris
c79e40a1dd Add array.entries() 2023-05-30 09:34:05 +10:00
Andrew Morris
4570aac6e8 Add string iteration 2023-05-29 18:40:02 +10:00
Andrew Morris
79b8523758 Add $SymbolIterator 2023-05-29 14:52:29 +10:00
Andrew Morris
702506d315 Simplify builtins 2023-05-29 14:46:24 +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
e7d008e3c9 Implement ArrayIterator.next 2023-05-29 12:45:38 +10:00
Andrew Morris
4cfcb00e10 custom -> dynamic 2023-05-29 11:09:59 +10:00
Andrew Morris
e40ea540e2 Implement Array.values 2023-05-29 10:36:36 +10:00
Andrew Morris
995c29cea5 ArrayIterator 2023-05-29 09:34:12 +10:00
Andrew Morris
cbc6e1f1da IterationResult, remove as_object_data 2023-05-29 09:12:29 +10:00
Andrew Morris
3b2be89880 Remove next stubs 2023-05-26 18:03:03 +10:00
Andrew Morris
ac868be23c Replace VsPointer with cached decoding 2023-05-26 17:50:35 +10:00
Andrew Morris
4fb30d68be Replace range_error macro 2023-05-26 16:18:51 +10:00
Andrew Morris
1613734325 Simplify native_fn 2023-05-26 16:13:23 +10:00
Andrew Morris
d214e27dc8 BuiltinObject refactor 2023-05-26 15:23:58 +10:00
Andrew Morris
67ba0d9a03 Reduce explicit Val::Static() 2023-05-26 14:25:20 +10:00
Andrew Morris
e0b66ca93f Simplify to_primitive 2023-05-26 14:03:05 +10:00
Andrew Morris
90e8410257 Remove unused code 2023-05-26 13:57:10 +10:00
Andrew Morris
4814329eca Implement to_val_string on Val and avoid conversion when already string 2023-05-26 13:53:27 +10:00
Andrew Morris
bc89575eae Replace val_to_string with to_string (via fmt::Display) 2023-05-26 13:17:31 +10:00
Andrew Morris
3cfe1a6527 Use .pretty() instead of defining Display as pretty version 2023-05-26 12:21:02 +10:00
Andrew Morris
ea42e94d5d to_val refactor, remove error macros 2023-05-26 11:54:43 +10:00
Andrew Morris
35c9699f2b Add stubs for ValTrait.next 2023-05-25 15:19:33 +10:00
Andrew Morris
205f5efa02 Add Symbol builtin 2023-05-25 13:45:38 +10:00
Andrew Morris
706fb78442 Add symbols 2023-05-25 13:15:15 +10:00
Andrew Morris
f0ce1743e7 Integrate step limit into run() instead of separate method 2023-05-24 15:53:47 +10:00