Correction to recompiling on a version chance

svn: r2052
This commit is contained in:
Kathy Gray 2006-01-30 22:07:40 +00:00
parent 47aadf7789
commit c0d057056a
7 changed files with 23 additions and 17 deletions

View File

@ -314,15 +314,18 @@
;Extracts the version from a .zo file. Will probably blow up on anything else.
;get-version port -> string
(define (get-version port)
(let get-to-count ((n 0))
(unless (= n 2)
(read-bytes 1 port)
(get-to-count (add1 n))))
(let ((count (bytes-ref (read-bytes 1 port) 0)))
(list->string (let loop ((c count))
(if (= c 0)
null
(cons (read-char port)
(loop (sub1 c))))))))
(if (eof-object? (peek-char port))
""
(begin
(let get-to-count ((n 0))
(unless (= n 2)
(read-bytes 1 port)
(get-to-count (add1 n))))
(let ((count (bytes-ref (read-bytes 1 port) 0)))
(list->string (let loop ((c count))
(if (= c 0)
null
(cons (read-char port)
(loop (sub1 c))))))))))
)

View File

@ -7,4 +7,4 @@
()
()
()
"version4")
"version4" "ignore")

View File

@ -7,4 +7,4 @@
()
()
()
"version4")
"version4" "ignore")

View File

@ -17,5 +17,5 @@
()
(("Object" "java" "lang"))
()
"version4")
"version4" "ignore")

View File

@ -85,4 +85,4 @@
()
(("Object" "java" "lang"))
(("Serializable" "java" "io") ("Comparable" "java" "lang") ("CharSequence" "java" "lang"))
"version4")
"version4" "ignore")

View File

@ -35,4 +35,4 @@
()
(("Object" "java" "lang"))
(("Serializable" "java" "io"))
"version4")
"version4" "ignore")

View File

@ -722,7 +722,7 @@
(define type-version "version4")
(define type-length 10)
(define type-length 11)
;; read-record: path -> (U class-record #f)
(define (read-record filename)
@ -730,6 +730,8 @@
(lambda (input)
(and (= (length input) type-length)
(equal? type-version (list-ref input 9))
(or (equal? (version) (list-ref input 10))
(equal? "ignore" (list-ref input 10)))
(make-class-record (list-ref input 1)
(list-ref input 2)
(symbol=? 'class (car input))
@ -798,7 +800,8 @@
(map inner->list (class-record-inners r))
(class-record-parents r)
(class-record-ifaces r)
type-version)))
type-version
(version))))
(field->list
(lambda (f)
(list