Commit Graph

61 Commits

Author SHA1 Message Date
Stephen Chung
e614790897 Enable function pointers even under no_function. 2020-06-30 18:34:58 +08:00
Stephen Chung
d6a08be223 Refactor. 2020-06-29 23:55:28 +08:00
Stephen Chung
063851a6ad Merge branch 'tokenizer' 2020-06-28 15:51:37 +08:00
Stephen Chung
527d41d0e3 No modules in scope. 2020-06-28 15:49:24 +08:00
Stephen Chung
aac04a5e53 Remove modules from Scope and use separate stack. 2020-06-27 23:56:24 +08:00
Stephen Chung
04d2fb5001 Fix no_std. 2020-06-26 23:24:47 +08:00
Stephen Chung
ab347fa14e Add Module::iter_script_fn. 2020-06-26 22:33:27 +08:00
Stephen Chung
58c198776f Code cleanup. 2020-06-25 11:07:46 +08:00
Stephen Chung
ffe0c559be Remove scope parameter from ModuleResolver::resolve. 2020-06-20 21:49:45 +08:00
Stephen Chung
cc57a2344e Fix doc test. 2020-06-20 10:49:15 +08:00
Stephen Chung
35fa61cd4b Do not export fn_native. 2020-06-18 18:39:28 +08:00
Stephen Chung
e095a87ea2 Remove wasm64 target. 2020-06-17 16:49:51 +08:00
Stephen Chung
7f4f737ff2 Gate WASM target. 2020-06-17 09:54:17 +08:00
Stephen Chung
a417bdd8e3 Support registering functions with a reference to the scripting engine. 2020-06-15 21:49:02 +08:00
Stephen Chung
e4cca7620f Better debug formatting for StaticVec. 2020-06-11 22:18:30 +08:00
Stephen Chung
0ac3a7d8b4 Use type alias TokenStream. 2020-06-11 18:13:33 +08:00
Stephen Chung
b4b835f80a Remove unnecessary "sync" feature gates. 2020-06-08 14:10:16 +08:00
Stephen Chung
5f40a1376a Implement index setters. 2020-06-06 13:06:00 +08:00
Stephen Chung
56eb659d5a Unify all functions into CallableFunction type, remove FunctionsLib. 2020-06-05 15:14:42 +08:00
Stephen Chung
cec6748ac6 Remove no_module gates to prepare for plugins. 2020-06-01 10:58:14 +08:00
Stephen Chung
c9de37e8d1 Hash functions only once via custom hasher. 2020-05-31 00:02:23 +08:00
Stephen Chung
666a618e40 Add register getter/setter/indexer to modules. 2020-05-30 10:28:17 +08:00
Stephen Chung
e1242df5c8 Extract copy/restore of first argument in method call. 2020-05-29 18:15:58 +08:00
Stephen Chung
acd4685145 Convert function calls to method calls to use &mut first argument. 2020-05-28 23:57:09 +08:00
Stephen Chung
30782212e4 Add set_fn_4/mut for modules. 2020-05-28 14:07:34 +08:00
Stephen Chung
0374311cf6 Optimize hot path of operators calling. 2020-05-24 16:40:00 +08:00
Stephen Chung
a743c47345 Refactor. 2020-05-22 21:50:24 +08:00
Stephen Chung
80fcc40710 Use function pointers for iterators. 2020-05-20 19:27:23 +08:00
Stephen Chung
4a1fd66b9f Reduce Rc/Arc wrapping for functions. 2020-05-19 22:25:57 +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
5a02548ebc Allocate packages with higher functions capacity. 2020-05-13 19:39:34 +08:00
Stephen Chung
30e5e2f034 Use modules to implement packages. 2020-05-13 19:21:42 +08:00
Stephen Chung
ec67879759 Derive more standard traits. 2020-05-12 18:48:25 +08:00
Stephen Chung
03c64688ad Fix sync feature. 2020-05-12 16:32:22 +08:00
Stephen Chung
33c9be7efc Reformat. 2020-05-11 23:48:50 +08:00
Stephen Chung
414f3d3c23 Fix bug with calling a pure function method-call style. 2020-05-11 18:55:58 +08:00
Stephen Chung
4a8710a4a9 Create NativeCallable trait. 2020-05-11 13:36:50 +08:00
Stephen Chung
314ec5e4d2 Remove checks for number of arguments. 2020-05-11 10:29:33 +08:00
Stephen Chung
80debbc432 Refactor. 2020-05-10 00:19:13 +08:00
Stephen Chung
79f39bd702 Pre-calculate function call hashes. 2020-05-09 16:15:50 +08:00
Stephen Chung
0d20137d6c Implement private modifier for functions. 2020-05-09 11:29:30 +08:00
Stephen Chung
d1de84fdd2 Add comments and fix documentation. 2020-05-09 10:00:59 +08:00
Stephen Chung
e50fcc385f Pre-calculate index for module-qualified calls. 2020-05-08 22:38:56 +08:00