;;;; -*- mode:lisp;coding:utf-8 -*-
;;;;**************************************************************************
;;;;FILE:               minimal-compiler-system.lisp
;;;;LANGUAGE:           Common-Lisp
;;;;SYSTEM:             Common-Lisp
;;;;USER-INTERFACE:     NONE
;;;;DESCRIPTION
;;;;
;;;;    This package exports primitives that are referenced by the macros
;;;;    defined in STANDARD-MACRO.
;;;;
;;;;AUTHORS
;;;;    <PJB> Pascal J. Bourguignon <pjb@informatimago.com>
;;;;MODIFICATIONS
;;;;    2011-10-10 <PJB> Extracted from 'standard-macro.lisp'.
;;;;BUGS
;;;;LEGAL
;;;;    GPL
;;;;
;;;;    Copyright Pascal J. Bourguignon 2011 - 2011
;;;;
;;;;    This program is free software; you can redistribute it and/or
;;;;    modify it under the terms of the GNU General Public License
;;;;    as published by the Free Software Foundation; either version
;;;;    2 of the License, or (at your option) any later version.
;;;;
;;;;    This program is distributed in the hope that it will be
;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;;;;    PURPOSE.  See the GNU General Public License for more details.
;;;;
;;;;    You should have received a copy of the GNU General Public
;;;;    License along with this program; if not, write to the Free
;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;;    Boston, MA 02111-1307 USA
;;;;**************************************************************************
(in-package "MINIMAL-COMPILER-SYSTEM")
(declaim (declaration constant)) ; we declaim constant variables as being mcsys:constant.


(defun note-type (type-name)
  "Register TYPE-NAME as a type (at compilation time).
RETURN: TYPE-NAME"
  type-name)


(defun ensure-type (type-name lambda-list docstring declarations type-form)
  (declare (ignore lambda-list docstring declarations type-form))
  ;; TODO: eventually we may want to register the type somewhere.
  type-name)



(defun note-class (class-name)
  "Register CLASS-NAME as a class (at compilation time).
RETURN: CLASS-NAME"
  class-name)


(defun ensure-class (class-name slot-specifiers class-options)
  (declare (ignore  slot-specifiers class-options))
  ;; TODO: eventually we may want to register the class somewhere.
  class-name)



(define-condition source-program-error (program-error)
  ((source-form        :initarg :source-form
                       :accessor source-program-error-source-form)
   (erroneous-subform  :initarg :erroneous-subform
                       :accessor source-program-error-erroneous-subform)))

(define-condition source-program-error-invalid-variable-name          (source-program-error) ())
(define-condition source-program-error-invalid-documentation-string   (source-program-error) ())
(define-condition source-program-error-too-many-documentation-strings (source-program-error) ())
(define-condition source-program-error-too-many-size-clauses          (source-program-error) ())
(define-condition source-program-error-invalid-defpackage-clause      (source-program-error) ())
(define-condition source-program-error-symbol-lists-must-be-disjoint  (source-program-error)
  ((intersection :initarg :intersection
                 :accessor source-program-error-symbol-lists-intersection)
   (one-list     :initarg :one-symbol-list
                 :accessor source-program-error-one-symbol-list)
   (other-list   :initarg :other-symbol-list
                 :accessor source-program-error-other-symbol-list)))
(define-condition source-program-error-too-many-deftype-forms         (source-program-error) ())


(define-condition package-error-package-not-found (package-error) ())
(define-condition package-error-symbol-not-found  (package-error)
  ((symbol-name :initarg :symbol-name
                :accessor package-error-symbol-not-found-symbol-name)))




(defun traced-functions ()
  "RETURN: The list of functions currently traced."
  ;; TODO: to be implemented.
  '())


(defun trace-function (fname)
  "Starts tracing the function."
  ;; TODO: to be implemented.
  fname)


(defun untrace-function (fname)
  "Stops tracing the function."
  ;; TODO: to be implemented.
  fname)


;;;; THE END ;;;;
ViewGit