Make sure atomics are initialized
This commit is contained in:
@@ -1503,7 +1503,7 @@ namespace chaiscript
|
|||||||
Type_Conversions m_conversions;
|
Type_Conversions m_conversions;
|
||||||
chaiscript::detail::threading::Thread_Storage<Stack_Holder> m_stack_holder;
|
chaiscript::detail::threading::Thread_Storage<Stack_Holder> m_stack_holder;
|
||||||
|
|
||||||
mutable std::atomic_uint_fast32_t m_method_missing_loc;
|
mutable std::atomic_uint_fast32_t m_method_missing_loc = {0};
|
||||||
|
|
||||||
State m_state;
|
State m_state;
|
||||||
};
|
};
|
||||||
|
@@ -337,7 +337,6 @@ namespace chaiscript
|
|||||||
: m_mutex(),
|
: m_mutex(),
|
||||||
m_conversions(),
|
m_conversions(),
|
||||||
m_convertableTypes(),
|
m_convertableTypes(),
|
||||||
m_num_types(0),
|
|
||||||
m_thread_cache(this),
|
m_thread_cache(this),
|
||||||
m_conversion_saves(this)
|
m_conversion_saves(this)
|
||||||
{
|
{
|
||||||
@@ -498,7 +497,7 @@ namespace chaiscript
|
|||||||
mutable chaiscript::detail::threading::shared_mutex m_mutex;
|
mutable chaiscript::detail::threading::shared_mutex m_mutex;
|
||||||
std::set<std::shared_ptr<detail::Type_Conversion_Base>> m_conversions;
|
std::set<std::shared_ptr<detail::Type_Conversion_Base>> m_conversions;
|
||||||
std::set<const std::type_info *, Less_Than> m_convertableTypes;
|
std::set<const std::type_info *, Less_Than> m_convertableTypes;
|
||||||
std::atomic_size_t m_num_types;
|
std::atomic_size_t m_num_types = {0};
|
||||||
mutable chaiscript::detail::threading::Thread_Storage<std::set<const std::type_info *, Less_Than>> m_thread_cache;
|
mutable chaiscript::detail::threading::Thread_Storage<std::set<const std::type_info *, Less_Than>> m_thread_cache;
|
||||||
mutable chaiscript::detail::threading::Thread_Storage<Conversion_Saves> m_conversion_saves;
|
mutable chaiscript::detail::threading::Thread_Storage<Conversion_Saves> m_conversion_saves;
|
||||||
};
|
};
|
||||||
|
@@ -128,7 +128,7 @@ namespace chaiscript
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Operators::Opers m_oper;
|
Operators::Opers m_oper;
|
||||||
mutable std::atomic_uint_fast32_t m_loc;
|
mutable std::atomic_uint_fast32_t m_loc = {0};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Int_AST_Node : public AST_Node {
|
struct Int_AST_Node : public AST_Node {
|
||||||
@@ -203,7 +203,7 @@ namespace chaiscript
|
|||||||
|
|
||||||
Boxed_Value m_value;
|
Boxed_Value m_value;
|
||||||
|
|
||||||
mutable std::atomic_uint_fast32_t m_loc;
|
mutable std::atomic_uint_fast32_t m_loc = {0};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Char_AST_Node : public AST_Node {
|
struct Char_AST_Node : public AST_Node {
|
||||||
@@ -397,8 +397,8 @@ namespace chaiscript
|
|||||||
{ assert(children.size() == 3); }
|
{ assert(children.size() == 3); }
|
||||||
|
|
||||||
Operators::Opers m_oper;
|
Operators::Opers m_oper;
|
||||||
mutable std::atomic_uint_fast32_t m_loc;
|
mutable std::atomic_uint_fast32_t m_loc = {0};
|
||||||
mutable std::atomic_uint_fast32_t m_clone_loc;
|
mutable std::atomic_uint_fast32_t m_clone_loc = {0};
|
||||||
|
|
||||||
virtual ~Equation_AST_Node() {}
|
virtual ~Equation_AST_Node() {}
|
||||||
virtual Boxed_Value eval_internal(const chaiscript::detail::Dispatch_State &t_ss) const CHAISCRIPT_OVERRIDE {
|
virtual Boxed_Value eval_internal(const chaiscript::detail::Dispatch_State &t_ss) const CHAISCRIPT_OVERRIDE {
|
||||||
@@ -567,7 +567,7 @@ namespace chaiscript
|
|||||||
return oss.str();
|
return oss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
mutable std::atomic_uint_fast32_t m_loc;
|
mutable std::atomic_uint_fast32_t m_loc = {0};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Dot_Access_AST_Node : public AST_Node {
|
struct Dot_Access_AST_Node : public AST_Node {
|
||||||
@@ -624,8 +624,8 @@ namespace chaiscript
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mutable std::atomic_uint_fast32_t m_loc;
|
mutable std::atomic_uint_fast32_t m_loc = {0};
|
||||||
mutable std::atomic_uint_fast32_t m_array_loc;
|
mutable std::atomic_uint_fast32_t m_array_loc = {0};
|
||||||
std::string m_fun_name;
|
std::string m_fun_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -961,7 +961,7 @@ namespace chaiscript
|
|||||||
return Boxed_Value();
|
return Boxed_Value();
|
||||||
}
|
}
|
||||||
|
|
||||||
mutable std::atomic_uint_fast32_t m_loc;
|
mutable std::atomic_uint_fast32_t m_loc = {0};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Case_AST_Node : public AST_Node {
|
struct Case_AST_Node : public AST_Node {
|
||||||
@@ -1027,7 +1027,7 @@ namespace chaiscript
|
|||||||
return "[" + AST_Node::pretty_print() + "]";
|
return "[" + AST_Node::pretty_print() + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
mutable std::atomic_uint_fast32_t m_loc;
|
mutable std::atomic_uint_fast32_t m_loc = {0};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Inline_Map_AST_Node : public AST_Node {
|
struct Inline_Map_AST_Node : public AST_Node {
|
||||||
@@ -1055,7 +1055,7 @@ namespace chaiscript
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mutable std::atomic_uint_fast32_t m_loc;
|
mutable std::atomic_uint_fast32_t m_loc = {0};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Return_AST_Node : public AST_Node {
|
struct Return_AST_Node : public AST_Node {
|
||||||
@@ -1147,7 +1147,7 @@ namespace chaiscript
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Operators::Opers m_oper;
|
Operators::Opers m_oper;
|
||||||
mutable std::atomic_uint_fast32_t m_loc;
|
mutable std::atomic_uint_fast32_t m_loc = {0};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Break_AST_Node : public AST_Node {
|
struct Break_AST_Node : public AST_Node {
|
||||||
@@ -1217,7 +1217,7 @@ namespace chaiscript
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mutable std::atomic_uint_fast32_t m_loc;
|
mutable std::atomic_uint_fast32_t m_loc = {0};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Annotation_AST_Node : public AST_Node {
|
struct Annotation_AST_Node : public AST_Node {
|
||||||
|
Reference in New Issue
Block a user