Changeset 263

Show
Ignore:
Timestamp:
08/23/04 14:11:47 (4 years ago)
Author:
david
Message:

removed REGISTER-ROD; fixed some warnings; cmucl 19a works now

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/thirdparty/cxml/cxml.asd

    r254 r263  
    55  (:use :asdf :cl)) 
    66(in-package :cxml-system) 
     7 
     8;; XXX das sollte natuerlich erst beim laden stattfinden 
     9#+cmu 
     10(require :gray-streams) 
    711 
    812(defclass closure-source-file (cl-source-file) ()) 
  • trunk/thirdparty/cxml/dom/dom-sax.lisp

    r253 r263  
    1 b(in-package :dom-impl) 
     1(in-package :dom-impl) 
    22 
    33(defun dom:map-document 
  • trunk/thirdparty/cxml/runes/characters.lisp

    r253 r263  
    135135  (stringp object)) 
    136136 
    137 (defun really-rod-p (object) 
    138   (stringp object)) 
    139  
    140137(defun rod-subseq (source start &optional (end (length source))) 
    141138  (unless (stringp source) 
  • trunk/thirdparty/cxml/runes/runes.lisp

    r253 r263  
    9090(defun rod-downcase (rod) 
    9191  ;; FIXME 
    92   (register-rod 
    93    (map '(simple-array (unsigned-byte 16) (*)) #'rune-downcase rod))) 
     92  (map '(simple-array (unsigned-byte 16) (*)) #'rune-downcase rod)) 
    9493 
    9594(defun rod-upcase (rod) 
    9695  ;; FIXME 
    97   (register-rod 
    98    (map '(simple-array (unsigned-byte 16) (*)) #'rune-upcase rod))) 
     96  (map '(simple-array (unsigned-byte 16) (*)) #'rune-upcase rod)) 
    9997 
    10098(defsubst white-space-rune-p (char) 
     
    116114 
    117115(defun rod (x) 
    118   (cond ((stringp x)    (register-rod (map 'rod #'char-code x))) 
     116  (cond ((stringp x)    (map 'rod #'char-code x)) 
    119117        ((symbolp x)    (rod (string x))) 
    120118        ((characterp x) (rod (string x))) 
    121         ((vectorp x)    (register-rod (coerce x 'rod))) 
    122         ((integerp x)   (register-rod (map 'rod #'identity (list x)))) 
     119        ((vectorp x)    (coerce x 'rod)) 
     120        ((integerp x)   (map 'rod #'identity (list x))) 
    123121        (t              (error "Cannot convert ~S to a ~S" x 'rod)))) 
    124122 
     
    145143 
    146144(defsubst make-rod (size) 
    147   (let ((res (make-array size :element-type 'rune))) 
    148     (register-rod res) 
    149     res)) 
     145  (make-array size :element-type 'rune)) 
    150146 
    151147(defun char-rune (char) 
     
    177173(defun rodp (object) 
    178174  (typep object 'rod)) 
    179  
    180 (defun really-rod-p (object) 
    181   (and (typep object 'rod) 
    182        (really-really-rod-p object))) 
    183175 
    184176(defun rod-subseq (source start &optional (end (length source))) 
     
    221213        (setf (%rune res i) (aref source (the fixnum (+ i start)))))))) 
    222214 
    223 ;;; Support for telling ROD and arrays apart: 
    224  
    225 #+CMU 
    226 (progn 
    227   (defvar *rod-hash-table* 
    228     (make-array 5003 :initial-element nil))) 
    229  
    230 (defun register-rod (rod) 
    231   #+CMU 
    232   (unless (really-really-rod-p rod) 
    233     (push (ext:make-weak-pointer rod) 
    234           (aref *rod-hash-table* (mod (cl::pointer-hash rod) 
    235                                       (length *rod-hash-table*))))) 
    236   rod) 
    237  
    238 (defun really-really-rod-p (rod) 
    239   #+CMU 
    240   (find rod (aref *rod-hash-table* (mod (cl::pointer-hash rod) 
    241                                         (length *rod-hash-table*))) 
    242         :key #'ext:weak-pointer-value)) 
    243  
    244 #+CMU 
    245 (progn 
    246   (defun rod-hash-table-rehash () 
    247     (let* ((n 5003) 
    248            (new (make-array n :initial-element nil))) 
    249       (loop for bucket across *rod-hash-table* do 
    250             (loop for item in bucket do 
    251                   (let ((v (ext:weak-pointer-value item))) 
    252                     (when v 
    253                       (push item (aref new (mod (cl::pointer-hash v) n))))))) 
    254       (setf *rod-hash-table* new))) 
    255  
    256   (defun rod-hash-after-gc-hook () 
    257     ;; hmm interesting question: should we rehash? 
    258     (rod-hash-table-rehash)) 
    259  
    260   (pushnew 'rod-hash-after-gc-hook extensions:*after-gc-hooks*) ) 
    261  
    262215(defun rod< (rod1 rod2) 
    263216  (do ((i 0 (+ i 1))) 
  • trunk/thirdparty/cxml/runes/syntax.lisp

    r253 r263  
    179179  (princ #\" stream)) 
    180180 
    181 #-rune-is-character 
    182 (set-pprint-dispatch '(satisfies really-rod-p) #'rod-printer) 
    183  
    184181(set-dispatch-macro-character #\# #\" 'rod-reader) 
    185  
    186 #|| 
    187 (defun longish-array-p (arr) 
    188   (and (arrayp arr) 
    189        (> (array-total-size arr) 10))) 
    190  
    191 (set-pprint-dispatch '(satisfies longish-array-p) 
    192                      #'(lambda (stream object) 
    193                          (let ((*print-array* nil) 
    194                                (*print-pretty* nil)) 
    195                            (prin1 object stream)))) 
    196 ||# 
  • trunk/thirdparty/cxml/test/domtest.lisp

    r253 r263  
    557557           (bindings '()) 
    558558           (code '())) 
    559       (declare (ignore title)) 
    560559      (do-child-elements (e test) 
    561560        (string-case (tag-name e) 
  • trunk/thirdparty/cxml/xml/xml-parse.lisp

    r254 r263  
    147147;; o xstreams auslagern, documententieren und dann auch in SGML und 
    148148;;   CSS parser verwenden. (halt alles was zeichen liest). 
    149 ::   [ausgelagert sind sie; dokumentiert "so la la"; die Reintegration 
     149;;   [ausgelagert sind sie; dokumentiert "so la la"; die Reintegration 
    150150;;   in Closure ist ein ganz anderes Thema] 
    151151;; 
     
    242242 
    243243(defvar *ctx*) 
     244 
     245;; forward declaration for DEFVAR 
     246(declaim (special *default-namespace-bindings*)) 
    244247 
    245248(defstruct (context (:conc-name nil)) 
     
    24202423    (consume-token input))) 
    24212424   
    2422 ;; forward declaration for DEFVAR 
    2423 (declaim (special *default-namespace-bindings*)) 
    2424  
    24252425(defun p/document (input handler &key validate root) 
    24262426  (let ((*ctx* (make-context))