Jason Turner
1bf4170d8f
Simplify dispatch
2015-06-19 11:47:16 -06:00
Jason Turner
6d632f6aa4
Normalize methods for numeric->string conversions
2015-06-19 06:18:49 -06:00
Jason Turner
835b5a90af
Reduce to_string overloads down to what is necessary
2015-06-18 21:47:05 -06:00
Jason Turner
2442e9ae20
Register all character types
2015-06-18 13:01:54 -06:00
Jason Turner
0dcac05f2f
Add numeric support for wide characters
2015-06-18 11:57:58 -06:00
Jason Turner
3d36ea6199
Add back CONSTEXPR for Type_Info
2015-06-16 17:01:01 -06:00
Jason Turner
68fa049d6c
Fix g++4.6 build
2015-06-10 19:26:21 -06:00
Jason Turner
f9e0193353
Add map .at method from c++11
...
closes #184
2015-06-10 18:41:50 -06:00
Jason Turner
ba492308f4
Move from multimap to sorted vector in dispatch
2015-06-08 15:19:32 -06:00
Jason Turner
d4e22c2c2c
Merge remote-tracking branch 'origin/remove_std_function' into develop
...
Conflicts:
include/chaiscript/dispatchkit/boxed_number.hpp
2015-06-08 14:34:02 -06:00
Jason Turner
b95526951f
Address warnings on VS
...
We have to ignore many of these warnings due to the nature of Boxed_Number supporting any operation.
2015-06-08 13:18:52 -06:00
Jason Turner
e4be97eb79
Revert "Remove redundant Boxed_Number type operations"
...
This reverts commit 59eecab0e80c9754e7545b152187934dce82d87d.
2015-06-04 11:04:21 -06:00
Jason Turner
59eecab0e8
Remove redundant Boxed_Number type operations
2015-06-04 08:28:38 -06:00
Jason Turner
be159759ea
Further boxed_number simplification
2015-06-03 21:24:09 -06:00
Jason Turner
1e41e73af2
Simplify boxed_number templates
2015-06-03 19:17:58 -06:00
Jason Turner
78819fd3a8
fixed boxed_number to_string impl
2015-06-03 18:39:49 -06:00
Jason Turner
c6c2bcc023
More template reduction in Boxed_Number
2015-06-03 08:59:01 -06:00
Jason Turner
e759a0c544
Reduce template instantiations
2015-06-03 07:00:28 -06:00
Jason Turner
b163065b3c
Begin simplifying boxed_number implementation
2015-06-03 06:25:41 -06:00
Jason Turner
38a83e3e56
Fix MSVC2013 builds
2015-06-02 17:35:31 -06:00
Jason Turner
bacf546dff
Merge branch 'develop' into remove_std_function
...
Conflicts:
include/chaiscript/dispatchkit/proxy_functions_detail.hpp
2015-06-02 16:16:22 -06:00
Jason Turner
85a6d85c1f
Fix warnings
...
- use `(void)` to avoid "unused parameter" warnings
- Move to clang-3.6 for thread sanitizer - found bug in 3.5's reporting
2015-06-02 13:53:07 -06:00
Jason Turner
26a0034176
Fixes for g++4.6
2015-06-01 16:07:10 -06:00
Jason Turner
cb5fbff1e6
Merge branch 'develop' into remove_std_function
2015-06-01 15:57:45 -06:00
Jason Turner
ff378abf84
Merge branch 'coverity_scan' into develop
2015-06-01 15:57:13 -06:00
Jason Turner
520f9bc0d2
Work around bug in g++4.6
...
I'm going to have to start dropping support for older compilers soon.
The 4.6 line is 4 years old now, and 4.7 has these issues fixed
2015-06-01 15:49:50 -06:00
Jason Turner
cf3db70d5d
Merge branch 'develop' into remove_std_function
...
Conflicts:
include/chaiscript/dispatchkit/proxy_functions_detail.hpp
2015-06-01 14:53:09 -06:00
Jason Turner
7026229273
Apply Index expansion technique to simplify code
...
Thanks @sean-parent I saw the technique in your future implementation
2015-06-01 09:43:29 -06:00
Jason Turner
d13d080dee
Remove constexpr from type_info
2015-05-30 15:50:21 -06:00
Jason Turner
61d5e2ad85
Revert "Work around coverity crash"
...
This reverts commit bb0d1005138e53cb2d414401f0338f22fbbc636b.
Conflicts:
include/chaiscript/dispatchkit/dispatchkit.hpp
include/chaiscript/dispatchkit/type_info.hpp
2015-05-30 15:47:22 -06:00
Jason Turner
023a3edf40
Fix static usage of Type_Info objects
2015-05-30 15:36:25 -06:00
Jason Turner
4b577f1f2a
Undefined types are never equal
2015-05-30 15:15:08 -06:00
Jason Turner
ac280a6971
Fix name() lookups
2015-05-30 14:14:48 -06:00
Jason Turner
bb0d100513
Work around coverity crash
...
I'm not 100% convinced on these changes, but they might be for the
better.
2015-05-30 07:33:34 -06:00
Jason Turner
e0234d942e
Various cleanups and fixes for older compilers
2015-05-22 19:40:56 -06:00
Jason Turner
df724b5c33
Completely remove Proxy_Function_Impl
2015-05-22 12:13:49 -06:00
Jason Turner
0b812942d4
Finish removing std::function<>
2015-05-22 11:35:58 -06:00
Jason Turner
48933bc32c
Use std::ref to make free functions callable
2015-05-22 10:28:28 -06:00
Jason Turner
630c618ae7
Remove automagic wrapping to std::function<>
2015-05-22 09:39:21 -06:00
Jason Turner
03143a9f83
Phase one of getting rid of std::function usage
2015-05-22 09:30:42 -06:00
Jason Turner
2129c5318b
Merge pull request #179 from ChaiScript/lambda_type_resolution
...
Lambda type resolution
2015-05-20 12:30:36 -06:00
Jason Turner
515ee711ce
Remove unnecessary code
2015-05-20 12:00:41 -06:00
Jason Turner
bc8a4c42fa
Get non-polymorphic Derived->Base conversions working
2015-05-20 11:08:07 -06:00
Jason Turner
da39b8403b
Remove more usage of new
2015-05-19 14:15:21 -06:00
Jason Turner
5fa44d5eef
Automatically deduce types of lambda for fun()
2015-05-19 13:47:34 -06:00
Jason Turner
cf4efacbe8
Add 'GLOBAL' keyword #122
...
Also provides functionality that makes things like overriding the built in
'print' possible. See #67
2015-05-04 11:47:36 -06:00
Jason Turner
c0dd0a3041
Use static const true/false on platforms with magic statics
2015-05-02 15:27:51 -06:00
Jason Turner
45baf6f8e9
Global const values for booleans
...
- Reduces number of Boxed_Value constructions greatly
2015-05-02 13:08:23 -06:00
Jason Turner
3e5034ecf8
Merge branch 'smaller_make_shared' into develop
2015-04-29 16:58:34 -06:00
Jason Turner
dc6d039a72
Add documentation note workaround for libc++
2015-04-29 13:41:58 -06:00
Jason Turner
2e72fde0ba
Horrible workaround for libc++
...
Libc++ appears to have a problem with dynamic_casting between types
where one of them is a template that has been forward declared. This is
the only case that I see this problem coming up.
Due to the existing interdependencies between header files, I *must*
forward declare the Assignable_Proxy_Function_Impl. I don't see any
other way around this than to work around the standard library bug.
2015-04-29 13:39:57 -06:00
Jason Turner
50e0ce36be
Clean up missing <string> include
2015-04-27 14:12:23 -06:00
Jason Turner
986699a3fe
Merge branch 'develop' into smaller_make_shared
...
And also apply cleanups suggested from resharper
Conflicts:
include/chaiscript/language/chaiscript_parser.hpp
2015-04-27 11:55:12 -06:00
Jason Turner
8889324b2d
Code simplifications and spelling fixes found by clion
2015-04-27 08:09:31 -06:00
Jason Turner
dde7d27b96
A smaller make_shared derived types
2015-04-24 21:35:56 -06:00
Jason Turner
ddc6ac8e00
Eliminate unnecessary warnings on MSVC (catch)
...
Mostly caused by catch
2015-04-23 16:27:43 -06:00
Jason Turner
9ab0b1108a
Wrap up method_missing docs and tests
2015-04-23 15:03:08 -06:00
Jason Turner
a542ec01f6
Update method_missing support to reduce exceptions
2015-04-22 12:15:15 -06:00
Jason Turner
f3943f215f
Merge remote-tracking branch 'origin/develop' into method_missing
2015-04-22 07:29:46 -06:00
Jason Turner
0f4bd2b889
Merge pull request #172 from ChaiScript/libcxx_ubuntu_14_04
...
Libcxx ubuntu 14 04
2015-04-22 07:26:10 -06:00
Jason Turner
650889eae7
Fix issue affecting function ordering for vector
2015-04-21 23:19:15 -06:00
Jason Turner
90102cebd7
Full dynamic object system built on method_missing working
2015-04-21 22:36:48 -06:00
Jason Turner
dc746ee131
Merge branch 'method_missing' of https://github.com/arBmind/ChaiScript into method_missing
...
PR #164
Conflicts:
include/chaiscript/dispatchkit/dispatchkit.hpp
2015-04-21 14:38:15 -06:00
Jason Turner
059c7bcca1
Merge branch 'fix_attr_function_calls' into develop
...
Conflicts:
src/test_module.cpp
2015-04-21 12:45:59 -06:00
Jason Turner
7830085f5e
Merge remote-tracking branch 'origin/add_array_type_support' into develop
2015-04-21 12:28:26 -06:00
Jason Turner
0ed9602ba9
Get libc++ on ubuntu 14.04 working
...
The std::is_member_function_pointer<> template is broken on this version
of the libc++ standard library for const member functions.
To get ChaiScript to work with this, we had to work around the use of
automatically generated std::function wrappers in many cases. This
actually cleaned up the code in a few places and muddied it up in one.
2015-04-21 12:01:29 -06:00
Jason Turner
2f531355cd
Boxed_Value changes necessary for libc++
2015-04-20 20:30:25 -06:00
Jason Turner
db34899225
Address msvc issues with #167 #165
...
The best we can get it down to is 2 moves in MSVC, it does not
elide the moves/copies as well as GCC and Clang do
It's not possible for us to support registering of array types in
MSVC12, but we can in MSVC14 with the latest release of the
compiler.
2015-04-18 20:51:45 -06:00
Jason Turner
71245aa703
Add array type support #167
2015-04-17 20:02:09 -06:00
Jason Turner
ecd2e523f7
attributes / members holding functions works fully now
...
Issue #155
2015-04-17 16:32:59 -06:00
Jason Turner
d2ed8fdcf1
Get class members that are functions working
...
Automatic conversion of return values into Proxy_Function objects
Issue: #155
2015-04-17 12:18:47 -06:00
Jason Turner
2e769d81cf
Get return_value_handling fully working
2015-04-10 09:32:01 -06:00
Andreas Reischuck
cbeeadd6f3
Merge branch 'develop' into method_missing
2015-04-08 16:52:34 +02:00
Jason Turner
1f74bfd9b3
Attempt to create the concept of "return values"
...
to reduce clones of values. This doesn't quite work
2015-04-07 13:54:38 -06:00
Jason Turner
5114ca9d35
Fix double pointer cast test
2015-04-07 11:09:47 -06:00
Jason Turner
79181fe41e
Reduce copies of UDTs
2015-04-07 10:23:43 -06:00
Jason Turner
962bdf4b3c
Reduce exceptions on startup to minimum
...
This still has some exceptions thrown during the loading of modules
since I have no way of knowing where the operating system
`dlopen` and `LoadLibrary` functions will search for me to pre-check
it.
Closes #158
2015-04-06 13:17:41 -06:00
Jason Turner
1557dabf4f
Fixes array access with arithmetic conversions
...
Closes #156
2015-04-06 07:21:32 -06:00
Jason Turner
7f1cd29a2c
Various cleanups
2015-04-02 15:40:45 -06:00
Jason Turner
59103b5a22
Apply some IIFE to reduce copies
2015-03-29 21:58:14 -06:00
Andreas Reischuck
b67dc4e09a
Merge branch 'develop' into method_missing
2015-03-27 21:36:25 +01:00
Jason Turner
95ead0dbfb
Various warning cleanups
2015-03-25 17:30:19 -06:00
Jason Turner
62337062bf
Reduce the number of exceptions created at runtime
2015-03-25 13:36:02 -06:00
Jason Turner
d396f8e6a0
Enhancements for > 1 param function dispatch
2015-03-25 10:01:36 -06:00
Jason Turner
0b28603cdc
Merge branch 'develop' of github.com:ChaiScript/ChaiScript into develop
2015-03-23 14:16:48 -06:00
Jason Turner
91bcaaa037
Reduce use of mem_fn when possible
2015-03-23 14:16:23 -06:00
Jason Turner
04bceedf64
Reduce versions of shared_ptr created
2015-03-23 13:44:40 -06:00
Jason Turner
9326539f3b
Fix gcc 4.6 errors/issues
2015-03-22 08:14:59 -06:00
Andreas Reischuck
4e614729dc
using copy construction
2015-03-22 00:23:49 +01:00
Andreas Reischuck
d0e763d77e
fixed method_missing parameter order
2015-03-22 00:17:53 +01:00
Andreas Reischuck
c15e0174c9
added "method_missing" feature
2015-03-21 22:29:16 +01:00
Jason Turner
722e9ed3d1
Various code cleanups
2015-01-31 10:10:35 -07:00
Jason Turner
9b19aa3b6e
Get ready for 5.6.0 release
...
- Update copyrights to 2015
- Set version to 5.6.0
- Update release notes
2015-01-17 07:05:10 -07:00
Jason Turner
e86fc96b2f
Merge branch 'AddMoreWarningFlags' into develop
...
Conflicts:
include/chaiscript/dispatchkit/boxed_number.hpp
include/chaiscript/dispatchkit/proxy_functions.hpp
include/chaiscript/language/chaiscript_eval.hpp
2015-01-16 19:32:53 -07:00
Jason Turner
66801349a8
Merge remote-tracking branch 'origin/OptionalTypedArgs' into develop
2015-01-16 10:19:27 -07:00
Jason Turner
bde4eb04b6
Merge remote-tracking branch 'origin/DivideByZeroProtection' into develop
2015-01-16 10:18:50 -07:00
Jason Turner
c3f343450d
Fix issues found with cppcheck inconclusive
2015-01-16 10:10:14 -07:00
Jason Turner
c7b2b3095a
Merge branch 'develop' of https://github.com/ChaiScript/ChaiScript into AddMoreWarningFlags
2015-01-15 15:45:45 -07:00
Jason Turner
9449fca22f
Memory leak error fixes. Various compiler fixes.
2015-01-15 15:42:35 -07:00
Jason Turner
759d6fc42f
Remove [[ noreturn ]], MSVC14 doesn't yet support attributes?
2015-01-15 15:15:02 -07:00
Jason Turner
f95ca75aca
Clean up more warnings with stricter warning levels
2015-01-15 14:24:39 -07:00
Jason Turner
41a45ce8b5
Enable warnings (and fix up some things)
2015-01-14 21:07:40 -07:00
Jason Turner
5b6e6042f3
Work around MSVC 2014 issue with future
...
have to wrap std::future::valid in a lambda due to noexcept?!
2015-01-14 20:41:41 -07:00
Jason Turner
3f23e57a3d
Fix build error
2015-01-13 12:07:08 -07:00
Jason Turner
f66b4aafc1
Fix g++ 4.6 initializers
2015-01-13 11:58:23 -07:00
Jason Turner
3d1edbf38f
Add missing dynamic_object_detail
2015-01-13 11:44:13 -07:00
Jason Turner
4761a68d06
Enable optional typing of function params
2015-01-13 11:24:40 -07:00
Jason Turner
31ef683ced
Use SFINAE to clean up divide by zero protection
2015-01-12 10:06:42 -07:00
Jason Turner
9b3bb493e9
Clean up some MSVC warnings
2015-01-10 07:18:10 -07:00
Jason Turner
2f90b3ae6b
Correct exception specifier for arithmetic_error
2015-01-09 20:31:40 -07:00
Jason Turner
576816e3b1
Add unit test for divide by zero protection
2015-01-09 20:17:20 -07:00
Jason Turner
25b15a3449
Only apply divide by zero protection to integers
...
Also allow arithmetic error to bubble up to the caller.
2015-01-09 20:06:04 -07:00
Jason Turner
8746a9eea5
Make divide by zero protection the default
2015-01-09 19:38:27 -07:00
Jason Turner
0695eec3ca
Limit scope of #ifdefs, remove macros
...
Macros do not fit within the ChaiScript coding standards because
they do not respect namespaces and are more difficult to debug
of something goes wrong.
2015-01-09 19:30:28 -07:00
Jason Turner
1a4dec0df0
Remove redundant/unnecessary constructors and object copies.
2015-01-09 19:06:08 -07:00
Jason Turner
de09489355
Fix formatting (tabs vs spaces) in divide/0 protection
2015-01-09 19:02:56 -07:00
Jason Turner
440ceeebbb
Merge branch 'develop' of https://github.com/lufinkey/ChaiScript into DivideByZeroProtection
2015-01-09 19:01:58 -07:00
Jason Turner
52d03a66b1
Add future support, and fix returning of r-values
2015-01-06 15:31:06 -07:00
Jason Turner
cc5bf45b3b
Merge branch 'develop' into performance_test
2014-11-14 21:37:07 -07:00
Jason Turner
28124e4b33
Fix stack memory management
...
From 747M to 6.2M for profiling tests.
2014-11-14 20:28:53 -07:00
Jason Turner
283152a880
Speed up print functions
2014-11-14 09:45:49 -07:00
Jason Turner
cf49b1b30c
Make def more efficient, fix to_string(string)
2014-11-13 12:28:52 -07:00
Jason Turner
63a083b47b
Remove uses of std::endl, which imply a flush
2014-11-13 10:13:51 -07:00
Jason Turner
3f460fdd20
Fix 64bit msvc warning
2014-11-03 18:34:33 -07:00
Jason Turner
5d5e881971
Fix arity of functions
...
A value was being accessed after it was moved.
2014-11-03 08:24:02 -07:00
Jason Turner
5515d058bb
Fix some warnings for clang / 64bit windows
2014-11-03 07:33:53 -07:00
Jason Turner
79c5f71975
Fix compilation on gcc 4.6
2014-11-02 21:47:42 -07:00
Jason Turner
c876a89030
Fix crash during user_defined_conversions_2
...
Temporaries created during user conversion operations were being dropped
before the result of the conversion was able to be used. This fixes that
by temporarily storing the result of the conversion inside the
current Function_Push_Pop context.
2014-11-02 21:37:01 -07:00
Jason Turner
20c0e6016e
Add type_conversion helper and failing unit test
2014-11-02 14:08:57 -07:00
Jason Turner
dd12785b72
Reduce virtual calls for get_arity
...
Saves compiled code size and some minor runtime differences
2014-11-01 18:40:42 -06:00
Jason Turner
87cee688a8
Fix broken type conversion call implementation
...
- We need to properly order the function so that the one with the least
number if type differences is the one that is tried first.
2014-11-01 15:52:02 -06:00
Jason Turner
e2cf8a48be
Correct check for which types might have conversions
2014-10-29 07:07:12 -06:00
Jason Turner
7c766f87a4
Add thread specific cache of type info
...
Reduces the number of locks necessary to check of a user defined type
conversion should be scanned for / applied.
2014-10-28 22:12:03 -06:00
Jason Turner
e85be6eb3d
Add C++ test for user defined conversion
2014-10-28 20:23:19 -06:00
Jason Turner
7b42d5307a
Add ability to register a user defined type conversion
...
Currently this adds a fair bit of overhead. It will need to be evaluated
further before it's merged.
2014-10-28 14:52:24 -06:00
Jason Turner
43d6f0cf16
Rename dynamic_cast into type_conversion
...
Prep work for getting user defined type conversions implemented
2014-10-28 12:43:30 -06:00
Jason Turner
86e26966c1
More code cleanups
2014-10-28 10:53:29 -06:00
Luis Finke
b41c0f432b
Added (optional) protection against divide by zero exceptions
...
defining the preprocessor CHAISCRIPT_PROTECT_DIVIDEBYZERO adds checking of right side values before division arithmetic, allowing the user to safely catch a divide by zero error, rather than dealing with a SIGFPE and having the entire program exit without a choice
2014-10-24 17:41:33 -04:00
Jason Turner
9e8b833d11
Code cleanups
2014-10-18 16:18:56 -06:00
Jason Turner
021e2a7949
Fix returning of boolean values from functors
2014-10-12 22:12:54 -07:00
Jason Turner
78cd980067
Work around broken Apple clang implementation
...
This line of code does not cause an error on clang-3.4 or clang-3.5
on Linux. Apple's clang is somewhere between the two, no way to know
where.
For an unknown reason, specifying default move operations in 'Data'
causes the compiler to think that Boxed_Value is an incomplete type.
This is highly illogical since Data is only used via a shared_ptr, so
the size / type of Boxed_Value should be fully known (and is known on
every other compiler/platform combination).
2014-10-01 15:49:11 -06:00
Jason Turner
58d9e69479
Work around missing move operations in MSVC12
2014-10-05 21:53:44 -06:00
Jason Turner
935e9de19e
GCC 4.6 fixes to cleanups
2014-10-05 14:58:27 -06:00
Jason Turner
f547b4bb10
Enable moving of data into Boxed_Values when possible
2014-10-05 12:11:46 -06:00
Jason Turner
87e40237d3
Enable moving of Any objects
2014-10-05 11:47:50 -06:00
Jason Turner
5619f2602d
Eliminate extra dynamic allocation in the Stack
2014-10-05 08:58:29 -06:00
Jason Turner
5986531bba
dispatchkit modernization
2014-10-04 22:59:52 -06:00
Jason Turner
81dc4949d2
1/4 through modernization of chaiscript_eval.hpp
2014-10-04 15:34:32 -06:00
Jason Turner
4f5a6da280
Move constructor and noexcept correctness
2014-09-21 14:19:41 -06:00
Jason Turner
e1b80abac4
Update documenation to-dos regarding gcc 4.6
2014-09-20 14:20:37 -06:00
Jason Turner
b6e8605aee
Attempt again to satisfy gcc 4.6
2014-09-20 14:17:41 -06:00
Jason Turner
0e381e333e
Attempt to satisfy G++4.6 and decltype usage
2014-09-20 08:31:18 -06:00
Jason Turner
8c31255012
Windows and GCC 4.6 error cleanups
2014-09-20 07:21:30 -06:00
Jason Turner
e55700b86b
Remove static in bind_first - VS12 warns on it
2014-09-19 21:52:18 -06:00
Jason Turner
81184cbbd7
Rollback template alias, not supported in gcc 4.6
2014-09-19 21:46:52 -06:00
Jason Turner
93c1cfde99
Try out some alias templates for cleanup
2014-09-18 20:48:34 -06:00
Jason Turner
5861c45fc1
C++11 related cleanup and improvments
2014-09-15 21:16:44 -06:00
Jason Turner
6c2ccf3869
Various cleanups prefering lambda to bind
2014-09-14 21:53:11 -06:00
Jason Turner
243f4001d1
Code cleanups
2014-09-12 15:16:24 -06:00
Jason Turner
fde90ad980
Throw exception if user attempts to use null Boxed_Value
2014-09-09 13:43:05 -06:00
Jason Turner
52179d8333
Merge branch 'develop' of https://github.com/ChaiScript/ChaiScript into develop
2014-09-08 11:11:35 -06:00
Jason Turner
eed90b521d
Spelling corrections and comment fixes
2014-09-08 11:10:53 -06:00
Jason Turner
6bea42c1c0
Speed up to_string performance by relying on C++ versions
...
Addresses #134 , fixing issues introduced by #132
2014-08-31 16:03:42 -06:00
Jason Turner
251790f144
Fix some MSVC warnings
2014-08-31 12:04:02 -06:00
Jason Turner
4ee9ba9c96
Make up some of the performance losses #132
2014-08-30 14:49:31 -06:00
Jason Turner
a71903f185
Add strong reference to range objects #132
2014-08-30 13:36:36 -06:00
Jason Turner
3fe80d70c6
Roll back name of range class, it's half baked from the range fix
2014-08-27 12:24:46 -06:00
Jason Turner
a6e3fd5b42
Make reflection API part of stdlib
...
removes the reflection module completely. Reflection and the
ability to catch eval errors is too useful.
2014-08-27 12:05:03 -06:00
Jason Turner
6a3f19d575
Add copy constructor for Type_Info
2014-08-26 09:28:51 -06:00
Jason Turner
fa1f4b795b
Add class keyword for easier user defined types.
...
Issue #118
2014-08-22 21:11:49 -06:00
Jason Turner
3a775097dd
Reduce size of Any template wrapper.
2014-08-17 06:52:11 -06:00
Jason Turner
5692dfc58a
Move to unique_ptr for Any implemenation
...
Speed and size improvements
2014-08-15 20:38:35 -06:00
Jason Turner
c5f6c549ec
Reduce compiled size with template reductions
2014-08-15 20:14:15 -06:00
Jason Turner
4018c873dc
Spelling fixes, phase 1.
2014-05-29 20:16:47 -06:00
Jason Turner
46e7d0ab99
Clean up tab vs space issues
...
discovered by @axelstudios
2014-05-23 09:56:55 -06:00
Jason Turner
61cd633084
Merge branch 'develop' of https://github.com/ChaiScript/ChaiScript into develop
...
Conflicts:
include/chaiscript/language/chaiscript_common.hpp
include/chaiscript/language/chaiscript_parser.hpp
2014-05-11 12:02:33 -06:00
Jason Turner
bcb7172037
Enable MSVC warning for thread safety with statics
...
Clean up a couple of additional issues found while playing with /Wall in MSVC.
2014-05-11 10:52:07 -06:00
Jason Turner
37982cbdaa
Fix issues found by cppcheck 1.65
2014-05-10 20:12:49 -06:00
Jason Turner
c0bf6ee99d
Apply corrections from the "include what you use" tool
...
Generally cleanups of the includes. Making sure each file
can properly stand on its own and forward declares when possible.
2014-05-10 18:41:11 -06:00
Jason Turner
f29af4618a
Make override a #define for gcc 4.6 support
2014-05-10 09:04:41 -06:00
Jason Turner
6eab8ddfe1
Apply changes applied from clang-modernize
...
Needed 1-2 cleanups by hand. 99% was automatic.
* The version that ships with ubuntu 14.04 seems to not work.
I had to build from scratch
* Use cmake to generate the build commands that clang-modernize wants
```sh
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:bool=true ../ChaiScript/
```
* Use the clang-modernize tool. Note that you have to be pretty explicit
about the include paths if you want it to also update your include
files
```sh
../llvm-build/bin/clang-modernize ../ChaiScript/src/*.cpp -for-compilers=gcc-4.8 -include /home/jason/ChaiScript/include,/hjason/ChaiScript/include/chaiscript,/home/jason/ChaiScript/include/chaiscript/dispatchkit,/home/jason/ChaiScript/include/chaiscript/language -p compile_commands.json
```
* In my case, it left some unused `typedef`s behind, which I cleaned up.
2014-05-10 08:25:38 -06:00
Jason Turner
5f2796868b
Fix threading warning discovered with MSVC -Wall
...
MSVC in -Wall mode creates approximately 6,500 warnings. 5,000+ of which are
from the std library. The one gem was the potential for threading issues with
the initilization of a function scoped static.
This fixes that.
2014-05-09 17:46:06 -06:00
Jason Turner
fcc9bd9bbb
Start porting of documentatation to markdown style
2014-04-13 19:16:51 -06:00
Jason Turner
2bd1910c70
~30% performance improvement with threading enabled
2014-04-05 22:49:50 -06:00
Jason Turner
926e962fc0
Merge remote-tracking branch 'origin/release-4.x'
...
Conflicts:
.travis.yml
CMakeLists.txt
include/chaiscript/dispatchkit/bootstrap.hpp
include/chaiscript/dispatchkit/boxed_cast.hpp
include/chaiscript/dispatchkit/dynamic_cast_conversion.hpp
include/chaiscript/dispatchkit/function_call_detail.hpp
include/chaiscript/dispatchkit/proxy_functions.hpp
include/chaiscript/language/chaiscript_common.hpp
2014-03-29 07:30:14 -06:00
Jason Turner
6b0e0dc7ae
Removed erroneously kept debug output
2014-03-28 07:04:51 -06:00
Jason Turner
65b0846e41
Address some of the issues found by cppcheck
2014-03-26 16:59:41 -06:00
Jason Turner
656b438002
First cast up chain, if that fails, cast down
2014-03-26 10:52:56 -06:00
Jason Turner
56b036052f
Add test for automatic casting down in inheritance
2014-03-26 09:14:06 -06:00
Jason Turner
7fade8e841
Allow for automatic conversion of arithmetic types
...
for returns from chaiscript function wrappers
2014-03-26 08:11:37 -06:00
Jason Turner
8d96abe730
Fix test for overload registration with add_class utility
2014-03-24 14:09:20 -06:00
Jason Turner
ee35eb1512
Merge branch 'ChaiScript_5_0_CPP_11' of https://github.com/ChaiScript/ChaiScript into ChaiScript_5_0_CPP_11
2014-03-04 11:21:25 -07:00
Jason Turner
ebbcc5cbdb
Catch missing virtual destructors, enable g++ warnings
2014-03-04 11:20:45 -07:00
Jason Turner
dbd9534bd9
Eliminate warnings on MSVC 2013
...
Note that this required ignoring a few warnings with pragmas, changing the
parameter type and return types of std::string::find functions to size_t
from int and a new global warning disable on MSVC.
I've managed to avoid global warning disables up to this point in the
code, but I don't see a way around the "decorated name too long (C4503)" warning.
Closes #100
2014-03-02 08:18:36 -07:00
Jason Turner
9cf5064a3b
Merge branch 'master' into ChaiScript_5_0_CPP_11
...
Conflicts:
include/chaiscript/dispatchkit/bootstrap.hpp
include/chaiscript/dispatchkit/proxy_functions_detail.hpp
src/reflection.cpp
2014-02-22 16:41:28 -07:00
Jason Turner
af44da916a
Fix warnings and errors on VisualStudio 2013
...
Interestingly, VS2013 with Boost 1.55 exhibited the issues complained
about in issue #92 , so I was able to provide an appropriate fix. It would
appear to be bugs in both compilers, which seems very odd.
2014-02-22 16:09:34 -07:00
Jason Turner
8aedd80e1a
Merge branch 'ChaiScript_5_0_CPP_11' of https://github.com/ChaiScript/ChaiScript into ChaiScript_5_0_CPP_11
2014-02-18 13:02:06 -07:00
Jason Turner
52bb08f4d5
Merge branch 'master' into ChaiScript_5_0_CPP_11
...
Conflicts:
include/chaiscript/dispatchkit/bootstrap_stl.hpp
include/chaiscript/language/chaiscript_engine.hpp
include/chaiscript/language/chaiscript_prelude.hpp
2014-02-17 16:31:16 -07:00
Jason Turner
71348b7967
Update copyrights to 2014 and some comment formatting
2014-02-17 16:24:29 -07:00
Jason Turner
5272a64be9
Fix (legit) warning in VisualStudio
2014-01-05 16:27:32 -07:00
Jason Turner
e667b4df5f
Fix missing empty, clear and size methods for strings
...
Fixes bugs #95 and #93
2014-01-05 11:52:59 -07:00
Jason Turner
7cebc8d748
Make map::count() properly const. #90
2013-11-27 09:36:50 -07:00
Jason Turner
5cb78ecd68
Merge branch 'master' into ChaiScript_5_0_CPP_11
...
Conflicts:
include/chaiscript/dispatchkit/bootstrap_stl.hpp
include/chaiscript/dispatchkit/boxed_number.hpp
2013-11-27 09:18:08 -07:00
Jason Turner
41f6ca18ea
Prevent the user from naming an object with "::" #91
2013-11-27 08:53:34 -07:00
Jason Turner
a26d628e5c
Cleanup (indentation, comments) for non-const global support
...
@Zoomulator - I pulled in your non-const global commits.
2013-11-27 08:19:26 -07:00
Jason Turner
d5fef3121a
Merge remote-tracking branch 'zoomulator/master'
...
Adding zoomulator's patches for allowing of non-const globals if the user
wants to.
2013-11-27 08:06:39 -07:00
Jason Turner
16f09794cf
Fixes #88 : Linking error on MacOS Mavericks
...
The c++ library implementation on MacOS is broken, it does not allow you to
correctly use points to members of std::string. We work around this by not
directly using member pointers and instead wrapping the method calls
with our own functions.
2013-11-27 08:00:23 -07:00
Jason Turner
26722d648d
Merge pull request #87 from bmario/ChaiScript_5_0_CPP_11
...
Fixes build issue for Boxed_Value
2013-11-26 16:12:57 -08:00
Jason Turner
73b3762f7a
Get ChaiScript ported to MSVC 2013. See Notes in code.
2013-11-02 07:42:06 -06:00
Mario Bielert
21e3d1cc0a
Fixes build issue for Boxed_Value
...
This ixes the problem, that one has to include chaiscript.hpp to build
compilation units, which only use Boxed_Value and boxed_cast.
You can now just include boxed_cast.hpp. This decreases build time
significant.
2013-07-22 21:24:16 +02:00
Jason Turner
1708024372
Merge branch 'master' into ChaiScript_5_0_CPP_11
...
Conflicts:
include/chaiscript/chaiscript_threading.hpp
include/chaiscript/dispatchkit/boxed_value.hpp
include/chaiscript/dispatchkit/proxy_functions_detail.hpp
samples/example.cpp
src/test_module.cpp
unittests/multithreaded_test.cpp
2013-05-27 08:48:59 -06:00
Jason Turner
101225aa68
- Fix legit threading issue which shows itself on clang / macos mostly
...
- Fix all warnings that I can / ignore those caused by boost
2013-05-26 22:47:23 -06:00
Jason Turner
6e71409a52
Merge branch 'master' into ChaiScript_5_0_CPP_11
...
Conflicts:
include/chaiscript/dispatchkit/proxy_functions_detail.hpp
2013-04-25 16:17:51 -06:00
Jason Turner
feb344e744
Fix various warnings found by MSVC
2013-04-25 15:39:03 -06:00
Jason Turner
1a48dd9480
Merge branch 'master' into ChaiScript_5_0_CPP_11
...
Conflicts:
include/chaiscript/dispatchkit/dynamic_object.hpp
include/chaiscript/dispatchkit/proxy_functions_detail.hpp
2013-04-25 12:42:00 -06:00
Jason Turner
12d842ca5a
Fix some additional warnings on MacOS
2013-04-25 12:21:41 -06:00
Jason Turner
d0ce78061c
Merge branch 'master' into ChaiScript_5_0_CPP_11
...
Conflicts:
include/chaiscript/dispatchkit/boxed_cast.hpp
include/chaiscript/dispatchkit/dynamic_cast_conversion.hpp
include/chaiscript/dispatchkit/function_call.hpp
include/chaiscript/dispatchkit/function_call_detail.hpp
include/chaiscript/dispatchkit/proxy_functions.hpp
include/chaiscript/dispatchkit/proxy_functions_detail.hpp
2013-04-25 09:40:22 -06:00
Jason Turner
e68599920a
Move to pointers for Dynamic_Cast_Conversions to avoid problems with using the class before it's defined
2013-04-25 09:15:09 -06:00
Jason Turner
9d59098015
Merge branch 'ChaiScript_5_0_CPP_11' of https://github.com/ChaiScript/ChaiScript into ChaiScript_5_0_CPP_11
2013-03-28 21:07:19 -06:00
Windoze
1f1656a6c2
C++11 needs constexpr constructor when object used in constexpr expression
2013-02-27 13:33:27 +08:00
Jason Turner
47e44d2f9e
Merge branch 'master' into ChaiScript_5_0_CPP_11
...
Conflicts:
include/chaiscript/dispatchkit/bootstrap.hpp
include/chaiscript/dispatchkit/boxed_cast.hpp
include/chaiscript/dispatchkit/boxed_cast_helper.hpp
include/chaiscript/dispatchkit/dynamic_cast_conversion.hpp
include/chaiscript/dispatchkit/dynamic_object.hpp
include/chaiscript/dispatchkit/exception_specification.hpp
include/chaiscript/dispatchkit/function_call.hpp
include/chaiscript/dispatchkit/function_call_detail.hpp
include/chaiscript/dispatchkit/proxy_functions.hpp
include/chaiscript/dispatchkit/proxy_functions_detail.hpp
include/chaiscript/language/chaiscript_engine.hpp
include/chaiscript/language/chaiscript_eval.hpp
2013-02-25 12:08:32 -07:00
Jason Turner
2afc09dad4
Eradicate global base_class registrations to prevent problems with threading and general memory management issues with knowing how and when to clean them up.
2013-02-25 11:00:14 -07:00
Jason Turner
47ab27fd11
Merge branch 'master' into ChaiScript_5_0_CPP_11
...
Conflicts:
include/chaiscript/dispatchkit/proxy_functions.hpp
releasenotes.txt
2012-11-27 21:42:21 -07:00
Jason Turner
0ea8931b21
Add ability to call functions requiring arithmetic value conversions
...
- Conversions are only attempted on a dispatch
- Conversions are only attempted after a normal dispatch has failed
- Conversions are only attempted if exactly one function matches
the signature of the parameters passed in - excluding the mismatched
arithmetic parameters
- This feature should not be relied on in performance critical code
overhead is added for each function call that requires a conversion
to execute, see the tests performed above.
2012-11-27 21:21:37 -07:00
Jason Turner
7917ea02dc
Fix linux build error discovered with 4.0.0 release
2012-11-17 20:30:53 -07:00
Jason Turner
58f3256389
Fix function pointer issue for substr on VS 2010 32bit
2012-11-16 13:58:03 -07:00
Jason Turner
57c6d72a79
Merge branch 'master' into ChaiScript_5_0_CPP_11
...
Conflicts:
include/chaiscript/dispatchkit/bind_first.hpp
include/chaiscript/dispatchkit/bootstrap_stl.hpp
include/chaiscript/dispatchkit/boxed_cast.hpp
include/chaiscript/dispatchkit/function_call_detail.hpp
include/chaiscript/dispatchkit/proxy_functions_detail.hpp
2012-11-07 17:04:54 -07:00
Jason Turner
923369a4f4
Add support for string::substr #75
...
Also add forgotten missing test for number suffixes
2012-11-07 15:48:25 -07:00
Jason Turner
964342bff3
Prevent leaking macros #76
2012-11-07 14:13:08 -07:00
Jason Turner
c5a86401aa
Merge branch 'master' into ChaiScript_5_0_CPP_11
...
Conflicts:
include/chaiscript/dispatchkit/bootstrap_stl.hpp
2012-11-07 13:47:09 -07:00
Jason Turner
623c64299a
Add ability to specify number prefixes for floating point and integers.
2012-11-07 12:05:34 -07:00
Kim Simmons
abcc6c9e3e
Chai::add_global was added
...
Just a modification of the add_global_const. I don't see the point in
limiting the user to binding only constants to the global scope if the user
wishes to have a thread safe mutable object as a global. This was my case
anyway.
2012-11-06 17:20:56 +01:00
Jason Turner
9832d1ce39
Add insert and insert_ref methods to "map" types
2012-09-26 12:38:32 -06:00
Jason Turner
ed7bdfb172
Add "erase" function to associative sets (maps)
2012-09-26 11:31:19 -06:00
Jason Turner
d84b4c0b37
Merge branch 'master' into ChaiScript_5_0_CPP_11
2012-07-18 07:30:34 -06:00
Markus Groß
9e3c2960aa
Make some Boxed_Number functions const.
2012-07-17 18:26:58 +02:00
Jason Turner
84e17b8d06
Port Boxed_Number enhancements from mgee to C++11 branch. #53
2012-07-16 22:24:25 -06:00
Jason Turner
9fd4a1b9f5
Merge pull request #53 from mgee/master
...
More Boxed_Number enhancements
2012-07-16 21:18:18 -07:00
Jason Turner
32fab64882
Merge branch 'master' into 2011-09-09-CxScript
2012-07-16 22:17:37 -06:00
Jason Turner
8cb49e9494
Merge branch 'master' into 2011-09-09-CxScript
2012-07-16 22:12:29 -06:00
Jason Turner
1155720b14
Add the ability to save and restore the state of local variables #25
2012-07-16 21:27:42 -06:00
Jason Turner
7052234650
Revert "Use unique_ptr instead of shared_ptr in our any implementation, >10% speed improvement"
...
This reverts commit f27739cf7183a0f9cbdffaa7e29c7b47b25b0508.
2012-07-13 13:54:48 -06:00
Jason Turner
0a436398dd
Use make_shared #64
2012-07-13 12:25:50 -06:00
Jason Turner
f27739cf71
Use unique_ptr instead of shared_ptr in our any implementation, >10% speed improvement
2012-07-09 16:20:55 -06:00
Markus Groß
08d9d9e28e
Adapt toString to proper naming scheme.
2012-07-03 18:42:27 +02:00
Markus Groß
935276fccd
Adapt getAs function to proper naming scheme.
2012-07-03 18:42:04 +02:00
Markus Groß
f8feaf6ea8
Add toString function to Boxed_Number.
...
For uint8_t, int8_t and char the value is first
converted to an appropriate int type.
This way the value is converted to a number
rather than a character.
2012-06-29 16:48:53 +02:00
Markus Groß
dfcc415c31
Add getAs<T> function to Boxed_Number to enable casting to a target type.
2012-06-29 08:00:00 +02:00
Markus Groß
927235d871
Add templated constructor to Boxed_Number to allow creating from primitive number types.
2012-06-29 07:42:16 +02:00
Jason Turner
bf4f90a4ff
Fix build error for building without threads
2012-06-25 16:44:22 -06:00