From aa53b080fb1296ac91877844f2ec7d90ede55f7b Mon Sep 17 00:00:00 2001 From: David Lichteblau Date: Sun, 16 Nov 2008 21:14:00 +0100 Subject: [PATCH] build order fix --- early-profile.lisp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ xslt.lisp | 15 --------------- xuriella.asd | 1 + 3 files changed, 47 insertions(+), 15 deletions(-) create mode 100644 early-profile.lisp diff --git a/early-profile.lisp b/early-profile.lisp new file mode 100644 index 0000000..e1b6338 --- /dev/null +++ b/early-profile.lisp @@ -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))) diff --git a/xslt.lisp b/xslt.lisp index 4be88bf..7baff23 100644 --- a/xslt.lisp +++ b/xslt.lisp @@ -150,20 +150,6 @@ ;;; (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 @@ -1733,7 +1719,6 @@ :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) diff --git a/xuriella.asd b/xuriella.asd index ba29696..704bc11 100644 --- a/xuriella.asd +++ b/xuriella.asd @@ -18,6 +18,7 @@ :components ((:file "package") (:file "trace") + (:file "early-profile") (:file "unparse") (:file "xslt") (:file "instructions") -- 2.11.4.GIT