build order fix
authorDavid Lichteblau <david@lichteblau.com>
Sun, 16 Nov 2008 20:14:00 +0000 (16 21:14 +0100)
committerDavid Lichteblau <david@radon.(none)>
Sun, 16 Nov 2008 20:14:00 +0000 (16 21:14 +0100)
early-profile.lisp [new file with mode: 0644]
xslt.lisp
xuriella.asd

diff --git a/early-profile.lisp b/early-profile.lisp
new file mode 100644 (file)
index 0000000..e1b6338
--- /dev/null
@@ -0,0 +1,46 @@
+;;; -*- show-trailing-whitespace: t; indent-tabs-mode: nil -*-
+
+;;; Copyright (c) 2007,2008 David Lichteblau, Ivan Shvedunov.
+;;; All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+;;;
+;;;   * Redistributions of source code must retain the above copyright
+;;;     notice, this list of conditions and the following disclaimer.
+;;;
+;;;   * Redistributions in binary form must reproduce the above
+;;;     copyright notice, this list of conditions and the following
+;;;     disclaimer in the documentation and/or other materials
+;;;     provided with the distribution.
+;;;
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package :xuriella)
+
+(defstruct profile-counter calls run real)
+
+(defvar *apply-stylesheet-counter* (make-profile-counter))
+(defvar *parse-stylesheet-counter* (make-profile-counter))
+(defvar *parse-xml-counter* (make-profile-counter))
+(defvar *unparse-xml-counter* (make-profile-counter))
+
+(defvar *profiling-enabled-p* nil)
+
+(defmacro with-profile-counter ((var) &body body)
+  `((lambda (fn)
+      (if (and *profiling-enabled-p* ,var)
+          (invoke-with-profile-counter fn ,var)
+          (funcall fn)))
+    (lambda () ,@body)))
index 4be88bf..7baff23 100644 (file)
--- a/xslt.lisp
+++ b/xslt.lisp
 ;;;     (setf (gethash "" xpath::*extensions*) non-extensions)
 ;;;     (funcall fn)))
 
-(defstruct profile-counter calls run real)
-
-(defvar *apply-stylesheet-counter* (make-profile-counter))
-(defvar *parse-stylesheet-counter* (make-profile-counter))
-(defvar *parse-xml-counter* (make-profile-counter))
-(defvar *unparse-xml-counter* (make-profile-counter))
-
-(defmacro with-profile-counter ((var) &body body)
-  `((lambda (fn)
-      (if (and *profiling-enabled-p* ,var)
-          (invoke-with-profile-counter fn ,var)
-          (funcall fn)))
-    (lambda () ,@body)))
-
 
 ;;;; Helper functions and macros
 
         :mode mode)))))
 
 (defvar *apply-imports*)
-(defvar *profiling-enabled-p* nil)
 
 (defun apply-applicable-templates (ctx templates param-bindings finally)
   (labels ((apply-imports (&optional actual-param-bindings)
index ba29696..704bc11 100644 (file)
@@ -18,6 +18,7 @@
     :components
     ((:file "package")
      (:file "trace")
+     (:file "early-profile")
      (:file "unparse")
      (:file "xslt")
      (:file "instructions")