make threads work
this means ensuring all required fields are set when creating new threads. as well as respecting the "global" ident flags when an alias is not pushed (in order to erase the UNKNOWN flag for all threads)master
parent
c2de63be25
commit
59c0d16d50
|
@ -144,10 +144,14 @@ void alias_stack::set_arg(alias *a, thread_state &ts, any_value &v) {
|
|||
node->val_s = std::move(v);
|
||||
}
|
||||
|
||||
void alias_stack::set_alias(alias *, thread_state &ts, any_value &v) {
|
||||
void alias_stack::set_alias(alias *a, thread_state &ts, any_value &v) {
|
||||
node->val_s = std::move(v);
|
||||
node->code = bcode_ref{};
|
||||
flags = ts.ident_flags;
|
||||
auto *imp = static_cast<alias_impl *>(a);
|
||||
if (node == &imp->p_initial) {
|
||||
imp->p_flags = flags;
|
||||
}
|
||||
}
|
||||
|
||||
/* public interface */
|
||||
|
|
|
@ -279,7 +279,9 @@ LIBCUBESCRIPT_EXPORT void state::destroy() {
|
|||
|
||||
state::state(internal_state *s) {
|
||||
p_tstate = s->create<thread_state>(s);
|
||||
p_tstate->pstate = this;
|
||||
p_tstate->istate = s;
|
||||
p_tstate->owner = false;
|
||||
}
|
||||
|
||||
LIBCUBESCRIPT_EXPORT state state::new_thread() {
|
||||
|
|
Loading…
Reference in New Issue