Jason Turner
87f1242ed4
Update copyrights to 2017
2017-02-15 15:55:40 -07:00
Jason Turner
28122f7cb0
Fix single parameter constructors found by cppcheck
2016-10-28 15:49:40 -06:00
Jason Turner
b1f1803759
Some cleanups found by clang's analyzer
2016-10-28 14:53:01 -06:00
Jason Turner
359897a442
Flesh out parser and tracer usage cases
2016-10-28 13:36:10 -06:00
Jason Turner
7d9e1b3af7
Add ability to disable loading external files
...
* Options are passed to ChaiScript constructor
* load_module / eval_file / use can be disabled
from script context
2016-10-17 20:51:15 -06:00
Stephen Berry
d2c2962eb7
Added braces to better distinguish case statements.
...
Added more comments to namespace handling functions.
Added mutex protection to import.
2016-10-17 08:26:26 -05:00
Stephen Berry
a01687d7ad
Added basic namespace handling. The new code is wrapped in NAMESPACE HANDLING comments.
...
C++:
register_namespace(): registers a namespace with an instance of ChaiScript (supports delayed namespace generation)
import(): imports a namespace as a global Dynamic_Object
ChaiScript:
import(): imports a namespace
namespace(): generates and registers a new namespace
2016-10-12 09:42:57 -05:00
Jason Turner
4e6e63ab5d
Cleanups and split up into _basic options
2016-08-27 10:33:44 -06:00
Jason Turner
e44724c780
Fix debug/clang build issues
2016-06-29 17:27:07 -06:00
Jason Turner
9e16cc2a79
Simplify and normalize if block code
2016-06-27 08:56:03 -06:00
Jason Turner
c31ebb5665
Move checking of valid object names to parse time
2016-06-23 10:23:40 -06:00
Jason Turner
52a191df9e
Add optimization for unused return values
2016-06-19 20:20:51 -06:00
Jason Turner
5373bbd52e
Add Fold-Right optimizer
2016-05-03 10:21:59 -06:00
Jason Turner
03803ee4c4
Initial take on Tracer hooks
...
This will allow the user to add hooks in for debugging / execution
tracing / throttling / etc for each node execution
The cost is *almost* 0 if no tracing is enabled.
2016-04-30 20:53:01 -06:00
Jason Turner
f6c69f2826
Allow folding of if blocks
2016-04-25 21:32:48 -06:00
Jason Turner
184ca7f7b2
Create Block reducing optimizer
2016-04-24 07:49:00 -06:00
Jason Turner
71caf5006f
Pull constant folding optimizer out
2016-04-23 22:27:34 -06:00
Jason Turner
4dbf1ee2bd
Pull out Return_Optimizer
2016-04-23 22:12:08 -06:00
Jason Turner
5b78d5a898
Make optimizer pluggable
2016-04-23 20:22:17 -06:00
Jason Turner
25575564c0
Make module load error much more explicit
2016-04-23 15:47:39 -06:00
Jason Turner
7ab6bce7fa
Untangle chaiscript_engine from the rest of it
2016-04-17 21:14:01 -06:00
Jason Turner
f9294c8cbe
Remove ChaiScript_Parser from stdlib, unnecessary
2016-04-17 16:55:08 -06:00
Jason Turner
49dfdfd15a
Fix some boxed_cast and exception issues
2016-04-14 12:03:55 -06:00
Jason Turner
6f0d02f158
Massive simplification of boxed_cast. More planned
2016-04-13 14:09:08 -06:00
Jason Turner
b594043eef
Clean up redundant code
2016-04-11 09:36:23 -06:00
Jason Turner
4bf619c80f
some initialization and destructor cleanups
2016-04-09 22:10:06 -06:00
Jason Turner
641ac1a1ae
Split up ifdef'd module code
2016-04-09 21:49:12 -06:00
Jason Turner
b5b6e5a5a3
Drop ifdef'd code for gcc4.6 and msvc12
2016-03-04 11:15:39 -07:00
Jason Turner
d4f02b5e67
Address sign promotion warnings, add todo test
2016-03-04 07:58:21 -07:00
Jason Turner
7f8a6f24f9
Fix a few warnings from old gcc
2016-02-16 11:13:14 -07:00
Jason Turner
e024b99b36
Fixes for type_conversion handling
2016-02-16 08:29:01 -07:00
Jason Turner
ed65ad72d0
Update copyrights
2016-02-14 20:04:17 -07:00
Jason Turner
b104b26f11
Also allow lcase global keyword
...
Closes #221
2016-01-31 19:15:32 -07:00
Jason Turner
1a06e53c58
Add some compiler identification info to build
2016-01-31 19:06:44 -07:00
Jason Turner
dfd04c8291
Clean up formatting from last merge
...
Closes #238
2016-01-29 15:16:35 -07:00
Jason Turner
209d6ed2e4
Merge remote-tracking branch 'ktm/set-global' into develop
2016-01-29 15:14:32 -07:00
Jason Turner
f82f6c2068
Some fixes found by resharper c++
2016-01-25 16:41:11 -07:00
ktm
43def57852
add set_global, update unit test
2016-01-17 00:01:51 -05:00
Jason Turner
28f5a74e98
Merge branch 'develop' of github.com:ChaiScript/ChaiScript into develop
2015-08-15 19:28:45 -06:00
msbroadf
3a595ef912
Update chaiscript_engine.hpp
2015-08-13 13:45:33 +10:00
Jason Turner
5aa0bfcea4
Add some convenience functions for parsing
2015-08-11 19:20:18 -06:00
Jason Turner
b53432cf28
Remove remaining uses of std::function
2015-06-23 13:02:43 -06:00
Jason Turner
88ab00679f
Fix spelling of Windows.h for cross compiling
...
Closes #176
2015-06-10 18:49:54 -06:00
Jason Turner
bb2938307c
Move prelude into stdlib so it's not included everywhere
2015-05-23 16:16:39 -06:00
Jason Turner
919c3f2b4a
Finish removing std::function and std::bind internally
2015-05-23 13:10:29 -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
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
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
b489ffe3ed
Fix errors with eval/use of scripts
2015-04-10 08:20:30 -06:00
Jason Turner
63684d0042
Add the ability to get the return value from 'use'
2015-04-08 08:17:33 -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
40e2bf4099
Test optimizing the AST
2015-03-23 21:43:57 -06:00
Jason Turner
b71f9db5c2
MSVC Fixes
2015-03-13 22:27:51 -06: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
c3f343450d
Fix issues found with cppcheck inconclusive
2015-01-16 10:10:14 -07:00
Jason Turner
9449fca22f
Memory leak error fixes. Various compiler fixes.
2015-01-15 15:42:35 -07:00
Jason Turner
f95ca75aca
Clean up more warnings with stricter warning levels
2015-01-15 14:24:39 -07:00
Jason Turner
12533ce3e1
Add note about State tracking of Type_Conversions
2015-01-09 16:14:47 -07:00
Jason Turner
2e02273673
Add .bundle to module search extensions
2015-01-09 10:40:20 -07:00
Jason Turner
d91294b989
Add warning for c-style casts to gcc
2015-01-07 13:56:48 -07:00
Jason Turner
63a083b47b
Remove uses of std::endl, which imply a flush
2014-11-13 10:13:51 -07: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
5986531bba
dispatchkit modernization
2014-10-04 22:59:52 -06:00
Jason Turner
6c2ccf3869
Various cleanups prefering lambda to bind
2014-09-14 21:53:11 -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
cb1c7730cf
Add the ability to look up user defined typenames
...
Closes #124
2014-08-17 09:05:29 -06:00
Jason Turner
32a9aa9c3c
Merge branch 'develop' of https://github.com/ChaiScript/ChaiScript into develop
2014-05-29 20:44:35 -06:00
Jason Turner
f57a14e3de
Allow user to add globals from within script.
2014-05-29 20:44:05 -06:00
Jason Turner
4018c873dc
Spelling fixes, phase 1.
2014-05-29 20:16:47 -06:00
Jason Turner
b4ea27d28a
Add unsupported build support for Haiku
2014-05-27 06:51:38 +00:00
Jason Turner
d5378f50af
Fix cygwin builds #121
...
Cygwin claims to be POSIX but only implementes part of
the dl_open interface.
For this usage, we revert to win32 interface when building on
Cygwin.
2014-05-13 14:55:27 -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
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
b87c37032b
Add version numbers that can be queried at runtime
2014-05-04 10:14:42 -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
65b0846e41
Address some of the issues found by cppcheck
2014-03-26 16:59:41 -06:00
Jason Turner
bf0737a35c
Cleanup search for chaiscript_stdlib and fix some bugs
2014-03-23 16:42:04 -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
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
510d550d64
Fix static analysis issue
2013-11-02 08:18:09 -06:00
Jason Turner
73b3762f7a
Get ChaiScript ported to MSVC 2013. See Notes in code.
2013-11-02 07:42:06 -06: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
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
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
4e33e969dc
Minor header file include cleanup
2012-07-10 13:27:47 -06:00
Jason Turner
a6924bcc9e
Use C++11 Raw Strings for chaiscript prelude
2012-06-28 21:24:51 -06:00
Jason Turner
d3b8daeff0
Merge branch 'master' into 2011-09-09-CxScript
...
Conflicts:
CMakeLists.txt
include/chaiscript/language/chaiscript_common.hpp
include/chaiscript/language/chaiscript_engine.hpp
include/chaiscript/language/chaiscript_eval.hpp
2012-06-25 15:40:19 -06:00