Commit Graph

104 Commits

Author SHA1 Message Date
Stephen Chung
99164ebceb Add custom syntax. 2020-07-09 19:54:28 +08:00
Stephen Chung
4052ad3df1 Assignments return () and no compound assignments. 2020-07-05 23:07:02 +08:00
Stephen Chung
d626bf9f5b Refine no_function feature. 2020-07-04 16:21:15 +08:00
Stephen Chung
aac04a5e53 Remove modules from Scope and use separate stack. 2020-06-27 23:56:24 +08:00
Stephen Chung
175c3ccaec OOP support. 2020-06-26 10:39:18 +08:00
Stephen Chung
58c198776f Code cleanup. 2020-06-25 11:07:46 +08:00
Stephen Chung
7cc1a3f5dc Change Map keys to ImmutableString to facilitate fast keys(). 2020-06-21 16:37:05 +08:00
Stephen Chung
56eb659d5a Unify all functions into CallableFunction type, remove FunctionsLib. 2020-06-05 15:14:42 +08:00
Stephen Chung
b70d38e820 Avoid passing position until error. 2020-06-01 15:25:22 +08:00
Stephen Chung
c6e5f672c9 More benchmarks and examples. 2020-05-31 23:44:49 +08:00
Stephen Chung
13c49387ef Add OptimizationLevel::is_simple 2020-05-31 12:36:31 +08:00
Stephen Chung
2bcc51cc45 Fix bug in index expressions. 2020-05-30 10:27:48 +08:00
Stephen Chung
95e67c48bd Optimize op-assignment statement. 2020-05-25 20:14:31 +08:00
Stephen Chung
99ea2b33c9 Use immutable strings. 2020-05-25 13:44:28 +08:00
Stephen Chung
0374311cf6 Optimize hot path of operators calling. 2020-05-24 16:40:00 +08:00
Stephen Chung
1798d4d6a0 Fix function call optimizations. 2020-05-24 11:57:46 +08:00
Stephen Chung
b49e1e199a Build-in certain common operators. 2020-05-23 18:59:28 +08:00
Stephen Chung
ab76a69b12 Avoid repeating empty TypeId's when calculating hash. 2020-05-19 20:07:51 +08:00
Stephen Chung
3295060dba Unify all functions under CallableFunction type. 2020-05-19 19:03:06 +08:00
Stephen Chung
a22f338b03 Back out NativeCallable trait. 2020-05-19 10:13:37 +08:00
Stephen Chung
8b5550eeb6 Complete StaticVec implementation. 2020-05-17 22:19:49 +08:00
Stephen Chung
a2c50879fe Fix dropping issues with StaticVec and use it everywhere. 2020-05-17 00:24:07 +08:00
Stephen Chung
be97047e51 Limit modules loading. 2020-05-15 21:40:54 +08:00
Stephen Chung
cabceb7498 Better handling of errors during function calls. 2020-05-13 21:58:38 +08:00
Stephen Chung
9d8d074940 Consistent naming of methods. 2020-05-13 20:22:05 +08:00
Stephen Chung
30e5e2f034 Use modules to implement packages. 2020-05-13 19:21:42 +08:00
Stephen Chung
996a54279c Pre-calculate property getter/setter function names. 2020-05-13 10:19:18 +08:00
Stephen Chung
33c9be7efc Reformat. 2020-05-11 23:48:50 +08:00
Stephen Chung
4a8710a4a9 Create NativeCallable trait. 2020-05-11 13:36:50 +08:00
Stephen Chung
8aa0e2ceb4 Use StaticVec to avoid most allocations with function arguments. 2020-05-10 21:25:47 +08:00
Stephen Chung
80debbc432 Refactor. 2020-05-10 00:19:13 +08:00
Stephen Chung
a7bfac21bd Reducing boxing and sizes of Expr/Stmt. 2020-05-09 21:46:38 +08:00
Stephen Chung
79f39bd702 Pre-calculate function call hashes. 2020-05-09 16:15:50 +08:00
Stephen Chung
5f12391ec6 Use hashed lookup for module-qualified functions and variables. 2020-05-08 00:19:08 +08:00
Stephen Chung
c607c7c428 Move Engine functions and iterators lib to Packages API. 2020-05-07 15:25:50 +08:00
Stephen Chung
d75a8bc6cd Make sure all features compile correctly. 2020-05-06 19:45:17 +08:00
Stephen Chung
38e717a838 Build Module type plus engine hooks. 2020-05-05 15:00:10 +08:00
Stephen Chung
143861747d Rename sub-scope/SubScope to module. 2020-05-05 10:39:12 +08:00
Stephen Chung
2bdd174f16 Add import statement. 2020-05-04 19:36:58 +08:00
Stephen Chung
ead9716f6d Add namespacing syntax. 2020-05-04 17:43:54 +08:00
Stephen Chung
d83b829810 Avoid copying arguments for function calls. 2020-05-03 16:54:24 +08:00
Stephen Chung
fc99b981a1 Fix panic when string character index is OOB. 2020-05-01 23:39:55 +08:00
Stephen Chung
c7c7fe3dfc Reduce size of Expr and Stmt by Boxing strings. 2020-05-01 17:32:39 +08:00
Stephen Chung
21c3edb31e Streamline. 2020-04-29 16:11:54 +08:00
Stephen Chung
304c658f89 Use scope offset for variable access. 2020-04-28 23:05:03 +08:00
Stephen Chung
9ad9dd52ab Reduce unnecessary Cow's in Expr. 2020-04-28 19:39:36 +08:00
Stephen Chung
c2bb1f48c2 Reduce size of scope entry. 2020-04-27 21:14:34 +08:00
Stephen Chung
5aaaa7be3b Simplify parsing by expecting the tokens stream will never be exhausted. 2020-04-23 13:24:24 +08:00
Stephen Chung
c69647d9fd Change Dynamic::from_xxx to From<xxx> impl. 2020-04-22 12:12:13 +08:00
Stephen Chung
0a75479637 Refine packages plumbing. 2020-04-21 23:01:10 +08:00