29
29
"*SUPPRESS-COMPILER-WARNINGS*"
30
30
"*SUPPRESS-COMPILER-NOTES*")
31
31
(:import-from "SI" "GET-SYSPROP" "PUT-SYSPROP" "REM-SYSPROP" "MACRO"
32
"*COMPILER-CONSTANTS*" "REGISTER-GLOBAL"))
32
"*COMPILER-CONSTANTS*" "REGISTER-GLOBAL" "CMP-ENV-REGISTER-MACROLET"))
34
34
(in-package "COMPILER")
270
270
(defvar *compiler-output1*)
271
271
(defvar *compiler-output2*)
275
;;; List of defined blocks, including marks for boundaries of closures
277
(defvar *blocks* nil)
279
273
;;; --cmpcbk.lsp--
281
275
;;; List of callbacks to be generated
360
354
(defvar *unwind-exit*)
364
;;; During Pass 1, *funs* holds a list of fun objects, local macro definitions
365
;;; and the symbol 'CB' (Closure Boundary) or 'LB' (Level Boundary).
366
;;; 'CB' will be pushed on *funs* when the compiler begins to process a closure.
367
;;; 'LB' will be pushed on *funs* when the compiler begins to process a local
369
;;; A local macro definition is a list ( macro-name expansion-function).
372
356
(defvar *current-function* nil)
358
(defvar *cmp-env* (cons nil nil)
359
"The compiler environment consists of a pair or cons of two
360
lists, one containing variable records, the other one macro and
363
variable-record = (:block block-name) |
364
(:tag ({tag-name}*)) |
365
(:function function-name) |
366
(var-name {:special | nil} bound-p) |
367
(symbol si::symbol-macro macro-function) |
368
CB | LB | UNWIND-PROTECT
369
macro-record = (function-name function) |
370
(macro-name si::macro macro-function)
371
CB | LB | UNWIND-PROTECT
373
A *-NAME is a symbol. A TAG-ID is either a symbol or a number. A
374
MACRO-FUNCTION is a function that provides us with the expansion
375
for that local macro or symbol macro. BOUND-P is true when the
376
variable has been bound by an enclosing form, while it is NIL if
377
the variable-record corresponds just to a special declaration.
378
CB, LB and UNWIND-PROTECT are only used by the C compiler and
379
they denote closure, lexical environment and unwind-protect
380
boundaries. Note that compared with the bytecodes compiler, these
381
records contain an additional variable, block, tag or function
374
384
;;; --cmplog.lsp--
376
386
;;; Destination of output of different forms. See cmploc.lsp for types
463
469
; or *temporary-objects*
464
470
(defvar *permanent-objects* nil) ; holds { ( object (VV vv-index) ) }*
465
471
(defvar *temporary-objects* nil) ; holds { ( object (VV vv-index) ) }*
472
(defvar *load-objects* nil) ; hash with association object -> vv-location
466
473
(defvar *load-time-values* nil) ; holds { ( vv-index form ) }*,
467
474
;;; where each vv-index should be given an object before
468
475
;;; defining the current function during loading process.
480
487
(defvar *linking-calls* nil) ; holds { ( global-fun-name fun symbol c-fun-name var-name ) }*
481
488
(defvar *local-funs* nil) ; holds { fun }*
482
489
(defvar *top-level-forms* nil) ; holds { top-level-form }*
490
(defvar *make-forms* nil) ; holds { top-level-form }*
484
493
;;; top-level-form:
485
494
;;; ( 'DEFUN' fun-name cfun lambda-expr doc-vv sp )
496
505
;;; *reservations* holds (... ( cmacro . value ) ...).
497
506
;;; *reservation-cmacro* holds the cmacro current used as vs reservation.
508
;;; *global-entries* holds (... ( fname cfun return-types arg-type ) ...).
499
509
(defvar *global-entries* nil)
501
;;; *self-destructing-fasl* = T means that, when a FASL module is
502
;;; being unloaded (for instance during garbage collection), the
503
;;; associated file will be deleted. We need this because on windows
504
;;; DLLs cannot be deleted if they have been opened with LoadLibrary.
505
;;; Thus, (COMPILE ...) cannot create a DLL, load it and delete it
506
;;; while it is being used.
507
(defvar *self-destructing-fasl* nil)
509
;;; *global-entries* holds (... ( fname cfun return-types arg-type ) ...).
511
(defvar *self-destructing-fasl* '()
512
"A value T means that, when a FASL module is being unloaded (for
513
instance during garbage collection), the associated file will be
514
deleted. We need this for #'COMPILE because windows DLLs cannot
515
be deleted if they have been opened with LoadLibrary.")
514
517
(defvar *undefined-vars* nil)