Commit Graph

171 Commits

Author SHA1 Message Date
Stephen Chung
c919ee4e46 Fine tune hash map sizes. 2020-11-15 13:49:54 +08:00
Stephen Chung
bde8917ed4 Set capacity of hash maps. 2020-11-15 12:07:35 +08:00
Stephen Chung
a63f14b59c Expr::Switch -> Stmt::Switch. 2020-11-14 23:43:36 +08:00
Stephen Chung
0182117759 Change Stmt Variant names. 2020-11-14 22:55:23 +08:00
Stephen Chung
28de155f08 Add Expr::DynamicConstant. 2020-11-14 19:04:49 +08:00
Stephen Chung
55b4907f19 Add switch expression. 2020-11-13 18:32:18 +08:00
Stephen Chung
7d1b971b39 More interned strings. 2020-11-13 10:43:54 +08:00
Stephen Chung
41c815f355 Optimize in-place. 2020-11-12 12:37:42 +08:00
Stephen Chung
958762079e Change modules to namespace. 2020-11-10 23:26:50 +08:00
Stephen Chung
e69444293c Encapsulate imported modules into AST. 2020-11-09 21:52:23 +08:00
Stephen Chung
4b622a8830 Enable export let/export const short-hand. 2020-11-09 12:21:11 +08:00
Stephen Chung
b3d318ef7f Module resolver returns shared module. 2020-11-07 23:33:21 +08:00
Stephen Chung
07a8a43298 Optimize data structures. 2020-11-06 16:27:40 +08:00
Stephen Chung
b390586bcc Fix optimization of Stmt::Expr. 2020-11-04 13:11:37 +08:00
Stephen Chung
c287a61b93 Streamline ScriptFnDef. 2020-11-04 12:34:54 +08:00
Stephen Chung
2168fd5361 Expr::Stmt takes a statements block. 2020-11-04 11:49:02 +08:00
Stephen Chung
f74d947c6b Fix constant assignment. 2020-11-03 13:08:19 +08:00
Stephen Chung
b9de8eaa7f Minor code refactor. 2020-11-02 23:54:19 +08:00
Stephen Chung
cc304ba513 Fix serde build. 2020-11-02 13:18:37 +08:00
Stephen Chung
d7d6f74dfd Add constant NO_POS. 2020-11-02 12:50:27 +08:00
Stephen Chung
717e8e7eee Remove unnecessary clone. 2020-11-01 22:55:19 +08:00
Stephen Chung
c55fc5a9a5 Optimize Scope. 2020-11-01 22:46:46 +08:00
Stephen Chung
42eac410b7 Optimize Expr. 2020-10-31 23:26:21 +08:00
Stephen Chung
89811c8dfc Pack Stmt and Expr some more. 2020-10-31 14:13:45 +08:00
Stephen Chung
4e115d2bc2 Code structure refactor. 2020-10-29 11:37:51 +08:00
Stephen Chung
f5ffbfbe06 Code structure cleanup. 2020-10-28 22:18:44 +08:00
Stephen Chung
f56c3fe9cb Add Ident/IdentX to AST. 2020-10-28 19:11:17 +08:00
Stephen Chung
00b1051732 Optimize Stmt/Expr reflections. 2020-10-28 14:10:48 +08:00
Stephen Chung
51fca1e757 Move Assignment to Stmt. 2020-10-27 23:21:20 +08:00
Stephen Chung
fd2ba54b49 Introduce BinaryExpr. 2020-10-27 23:00:05 +08:00
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