Commit Graph

57 Commits

Author SHA1 Message Date
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
8d7fe133f3 Replace run with runLinked, allow modules that don't export functions 2023-03-28 16:56:01 +11: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
a046a8e4fc Fix bigint + type error 2023-03-21 16:47:54 +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
Andrew Morris
a59b577cd3 Make NativeFunction use exceptions (panics not converted though) 2023-03-21 12:07:04 +11:00
Andrew Morris
215139e98b Exceptions for binary ops 2023-03-21 11:14:44 +11:00
Andrew Morris
11b547db15 Set up frame steps for exceptions 2023-03-21 09:51:25 +11:00
Andrew Morris
eaf6280c71 Add Number.EPSILON 2023-03-20 18:51:10 +11:00
Andrew Morris
5b7a64049c Fix codify bigint suffix, adjust readme 2023-03-20 18:29:01 +11:00
Andrew Morris
d2c437a9b6 BigInt 2023-03-20 17:59:07 +11:00
Andrew Morris
44de4a88f4 Allow using isFinite, isNaN, parseFloat, parseInt globally 2023-03-20 14:39:49 +11:00
Andrew Morris
b71bf3a9d1 Array builtin 2023-03-20 14:31:41 +11:00
Andrew Morris
904f230416 inf -> Infinity 2023-03-20 11:43:56 +11:00
Andrew Morris
c3647969e8 Boolean methods 2023-03-20 10:04:18 +11:00
Andrew Morris
07a299c465 Boolean builtin 2023-03-20 09:56:50 +11:00
Andrew Morris
15fc9fa12b Module for builtins 2023-03-20 09:35:35 +11:00
Andrew Morris
58fae267bb Consistent naming 2023-03-20 09:23:52 +11:00
Andrew Morris
358c816fe3 More deduping of builtins, fix todo 2023-03-20 09:20:51 +11:00
Andrew Morris
e168f0370a String(), Number() 2023-03-19 13:54:33 +11:00
Andrew Morris
14983eebea toString, valueOf 2023-03-19 13:39:58 +11:00
Andrew Morris
606b2be84d toExponential, toFixed 2023-03-17 12:58:14 +11:00
Andrew Morris
791e69dcca number_builtin 2023-03-17 01:00:10 +11:00
Andrew Morris
751bf7a30d substring, toLowerCase, toString, toUpperCase, trim, trimEnd, trimStart, valueOf 2023-03-16 23:41:45 +11:00
Andrew Morris
2a489b3264 startsWith 2023-03-15 13:05:29 +11:00
Andrew Morris
efb21c777a split 2023-03-15 11:39:28 +11:00
Andrew Morris
48314c692d slice (string) 2023-03-15 09:21:58 +11:00
Andrew Morris
a9e52e564f repeat 2023-03-14 11:49:58 +11:00
Andrew Morris
f2edd6f866 padEnd, padStart 2023-03-14 09:40:21 +11:00
Andrew Morris
32a2c45115 Add todos for localeCompare, match, matchAll 2023-03-13 21:26:41 +11:00
Andrew Morris
f0d9c996e9 lastIndexOf 2023-03-13 21:18:58 +11:00
Andrew Morris
3f9a52a461 indexOf (string) 2023-03-13 20:36:08 +11:00
Andrew Morris
c3c49f43ee includes 2023-03-13 20:13:37 +11:00
Andrew Morris
4de8f51495 Move comment 2023-03-13 14:28:34 +11:00
Andrew Morris
253b06141c fromCodePoint 2023-03-13 14:25:55 +11:00
Andrew Morris
11e77f36bd endsWith 2023-03-13 14:02:35 +11:00
Andrew Morris
22eb55a915 concat (string) 2023-03-13 13:50:27 +11:00
Andrew Morris
fe730a613a Don't support charAt, charCodeAt 2023-03-13 13:35:07 +11:00
Andrew Morris
d33d93bd34 Improve string indexing, codePointAt 2023-03-13 12:52:33 +11:00