Commit Graph

  • 7d58ba3c34 Use self.frame instead of top of stack Andrew Morris 2022-05-27 13:18:01 +10:00
  • cf4e95456e Add unimplemented new instruction Andrew Morris 2022-05-27 12:46:48 +10:00
  • d978dd8004 Add placeholder names at top-level to ignore list Andrew Morris 2022-05-27 12:05:55 +10:00
  • 00729d0334 Use trunc instead of signum+abs+floor Andrew Morris 2022-05-22 21:43:15 +10:00
  • d1cfbd9dfe Add math functions Andrew Morris 2022-05-22 21:37:19 +10:00
  • 1075f23906 Add stubs for math functions Andrew Morris 2022-05-22 21:14:40 +10:00
  • 980466b9d7 Add more math constants Andrew Morris 2022-05-22 20:59:32 +10:00
  • 9a1f0cc931 Add builtins, Math.E Andrew Morris 2022-05-22 20:56:06 +10:00
  • 0cb891b8c4 Use direct impl instead of trait Andrew Morris 2022-05-22 19:47:38 +10:00
  • e65b366f8e Remove completed TODO Andrew Morris 2022-05-22 16:22:37 +10:00
  • 141cf92bb4 Enable method calls on non-lvalues Andrew Morris 2022-05-22 16:18:11 +10:00
  • c7c9913444 Array.prototype.splice Andrew Morris 2022-05-22 16:00:57 +10:00
  • 921f13452a toString Andrew Morris 2022-05-22 12:34:12 +10:00
  • 2cc7ea317d sort (without custom comparison fn) Andrew Morris 2022-05-22 12:29:21 +10:00
  • 691a3258e2 slice Andrew Morris 2022-05-22 12:15:17 +10:00
  • f48b7abb5f reverse Andrew Morris 2022-05-22 12:03:02 +10:00
  • d2873abda9 lastIndexOf Andrew Morris 2022-05-22 11:51:22 +10:00
  • d40e9e3733 indexOf, join Andrew Morris 2022-05-22 11:49:08 +10:00
  • a5d0e2a46f Fix undefined elements in array toString Andrew Morris 2022-05-22 11:39:16 +10:00
  • 8a97ad7c38 Add stubs for remaining array methods Andrew Morris 2022-05-22 11:26:44 +10:00
  • cc6f7f4eb6 Alphabetize array methods Andrew Morris 2022-05-21 18:09:53 +10:00
  • 8706929c25 Array.prototype.flat (without depth param) Andrew Morris 2022-05-21 18:07:37 +10:00
  • b7d5d66a7c Array.prototype.fill Andrew Morris 2022-05-21 17:53:44 +10:00
  • 5056dc89f5 Fix index clamping for copyWithin Andrew Morris 2022-05-21 17:47:32 +10:00
  • 3dc2eb7d8b Fix copyWithin Andrew Morris 2022-05-21 17:29:54 +10:00
  • 55e75669f7 wip Array.prototype.copyWithin Andrew Morris 2022-05-21 15:57:18 +10:00
  • 26f0180ede Array.prototype.concat Andrew Morris 2022-05-21 14:54:42 +10:00
  • 778c4204c4 Add tsconfig to improve intellisense Andrew Morris 2022-05-21 14:53:21 +10:00
  • 5880318caf Array.prototype.at Andrew Morris 2022-05-21 14:38:24 +10:00
  • 55191fb43c Implement array's .length Andrew Morris 2022-05-21 14:21:01 +10:00
  • fcd12b9b96 Add class-like examples Andrew Morris 2022-05-21 14:14:10 +10:00
  • fe7fb346e0 Ignore type aliases Andrew Morris 2022-05-21 14:13:07 +10:00
  • 474e1047b2 Fix target access on method calls Andrew Morris 2022-05-21 14:12:59 +10:00
  • 587d6da4e8 Use 16-bit pointers in the bytecode Andrew Morris 2022-05-21 14:12:36 +10:00
  • 99db7d6c0a Fix return and undefined bugs in capture finder Andrew Morris 2022-05-21 14:11:56 +10:00
  • 1d3d341183 Fix this parameter for ordinary functions Andrew Morris 2022-05-20 17:03:01 +10:00
  • 01470f484f unshift, pop, shift Andrew Morris 2022-05-20 17:02:48 +10:00
  • 007618f417 Array.prototype.includes Andrew Morris 2022-05-20 16:48:19 +10:00
  • e663f1c077 Improve debug printing Andrew Morris 2022-05-20 16:19:30 +10:00
  • 00b7c56053 Compile method calls Andrew Morris 2022-05-20 15:19:36 +10:00
  • 5f3875ff4d Implement subcall instruction Andrew Morris 2022-05-20 14:46:07 +10:00
  • b756605d5d Implement .push (in theory 😅) Andrew Morris 2022-05-20 11:54:43 +10:00
  • 0a0c3e98d3 Add native_function Andrew Morris 2022-05-20 11:28:38 +10:00
  • ca5ef43ee2 Add array prototype Andrew Morris 2022-05-20 10:54:05 +10:00
  • b5989a8137 Add static system Andrew Morris 2022-05-20 10:22:38 +10:00
  • 6a3b62dec0 Introduce VsArray with object fallback Andrew Morris 2022-05-20 10:06:48 +10:00
  • 4a31e11811 Fallback to prototype when subscripting object Andrew Morris 2022-05-20 09:39:48 +10:00
  • fcc8c55b38 Introduce VsObject Andrew Morris 2022-05-20 09:32:07 +10:00
  • 2a456145f1 Fix failing input Andrew Morris 2022-05-20 08:54:19 +10:00
  • 51a4f5bebe Add failing input Andrew Morris 2022-05-20 08:44:01 +10:00
  • 18d2335fae Implement template literals Andrew Morris 2022-05-19 10:14:43 +10:00
  • db8044e4d3 Add more inputs Andrew Morris 2022-05-19 09:39:15 +10:00
  • 59f0fb530f Move several concepts into inputs and add failing case Andrew Morris 2022-05-19 09:04:55 +10:00
  • 6c87d901fa Implement closures for function declarations Andrew Morris 2022-05-18 22:03:24 +10:00
  • 81241481e6 Closures! Andrew Morris 2022-05-18 20:05:55 +10:00
  • 3e6a2adbc6 Set up native functions Andrew Morris 2022-05-18 09:54:15 +10:00
  • a714c2894d Allow assigning past the end of an array Andrew Morris 2022-05-16 14:57:11 +10:00
  • 944dc45fbd Implement target access for assign expressions Andrew Morris 2022-05-16 14:51:39 +10:00
  • 1f19a673bc Add missing recursive packup call Andrew Morris 2022-05-16 12:12:44 +10:00
  • bfbf5f943c Implement TargetAccessor and use with update_expression Andrew Morris 2022-05-16 12:08:11 +10:00
  • 271f1ca032 Fix void's val_to_string Andrew Morris 2022-05-16 10:13:51 +10:00
  • 6c17442dc9 Fix to_string -> val_to_string Andrew Morris 2022-05-16 10:12:24 +10:00
  • b940f22040 Enable voids in bytecode Andrew Morris 2022-05-16 10:11:19 +10:00
  • 4e712a28b1 Implement submov Andrew Morris 2022-05-16 10:02:26 +10:00
  • 84c20f0cc3 Implement break and continue Andrew Morris 2022-05-15 20:58:29 +10:00
  • a4ced15d61 Implement update expressions Andrew Morris 2022-05-15 16:22:52 +10:00
  • cf7aed1a1a Implement compound assignment Andrew Morris 2022-05-15 15:49:06 +10:00
  • 1b550f1200 Simplify assign using inline Andrew Morris 2022-05-15 15:00:17 +10:00
  • 779e194c6c Update cargo files Andrew Morris 2022-05-14 11:54:29 +10:00
  • 37d9e76f48 Implement function expressions Andrew Morris 2022-05-14 11:54:11 +10:00
  • ff76b4083a Give ExpressionCompiler reference to FunctionCompiler Andrew Morris 2022-05-14 11:43:04 +10:00
  • d6670a0e3f Split out function_compiler Andrew Morris 2022-05-14 11:38:29 +10:00
  • 2c500c0bf2 Implement nested non-capturing functions Andrew Morris 2022-05-14 11:31:50 +10:00
  • 569c13b804 Set up queuing for nested functions Andrew Morris 2022-05-14 10:58:14 +10:00
  • 7db1ccbf46 Implement member expressions Andrew Morris 2022-05-13 17:45:44 +10:00
  • 2a82503b5c More 'concept' code Andrew Morris 2022-05-13 17:21:09 +10:00
  • e5acdb72d2 Implement for loops Andrew Morris 2022-05-13 17:02:35 +10:00
  • 98dde289d9 Implement do while loops Andrew Morris 2022-05-13 12:44:22 +10:00
  • ddda271cb8 Split out expression_compiler Andrew Morris 2022-05-13 12:30:36 +10:00
  • d3aa4ed4fa Split out name_allocator Andrew Morris 2022-05-13 12:12:46 +10:00
  • 2079053642 Split out scope Andrew Morris 2022-05-13 12:10:08 +10:00
  • ed8fc7090d Implement while loops Andrew Morris 2022-05-13 12:05:34 +10:00
  • f184636c48 Implement object expressions Andrew Morris 2022-05-13 11:41:53 +10:00
  • 69616b7769 Fix array assembling bug Andrew Morris 2022-05-13 10:32:59 +10:00
  • c284cc3823 Compile array expressions Andrew Morris 2022-05-13 10:20:02 +10:00
  • ae22a5b542 Fill in scope cases where nothing needs to be done Andrew Morris 2022-05-13 09:44:48 +10:00
  • 3d907703c0 Fix name reallocation bug and release the cond register Andrew Morris 2022-05-12 17:22:11 +10:00
  • bdc92adb02 Implement if/else Andrew Morris 2022-05-12 17:11:10 +10:00
  • 95a1168bd6 Implement block statements Andrew Morris 2022-05-12 16:24:32 +10:00
  • 589d48a2e2 Refactor scope population, implement nested vars being at function level Andrew Morris 2022-05-12 13:56:30 +10:00
  • 987b71e4a5 Panic when overwriting scope name Andrew Morris 2022-05-12 13:18:11 +10:00
  • d316ecb2b9 Split out compile_fn Andrew Morris 2022-05-12 13:14:43 +10:00
  • 9d3d179ffe Separate out function for compiling statements Andrew Morris 2022-05-12 13:07:31 +10:00
  • 49268e74c6 Refactor: separate FunctionCompiler struct Andrew Morris 2022-05-12 13:03:02 +10:00
  • 8b01ed9b4a Fix trailing whitespace Andrew Morris 2022-05-12 12:36:15 +10:00
  • a4364e71a9 Fix main export naming/scoping issue Andrew Morris 2022-05-12 12:26:22 +10:00
  • 15bcfc90b5 Implement call expressions Andrew Morris 2022-05-12 12:08:33 +10:00
  • a455930e58 Pass command line arguments to main function Andrew Morris 2022-05-12 11:16:05 +10:00
  • 9945676d46 Remove buggy available_register pattern Andrew Morris 2022-05-12 10:50:57 +10:00
  • 1658c19c1d Compile expression statements Andrew Morris 2022-05-12 10:16:41 +10:00