Commit Graph

52 Commits

Author SHA1 Message Date
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
Stephen Chung
eb52bfa28a Add export statement. 2020-05-08 16:49:24 +08:00
Stephen Chung
e0745ef069 Do not build index for multiple packages to avoid Engine creation regression. 2020-05-08 13:27:51 +08:00
Stephen Chung
e6fabe58cc Unify function hash calculations, pre-hash module-qualified function calls. 2020-05-08 11:34:56 +08:00
Stephen Chung
5f12391ec6 Use hashed lookup for module-qualified functions and variables. 2020-05-08 00:19:08 +08:00
Stephen Chung
59eaad1fdf Create module from file. 2020-05-06 22:26:52 +08:00
Stephen Chung
d75a8bc6cd Make sure all features compile correctly. 2020-05-06 19:45:17 +08:00
Stephen Chung
88fec57394 Make module_resolver optional and remove NullModuleResolver. 2020-05-06 16:09:44 +08:00
Stephen Chung
82e1af7acd Implement module resolvers. 2020-05-05 23:57:25 +08:00
Stephen Chung
aae9e43109 Implement module-qualified functions. 2020-05-05 17:51:40 +08:00