Changeset 5868


Ignore:
Timestamp:
02/18/04 15:33:16 (17 years ago)
Author:
piso
Message:

FUNCALL compiler macro.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/precompiler.lisp

    r5753 r5868  
    22;;;
    33;;; Copyright (C) 2003-2004 Peter Graves
    4 ;;; $Id: precompiler.lisp,v 1.26 2004-02-10 16:28:32 piso Exp $
     4;;; $Id: precompiler.lisp,v 1.27 2004-02-18 15:33:16 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    9393      `(%subtypep ,@args)
    9494      form))
     95
     96(define-compiler-macro funcall (&whole form &rest args)
     97  (let ((callee (car args)))
     98    (if (and (consp callee)
     99             (eq (car callee) 'function)
     100             (symbolp (cadr callee))
     101             (memq (symbol-package (cadr callee))
     102                   (list (find-package "CL") (find-package "SYS"))))
     103        `(,(cadr callee) ,@(cdr args))
     104        form)))
    95105
    96106(in-package "EXTENSIONS")
Note: See TracChangeset for help on using the changeset viewer.