[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-429-g51c2a5c)
The branch, master has been updated
via 51c2a5c9f7f9ad1c99b9da2774a051ae97f3e62e (commit)
from fff0850cbff67ded4dc53138679e2f5f445f86cd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gnetlist/scheme/gnet-bom2.scm | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
=================
Commit Messages
=================
commit 51c2a5c9f7f9ad1c99b9da2774a051ae97f3e62e
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Sat Dec 20 18:23:22 2008 +0000
gnetlist: Improve bom2 backend performance.
Change part of bom2 backend to use tail recursion, avoiding stack
overflows for very large schematics. Tested with up to 1024 devices,
but gnetlist core performance made testing with larger schematics
problematic.
:100644 100644 4798dad... 8ec3e95... M gnetlist/scheme/gnet-bom2.scm
=========
Changes
=========
commit 51c2a5c9f7f9ad1c99b9da2774a051ae97f3e62e
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date: Sat Dec 20 18:23:22 2008 +0000
gnetlist: Improve bom2 backend performance.
Change part of bom2 backend to use tail recursion, avoiding stack
overflows for very large schematics. Tested with up to 1024 devices,
but gnetlist core performance made testing with larger schematics
problematic.
diff --git a/gnetlist/scheme/gnet-bom2.scm b/gnetlist/scheme/gnet-bom2.scm
index 4798dad..8ec3e95 100644
--- a/gnetlist/scheme/gnet-bom2.scm
+++ b/gnetlist/scheme/gnet-bom2.scm
@@ -101,16 +101,22 @@
(cons (cons (merge (list uref) (caar bomlist) string<? ) (cdar bomlist))(cdr bomlist))
(cons (car bomlist)(bom2:match? uref attriblist (cdr bomlist)))))))
-(define bom2:components
- (lambda (ls attriblist)
- (if (null? ls)
- '()
- (let ((package (car ls))
- (bomlist (bom2:components (cdr ls) attriblist))
- (attribs (bom2:find-attribs (car ls) attriblist)))
- (if (not (string=? "unknown" (gnetlist:get-package-attribute package "nobom")))
- bomlist
- (bom2:match? package attribs bomlist))))))
+(define (bom2:in-bom? package)
+ (string=? "unknown"
+ (gnetlist:get-package-attribute package "nobom")))
+
+(define (bom2:components-impl ls attriblist bomlist)
+ (if (null? ls)
+ bomlist
+ (let* ((package (car ls))
+ (attribs (bom2:find-attribs package attriblist)))
+ (bom2:components-impl (cdr ls) attriblist
+ (if (bom2:in-bom? package)
+ (bom2:match? package attribs bomlist)
+ bomlist)))))
+
+(define (bom2:components ls attriblist)
+ (bom2:components-impl ls attriblist '()))
(define bom2:find-attribs
(lambda (package attriblist)
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs