Fixed an error introduced in the last commit (which has been in the
code now for 10 days). The last commit fixed an error when using drcCanonicalMaxwidth() multiple times in DRC rule checks on a single edge. At the time, I also added a method to save some drcCanonicalMaxwidth() results to prevent needlessly re-doing the same (potentially expensive) computation over and over. However, where I reused the cached result, I did not check if the number of entries is zero. Other code does not check the number of entries and depends on the prior behavior that drcCanonicalMaxwidth() returns NULL when there are no entries. So the code needed to check if the number of entries is zero before re-using the cached result. Without the fix, any time the caching is used, the last computed maximum area rectangle will be made active even when the current check area does not meet the area requirement, resulting in many false positive errors.
This commit is contained in:
parent
d157eea7f3
commit
d0e38df6bf
|
|
@ -334,23 +334,23 @@
|
|||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=undo.html> <B>undo</B></A> </TD>
|
||||
<TD> <A HREF=units.html> <B>units</B></A> </TD>
|
||||
<TD> <A HREF=updatedisplay.html> <B>updatedisplay</B></A> </TD>
|
||||
<TD> <A HREF=version.html> <B>version</B></A> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=version.html> <B>version</B></A> </TD>
|
||||
<TD> <A HREF=view.html> <B>view</B></A> </TD>
|
||||
<TD> <A HREF=windowborder.html> <B>windowborder</B></A> </TD>
|
||||
<TD> <A HREF=windowcaption.html> <B>windowcaption</B></A> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=windowcaption.html> <B>windowcaption</B></A> </TD>
|
||||
<TD> <A HREF=windownames.html> <B>windownames</B></A> </TD>
|
||||
<TD> <A HREF=windowscrollbars.html> <B>windowscrollbars</B></A> </TD>
|
||||
<TD> <A HREF=xview.html> <B>xview</B></A> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=xview.html> <B>xview</B></A> </TD>
|
||||
<TD> <A HREF=zoom.html> <B>zoom</B></A> </TD>
|
||||
<TD> <A HREF=tk_path_name.html> <I>tk_path_name</I></A> </TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
</TBODY>
|
||||
</TABLE>
|
||||
|
|
@ -367,7 +367,7 @@
|
|||
<TD> <A HREF=antennacheck.html> <B>antennacheck</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=archive.html> <B>array</B></A></TD>
|
||||
<TD> <A HREF=archive.html> <B>archive</B></A></TD>
|
||||
<TD> <A HREF=array.html> <B>array</B></A></TD>
|
||||
<TD> <A HREF=box.html> <B>box</B></A></TD>
|
||||
</TR>
|
||||
|
|
@ -402,28 +402,28 @@
|
|||
<TD> <A HREF=deletecommandentry.html> <B>deletecommandentry</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=display.html> <B>display</B></A></TD>
|
||||
<TD> <A HREF=down.html> <B>down</B></A></TD>
|
||||
<TD> <A HREF=drc.html> <B>drc</B></A></TD>
|
||||
<TD> <A HREF=dump.html> <B>dump</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=drop.html> <B>drop</B></A></TD>
|
||||
<TD> <A HREF=dump.html> <B>dump</B></A></TD>
|
||||
<TD> <A HREF=edit.html> <B>edit</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=element.html> <B>element</B></A></TD>
|
||||
<TD> <A HREF=erase.html> <B>erase</B></A></TD>
|
||||
<TD> <A HREF=expand.html> <B>expand</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=expand.html> <B>expand</B></A></TD>
|
||||
<TD> <A HREF=ext.html> <B>ext</B></A></TD>
|
||||
<TD> <A HREF=ext2sim.html> <B>ext2sim</B></A></TD>
|
||||
<TD> <A HREF=ext2spice.html> <B>ext2spice</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=ext2spice.html> <B>ext2spice</B></A></TD>
|
||||
<TD> <A HREF=extract.html> <B>extract</B></A></TD>
|
||||
<TD> <A HREF=extresist.html> <B>extresist</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=ext2sim.html> <B>exttosim</B></A></TD>
|
||||
<TD> <A HREF=ext2spice.html> <B>exttospice</B></A></TD>
|
||||
<TD> <A HREF=feedback.html> <B>feedback</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
|
|
@ -462,77 +462,82 @@
|
|||
<TD> <A HREF=load.html> <B>load</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=locking.html> <B>locking</B></A></TD>
|
||||
<TD> <A HREF=maketoolbar.html> <B>maketoolbar</B></A></TD>
|
||||
<TD> <A HREF=move.html> <B>move</B></A></TD>
|
||||
<TD> <A HREF=measure.html> <B>measure</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=move.html> <B>move</B></A></TD>
|
||||
<TD> <A HREF=openwrapper.html> <B>openwrapper</B></A></TD>
|
||||
<TD> <A HREF=paint.html> <B>paint</B></A></TD>
|
||||
<TD> <A HREF=path.html> <B>path</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=path.html> <B>path</B></A></TD>
|
||||
<TD> <A HREF=peekbox.html> <B>peekbox</B></A></TD>
|
||||
<TD> <A HREF=plot.html> <B>plot</B></A></TD>
|
||||
<TD> <A HREF=plow.html> <B>plow</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=plow.html> <B>plow</B></A></TD>
|
||||
<TD> <A HREF=polygon.html> <B>polygon</B></A></TD>
|
||||
<TD> <A HREF=popbox.html> <B>popbox</B></A></TD>
|
||||
<TD> <A HREF=popstack.html> <B>popstack</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=popstack.html> <B>popstack</B></A></TD>
|
||||
<TD> <A HREF=port.html> <B>port</B></A></TD>
|
||||
<TD> <A HREF=promptload.html> <B>promptload</B></A></TD>
|
||||
<TD> <A HREF=promptsave.html> <B>promptsave</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=promptsave.html> <B>promptsave</B></A></TD>
|
||||
<TD> <A HREF=property.html> <B>property</B></A></TD>
|
||||
<TD> <A HREF=pushbox.html> <B>pushbox</B></A></TD>
|
||||
<TD> <A HREF=pushstack.html> <B>pushstack</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=pushstack.html> <B>pushstack</B></A></TD>
|
||||
<TD> <A HREF=readspice.html> <B>readspice</B></A></TD>
|
||||
<TD> <A HREF=render3d.html> <B>render3d</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=resumeall.html> <B>resumeall</B></A></TD>
|
||||
<TD> <A HREF=rotate.html> <B>rotate</B></A></TD>
|
||||
<TD> <A HREF=route.html> <B>route</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=route.html> <B>route</B></A></TD>
|
||||
<TD> <A HREF=save.html> <B>save</B></A></TD>
|
||||
<TD> <A HREF=scalegrid.html> <B>scalegrid</B></A></TD>
|
||||
<TD> <A HREF=search.html> <B>search</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=search.html> <B>search</B></A></TD>
|
||||
<TD> <A HREF=see.html> <B>see</B></A></TD>
|
||||
<TD> <A HREF=select.html> <B>select</B></A></TD>
|
||||
<TD> <A HREF=setlabel.html> <B>setlabel</B> <I>(version 8.0)</I></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=setlabel.html> <B>setlabel</B> <I>(version 8.0)</I></A></TD>
|
||||
<TD> <A HREF=shell.html> <B>shell</B></A></TD>
|
||||
<TD> <A HREF=sideways.html> <B>sideways</B></A></TD>
|
||||
<TD> <A HREF=snap.html> <B>snap</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=snap.html> <B>snap</B></A></TD>
|
||||
<TD> <A HREF=spliterase.html> <B>spliterase</B></A></TD>
|
||||
<TD> <A HREF=splitpaint.html> <B>splitpaint</B></A></TD>
|
||||
<TD> <A HREF=startup.html> <B>startup</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=startup.html> <B>startup</B></A></TD>
|
||||
<TD> <A HREF=straighten.html> <B>straighten</B></A></TD>
|
||||
<TD> <A HREF=stretch.html> <B>stretch</B></A></TD>
|
||||
<TD> <A HREF=suspendall.html> <B>suspendall</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=suspendall.html> <B>suspendall</B></A></TD>
|
||||
<TD> <A HREF=tag.html> <B>tag</B></A></TD>
|
||||
<TD> <A HREF=tech.html> <B>tech</B></A></TD>
|
||||
<TD> <A HREF=techmanager.html> <B>techmanager</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=techmanager.html> <B>techmanager</B></A></TD>
|
||||
<TD> <A HREF=tool.html> <B>tool</B> <I>(non-Tcl version)</I></A></TD>
|
||||
<TD> <A HREF=changetool.html> <B>tool</B> <I>(Tcl version)</I></A></TD>
|
||||
<TD> <A HREF=unexpand.html> <B>unexpand</B></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=unexpand.html> <B>unexpand</B></A></TD>
|
||||
<TD> <A HREF=units.html> <B>units</B></A> </TD>
|
||||
<TD> <A HREF=unmeasure.html> <B>unmeasure</B></A></TD>
|
||||
<TD> <A HREF=upsidedown.html> <B>upsidedown</B></A></TD>
|
||||
</TR>
|
||||
|
|
@ -543,7 +548,7 @@
|
|||
</TR>
|
||||
<TR>
|
||||
<TD> <A HREF=xload.html> <B>xload</B></A></TD>
|
||||
<TD> </TD>
|
||||
<TD> <A HREF=xor.html> <B>xor</B></A></TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
</TBODY>
|
||||
|
|
|
|||
|
|
@ -768,7 +768,6 @@ drcTile (tile, dinfo, arg)
|
|||
int edgeX = LEFT(tile);
|
||||
|
||||
firsttile = TRUE;
|
||||
mrd = NULL;
|
||||
for (tpleft = BL(tile); BOTTOM(tpleft) < top; tpleft = RT(tpleft))
|
||||
{
|
||||
/* Get the tile types to the left and right of the edge */
|
||||
|
|
@ -858,6 +857,7 @@ drcTile (tile, dinfo, arg)
|
|||
}
|
||||
|
||||
DRCstatRules++;
|
||||
if (!triggered) mrd = NULL;
|
||||
|
||||
if (cptr->drcc_flags & DRC_AREA)
|
||||
{
|
||||
|
|
@ -895,7 +895,7 @@ drcTile (tile, dinfo, arg)
|
|||
mrd = drcCanonicalMaxwidth(tile, GEO_EAST, arg, cptr,
|
||||
&mrdcache[2]);
|
||||
else
|
||||
mrd = mrdcache[1];
|
||||
mrd = (mrdcache[1]->entries == 0) ? NULL : mrdcache[1];
|
||||
triggered = 0;
|
||||
}
|
||||
if (!trigpending || (DRCCurStyle->DRCFlags
|
||||
|
|
@ -1227,7 +1227,6 @@ drcTile (tile, dinfo, arg)
|
|||
|
||||
/* Go right across bottom of tile */
|
||||
firsttile = TRUE;
|
||||
mrd = NULL;
|
||||
for (tpbot = LB(tile); LEFT(tpbot) < right; tpbot = TR(tpbot))
|
||||
{
|
||||
/* Get the tile types to the top and bottom of the edge */
|
||||
|
|
@ -1318,6 +1317,7 @@ drcTile (tile, dinfo, arg)
|
|||
}
|
||||
|
||||
DRCstatRules++;
|
||||
if (!triggered) mrd = NULL;
|
||||
|
||||
/* top to bottom */
|
||||
|
||||
|
|
@ -1350,7 +1350,7 @@ drcTile (tile, dinfo, arg)
|
|||
mrd = drcCanonicalMaxwidth(tile, GEO_NORTH, arg, cptr,
|
||||
&mrdcache[2]);
|
||||
else
|
||||
mrd = mrdcache[1];
|
||||
mrd = (mrdcache[1]->entries == 0) ? NULL : mrdcache[1];
|
||||
triggered = 0;
|
||||
}
|
||||
if (!trigpending || (DRCCurStyle->DRCFlags
|
||||
|
|
|
|||
Loading…
Reference in New Issue