Commits

llibra committed 1cf1d47

Made optimize declarations customizable.

  • Participants
  • Parent commits 70659e4

Comments (0)

Files changed (3)

File src/decode.lisp

 (defun decode (string &key (test (load-time-value (constantly t)))
                            (www-form nil)
                            (encoding *default-character-encoding*))
-  (declare (optimize speed (debug 0) (safety 0))
+  (declare #.*optimize-qualities*
            (type simple-string string)
            (type (function (octet) boolean) test))
   (labels ((->octet (c1 c2 pos)

File src/encode.lisp

 (defun encode (string &key (test #'unreservedp)
                            (www-form nil)
                            (encoding *default-character-encoding*))
-  (declare (optimize speed (debug 0) (safety 0))
+  (declare #.*optimize-qualities*
            (type (function (octet) boolean) test))
   (do* ((octets (string-to-octets string :encoding encoding))
         (length (length octets))

File src/var.lisp

 (in-package :percent)
 
+(defvar *optimize-qualities*
+  '(optimize speed (debug 0) (safety 0) (space 0) (compilation-speed 0)))
+
 (defvar *default-character-encoding* :utf-8)