1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

Remove unused top-level variables.

* module/ice-9/runq.scm (fork-strips): Remove.

* module/language/assembly.scm (*block-alignment*): Remove.

* module/language/assembly/disassemble.scm (disassemble-objects,
  simplify): Remove.

* module/srfi/srfi-18.scm (mutex-owners): Remove.

* module/srfi/srfi-19.scm (leap-year?): Remove.

* module/system/base/compile.scm (dsu-sort): Remove.

* module/texinfo.scm (ascii->char): Remove.

* module/texinfo/html.scm (ignored?): Remove.

* module/texinfo/indexing.scm (def-name): Remove.

* module/texinfo/plain-text.scm (ignore): Remove.
This commit is contained in:
Ludovic Courtès 2010-01-10 23:52:15 +01:00
parent e6251e7bd9
commit 6734191c68
10 changed files with 8 additions and 46 deletions

View file

@ -1,6 +1,6 @@
;;;; runq.scm --- the runq data structure ;;;; runq.scm --- the runq data structure
;;;; ;;;;
;;;; Copyright (C) 1996, 2001, 2006 Free Software Foundation, Inc. ;;;; Copyright (C) 1996, 2001, 2006, 2010 Free Software Foundation, Inc.
;;;; ;;;;
;;;; This library is free software; you can redistribute it and/or ;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public ;;;; modify it under the terms of the GNU Lesser General Public
@ -208,7 +208,6 @@
;;; runq, strips of the parallel subtasks will run ;;; runq, strips of the parallel subtasks will run
;;; round-robin style. ;;; round-robin style.
;;; ;;;
(define fork-strips (lambda args args))
;;;; ;;;;

View file

@ -1,6 +1,6 @@
;;; Guile Virtual Machine Assembly ;;; Guile Virtual Machine Assembly
;; Copyright (C) 2001, 2009 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
;;;; This library is free software; you can redistribute it and/or ;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public ;;;; modify it under the terms of the GNU Lesser General Public
@ -58,8 +58,6 @@
(define *program-alignment* 8) (define *program-alignment* 8)
(define *block-alignment* 8)
(define (addr+ addr code) (define (addr+ addr code)
(fold (lambda (x len) (+ (byte-length x) len)) (fold (lambda (x len) (+ (byte-length x) len))
addr addr

View file

@ -88,13 +88,6 @@
(else (else
(error "bad load-program form" asm)))) (error "bad load-program form" asm))))
(define (disassemble-objects objs)
(display "Objects:\n\n")
(let ((len (vector-length objs)))
(do ((n 0 (1+ n)))
((= n len) (newline))
(print-info n (vector-ref objs n) #f #f))))
(define (disassemble-free-vars free-vars) (define (disassemble-free-vars free-vars)
(display "Free variables:\n\n") (display "Free variables:\n\n")
(let lp ((i 0)) (let lp ((i 0))
@ -164,12 +157,3 @@
;; i am format's daddy. ;; i am format's daddy.
(define (print-info addr info extra src) (define (print-info addr info extra src)
(format #t "~4@S ~32S~@[;; ~1{~@?~}~]~@[~61t at ~a~]\n" addr info extra src)) (format #t "~4@S ~32S~@[;; ~1{~@?~}~]~@[~61t at ~a~]\n" addr info extra src))
(define (simplify x)
(cond ((string? x)
(cond ((string-index x #\newline) =>
(lambda (i) (set! x (substring x 0 i)))))
(cond ((> (string-length x) 16)
(set! x (string-append (substring x 0 13) "..."))))))
x)

View file

@ -1,6 +1,6 @@
;;; srfi-18.scm --- Multithreading support ;;; srfi-18.scm --- Multithreading support
;; Copyright (C) 2008, 2009 Free Software Foundation, Inc. ;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
;; ;;
;; This library is free software; you can redistribute it and/or ;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public ;; modify it under the terms of the GNU Lesser General Public
@ -105,7 +105,6 @@
(define terminated-thread-exception (list 'terminated-thread-exception)) (define terminated-thread-exception (list 'terminated-thread-exception))
(define uncaught-exception (list 'uncaught-exception)) (define uncaught-exception (list 'uncaught-exception))
(define mutex-owners (make-weak-key-hash-table))
(define object-names (make-weak-key-hash-table)) (define object-names (make-weak-key-hash-table))
(define object-specifics (make-weak-key-hash-table)) (define object-specifics (make-weak-key-hash-table))
(define thread-start-conds (make-weak-key-hash-table)) (define thread-start-conds (make-weak-key-hash-table))

View file

@ -738,9 +738,6 @@
(or (= (modulo year 400) 0) (or (= (modulo year 400) 0)
(and (= (modulo year 4) 0) (not (= (modulo year 100) 0))))) (and (= (modulo year 4) 0) (not (= (modulo year 100) 0)))))
(define (leap-year? date)
(priv:leap-year? (date-year date)))
;; Map 1-based month number M to number of days in the year before the ;; Map 1-based month number M to number of days in the year before the
;; start of month M (in a non-leap year). ;; start of month M (in a non-leap year).
(define priv:month-assoc '((1 . 0) (2 . 31) (3 . 59) (4 . 90) (define priv:month-assoc '((1 . 0) (2 . 31) (3 . 59) (4 . 90)

View file

@ -1,6 +1,6 @@
;;; High-level compiler interface ;;; High-level compiler interface
;; Copyright (C) 2001, 2009 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
;;; This library is free software; you can redistribute it and/or ;;; This library is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public ;;; modify it under the terms of the GNU Lesser General Public
@ -109,11 +109,6 @@
(ensure-writable-dir (dirname dir)) (ensure-writable-dir (dirname dir))
(mkdir dir)))) (mkdir dir))))
(define (dsu-sort list key less)
(map cdr
(stable-sort (map (lambda (x) (cons (key x) x)) list)
(lambda (x y) (less (car x) (car y))))))
;;; This function is among the trickiest I've ever written. I tried many ;;; This function is among the trickiest I've ever written. I tried many
;;; variants. In the end, simple is best, of course. ;;; variants. In the end, simple is best, of course.
;;; ;;;

View file

@ -1,6 +1,6 @@
;;;; (texinfo) -- parsing of texinfo into SXML ;;;; (texinfo) -- parsing of texinfo into SXML
;;;; ;;;;
;;;; Copyright (C) 2009 Free Software Foundation, Inc. ;;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
;;;; Copyright (C) 2004, 2009 Andy Wingo <wingo at pobox dot com> ;;;; Copyright (C) 2004, 2009 Andy Wingo <wingo at pobox dot com>
;;;; Copyright (C) 2001,2002 Oleg Kiselyov <oleg at pobox dot com> ;;;; Copyright (C) 2001,2002 Oleg Kiselyov <oleg at pobox dot com>
;;;; ;;;;
@ -427,8 +427,6 @@ Examples:
(read-char port)) ; skip \n that follows \r (read-char port)) ; skip \n that follows \r
line))) line)))
(define ascii->char integer->char)
(define (skip-whitespace port) (define (skip-whitespace port)
(skip-while '(#\space #\tab #\return #\newline) port)) (skip-while '(#\space #\tab #\return #\newline) port))

View file

@ -1,6 +1,6 @@
;;;; (texinfo html) -- translating stexinfo into shtml ;;;; (texinfo html) -- translating stexinfo into shtml
;;;; ;;;;
;;;; Copyright (C) 2009 Free Software Foundation, Inc. ;;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
;;;; Copyright (C) 2003,2004,2009 Andy Wingo <wingo at pobox dot com> ;;;; Copyright (C) 2003,2004,2009 Andy Wingo <wingo at pobox dot com>
;;;; ;;;;
;;;; This library is free software; you can redistribute it and/or ;;;; This library is free software; you can redistribute it and/or
@ -210,8 +210,6 @@ name, @code{#}, and the node name."
'(page setfilename setchapternewpage iftex ifinfo ifplaintext ifxml sp vskip '(page setfilename setchapternewpage iftex ifinfo ifplaintext ifxml sp vskip
menu ignore syncodeindex comment c dircategory direntry top shortcontents menu ignore syncodeindex comment c dircategory direntry top shortcontents
cindex printindex)) cindex printindex))
(define (ignored? tag)
(memq tag ignore-list))
(define rules (define rules
`((% *preorder* . ,(lambda args args)) ;; Keep these around... `((% *preorder* . ,(lambda args args)) ;; Keep these around...

View file

@ -1,6 +1,6 @@
;;;; (texinfo indexing) -- indexing stexinfo ;;;; (texinfo indexing) -- indexing stexinfo
;;;; ;;;;
;;;; Copyright (C) 2009 Free Software Foundation, Inc. ;;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
;;;; Copyright (C) 2003,2004,2009 Andy Wingo <wingo at pobox dot com> ;;;; Copyright (C) 2003,2004,2009 Andy Wingo <wingo at pobox dot com>
;;;; ;;;;
;;;; This library is free software; you can redistribute it and/or ;;;; This library is free software; you can redistribute it and/or
@ -32,9 +32,6 @@
#:use-module (srfi srfi-13) #:use-module (srfi srfi-13)
#:export (stexi-extract-index)) #:export (stexi-extract-index))
(define (def-name def)
(cadr (assq 'name (cdadr def))))
(define defines (define defines
'(deftp defcv defivar deftypeivar defop deftypeop defmethod '(deftp defcv defivar deftypeivar defop deftypeop defmethod
deftypemethod defopt defvr defvar deftypevr deftypevar deffn deftypemethod defopt defvr defvar deftypevr deftypevar deffn

View file

@ -1,6 +1,6 @@
;;;; (texinfo plain-text) -- rendering stexinfo as plain text ;;;; (texinfo plain-text) -- rendering stexinfo as plain text
;;;; ;;;;
;;;; Copyright (C) 2009 Free Software Foundation, Inc. ;;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
;;;; Copyright (C) 2003,2004,2009 Andy Wingo <wingo at pobox dot com> ;;;; Copyright (C) 2003,2004,2009 Andy Wingo <wingo at pobox dot com>
;;;; ;;;;
;;;; This library is free software; you can redistribute it and/or ;;;; This library is free software; you can redistribute it and/or
@ -208,9 +208,6 @@
(define (passthrough tag . body) (define (passthrough tag . body)
(stexi->plain-text body)) (stexi->plain-text body))
(define (ignore . args)
"")
(define (texinfo tag args . body) (define (texinfo tag args . body)
(let ((title (chapter 'foo (arg-req 'title args)))) (let ((title (chapter 'foo (arg-req 'title args))))
(string-append title (stexi->plain-text body)))) (string-append title (stexi->plain-text body))))