Commit Graph

141 Commits

Author SHA1 Message Date
Stephen Chung
f62f7908ab Pack Stmt tighter. 2020-10-27 19:23:43 +08:00
Stephen Chung
93b5df6b3c Pack Stmt structure. 2020-10-27 18:18:19 +08:00
Stephen Chung
01663a6581 Refine docs. 2020-10-27 11:30:38 +08:00
Stephen Chung
07bdb824fe Add try-catch. 2020-10-20 23:16:03 +08:00
Stephen Chung
92ba7b42d5 Implement namespaces chain. 2020-10-20 10:54:32 +08:00
Stephen Chung
3c7805d514 Encapsulate environment in ScriptFnDef. 2020-10-13 09:38:14 +08:00
Stephen Chung
612ecc4ebc Move StaticVec definition to lib.rs. 2020-10-10 13:41:55 +08:00
Stephen Chung
95c4ac4180 Fix no_float bug in time. 2020-10-09 13:47:35 +08:00
Stephen Chung
59b380b130 Allow propagation for pushed scope constants. 2020-10-09 13:26:32 +08:00
Stephen Chung
7ede299aae Allow expressions in constants. 2020-10-09 11:15:25 +08:00
Stephen Chung
1272eeb81a Add/remove #[inline] attributes. 2020-10-08 22:25:50 +08:00
Stephen Chung
ae1157a140 Remove Expr::get_constant_str and change Expr::get_constant_value not to panic. 2020-10-06 22:09:26 +08:00
Stephen Chung
b67a743306 Do not eagerly evaluate is_def_fn and is_def_var. 2020-10-05 12:14:34 +08:00
Stephen Chung
29bf790286 Fix no_function build. 2020-10-05 12:09:45 +08:00
Stephen Chung
0d0affd5e9 Eagerly evaluate built-in operators for OptimizationLevel::Simple. 2020-10-05 10:27:31 +08:00
Stephen Chung
03dce86328 Support Dynamic as function default return value. 2020-09-26 16:27:38 +08:00
Stephen Chung
6a53c446d3 Fix no_function build. 2020-09-24 23:32:54 +08:00
Stephen Chung
c4ec93080e New FileModuleResolver. 2020-09-24 22:50:28 +08:00
Stephen Chung
db59aed14e Fix bug in optimizer for if statements with empty true blocks. 2020-09-14 22:24:55 +08:00
Stephen Chung
ae11dbbefe Fix feature flags. 2020-08-05 22:53:01 +08:00
Stephen Chung
4079164bfd Implement closures. 2020-08-03 12:10:20 +08:00
Stephen Chung
60891e694f Streamline code and feature gates. 2020-07-31 22:30:23 +08:00
Stephen Chung
cb005506e2 Simplify function calling. 2020-07-31 12:11:16 +08:00
Stephen Chung
98b294c699 Implement capturing. 2020-07-30 18:18:28 +08:00
Stephen Chung
691e04292f Put externals in ScriptFnDef. 2020-07-30 13:28:06 +08:00
Stephen Chung
1465ba2315 Refactor auto-currying. 2020-07-29 22:43:50 +08:00
Stephen Chung
afbcd0fc0b Replace StaticVec with SmallVec. 2020-07-29 16:10:06 +08:00
Stephen Chung
b63ff56e09 Make sure we keep the starting position of each statement (for future uses). 2020-07-28 10:26:20 +08:00
Stephen Chung
a3a167424b Allow Rust functions in FnPtr::call_dynamic. 2020-07-27 12:52:32 +08:00
Stephen Chung
6b600704a3 Avoid warnings. 2020-07-26 15:53:22 +08:00
Stephen Chung
a58207aaa9 Change ScriptFnDef to use ImmutableString. 2020-07-25 14:06:13 +08:00
Stephen Chung
bff266d4e1 Move function calling to separate source file. 2020-07-23 18:40:42 +08:00
Stephen Chung
61a1355c59 Add no-std example. 2020-07-21 22:32:24 +08:00
Stephen Chung
e6c3f8134d Avoid copying property name for map property access. 2020-07-21 20:59:12 +08:00
Stephen Chung
cf36dc5a57 Support for anonymous functions. 2020-07-19 17:14:55 +08:00
Stephen Chung
8449f8c55e Make API chainable. 2020-07-12 11:46:53 +08:00
Stephen Chung
ebffbf0f98 Refine docs and add custom syntax. 2020-07-10 22:01:47 +08:00
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