Stan
be5709ab5c
Add support for chained dot calls.
2018-03-04 22:49:36 +01:00
Jason Turner
476a752a08
Fix last merge
2018-03-02 15:09:52 -07:00
Jason Turner
2818ec67df
Merge remote-tracking branch 'origin/develop' into apply_unicode_patches
2018-03-02 15:01:41 -07:00
Jason Turner
1a9165f7fc
Normalize on C++'s standards for \u and \U
2018-03-02 07:45:24 -07:00
Jason Turner
1b9027a24f
Fix handling of 32 bit unicode character escapes
2018-03-01 17:03:50 -07:00
Jason Turner
81ebe1a7be
Fix the compiler warnings related to unicode parsing
...
Re #415
2018-03-01 13:40:49 -07:00
Jason Turner
1acfb4f7b8
Apply patch from @chris0e3
2018-03-01 11:22:20 -07:00
Jason Turner
6a8541971e
Merge pull request #410 from arcoRocks/patch-3
...
Fix for #409
2018-03-01 10:44:45 -07:00
arcoRocks
e23c2bb04f
fix for #413
2018-02-20 16:23:45 +01:00
arcoRocks
3e1916a8d5
fix for #413
2018-02-19 13:31:38 +01:00
Stephen Berry
0ad4f83366
Removed constexpr for Visual Studio compilation. Xcode (LLVM) works with constexpr on the before function, but Visual Studio (2015) does not.
2018-02-15 09:10:11 -06:00
Stephen Berry
2dbfdfe111
Critical type_info ordering fix. Was using a less than comparison on pointers, which sometimes resulted in differing behavior between compilations.
2018-02-15 08:59:20 -06:00
arcoRocks
88042c7958
Fix for #409
2018-02-15 14:33:38 +01:00
Jason Turner
1c5c34561b
Merge pull request #388 from arcoRocks/patch-2
...
Fix for #387
2018-02-02 21:34:12 -07:00
Jason Turner
bbaa6ed76f
Merge pull request #400 from totalgee/to_json_fixes
...
In to_json(), maintain the "type" of empty maps and vectors
2018-02-02 21:33:11 -07:00
Jason Turner
35af4edb30
Ignore some warnings from clang++
2018-02-02 21:04:21 -07:00
Jason Turner
9be8f36824
Fix some warnings found on g++7
2018-02-02 20:36:29 -07:00
Jason Turner
6c41ac90d8
Add to_int(int) and similar overloads
...
* This is so that `to_int` `to_char` `to_long` and similar work not
only with strings but also with built-in types
2018-02-02 20:35:32 -07:00
Jason Turner
0c32c5054c
Add clarification on use-after-move
2018-01-19 13:01:44 -07:00
Jason Turner
cb30a97832
Workaround for /permissive- on MSVC
...
Addresses #403
2018-01-19 13:01:05 -07:00
Jason Turner
695fa0b371
Proper fix for noexcept/msvc2017
...
From @StephanTLavavej
2018-01-19 11:54:19 -07:00
Jason Turner
eb93760f1b
Fix building on MSVC in C++17 mode
...
Closes #403 #396 #395
2018-01-19 10:26:31 -07:00
Jason Turner
be8726b41a
Merge pull request #382 from arcoRocks/patch-1
...
Update json_wrap.hpp
2018-01-18 16:54:45 -07:00
Glen Fraser
783b8b7361
In to_json(), maintain the "type" of empty maps and vectors
...
- fix issue #399 .
- make to_json() with an empty Map, Vector or Dynamic_Object return a
similar/compatible type (JSON object or array), rather than "null".
- include the fix for #381 (to_json() support for null values), so
that can also be unit tested.
2018-01-11 19:44:27 +01:00
Jason Turner
6bfc130b73
Fix pull from develop, fix gcc warnings
2017-12-16 11:50:32 -07:00
Jason Turner
cd05b1f750
Merge branch 'develop' into best_practices
2017-12-16 10:22:25 -07:00
arcoRocks
f6ffcd9481
Fix for #387
2017-12-04 13:41:59 +01:00
Jason Turner
e884f0816d
Merge branch 'develop' of github.com:ChaiScript/ChaiScript into develop
2017-11-30 10:08:26 -07:00
Jason Turner
56140608ef
Fix scope optimizations for ranged for and refs
...
Closes #383
2017-11-30 10:06:32 -07:00
arcoRocks
ed9c0747fb
Update json_wrap.hpp
2017-11-28 08:06:46 +01:00
Jason Turner
3a019b06c3
Merge pull request #380 from stephenberry/develop
...
Improved parsing speed of parse_num
2017-11-27 20:26:08 -07:00
Jason Turner
035319bbd0
Fix "compiled loop" optimization
2017-11-26 22:31:35 -07:00
Jason Turner
db72ab626f
Consolidate hand-rolled flat maps
2017-11-24 22:20:52 -07:00
arcoRocks
af76d1bb42
Update json_wrap.hpp
...
Fix for #381
2017-11-24 10:15:06 +01:00
Jason Turner
48e5a46cbd
Move to QuickFlatMap from manual vector map thing
2017-11-23 22:38:15 -07:00
Stephen Berry
bcd01f3b03
Fixed issue when lacking positive exponent sign
2017-11-22 14:52:05 -06:00
Stephen Berry
2c30268bf2
Improved parsing speed of parse_num
2017-11-22 14:06:03 -06:00
Jason Turner
6ae3f2d187
Merge remote-tracking branch 'origin/develop' into best_practices
2017-11-21 16:28:12 -07:00
Jason Turner
903454bf05
Merge pull request #290 from stephenberry/develop
...
Adding basic namespace handling
2017-11-21 16:27:40 -07:00
Jason Turner
f462796ee5
Add clone shortcircuit for strings
2017-11-21 16:17:53 -07:00
Jason Turner
fe405a781c
Revert "Merge branch 'typed_function_ordering' into c++17"
...
This reverts commit 5d5a126bb15b8490ebdb92a8f0a8b2b990d8a067, reversing
changes made to dd912822a7979aad101042c62478c2441ae21d1a.
2017-11-21 16:10:13 -07:00
Jason Turner
8b523c73b8
Merge remote-tracking branch 'origin/develop' into best_practices
2017-11-21 15:34:04 -07:00
Jason Turner
f37bb847c7
Merge remote-tracking branch 'origin/c++17' into best_practices
2017-11-21 14:59:04 -07:00
Jason Turner
9f2ed24dd0
Merge pull request #369 from mlang/use-using
...
Use using
2017-11-21 14:54:13 -07:00
Jason Turner
fdddba1e00
Merge pull request #355 from bogemic/pvs-studio-warnings-v728
...
fixed PVS-Studio warnings V728
2017-11-21 14:51:56 -07:00
Jason Turner
e2aec593c1
Merge pull request #366 from mlang/future_type
...
Allow standard_library::future_type to bootstrap hpx::lcos::future
2017-11-21 14:42:11 -07:00
Jason Turner
680f9b9242
Fix variable redeclaration from last merge conflict fix.
2017-11-21 14:06:42 -07:00
Jason Turner
e97d3723df
Merge branch 'develop' into develop
2017-11-21 13:54:54 -07:00
Jason Turner
8307663938
Look for and optimize decl assignments
...
Re: #356
2017-11-21 10:26:58 -07:00
Jason Turner
50a2773081
Reduce cost of cloning common built in types
...
Re: #356
2017-11-21 09:01:17 -07:00
Jason Turner
61bce30901
Unused code removal
2017-11-21 06:30:19 -07:00
Jason Turner
c6021f3e61
Bug fix from Function_Params refactor
2017-11-19 06:20:27 -07:00
Jason Turner
92ae85c3e8
Remove guards from catch blocks
2017-11-18 19:08:14 -07:00
Jason Turner
d59350d356
Various cleanups
2017-11-18 18:42:45 -07:00
Jason Turner
a6d30baa27
Apply some if constexpr action
2017-11-17 06:12:50 -07:00
Jason Turner
b03b90dee6
Fix bug introduced with Function_Params refactor
2017-11-17 05:26:24 -07:00
Jason Turner
28a59d2a6e
Avoid creating vectors when possible
2017-11-16 09:10:48 -07:00
Jason Turner
5d5a126bb1
Merge branch 'typed_function_ordering' into c++17
2017-11-13 00:33:59 -07:00
Jason Turner
dd912822a7
Merge commit '8895ee8fc58ff13e7ee17007aeab6f78bf9f81f1' into c++17
2017-11-13 00:03:25 -07:00
Jason Turner
8895ee8fc5
Fix assignment / modification of return values
2017-11-13 00:02:22 -07:00
Jason Turner
91bcf1187e
minor noexcept adjustments
2017-11-12 04:09:37 -07:00
Glen Fraser
79d985d6ff
Fix JSON parsing for floats with negative exponents
...
- also add unit tests to cover some broken (now fixed) cases.
2017-10-24 20:10:50 +02:00
Jason Turner
f42bdb7541
Merge branch 'develop' into typed_function_ordering
2017-10-14 15:50:18 -06:00
dinghram
1541cce1d9
Change long to int64_t to remove OS ambiguity
...
Linux compilers interpret "long" as 64 bit, Visual Studio on Windows interprets "long" as 32 bit. In order to remove ambiguity, from_json should use int64_t rather than long when parsing integers.
2017-10-03 08:43:01 -06:00
Jason Turner
be225a9209
Merge branch 'develop' of github.com:ChaiScript/ChaiScript into develop
2017-10-02 09:53:23 -06:00
Jason Turner
15196af5d6
Remove one case of UB union work
2017-10-02 09:52:51 -06:00
Mario Lang
f54aa90736
Use using
2017-09-25 16:55:18 +02:00
Jason Turner
c6237cc528
Add += char for string type
2017-09-21 08:55:32 -06:00
Jason Turner
8e590387f1
Merge branch 'constexpr' into c++17
2017-09-20 17:05:31 -06:00
Jason Turner
6cae70c208
Move to module level statics from function level
2017-09-20 16:44:32 -06:00
Jason Turner
c5a9cab3dd
Simple cleanup for string comparisons
2017-09-20 15:34:19 -06:00
Mario Lang
3e521d2952
Delete now useless local copy
2017-09-18 17:00:04 +02:00
Mario Lang
0fa0def112
Use range-based for
2017-09-18 15:00:52 +02:00
Mario Lang
ee3f828b8c
Allow bootstrapping hpx::lcos::future
...
Which has an overloaded get(error_code &). Use a lambda in
standard_library::future_type to disambiguate.
2017-09-15 10:12:47 +02:00
Jason Turner
e38b05ff9a
Better constexpr for comment types
2017-09-10 07:12:33 -06:00
Stephen Berry
ff78d31583
Simplified namespace handling code and requiring all namespace registration to allow for delayed generation. This simplifies generating namespaces by the user and leads to more efficient code.
2017-09-05 13:26:55 -05:00
Stephen Berry
a9fc1d492e
Merge branch 'develop' of https://github.com/ChaiScript/ChaiScript into develop
2017-09-05 12:13:29 -05:00
Stephen Berry
3f299333cc
Switched to recursive mutex
...
Removed namespaces_nested_ref.chai
2017-09-05 12:02:11 -05:00
Jason Turner
f338586d37
Performance improvements and LOC reduction in BoxedNumber
2017-09-02 19:06:46 -06:00
Jason Turner
bfe7799d13
Come C++17 updates, namespaces, etc
2017-09-02 13:12:52 -06:00
Jason Turner
1738476321
Make comparison constexpr
2017-08-30 08:41:08 -06:00
Jason Turner
4213f24761
Various C++17 considerations
2017-08-29 16:14:44 -06:00
Jason Turner
ac78e978fe
Move to template type deduction for function signature
2017-08-26 14:19:38 -06:00
Jason Turner
e6a6a20eb6
Handful for C++17 things
2017-08-26 08:24:55 -06:00
Jason Turner
f9a1784b9b
Move json.hpp to variant
2017-08-25 19:48:30 -06:00
Jason Turner
4275ec6878
Make it easier to swap around some hashing algorithms
2017-08-25 15:31:24 -06:00
Jason Turner
dce9e17c34
More string_view tweaks
2017-08-25 14:49:44 -06:00
Jason Turner
04902f8209
Use C++17's emplace_back return reference
2017-08-25 12:48:34 -06:00
Jason Turner
e49df4c54d
Move the parser to string_view
2017-08-25 11:17:47 -06:00
Jason Turner
ff70341af2
Avoid conversions to string_view, 2% perf savings
2017-08-24 21:14:05 -06:00
Jason Turner
d115dbfd79
move towards string_view
2017-08-24 20:46:22 -06:00
Jason Turner
9596e15049
Warning / build fixes for gcc7
2017-08-24 18:35:03 -06:00
Jason Turner
9bbe723827
Fix unhandled divide by zero
2017-08-23 21:38:41 -06:00
Jason Turner
7722841294
More if constexpr work
2017-08-23 21:23:18 -06:00
Jason Turner
dd918c524d
Use if constexpr in boxed_number
2017-08-23 20:20:17 -06:00
Jason Turner
8568b61014
Merge branch 'constexpr' of github.com:ChaiScript/ChaiScript into constexpr
2017-08-23 16:13:39 -06:00
Jason Turner
b8b548bab3
more constexpr for parser
2017-08-23 16:10:10 -06:00
Jason Turner
0d76241f77
Avoid capture of constexpr value
2017-08-23 16:08:44 -06:00
Jason Turner
3feb084438
constexpr user_type objects
2017-08-22 22:22:47 -06:00
Jason Turner
ac7af60d76
Make constructors return values, not shared_ptr
2017-08-22 15:54:42 -06:00
Jason Turner
b810e4f7d9
Callable traits constexpr
2017-08-22 13:29:08 -06:00
Jason Turner
ac8f876347
constexpr fixes for Visual Studio
2017-08-22 12:02:42 -06:00
Jason Turner
b51b52dea9
constexpr bind_first
2017-08-22 10:03:26 -06:00
Jason Turner
535c0344b7
Make function constexpr
2017-08-20 13:11:57 -06:00
Jason Turner
ddb2f352cd
Initial simple application of constexpr to API
2017-08-17 11:27:14 -06:00
Jason Turner
58f740844d
Undo perf hit to keyword lookups
2017-08-15 13:17:23 -06:00
Jason Turner
0fc420f69d
Revert "Remove exception specification shared_ptr use"
...
This reverts commit e1cf8b9eb1d59d49149454424ec49bd0d8a3b28f.
2017-08-15 10:13:20 -06:00
Jason Turner
1ca857b890
Satisfy older clangs by adding default ctor
2017-08-11 14:20:17 -06:00
Jason Turner
710b3c4003
Fix instantiation of Static_String for older compilers
2017-08-11 08:57:44 -06:00
Jason Turner
ca8f78ff89
JSON noexcept updates
2017-08-10 22:22:13 -06:00
Jason Turner
73d543eef0
Make operator lookup noexcept
2017-08-10 20:32:39 -06:00
Jason Turner
5ba155e058
Make operators noexcept (removing std::vector usage)
2017-08-10 19:52:32 -06:00
Jason Turner
5d56051532
Various noexcept additions
2017-08-10 19:47:03 -06:00
Jason Turner
e1cf8b9eb1
Remove exception specification shared_ptr use
2017-08-10 10:28:16 -06:00
Jason Turner
7986ea08b6
More work towards all noexcept, warning cleanups
2017-08-09 14:36:45 -06:00
Jason Turner
34534c1386
Changes that noexcept want to happen
2017-08-08 17:06:36 -06:00
Jason Turner
171765cfdb
Add back in extent capture
2017-08-06 18:19:43 -06:00
Jason Turner
7f6f1d8a59
Fix clang warnings, fix misplaced noexcept
2017-07-31 16:12:16 -06:00
Jason Turner
3f8b697e9e
Fix windows noexcept build
2017-07-23 07:38:20 -06:00
Jason Turner
e07cd88659
Add noexcept where appropriate
...
This modifies no logic, it simply adds the keyword `noexcept`
I believe this is 100% correct. It calls methods that are not
guaranteed to be `noexcept`, such as `operator[]` but have
no logically way of throwing.
2017-07-22 20:33:30 -06:00
Jason Turner
755f650a8d
strip noexcept
2017-07-21 05:44:20 -06:00
Jason Turner
ef333e491a
remove existing constexpr
2017-07-20 21:16:54 -06:00
Jason Turner
f465d2ceca
Make sure to not deref null parse node
2017-07-20 06:10:31 -06:00
Jason Turner
14eaefdceb
Make front() back() checked
2017-07-19 15:52:34 -06:00
Jason Turner
f03659c865
More careful testing of 'for' parses
2017-07-19 13:19:36 -06:00
Jason Turner
b42316a275
More careful with json errors
2017-07-19 13:19:17 -06:00
Jason Turner
d8da295e40
Check string accesses during JSON parsing
2017-07-19 10:47:17 -06:00
Jason Turner
cfb2e663d3
Fix unhandled exception found via libfuzzer
2017-07-19 10:09:44 -06:00
Jason Turner
ea03a5462f
Wrap up build issues for dropping of shared_ptr
2017-07-18 16:58:09 -06:00
Mike Bogdanov
0c31d81711
fixed PVS-Studio warnings V728
2017-07-13 12:41:23 +03:00
Jason Turner
77315ae4b9
Fix non-shared_ptr tree code
2017-06-22 09:32:49 -06:00
Jason Turner
5a5600914c
Move away from shared_ptr for parse nodes
2017-06-21 21:27:48 -06:00
Jason Turner
36e61dec0a
Fix defaults for dynload options
2017-06-06 14:59:05 -06:00
Jason Turner
bdd0a12bb7
ChaiScript can only support static in non-threading mode
2017-05-31 14:18:30 -06:00
Jason Turner
3b48983bc2
Revert "Add workaround for chaiscript used as static"
...
This reverts commit a281d9571e00788784a10bdae054f92cb3e3fb1a.
2017-05-31 13:54:45 -06:00
Jason Turner
bd736eddec
Deprecate GLOBAL #247
2017-05-30 11:33:12 -06:00
Jason Turner
9f8b57c145
Enable ChaiScript compilation for C++17
...
Closes #348
This works by taking into account the fact that `noexcept` is now part
of the type system in C++17. However, this would conflict with pre-C++17
compilers, so I have added a feature macro around it
2017-05-30 09:16:20 -06:00
Jason Turner
a999ea3692
Fix handling of const return types #430
2017-05-30 08:38:47 -06:00
Jason Turner
0f9d9cae4a
Merge pull request #332 from ftk/develop
...
Ability to disable module loading support at compile time
2017-03-21 12:55:30 -07:00
Jason Turner
468d65a661
Merge pull request #336 from totalgee/from_json_fix
...
Handle negative numbers in JSONParse::parse_number
2017-03-21 12:21:26 -07:00
Jason Turner
9847618cf3
Fix use after move during parsing
...
closes #337
2017-03-21 12:17:30 -07:00
Jason Turner
a281d9571e
Add workaround for chaiscript used as static
...
closes #338
2017-03-21 11:58:33 -07:00
Jason Turner
be2fec02d9
Simplify usage of Thread_Specific object
2017-03-21 10:44:53 -07:00
Glen Fraser
491b95099d
In JSONParser::parse_number(), only allow a single '-' at start
...
- also, don't allow multiple '.' decimal points. Add unit tests to
cover these cases.
2017-03-14 13:01:09 +01:00
Glen Fraser
561c5bc981
Handle negative numbers in JSONParse::parse_number
...
- fix issue #334 , where negative numbers loaded from JSON were being
parsed as 0.
- add unit tests to cover these cases.
2017-03-14 12:01:51 +01:00
ftk
60c43233c6
More clear error message in load_module
2017-03-05 21:55:01 +03:00
ftk
c2f7ca3aa2
Using runtime stdlib constructor will result in compilation error
2017-03-05 21:48:59 +03:00
ftk
72cb9bd940
Compile out module path search code when module support is disabled
2017-03-05 21:26:01 +03:00
ftk
84f9c44ab6
Do not register load_module by default when dynamic loading is disabled
2017-03-05 21:23:05 +03:00
ftk
698dfb06db
Loadable module support can be disabled by defining CHAISCRIPT_NO_DYNLOAD
2017-03-05 20:54:01 +03:00