Merge branch 'master' of github.com:steveicarus/iverilog
This commit is contained in:
commit
483d0534ae
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999-2008,2010 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1999-2013 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -74,7 +74,7 @@ PChainConstructor* PFunction::extract_chain_constructor()
|
|||
{
|
||||
PChainConstructor*res = 0;
|
||||
|
||||
if (res = dynamic_cast<PChainConstructor*> (statement_)) {
|
||||
if ((res = dynamic_cast<PChainConstructor*> (statement_))) {
|
||||
statement_ = 0;
|
||||
|
||||
} else if (PBlock*blk = dynamic_cast<PBlock*>(statement_)) {
|
||||
|
|
|
|||
|
|
@ -2145,10 +2145,11 @@ unsigned PECallFunction::elaborate_arguments_(Design*des, NetScope*scope,
|
|||
unsigned missing_parms = 0;
|
||||
|
||||
const unsigned parm_count = parms.size() - parm_off;
|
||||
const unsigned actual_count = parms_.size();
|
||||
|
||||
for (unsigned idx = 0 ; idx < parm_count ; idx += 1) {
|
||||
unsigned pidx = idx + parm_off;
|
||||
PExpr*tmp = parms_[idx];
|
||||
PExpr*tmp = (idx < actual_count) ? parms_[idx] : 0;
|
||||
if (tmp) {
|
||||
parms[pidx] = elaborate_rval_expr(des, scope,
|
||||
def->port(pidx)->net_type(),
|
||||
|
|
|
|||
|
|
@ -601,16 +601,28 @@ void vthreads_delete(struct __vpiScope*scope)
|
|||
|
||||
/*
|
||||
* Reaping pulls the thread out of the stack of threads. If I have a
|
||||
* child, then hand it over to my parent.
|
||||
* child, then hand it over to my parent or fully detach it.
|
||||
*/
|
||||
static void vthread_reap(vthread_t thr)
|
||||
{
|
||||
if (! thr->children.empty()) {
|
||||
for (set<vthread_t>::iterator cur = thr->children.begin()
|
||||
; cur != thr->children.end() ; ++cur) {
|
||||
vthread_t curp = *cur;
|
||||
assert(curp->parent == thr);
|
||||
curp->parent = thr->parent;
|
||||
vthread_t child = *cur;
|
||||
assert(child);
|
||||
assert(child->parent == thr);
|
||||
child->parent = thr->parent;
|
||||
}
|
||||
}
|
||||
if (! thr->detached_children.empty()) {
|
||||
for (set<vthread_t>::iterator cur = thr->detached_children.begin()
|
||||
; cur != thr->detached_children.end() ; ++cur) {
|
||||
vthread_t child = *cur;
|
||||
assert(child);
|
||||
assert(child->parent == thr);
|
||||
assert(child->i_am_detached);
|
||||
child->parent = 0;
|
||||
child->i_am_detached = 0;
|
||||
}
|
||||
}
|
||||
if (thr->parent) {
|
||||
|
|
@ -2224,11 +2236,6 @@ bool of_DISABLE(vthread_t thr, vvp_code_t cp)
|
|||
while (! scope->threads.empty()) {
|
||||
set<vthread_t>::iterator cur = scope->threads.begin();
|
||||
|
||||
/* If I am disabling myself, then remember that fact so
|
||||
that I can finish this statement differently. */
|
||||
if (*cur == thr)
|
||||
disabled_myself_flag = true;
|
||||
|
||||
if (do_disable(*cur, thr))
|
||||
disabled_myself_flag = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue