Commit Graph

163 Commits

Author SHA1 Message Date
Stephen Chung
bd5ff457d2 Built-in interop between FLOAT/Decimal and INT. 2021-02-19 11:47:26 +08:00
Stephen Chung
9a9adbefcc Wrap eval errors in ErrorInFunctionCall. 2021-02-18 14:33:12 +08:00
Stephen Chung
909d48caed Provide short-cuts to Decimal calculations. 2021-02-15 17:42:33 +08:00
Stephen Chung
d49581356d Remove duplicated functions lookup for script function call. 2021-02-11 12:13:30 +08:00
Stephen Chung
61638d6566 Use ** for power/exponentiation. 2021-02-10 12:41:27 +08:00
Stephen Chung
58528db45c Encapsulate functions resolution cache into State API. 2021-02-07 17:56:29 +08:00
Stephen Chung
a76bed2f46 Use eval_statements_block when at global. 2021-02-07 17:06:33 +08:00
Stephen Chung
aafff4fb93 Use stacked functions resolution caches to further improve performance. 2021-02-07 15:41:40 +08:00
Stephen Chung
7b87f81850 Add has_override and script calls to function resolution cache. 2021-02-07 15:09:27 +08:00
Stephen Chung
dff124b242 Save functions resolution cache during script call. 2021-02-06 22:16:05 +08:00
Stephen Chung
c5e2620d0f Minor code refactors. 2021-02-03 19:14:26 +08:00
Stephen Chung
3b42cc5bb2 Fix bug where plugin module parameters are consumed. 2021-01-23 09:37:27 +08:00
Stephen Chung
8aae3ac46c Add function name to NativeCallContext. 2021-01-21 21:49:25 +08:00
Stephen Chung
92c7fd9e5b Better error messages. 2021-01-15 17:13:04 +08:00
Stephen Chung
e2a47b2a65 Disallow duplicated function definitions. 2021-01-03 20:54:08 +08:00
Stephen Chung
70a0d6ce58 Make id_raw return Option<&ImmutableString> 2021-01-03 11:25:25 +08:00
Stephen Chung
1bbf473ec7 Add source info to native calls. 2021-01-03 00:20:13 +08:00
Stephen Chung
ef48f47b74 Refine docs and comments etc. 2021-01-02 23:30:10 +08:00
Stephen Chung
ba7f8c6391 Propagate source info. 2020-12-30 21:12:51 +08:00
Stephen Chung
13f5cec291 Fix call stack limits. 2020-12-29 12:29:45 +08:00
Stephen Chung
eca8212f38 More code refinements. 2020-12-29 10:41:20 +08:00
Stephen Chung
e481a8019d Simplify code and better error messages. 2020-12-28 14:21:13 +08:00
Stephen Chung
dc4e52e795 Code enhancements. 2020-12-26 13:05:57 +08:00
Stephen Chung
363085efc3 Map actual 0 hash to 42. 2020-12-24 18:43:04 +08:00
Stephen Chung
8506640073 Use NonZeroU64 for function hashes. 2020-12-24 16:32:43 +08:00
Stephen Chung
15fb03218c Rename packages to global modules. 2020-12-22 23:45:14 +08:00
Stephen Chung
0157f912e0 Remove PackageLibrary and PackagesCollection. 2020-12-22 22:36:30 +08:00
Stephen Chung
206400b187 Fix serde feature. 2020-12-22 15:27:27 +08:00
Stephen Chung
ff67efc6d5 Add source to contexts. 2020-12-21 23:12:45 +08:00
Stephen Chung
5ac83f0f46 Add context source to on_debug. 2020-12-21 22:04:46 +08:00
Stephen Chung
2955a4ab64 Fix unary operators binding. 2020-12-21 17:39:37 +08:00
Stephen Chung
730a7320d6 Run eval with new State. 2020-12-20 23:46:46 +08:00
Stephen Chung
cec27846ea Simplify code. 2020-12-20 23:25:11 +08:00
Stephen Chung
0182b2d3f4 Correct speed claim and others in docs. 2020-12-19 17:46:34 +08:00
Stephen Chung
d73f3a1d60 Add functions lookup cache. 2020-12-18 23:47:17 +08:00
Stephen Chung
db7b9cb0f9 Native only if function call is not a valid identifier. 2020-12-18 23:03:56 +08:00
Stephen Chung
1087c338bd Change output of AST::iter_functions. 2020-12-12 16:31:13 +08:00
Stephen Chung
40b6a014ae Provide Position to debug. 2020-12-12 11:47:18 +08:00
Stephen Chung
5443368359 Pass Position into function calls. 2020-12-12 11:15:09 +08:00
Stephen Chung
7598ec136f Fix feature builds. 2020-12-08 23:09:12 +08:00
Stephen Chung
f22a04fc74 Move constancy into Dynamic. 2020-12-08 22:47:38 +08:00
Stephen Chung
a0979d0c35 Code cleanup 2020-11-25 09:36:06 +08:00
Stephen Chung
739dce72e3 Move if_def_fn into CorePackage. 2020-11-22 15:41:55 +08:00
Stephen Chung
783803ec46 Update comments with links. 2020-11-20 16:52:28 +08:00
Stephen Chung
5e4ede6f07 global_module -> global_namespace. 2020-11-19 13:56:03 +08:00
Stephen Chung
999a87f86e Fix no_optimize build. 2020-11-16 23:32:44 +08:00
Stephen Chung
272c8505b8 Refactor use. 2020-11-16 23:10:14 +08:00
Stephen Chung
d50d48f26f Move definition of Array and Map to lib.rs. 2020-11-16 21:14:32 +08:00
Stephen Chung
adb902326e Reduce feature gates on imports. 2020-11-16 16:28:04 +08:00
Stephen Chung
ef02150afd Expose methods for Engine::register_module. 2020-11-16 14:07:48 +08:00