~ubuntu-branches/ubuntu/intrepid/ecl/intrepid

« back to all changes in this revision

Viewing changes to src/cmp/cmpdefs.lsp

  • Committer: Bazaar Package Importer
  • Author(s): Peter Van Eynde
  • Date: 2006-06-21 09:21:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060621092121-txz1f21lj0wh0f67
Tags: 0.9h-20060617-1
* New upstream version
* Updated standards version without real changes. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
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"))
33
33
 
34
34
(in-package "COMPILER")
35
35
 
270
270
(defvar *compiler-output1*)
271
271
(defvar *compiler-output2*)
272
272
 
273
 
;;; --cmpblock.lsp--
274
 
;;;
275
 
;;; List of defined blocks, including marks for boundaries of closures
276
 
;;;
277
 
(defvar *blocks* nil)
278
 
 
279
273
;;; --cmpcbk.lsp--
280
274
;;;
281
275
;;; List of callbacks to be generated
359
353
(defvar *exit*)
360
354
(defvar *unwind-exit*)
361
355
 
362
 
;;; --cmpflet.lsp--
363
 
;;;
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
368
 
;;; function.
369
 
;;; A local macro definition is a list ( macro-name expansion-function).
370
 
 
371
 
(defvar *funs* nil)
372
356
(defvar *current-function* nil)
373
357
 
 
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
 
361
function recors:
 
362
 
 
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
 
372
 
 
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
 
382
object at the end.")
 
383
 
374
384
;;; --cmplog.lsp--
375
385
;;;
376
386
;;; Destination of output of different forms. See cmploc.lsp for types
437
447
;;; Compiler program and flags.
438
448
;;;
439
449
 
440
 
;;; --cmptag.lsp--
441
 
;;;
442
 
;;; List of tags with marks for closure boundaries.
443
 
;;;
444
 
(defvar *tags* nil)
445
 
 
446
450
;;; --cmptop.lsp--
447
451
;;;
 
452
(defvar *compiler-phase* nil)
 
453
 
448
454
(defvar *volatile*)
449
455
(defvar *setjmps* 0)
450
456
 
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 }*
 
491
 
483
492
;;;
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.
498
507
 
 
508
;;; *global-entries* holds (... ( fname cfun return-types arg-type ) ...).
499
509
(defvar *global-entries* nil)
500
510
 
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)
508
 
 
509
 
;;; *global-entries* holds (... ( fname cfun return-types arg-type ) ...).
510
 
 
511
 
;;; --cmpvar.lsp--
512
 
;;;
513
 
(defvar *vars* nil)
 
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.")
 
516
 
514
517
(defvar *undefined-vars* nil)