Commit Graph

3966 Commits

Author SHA1 Message Date
Gary Pennington
f7cc4c93d6 remove redunant compare of previous and 1
since that's what the compare_exchange does...
2023-06-14 15:29:51 +01:00
Gary Pennington
785be453f6 remove a race from the hashing write()
Calling load() and store() separately leaves a lot of opportunity for a
race to occur.

This changes the logic to use compare_exchange() and will only return if
the previous value is absolutely not 1 at the point of comparison.

I also don't think this needs to be SeqCst, so relaxing that requirement
a little.
2023-06-14 15:23:12 +01:00
Stephen Chung
517f219066
Merge pull request #719 from schungx/master
Fixed thumbv6m-none-eabi
2023-05-03 00:58:58 +08:00
Stephen Chung
7df3e76ea2 Fixed thumbv6m-none-eabi 2023-05-03 00:58:18 +08:00
Stephen Chung
988a35dd30
Merge pull request #717 from LinuxHeki/main
Fix compilation for thumbv6m-none-eabi
2023-05-02 21:17:56 +08:00
LinuxHeki
4c0a1e9459 fix compilation for thumbv6m-none-eabi 2023-05-02 14:41:53 +02:00
LinuxHeki
14b924e83a update no-std-compat dependency 2023-05-02 14:39:29 +02:00
Stephen Chung
c1d1072c74
Merge pull request #716 from schungx/master
Dynamic deserialization.
2023-04-29 09:41:38 +08:00
Stephen Chung
ae59a3321b Add support for deserialization of custom type/shared value from into another Dynamic. 2023-04-28 23:16:00 +08:00
Stephen Chung
72cfd42ab7 Code refactor. 2023-04-28 15:05:31 +08:00
Stephen Chung
ceb5b3718d Merge branch 'main' of https://github.com/rhaiscript/rhai 2023-04-28 10:54:45 +08:00
Stephen Chung
3dbfc1e99f Cleanup code. 2023-04-27 15:24:55 +08:00
Stephen Chung
aa47dd2407
Merge pull request #715 from schungx/master
Fix bugs.
2023-04-27 13:40:37 +08:00
Stephen Chung
76e6c1b9e4 Fix bug on OOP-style calling of exported map object. 2023-04-27 13:19:28 +08:00
Stephen Chung
ff2a23189a Improve FnPtr debug print. 2023-04-27 12:11:41 +08:00
Stephen Chung
4ec16d14e0 Fix custom syntax bug. 2023-04-25 23:14:08 +08:00
Stephen Chung
6be29cae54 Fix reverse lookup table for keywords 2023-04-25 22:33:29 +08:00
Stephen Chung
1a61ed167c Fix optimizer constants propagation bug. 2023-04-24 12:17:23 +08:00
Stephen Chung
e28bdd5b17 Rewrite combo chains in parser. 2023-04-23 00:00:55 +08:00
Stephen Chung
a0869004a3 Optimize chain structure. 2023-04-22 12:42:50 +08:00
Stephen Chung
f49ce33a88 Use .take instead of mem::take(). 2023-04-21 10:20:19 +08:00
Stephen Chung
2034ddd830 Fix builds. 2023-04-20 22:45:30 +08:00
Stephen Chung
243e04f5ab Fix export shadowing bug. 2023-04-20 22:31:49 +08:00
Stephen Chung
160f72b4cd
Merge pull request #714 from schungx/master
Fix parsing bug.
2023-04-20 14:38:17 +08:00
Stephen Chung
60ba27e2d6 Fix doc test bug. 2023-04-19 23:28:37 +08:00
Stephen Chung
fb88b79178 Fix bug in parsing index chains. 2023-04-19 23:17:54 +08:00
Stephen Chung
0699f47ff9 Fix Dynamic::from examples. 2023-04-19 21:38:01 +08:00
Stephen Chung
094eb5878a Add info into README's. 2023-04-12 12:09:14 +08:00
Stephen Chung
0206f776db Add is_symbol_disabled and is_custom_keyword. 2023-04-11 11:38:48 +08:00
Stephen Chung
dd0d1dd7ca Fix test. 2023-04-11 10:35:24 +08:00
Stephen Chung
407d376a61 Encode pure in CallableFunction variant. 2023-04-11 10:26:23 +08:00
Stephen Chung
8662ffec62 Use unwrap_err. 2023-04-10 23:23:59 +08:00
Stephen Chung
20c535ecd3 Add full optimization test. 2023-04-10 22:29:44 +08:00
Stephen Chung
26ad454cb1 Streamline data types. 2023-04-10 18:47:53 +08:00
Stephen Chung
1f8592242f
Merge pull request #712 from schungx/master
Fix bug in optimize_ast.
2023-04-10 13:52:26 +08:00
Stephen Chung
ac52d3cd87 Remove MacOS for no-std for the time being. 2023-04-10 13:18:45 +08:00
Stephen Chung
b5c81c9baa Fix test. 2023-04-10 13:17:48 +08:00
Stephen Chung
465fdeec21 Optimize curry with constant arguments. 2023-04-10 13:11:33 +08:00
Stephen Chung
120ff91074 Fix bug in optimize_ast skipping Stmt::FnCall. 2023-04-10 13:11:24 +08:00
Stephen Chung
b2dbd322db
Merge pull request #711 from schungx/master
Fix optimizer bug for closures.
2023-04-09 17:16:36 +08:00
Stephen Chung
a82bb7b2ef Fix build 2023-04-09 16:38:19 +08:00
Stephen Chung
8369a9bf63 Fix optimizer bug for closures. 2023-04-09 16:31:06 +08:00
Stephen Chung
6ee4a1efa6 Merge branch 'main' of https://github.com/rhaiscript/rhai 2023-04-09 16:30:15 +08:00
Stephen Chung
98f227d640 Fix doc test. 2023-04-07 16:14:26 +08:00
Stephen Chung
9de41e7559 Further simplify matches. 2023-04-05 23:40:27 +08:00
Stephen Chung
df05f43460 Simplify match. 2023-04-05 23:15:55 +08:00
Stephen Chung
5eaa4c5240 Do not cache long strings and avoid caching one-hit wonders. 2023-03-31 10:41:55 +08:00
Stephen Chung
b102982d65 Add flags into gperf source files. 2023-03-31 09:00:52 +08:00
Stephen Chung
637728de6a Fix builds. 2023-03-30 17:41:21 +08:00
Stephen Chung
34c7dabe44 Add is_def_fn with 3 parameters. 2023-03-30 16:43:15 +08:00