V0.8: Ignore system tasks/functions NULL arguments in @* calculation.
System tasks and functions can be defined to have NULL arguments. This patch makes the @* sensitivity list calculation skip these NULL (constant) arguments.
This commit is contained in:
parent
867c864132
commit
35c68d8c58
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2002 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2002-2010 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -130,16 +130,23 @@ NexusSet* NetESelect::nex_input(bool rem_out)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The $fread, etc. system functions can have NULL arguments.
|
||||||
|
*/
|
||||||
NexusSet* NetESFunc::nex_input(bool rem_out)
|
NexusSet* NetESFunc::nex_input(bool rem_out)
|
||||||
{
|
{
|
||||||
if (nparms_ == 0)
|
if (nparms_ == 0)
|
||||||
return new NexusSet;
|
return new NexusSet;
|
||||||
|
|
||||||
NexusSet*result = parms_[0]->nex_input(rem_out);
|
NexusSet*result;
|
||||||
|
if (parms_[0]) result = parms_[0]->nex_input(rem_out);
|
||||||
|
else result = new NexusSet;
|
||||||
for (unsigned idx = 1 ; idx < nparms_ ; idx += 1) {
|
for (unsigned idx = 1 ; idx < nparms_ ; idx += 1) {
|
||||||
NexusSet*tmp = parms_[idx]->nex_input(rem_out);
|
if (parms_[idx]) {
|
||||||
result->add(*tmp);
|
NexusSet*tmp = parms_[idx]->nex_input(rem_out);
|
||||||
delete tmp;
|
result->add(*tmp);
|
||||||
|
delete tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -372,16 +379,23 @@ NexusSet* NetRepeat::nex_input(bool rem_out)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The $display, etc. system tasks can have NULL arguments.
|
||||||
|
*/
|
||||||
NexusSet* NetSTask::nex_input(bool rem_out)
|
NexusSet* NetSTask::nex_input(bool rem_out)
|
||||||
{
|
{
|
||||||
if (parms_.count() == 0)
|
if (parms_.count() == 0)
|
||||||
return new NexusSet;
|
return new NexusSet;
|
||||||
|
|
||||||
NexusSet*result = parms_[0]->nex_input(rem_out);
|
NexusSet*result;
|
||||||
|
if (parms_[0]) result = parms_[0]->nex_input(rem_out);
|
||||||
|
else result = new NexusSet;
|
||||||
for (unsigned idx = 1 ; idx < parms_.count() ; idx += 1) {
|
for (unsigned idx = 1 ; idx < parms_.count() ; idx += 1) {
|
||||||
NexusSet*tmp = parms_[idx]->nex_input(rem_out);
|
if (parms_[idx]) {
|
||||||
result->add(*tmp);
|
NexusSet*tmp = parms_[idx]->nex_input(rem_out);
|
||||||
delete tmp;
|
result->add(*tmp);
|
||||||
|
delete tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue