Jason Turner
5861c45fc1
C++11 related cleanup and improvments
2014-09-15 21:16:44 -06:00
Jason Turner
eed90b521d
Spelling corrections and comment fixes
2014-09-08 11:10:53 -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
4018c873dc
Spelling fixes, phase 1.
2014-05-29 20:16:47 -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
2bd1910c70
~30% performance improvement with threading enabled
2014-04-05 22:49:50 -06: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
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
73b3762f7a
Get ChaiScript ported to MSVC 2013. See Notes in code.
2013-11-02 07:42:06 -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
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
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
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
5a76d98692
Enhance and correct error messages
...
Backported from C++11 branch.
Conflicts:
include/chaiscript/dispatchkit/proxy_functions.hpp
include/chaiscript/language/chaiscript_common.hpp
include/chaiscript/language/chaiscript_eval.hpp
include/chaiscript/language/chaiscript_parser.hpp
2012-06-22 18:00:10 -06:00
Jason Turner
a951d2b0af
Fix crash discovered by the move to using stdlib for all tests.
2012-06-04 07:32:05 -06:00
Jason Turner
d2aba2ef56
Eliminate boost::lexical_cast usage completely #39
2012-06-03 09:20:15 -06:00
Jason Turner
ed15cc1730
Clean up a few warnings found in Windows.
2012-05-28 10:48:19 -06:00
Jason Turner
13ffc92bc3
Merge branch 'master' into 2011-09-09-CxScript
...
Conflicts:
CMakeLists.txt
include/chaiscript/dispatchkit/boxed_value.hpp
include/chaiscript/language/chaiscript_eval.hpp
2012-05-21 10:47:12 -06:00
Jason Turner
3a7eff1478
Move to a bit smarter stack based object management
...
- we store all function parameters until the f
outer function call exits
- this results in more values being stored longer than
they need to be, but the results are predictable
and no leaks
2012-05-21 10:16:16 -06:00
Jason Turner
ba9d13bf7b
Merge branch 'master' into 2011-09-09-CxScript
2012-05-19 18:05:58 -06:00
Jason Turner
56757973b6
Actually reenable function
2012-05-19 18:05:41 -06:00
Jason Turner
16bdfe4571
Merge branch 'master' into 2011-09-09-CxScript
2012-05-19 09:51:19 -06:00
Jason Turner
804de05a0a
Fix object_lifetime_test which was broken by last perfomance fix
2012-05-19 09:50:49 -06:00
Jason Turner
62891b8537
Merge branch 'master' into 2011-09-09-CxScript
...
Conflicts:
include/chaiscript/language/chaiscript_engine.hpp
2012-05-19 07:33:16 -06:00
Jason Turner
ae02706c71
Approx 12% speedup for function call heavy profile.chai
2012-05-19 07:09:55 -06:00
Jason Turner
a0f7c46cc9
Merge branch 'master' into 2011-09-09-CxScript
...
Conflicts:
include/chaiscript/language/chaiscript_engine.hpp
include/chaiscript/language/chaiscript_eval.hpp
2012-05-18 16:57:05 -06:00
Jason Turner
897ad7007f
Get system introspection functions fully working
2012-05-18 16:25:13 -06:00
Jason Turner
13fb930676
First part of system introspection for objs and funcs added
2012-05-18 15:31:42 -06:00
Jason Turner
af1e02b0bb
Update copyrights to 2012 #23
2012-05-16 11:55:51 -06:00
Jason Turner
bca86c87e1
Update copyrights to 2012 #23
2012-05-16 11:54:46 -06:00
Jason Turner
a04dbf2c2d
Merge branch 'master' into 2011-09-09-CxScript
...
Conflicts:
include/chaiscript/language/chaiscript_eval.hpp
unittests/object_lifetime_test.cpp
unittests/utility_test.cpp
2012-05-16 11:50:44 -06:00
Jason Turner
4bcaa75fa4
Throw eval exception if a variable or function is redefined #28
2012-05-16 11:40:43 -06:00
Jason Turner
98d2eadde2
Explicitly default the copy assignment operator for clang's benefit
2012-05-14 10:15:38 -06:00
Jason Turner
702b5fdba1
Enhance and correct error messages
2011-09-25 16:46:05 -06:00
Jason Turner
535adce298
Remove exception specifications in favor of noexcept keyword
2011-09-21 12:22:52 -06:00
Jason Turner
6f282b6a56
Remove need for boost::function_types library
2011-09-12 08:18:51 -06:00
Jason Turner
194001f9a1
Remove boost::any requirement by providing our own implementation
2011-09-11 19:51:37 -06:00
Jason Turner
4522ff0732
Remove various other boost libraries
2011-09-10 13:49:29 -06:00
Jason Turner
53108463df
Move from boost::bind to std::bind
2011-09-10 10:19:55 -06:00
Jason Turner
afa96ecbf9
Begin port to C++11
2011-09-10 06:55:27 -06:00
Jason Turner
d9727973c1
Add files missing from last checkin
2011-09-09 17:08:51 -06:00
Jason Turner
7a9baeb350
Rename of numeric to number
2011-06-08 13:53:55 -06:00
Jason Turner
226666c2bb
Rename Boxed_POD_Value to Boxed_Numeric, which is more correct.
2011-06-04 04:24:57 +08:00
Jason Turner
319f9e4de9
Fix issues with trim() and with unit tests relying on certain line endings.
2011-05-20 16:01:50 -06:00
Jason Turner
2786156086
Finalize documentation for 3.0.0 release and update version number in CMakeLists.txt
2011-05-20 13:44:34 -06:00
Jason Turner
0d238b1617
Documentation updates and namespace reorg for docs.
2011-04-02 20:52:49 -06:00
Jason Turner
92c836c58a
Simplify mutex code by providing stubs that are do nothing during
...
CHAISCRIPT_NO_THREADS builds.
2011-03-25 22:49:17 -06:00
Jason Turner
58e5df0a9a
Even more reorganization of namespaces to help with documentation and
...
clarity.
2011-03-25 15:42:18 -06:00
Jason Turner
cd8bead54a
Further namespace reorganization and cleanup to limit to the user the
...
most important aspect of the API and make documenation easier.
2011-03-24 09:23:05 -06:00
Jason Turner
637164e457
Move around some namespaces for documentation purposes.
...
Fix problems with building on clang 2.8.
Remove unneeded function for get_engine() and fix functor<> calls that take a Boxed_Value
2011-03-15 17:35:14 -06:00
Jason Turner
9dd9ffec46
Update copyright information for 2011
2011-03-15 09:42:33 -06:00
Jason Turner
f6b6936348
Normalize on include guard style, removing __ reserved words
2011-03-08 14:06:09 -07:00
Jason Turner
0b97fcb4df
Add better namespaces to make documentation easier to handle
2011-03-05 22:50:38 -07:00
Jason Turner
660e978da3
Implement test for function ordering for dispatch. Catch bug for "const" characterization of function parameters. Add test for type characterizations.
2010-12-13 03:32:47 +00:00
Jason Turner
e90d49bb9d
Function ordering is working properly now, just need to add a unit test for it.
2010-12-11 22:38:08 +00:00
Jason Turner
13f53839c9
Check in of function ordering. Breaks function assignment test - need to understand why still.
2010-12-11 21:01:18 +00:00
Jason Turner
7ef1b81504
Simplify how functions are stored and passed. This is the first step in allowing us to sort functions so that dispatches are attempted in an organized order (as opposed to just the order they were added in).
...
Should have resulted in a speed imrovement too - fewer string copies during dispatch.
2010-11-15 05:52:48 +00:00
Jason Turner
97081b1f33
Remove vestiges of object caching from dispatch kit
2010-11-14 22:28:05 +00:00
Jason Turner
6e18aa3dcd
Further VS 64bit warning fixes.
2010-11-05 02:43:52 +00:00
Jason Turner
2cdfac4e47
Add function meta data functions, plus related tests, and some various cleanups for how functions are constructed internally
2010-10-14 14:33:17 +00:00
Jason Turner
74e719c053
Add object dependency tracking to make sure that during nested function calls all returned values are not prematurely destructed.
...
All tests pass on vc2008 now.
2010-10-02 13:26:06 +00:00
Jason Turner
43dbd8ac78
Rip out object caching. With this removed it becomes that much more critical that we fix the scoping issue with references returned from temporaries.
2010-10-01 02:25:29 +00:00
Jason Turner
7b77af3736
Remove commented out code and make variable declarations/scopes consistent with the rest of the C++ codebase
2010-09-30 19:16:03 +00:00
Jason Turner
a39d70dbca
Rip out caching in dispatch kit to get a more clean view of the performance world
2010-09-19 23:24:52 +00:00
Jonathan Turner
7f037b26d4
Updated email addresses in copyright information.
2010-08-10 05:24:07 +00:00
Jason Turner
f4e4f92dae
Move type registration into module code, and fix problems with unloading of modules and type conversions registered inside of a module.
...
We have to allow the same type registration more than once now, just in case several different modules register the same conversion.
2010-08-03 01:17:38 +00:00
Jason Turner
f5f99961c1
Make sure that stack is properly initialized on a per-thread basis. Fixes #95wq
2010-07-23 20:00:17 +00:00
Jason Turner
f7086c10ec
Roll back changes from last 2 checkins - user defined type conversions are going to be too slow and too hard to keep track of. Need more portable / generic approach to solving the actual problem - the ability to deal with inhertance properly
2010-07-23 14:55:32 +00:00
Jason Turner
3d19138c95
Minor reorg of type conversion code to support move to using it in dispatch
2010-07-18 01:52:07 +00:00
Jason Turner
35ac7342b6
Stub in of support for type conversions. Not yet fully implemented.
2010-07-17 21:49:27 +00:00
Jason Turner
799b3ef388
Update copyright for 2010
2010-05-15 22:48:54 +00:00
Jason Turner
5c98a5d6e7
Add sync_cache to set_state code to fix logic flaw in resetting of state and memory leak. #92
2010-03-09 02:09:05 +00:00
Jason Turner
e601de9d18
Reduce use of Param_List_Builder by providing call_function implementations for 0,1,2 arity
2009-12-06 01:31:58 +00:00
Jason Turner
fbf8f53e04
Add Type_Info type and add *_type objects at time of type registration.
2009-11-21 22:47:44 +00:00
Jason Turner
d3e4af433e
Add support for saving/restoring of chaiscript engine state.
2009-11-18 04:43:08 +00:00
Jason Turner
cca477dae6
Only share const globals between threads. Require all globals to be const.
2009-11-11 05:47:54 +00:00
Jason Turner
480761c1f7
Add bound_fun helper and put it to use cleaning up the engine bootstrapping
2009-10-14 02:34:09 +00:00
Jason Turner
b1e892487f
Enhance "is_type" to be more accurate and to work with Dynamic_Object types
2009-10-13 03:31:56 +00:00
Jason Turner
edd274ccce
Fix some more obscure warnings
2009-10-06 02:26:47 +00:00
Jason Turner
bad5384c96
Fix multi-file compilation issues
2009-09-22 20:59:10 +00:00
Jason Turner
50eace16da
Allow "Module" to contain chaiscript snippets to be executed when a module is initialized. Update dynamic_object to use the new feature to clean up some of the _prelude.hpp
2009-09-21 03:07:01 +00:00
Jason Turner
7cdd772f2b
Add const correctness for proxy functions. Add unit tests for function variable assignment scenarios
2009-09-19 21:13:12 +00:00
Jason Turner
f369afed77
Decrease compile times by 30% and runtimes by 10% by eliminating use of boost::bind during function dispatch
2009-09-10 03:44:42 +00:00
Jason Turner
b185e2e792
Make Type_Info internal data private and provide more rigorous definitions for comparisions of objects
2009-09-08 13:31:14 +00:00
Jason Turner
798908f127
Add loadable module support for ms Visual C++ and fix visual studio specific type identification problems, (while making the C++ more correct)
2009-09-07 17:05:57 +00:00
Jason Turner
7cc6a3cab9
Add support for loadable modules on POSIX systems
2009-09-06 23:33:03 +00:00
Jason Turner
3094ff6e3b
Made thread saftey a compilation option for performance and dependencies reasons
2009-09-05 00:16:46 +00:00
Jason Turner
4d42d6ff33
Add shared objects that can be used by all threads at their root scope only
2009-09-03 11:42:23 +00:00
Jason Turner
efb7a8d453
Create local thread caches of registered function objects to reduce thread contention
2009-09-02 02:28:38 +00:00
Jason Turner
6c4872eae9
Initial check in of multithreaded support for chaiscript
2009-08-31 19:50:41 +00:00
Jason Turner
94e4b671f3
Make sure to invalidate the cache when a new function name is added
2009-08-30 01:06:21 +00:00
Jason Turner
096c8aab50
Provide for caching of objects in the dispatch get get_object side. Also, update chaiscript_eval to not explicitly add a new stack object to each scope as it is created
2009-08-30 00:48:17 +00:00
Jason Turner
89186a86c8
speed up operator calls by about 10% by reducing Proxy_Function copies and such
2009-08-29 19:19:31 +00:00
Jason Turner
541e453098
check in of reserved word handling
2009-08-25 00:36:02 +00:00
Jason Turner
0b780593a6
Make for better error messages when a clone fails
2009-08-22 13:55:06 +00:00
Jason Turner
2e7c5f413e
Cleanup get_function implementation
2009-08-21 22:51:12 +00:00
Jonathan Turner
7e5b7cbd7a
Switch get_function to default to not doing object lookup. Correct method eval to maintain method lambda syntax. Add unit test for method lambda
2009-08-21 20:05:05 +00:00
Jason Turner
a3d4b6698a
Favor filtering of functions during dispatch over exceptions to determine appropriate function to call. Results in approximately 50% reduction in runtime for long running scripts
2009-08-06 04:22:13 +00:00
Jason Turner
0ff107a818
Rename types_match to call_match in Proxy_Function to more closely match the semantics of the call
2009-08-06 01:35:12 +00:00
Jason Turner
ba6b392174
Approximate 20% reduction in runtime on long running scripts, based on profiling data. Reduce number of execution of object cache culling, reduction of copies of the stack and reduction of Boxed_Value copies
2009-08-05 02:43:13 +00:00
Jason Turner
0d3c90a245
Add "type_name" function and port the "new" in prelude to use it instead of clone/clear.
2009-07-24 04:01:28 +00:00
Jason Turner
00ac8113c0
Add additional support for boost::shared_ptr as a return type
2009-07-21 02:00:39 +00:00
Jason Turner
a5a1e3ee1b
Revamped method for bootstrapping of types, using a new Module class that collects everything related to a type or group of types
2009-07-19 03:04:46 +00:00
Jason Turner
4d4c26bf73
Major updates to the C++ API. Please see trunk/src/example.cpp to follow along
2009-07-18 18:05:54 +00:00
Jonathan Turner
5ec3901396
Some minor source header touchups
2009-07-13 03:13:04 +00:00
Jason Turner
a70dc12b2a
Documentation updates.
2009-07-12 03:07:45 +00:00
Jason Turner
c9e67f2063
use relative include paths to make moving files around/portability easier potentially.
2009-07-11 13:00:43 +00:00
Jonathan Turner
ac2b59796f
Moving internal includes to point to the new dir structure
2009-07-10 15:24:24 +00:00
Jonathan Turner
a40c71967c
Move dispatch kit into new include tree
2009-07-10 15:06:47 +00:00