Commit Graph

297 Commits

Author SHA1 Message Date
Andrew Morris
839aff0de3 Allow fallback to pointer for non-constants 2023-07-24 14:36:22 +10:00
Andrew Morris
a72b26a8ba Make compile_expr non-optional 2023-07-24 14:32:59 +10:00
Andrew Morris
ff47617862 Make compile_enum_value and static_eval_expr methods of ModuleCompiler 2023-07-24 14:10:15 +10:00
Andrew Morris
870c9eed2a Simplify diagnostic reporting 2023-07-24 13:58:12 +10:00
Andrew Morris
267a86fb2c Just pass ModuleCompiler to compile_enum_value, static_eval_expr 2023-07-24 11:24:07 +10:00
Andrew Morris
1a12e57435 Use compile-time borrowing of module compiler to simplify fnc, ec 2023-07-24 11:16:38 +10:00
Andrew Morris
e81eb6d1e2 Fix clippy issues 2023-07-24 10:38:46 +10:00
Andrew Morris
d649272a6e Implement exporting constants 2023-07-24 10:26:54 +10:00
Andrew Morris
0f7ab32fce Remove completed TODO 2023-07-24 09:51:50 +10:00
Andrew Morris
bccc43f264 Fix doubleCapture.ts 2023-07-21 17:21:22 +10:00
Andrew Morris
7ce3e4b2bb Fix reverting this in try-catch 2023-07-21 16:52:40 +10:00
Andrew Morris
9536a5fc6e Capture this in arrow functions 2023-07-21 16:38:30 +10:00
Andrew Morris
fd116d06a2 Include this in scope analysis 2023-07-21 15:27:02 +10:00
Andrew Morris
24438aecb7 Implement constants that refer to other constants 2023-07-07 17:46:29 +10:00
Andrew Morris
48fd851fb7 Use ScopeAnalysis in static eval 2023-07-07 17:07:09 +10:00
Andrew Morris
581965e01b Make clippy a happy chappy 2023-07-07 16:08:28 +10:00
Andrew Morris
6c72b32111 Handle undefined as a constant 2023-07-07 14:34:39 +10:00
Andrew Morris
f7cface4cc Support all values as keys in assembly 2023-07-07 11:46:21 +10:00
Andrew Morris
d763e0dd13 Implement enums 2023-07-07 10:49:21 +10:00
Andrew Morris
9552c71109 Take registers on the last pass only, do 3 passes 2023-07-07 00:20:25 +10:00
Andrew Morris
1cbc6fdb09 Simplify just-reg edge case 2023-07-06 23:55:19 +10:00
Andrew Morris
afd0c46495 Avoid making new registers when knowledge is just a register map 2023-07-06 23:48:59 +10:00
Andrew Morris
5a39f7996f Capture registers in knowledge when overwritten 2023-07-06 23:26:05 +10:00
Andrew Morris
06474f38a4 Remove outdated TODO 2023-07-06 22:29:31 +10:00
Andrew Morris
3fc5e62f25 TsTypeAssertion 2023-07-06 22:04:52 +10:00
Andrew Morris
496de4fff2 Mark await as todo instead of not supported 2023-07-06 22:02:32 +10:00
Andrew Morris
46eccda083 Compile seq expressions 2023-07-06 22:01:09 +10:00
Andrew Morris
6615ea79d2 Support more static expressions 2023-07-06 21:52:08 +10:00
Andrew Morris
5a72e7c3bf Support static eval for object literals 2023-07-06 20:33:39 +10:00
Andrew Morris
dce4d50506 Support static eval for array literals 2023-07-06 20:20:20 +10:00
Andrew Morris
c29b6d64ae Don't skip code generation when static eval fails 2023-07-06 20:11:46 +10:00
Andrew Morris
90c276d915 Remove outdated comment 2023-07-06 18:27:09 +10:00
Andrew Morris
2f0db65d30 Fix template string bug 2023-07-06 18:18:19 +10:00
Andrew Morris
2ee11752ad Extract bigint constants, update p25 example 2023-07-06 17:58:28 +10:00
Andrew Morris
385d63374d Implement string.length for Kal 2023-07-06 17:46:17 +10:00
Andrew Morris
5a6d11c980 Implement string indexing for Kal 2023-07-06 17:38:08 +10:00
Andrew Morris
57b3a6b543 Implement typescript param props 2023-07-06 16:30:24 +10:00
Andrew Morris
262ac430f4 Simplify get_pattern_register 2023-07-06 14:17:52 +10:00
Andrew Morris
2952d69698 Fix this params 2023-07-06 14:06:51 +10:00
Andrew Morris
9000487b2f Fix switch tests 2023-07-06 10:27:41 +10:00
Andrew Morris
ced2b3cee6 Implement switch 2023-07-06 10:22:05 +10:00
Andrew Morris
5b7626735d Remove mov where arg and dst are the same 2023-07-05 12:24:45 +10:00
Andrew Morris
70102961c6 Fix test 2023-07-05 12:22:17 +10:00
Andrew Morris
3f63091e07 Use return register when a variable is always returned 2023-07-05 11:44:14 +10:00
Andrew Morris
d38abb7377 Collapse jump to jump 2023-07-04 22:50:13 +10:00
Andrew Morris
063ab365a7 Remove unused registers 2023-07-04 11:01:07 +10:00
Andrew Morris
0366d098c0 Remove redundant ends, fix next_instruction_index 2023-07-03 12:19:51 +10:00
Andrew Morris
07e299614f Simplify jumps 2023-07-03 11:59:04 +10:00
Andrew Morris
eca2cda3d5 Use half indentation for labels 2023-07-03 11:16:34 +10:00
Andrew Morris
9b9b342110 Use 4 space indentation for assembly 2023-07-03 11:15:36 +10:00