Merge branch 'develop' into smaller_make_shared
This commit is contained in:
commit
7a13b6b801
@ -26,5 +26,5 @@ compilers:
|
|||||||
skip_packaging: true
|
skip_packaging: true
|
||||||
cmake_extra_flags: -DBUILD_SAMPLES:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON
|
cmake_extra_flags: -DBUILD_SAMPLES:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON
|
||||||
- name: cppcheck
|
- name: cppcheck
|
||||||
compiler_extra_flags: --enable=all -I include --inline-suppr -Umax --suppress="*:cmake*" --suppress="*:catch.hpp" --force
|
compiler_extra_flags: --enable=all -I include --inline-suppr -Umax --suppress="*:cmake*" --suppress="*:unittests/catch.hpp" --force
|
||||||
|
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
|
|
||||||
|
def go()
|
||||||
|
{
|
||||||
var my_array=["1", 4, 6.6l, 10ul, "1000", 100, 10.9f ];
|
var my_array=["1", 4, 6.6l, 10ul, "1000", 100, 10.9f ];
|
||||||
|
|
||||||
|
var q = 0;
|
||||||
|
|
||||||
for (var j = 0; j < 10000; ++j)
|
for (var j = 0; j < 10000; ++j)
|
||||||
{
|
{
|
||||||
for (var i = 0; i < 6; ++i)
|
for (var i = 0; i < 6; ++i)
|
||||||
{
|
{
|
||||||
to_string(my_array[i]);
|
to_string(my_array[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
q += j;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
go();
|
||||||
|
@ -90,9 +90,6 @@ namespace chaiscript
|
|||||||
Operators::Opers t_oper, const std::string &t_oper_string, const Boxed_Value &t_lhs, const Boxed_Value &t_rhs) const
|
Operators::Opers t_oper, const std::string &t_oper_string, const Boxed_Value &t_lhs, const Boxed_Value &t_rhs) const
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
chaiscript::eval::detail::Function_Push_Pop fpp(t_ss);
|
|
||||||
fpp.save_params({t_lhs, t_rhs});
|
|
||||||
|
|
||||||
if (t_oper != Operators::invalid && t_lhs.get_type_info().is_arithmetic() && t_rhs.get_type_info().is_arithmetic())
|
if (t_oper != Operators::invalid && t_lhs.get_type_info().is_arithmetic() && t_rhs.get_type_info().is_arithmetic())
|
||||||
{
|
{
|
||||||
// If it's an arithmetic operation we want to short circuit dispatch
|
// If it's an arithmetic operation we want to short circuit dispatch
|
||||||
@ -103,8 +100,9 @@ namespace chaiscript
|
|||||||
} catch (...) {
|
} catch (...) {
|
||||||
throw exception::eval_error("Error with numeric operator calling: " + t_oper_string);
|
throw exception::eval_error("Error with numeric operator calling: " + t_oper_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
chaiscript::eval::detail::Function_Push_Pop fpp(t_ss);
|
||||||
|
fpp.save_params({t_lhs, t_rhs});
|
||||||
chaiscript::eval::detail::Stack_Push_Pop spp(t_ss);
|
chaiscript::eval::detail::Stack_Push_Pop spp(t_ss);
|
||||||
return t_ss.call_function(t_oper_string, t_lhs, t_rhs);
|
return t_ss.call_function(t_oper_string, t_lhs, t_rhs);
|
||||||
}
|
}
|
||||||
@ -1218,7 +1216,6 @@ namespace chaiscript
|
|||||||
|
|
||||||
virtual ~Prefix_AST_Node() {}
|
virtual ~Prefix_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) const CHAISCRIPT_OVERRIDE{
|
virtual Boxed_Value eval_internal(chaiscript::detail::Dispatch_Engine &t_ss) const CHAISCRIPT_OVERRIDE{
|
||||||
chaiscript::eval::detail::Function_Push_Pop fpp(t_ss);
|
|
||||||
Boxed_Value bv(this->children[1]->eval(t_ss));
|
Boxed_Value bv(this->children[1]->eval(t_ss));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -1227,6 +1224,7 @@ namespace chaiscript
|
|||||||
{
|
{
|
||||||
return Boxed_Number::do_oper(m_oper, std::move(bv));
|
return Boxed_Number::do_oper(m_oper, std::move(bv));
|
||||||
} else {
|
} else {
|
||||||
|
chaiscript::eval::detail::Function_Push_Pop fpp(t_ss);
|
||||||
chaiscript::eval::detail::Stack_Push_Pop spp(t_ss);
|
chaiscript::eval::detail::Stack_Push_Pop spp(t_ss);
|
||||||
fpp.save_params({bv});
|
fpp.save_params({bv});
|
||||||
return t_ss.call_function(this->children[0]->text, std::move(bv));
|
return t_ss.call_function(this->children[0]->text, std::move(bv));
|
||||||
|
@ -8,9 +8,18 @@
|
|||||||
class TestBaseType
|
class TestBaseType
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TestBaseType() : val(10), const_val(15) { }
|
#ifdef CHAISCRIPT_MSVC_12
|
||||||
TestBaseType(int) : val(10), const_val(15) {}
|
#pragma warning(push)
|
||||||
TestBaseType(int *) : val(10), const_val(15) { }
|
#pragma warning(disable : 4351)
|
||||||
|
#endif
|
||||||
|
// MSVC 12 warns that we are using new (correct) behavior
|
||||||
|
TestBaseType() : val(10), const_val(15), mdarray{} { }
|
||||||
|
TestBaseType(int) : val(10), const_val(15), mdarray{} { }
|
||||||
|
TestBaseType(int *) : val(10), const_val(15), mdarray{} { }
|
||||||
|
#ifdef CHAISCRIPT_MSVC_12
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
TestBaseType(const TestBaseType &) = default;
|
TestBaseType(const TestBaseType &) = default;
|
||||||
virtual ~TestBaseType() {}
|
virtual ~TestBaseType() {}
|
||||||
virtual int func() { return 0; }
|
virtual int func() { return 0; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user