Commit Graph

740 Commits

Author SHA1 Message Date
Stephen Chung
3557db88e8 Merge empty strings. 2021-09-26 21:18:52 +08:00
Stephen Chung
d791052d5c Add Engine::on_parse_token. 2021-09-24 18:00:48 +08:00
Stephen Chung
96dbbc76e4 Use StaticVec for function resolution caches for the common case where no modules are used. 2021-09-12 13:33:55 +08:00
Stephen Chung
6510b617fe Reduce usage of Default::default() 2021-09-11 19:40:40 +08:00
Stephen Chung
84be799403 Change StaticVec to 3 inline elements. 2021-09-10 20:25:22 +08:00
Stephen Chung
43de522568 Use option flags for certain AST nodes. 2021-09-10 20:23:59 +08:00
Stephen Chung
6faa6358f0 Simplify code by merging Engine::global_namespace with Engine::global_modules. 2021-08-30 10:09:28 +08:00
Stephen Chung
aec4417bd5 Refine expect messages. 2021-08-26 23:58:41 +08:00
Stephen Chung
3610b5eb7e Change some inline(always) into inline. 2021-08-14 15:10:37 +08:00
Stephen Chung
dba4510456 Better function parameter names. 2021-08-13 13:42:39 +08:00
Stephen Chung
9b56c1ba78 Optimize loops better. 2021-08-04 17:40:26 +08:00
Stephen Chung
81770f00e0 Rename variables and constants for bit flags. 2021-08-04 11:16:11 +08:00
Stephen Chung
1d82a11f0b Change AST nodes to use bitflags for options. 2021-08-03 22:19:25 +08:00
Stephen Chung
0944261b88 Merge Stmt::Let and Stmt::Const into Stmt::Var. 2021-08-01 11:59:53 +08:00
Stephen Chung
2c50738c6c Change field names of EvalState. 2021-07-26 10:03:46 +08:00
Stephen Chung
c7498503ba Use lower case for feature marker. 2021-07-25 22:56:05 +08:00
Stephen Chung
df482d3574 Satisfy clippy. 2021-07-24 14:11:16 +08:00
Stephen Chung
b8485b1909 Fix bug in indexing. 2021-07-24 12:27:33 +08:00
Stephen Chung
e0673a2f1a Change some #[inline(always)] to [#inline]. 2021-07-10 11:06:13 +08:00
Stephen Chung
4adc044c79 Fix builds. 2021-07-04 16:51:05 +08:00
Stephen Chung
694ac5b5bd General code fixups. 2021-07-04 16:40:15 +08:00
Stephen Chung
23cc48f937 Implement standard traits for Imports. 2021-07-04 16:33:26 +08:00
Stephen Chung
fc0256aff9 Refine ChainArgument. 2021-06-30 10:13:45 +08:00
Stephen Chung
c87645ba77 Fix unchecked build. 2021-06-29 23:29:05 +08:00
Stephen Chung
fc349f67f8 Make more functions const. 2021-06-29 23:17:31 +08:00
Stephen Chung
0346bb874b Make Expr::position const. 2021-06-29 18:41:03 +08:00
Stephen Chung
4143ef1e3f Simplify Engine creation. 2021-06-29 17:47:31 +08:00
Stephen Chung
27c126d2f0 Make on_print/on_debug Option. 2021-06-29 17:42:03 +08:00
Stephen Chung
8f4a582f88 Remove free list of empty function resolution caches. 2021-06-28 22:06:46 +08:00
Stephen Chung
2342777a13 Iterator reference parameters. 2021-06-21 19:12:28 +08:00
Stephen Chung
425e038f4b Split FnPtr into own file. 2021-06-17 09:50:32 +08:00
Stephen Chung
a9ed434c73 Refine error position for missing indexer. 2021-06-16 19:45:45 +08:00
Stephen Chung
42a14ab4cc Make file structures consistent. 2021-06-16 18:36:33 +08:00
Stephen Chung
aa2e04bd25 Simplify Expr::Export. 2021-06-16 16:35:56 +08:00
Stephen Chung
0a857e6944 Remove position for catch keyword. 2021-06-16 16:15:29 +08:00
Stephen Chung
743d48f44f Code style cleanup. 2021-06-13 17:41:34 +08:00
Stephen Chung
8ca24059b1 Add #[must_use] 2021-06-12 22:47:43 +08:00
Stephen Chung
68ea8c27fd Fix unchecked.
Do not duplicate data size checking.
2021-06-12 10:26:50 +08:00
Stephen Chung
f9dcfeb1ad Check data size after assignments. 2021-06-11 19:59:50 +08:00
Stephen Chung
c3eb6d65f6 Refine Target variant names. 2021-06-08 23:40:21 +08:00
Stephen Chung
ae9f4b5b71 Remove collect() with exact sizes. 2021-06-08 15:48:55 +08:00
Stephen Chung
2c21928f67 Simplify constant function call arguments. 2021-06-08 14:46:49 +08:00
Stephen Chung
1e66f1963a Add counter variable to for statement. 2021-06-07 11:01:16 +08:00
Stephen Chung
99e06abd94 Fix test. 2021-06-02 15:18:09 +08:00
Stephen Chung
4cf6550fc6 Fix tests. 2021-06-02 15:05:33 +08:00
Stephen Chung
71684f5e2a Implement bit-fields. 2021-06-02 14:29:18 +08:00
Stephen Chung
76bd48d0a6 Code style refinements. 2021-05-29 18:33:29 +08:00
Stephen Chung
dfea3ed22a Code style refactor. 2021-05-25 10:54:48 +08:00
Stephen Chung
cc3e2d79a5 Replace unwrap with expect. 2021-05-22 19:14:24 +08:00
Stephen Chung
1545b602a7 Streamline hashing function. 2021-05-19 20:26:11 +08:00
Stephen Chung
2ade56fd94 Fix no_index build. 2021-05-18 21:38:09 +08:00
Stephen Chung
dc9b4d7f4d Indexer as fallback to property. 2021-05-18 20:12:30 +08:00
Stephen Chung
3116a39331 Minor code refactor. 2021-05-18 12:24:11 +08:00
Stephen Chung
941e09d29d Guard against setters mutating constants, and allow pure setters. 2021-05-15 11:41:42 +08:00
Stephen Chung
d230f448c0 Add no_smartstring to disable using SmartString. 2021-05-08 22:59:33 +08:00
Stephen Chung
c749bbb653 Reduce BTree sizes by boxing values. 2021-05-03 13:45:41 +08:00
Stephen Chung
aad842fe50 Remove Engine::enable_doc_comments. 2021-05-03 13:07:51 +08:00
Stephen Chung
bb5dc7b637 Add tag to Dynamic. 2021-05-02 23:57:35 +08:00
Stephen Chung
b091113334 Eliminate unnecessary data structures. 2021-04-27 22:28:01 +08:00
Stephen Chung
a5d4a0abb9 Disable on_progress with unchecked. 2021-04-25 15:27:58 +08:00
Stephen Chung
c82a47ac26 Unchecked index access. 2021-04-24 14:47:20 +08:00
Stephen Chung
61b559a58f Refine op-assignment. 2021-04-24 11:55:40 +08:00
Stephen Chung
fc782c5563 Refine posistion display. 2021-04-23 14:24:53 +08:00
Stephen Chung
a54fbb32ff Add no_position feature. 2021-04-22 23:02:25 +08:00
Stephen Chung
fe37edd123 Add Stmt::FnCall. 2021-04-21 18:16:24 +08:00
Stephen Chung
cc546fcaab Add version to repl. 2021-04-21 17:39:45 +08:00
Stephen Chung
815f7ba09e Remove Expr::FnPointer. 2021-04-20 23:40:52 +08:00
Stephen Chung
ce384d8bb0 Change FnPtr to SmartString. 2021-04-20 23:28:04 +08:00
Stephen Chung
8f1bff2ded Change hash to hashes. 2021-04-20 22:26:08 +08:00
Stephen Chung
bd145bd080 Do not unnecessarily reindex module. 2021-04-17 22:19:48 +08:00
Stephen Chung
eefdc09352 Allow shadowing of global. 2021-04-17 18:40:16 +08:00
Stephen Chung
9a8da93145 Delay creation of global module until actually needed. 2021-04-17 18:10:57 +08:00
Stephen Chung
1be7e60be2 Automatic global module. 2021-04-17 17:25:35 +08:00
Stephen Chung
01f0cc028b Use no-std-compat to build no-std. 2021-04-17 15:15:54 +08:00
Stephen Chung
199df9aa4a Use deref for Target. 2021-04-17 13:36:51 +08:00
Stephen Chung
6c92011ea1 Hide is_shared and is_locked under feature gates. 2021-04-17 12:03:29 +08:00
Stephen Chung
1f987ec61a Streamine StmtBlock. 2021-04-16 13:15:11 +08:00
Stephen Chung
980a13ca42 Add switch case conditions. 2021-04-16 12:04:33 +08:00
Stephen Chung
40fda5139d Support negative index counting from end. 2021-04-10 15:00:03 +08:00
Stephen Chung
4aaf957d73 Gate doc-comment tokenizing. 2021-04-09 23:13:33 +08:00
Stephen Chung
f17a826f99 Refine debug print-out. 2021-04-06 23:18:41 +08:00
Stephen Chung
d3cfb3c605 Optimize position in variable access. 2021-04-05 23:59:15 +08:00
Stephen Chung
94fc5af285 Store short index in variable access. 2021-04-05 23:06:48 +08:00
Stephen Chung
a3ee0f4245 Fix no_index build. 2021-04-05 18:32:20 +08:00
Stephen Chung
e6c878edf3 Implement string interpolation. 2021-04-04 13:13:07 +08:00
Stephen Chung
b089d5b8f4 Fix bug in property setter op-assignment. 2021-04-03 11:12:35 +08:00
Stephen Chung
a738f750f9 Implement string functions with to_string/to_debug. 2021-04-02 19:26:55 +08:00
Stephen Chung
889edbef71 Allow cross-loading of relative file paths in FileModuleResolver. 2021-04-02 12:34:39 +08:00
Stephen Chung
98afb2e7d6 Fix feature builds. 2021-03-31 10:16:38 +08:00
Stephen Chung
a049f7b5ba Optimize data structures. 2021-03-30 23:55:29 +08:00
Stephen Chung
e306a92ea0 Change Map keys to Identifier. 2021-03-29 17:14:22 +08:00
Stephen Chung
e5249cc1ae Extract Identifier type. 2021-03-29 11:36:02 +08:00
Stephen Chung
7bdc2e3d20 Extract constant arguments from function calls. 2021-03-28 19:04:25 +08:00
Stephen Chung
c4fe1782df Streamline string handling. 2021-03-24 13:17:52 +08:00
Stephen Chung
3d0d5d1708 Streamline code. 2021-03-24 10:02:50 +08:00
Stephen Chung
0d7f2c16cc Reduce indirections. 2021-03-23 20:04:54 +08:00
Stephen Chung
f9429c06f9 Use template for object map literal. 2021-03-23 18:25:40 +08:00
Stephen Chung
f70225ca1d Change HashMap to BTreeMap. 2021-03-23 12:13:53 +08:00
Stephen Chung
a82f0fc738 Allow non-Dynamic in return_raw. 2021-03-22 11:18:09 +08:00
Stephen Chung
6667a22c0c Code style and docs. 2021-03-17 13:30:47 +08:00