Commit Graph

195 Commits

Author SHA1 Message Date
Stephen Chung
a251219730 Remove public Dynamic::as_str. 2021-03-05 23:00:27 +08:00
Stephen Chung
65ef32af19 Calculate whether contains global functions during indexing. 2021-03-05 20:07:35 +08:00
Stephen Chung
0589572d19 Refine inlining. 2021-03-04 18:13:47 +08:00
Stephen Chung
ade290da7e Simplify lifetimes. 2021-03-03 22:49:57 +08:00
Stephen Chung
7262d63909 Move default comparisons into builtin. 2021-03-02 23:08:54 +08:00
Stephen Chung
5b1f80f5ce Store negative result from has_override to function resolution cache. 2021-03-02 22:31:07 +08:00
Stephen Chung
e3e53bd399 Introduce RhaiResult. 2021-03-02 15:02:28 +08:00
Stephen Chung
521c8fad27 Streamline ref object backup. 2021-03-02 14:44:21 +08:00
Stephen Chung
b76e8da5ee Cache built-in functions to improve resolution speed. 2021-03-02 13:48:41 +08:00
Stephen Chung
67d277aa21 Disallow overriding keywords. 2021-03-01 22:44:56 +08:00
Stephen Chung
fc10df7d63 Keyword can no longer be overloaded. 2021-03-01 17:17:13 +08:00
Stephen Chung
b7e864bb78 Extract function resolution code. 2021-03-01 16:53:03 +08:00
Stephen Chung
b466d58192 Remove unnecessary AsRef and impl IntoIterator. 2021-03-01 15:58:11 +08:00
Stephen Chung
061fce1f02 No more pub_only. 2021-03-01 15:39:49 +08:00
Stephen Chung
1300ad8677 No need to copy sub-modules. 2021-03-01 14:54:20 +08:00
Stephen Chung
733f4af8b3 Fix no_std build. 2021-03-01 09:30:23 +08:00
Stephen Chung
082111074e Encapsulate gen_call_signature. 2021-02-27 15:07:16 +08:00
Stephen Chung
c8addb45ac Set position for errors in native function call. 2021-02-27 15:06:57 +08:00
Stephen Chung
3f4dba9dbc Build in operators between string and char. 2021-02-25 13:29:49 +08:00
Stephen Chung
1c1dfc701f Fix Decimal. 2021-02-25 11:03:54 +08:00
Stephen Chung
49e5382ab0 Do not return default for comparisons between same types. 2021-02-25 10:59:11 +08:00
Stephen Chung
02057ef1d2 Avoid double checking of builtin's. 2021-02-24 23:23:32 +08:00
Stephen Chung
baaa0461bf Limit Dynamic parameters to 16. 2021-02-24 22:40:18 +08:00
Stephen Chung
4ac05aee8b Disallow implicit comparisons between different numeric types. 2021-02-24 15:45:29 +08:00
Stephen Chung
0d933d865a Do not test for built-in's when operands are not built-in. 2021-02-24 13:53:11 +08:00
Stephen Chung
8b67a9a9bc Do not test for op-assignment when not ending with '='. 2021-02-24 11:05:16 +08:00
Stephen Chung
6f876e85cc Always call native for op-assignment operators. 2021-02-23 20:32:50 +08:00
Stephen Chung
123e9d6901 Short-circuits op-assignment for indexing and dotting. 2021-02-23 20:03:28 +08:00
Stephen Chung
36420f0b99 Implement print/debug functions via Dynamic parameters. 2021-02-23 19:08:05 +08:00
Stephen Chung
ba2b0630f7 Add support for Dynamic wildcard arguments. 2021-02-23 16:06:36 +08:00
Stephen Chung
0b49865f29 Fix no_std build. 2021-02-21 14:41:20 +08:00
Stephen Chung
54e26059dc Set correct position for system errors inside function calls. 2021-02-20 14:32:37 +08:00
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