Changeset 4762 for trunk/j/src/org/armedbear/lisp/precompiler.lisp
 Timestamp:
 11/15/03 01:07:35 (18 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/j/src/org/armedbear/lisp/precompiler.lisp
r4724 r4762 2 2 ;;; 3 3 ;;; Copyright (C) 2003 Peter Graves 4 ;;; $Id: precompiler.lisp,v 1. 3 20031114 00:06:05 piso Exp $4 ;;; $Id: precompiler.lisp,v 1.4 20031115 01:07:35 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 298 298 299 299 (defun precompile1 (form) 300 (when (atom form) 301 (returnfrom precompile1 form)) 302 ;; Form is a cons. 303 (let ((op (car form))) 304 (when (symbolp op) 305 (cond ((localmacrofunction op) 306 (let ((result (expandlocalmacro form))) 307 (if (equal result form) 308 (returnfrom precompile1 result) 309 (returnfrom precompile1 (precompile1 result))))) 310 ((compilermacrofunction op) 311 (let ((result (compilermacroexpand form))) 312 (if (equal result form) 313 (returnfrom precompile1 result) 314 (returnfrom precompile1 (precompile1 result))))) 315 ((and (not (eq op 'LAMBDA)) 316 (macrofunction op)) 317 ;; It's a macro... 318 (unless (and (specialoperatorp op) (not *injvmcompile*)) 319 (let ((result (expandmacro form))) 320 (returnfrom precompile1 (precompile1 result)))))) 321 (let ((handler (get op 'precompilehandler))) 322 (when handler 323 (returnfrom precompile1 (funcall handler form))))) 324 (when (and (symbolp op) (fboundp op)) 325 (when (specialoperatorp op) 326 (format t "PRECOMPILE1: unsupported special operator ~S~%" op)))) 327 (precompilecons form)) 300 (if (atom form) 301 form 302 (let ((op (car form))) 303 (when (symbolp op) 304 (cond ((localmacrofunction op) 305 (let ((result (expandlocalmacro form))) 306 (if (equal result form) 307 (returnfrom precompile1 result) 308 (returnfrom precompile1 (precompile1 result))))) 309 ((compilermacrofunction op) 310 (let ((result (compilermacroexpand form))) 311 (if (equal result form) 312 (returnfrom precompile1 result) 313 (returnfrom precompile1 (precompile1 result))))) 314 ((and (not (eq op 'LAMBDA)) 315 (macrofunction op)) 316 ;; It's a macro... 317 (unless (and (specialoperatorp op) (not *injvmcompile*)) 318 (let ((result (expandmacro form))) 319 (returnfrom precompile1 (precompile1 result)))))) 320 (let ((handler (get op 'precompilehandler))) 321 (when handler 322 (returnfrom precompile1 (funcall handler form))))) 323 (when (and (symbolp op) (specialoperatorp op)) 324 (format t "PRECOMPILE1: unsupported special operator ~S~%" op)) 325 (precompilecons form)))) 328 326 329 327 (defun precompileform (form injvmcompile)
Note: See TracChangeset
for help on using the changeset viewer.