diff --git a/src/cmp/cmpbackend-cxx/cmpc-opt-inl.lsp b/src/cmp/cmpbackend-cxx/cmpc-opt-inl.lsp index 469b53100..7174e3613 100644 --- a/src/cmp/cmpbackend-cxx/cmpc-opt-inl.lsp +++ b/src/cmp/cmpbackend-cxx/cmpc-opt-inl.lsp @@ -63,7 +63,7 @@ (c2expr* form1)) (if (eq (c1form-name form1) 'LOCATION) (list (c1form-primary-type form1) (c1form-arg 0 form1)) - (emit-inlined-variable (make-c1form 'VAR form vref nil) rest-forms)))) + (emit-inlined-variable (make-c1form 'VARIABLE form vref nil) rest-forms)))) (defun emit-inlined-call-global (form expected-type) (let* ((fname (c1form-arg 0 form)) @@ -129,7 +129,7 @@ (case (c1form-name form) (LOCATION (list (c1form-primary-type form) (c1form-arg 0 form))) - (VAR + (VARIABLE (emit-inlined-variable form forms)) (CALL-GLOBAL (emit-inlined-call-global form (c1form-primary-type form))) diff --git a/src/cmp/cmpbackend-cxx/cmppass2-call.lsp b/src/cmp/cmpbackend-cxx/cmppass2-call.lsp index 37f4d2181..e444642c1 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-call.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-call.lsp @@ -15,7 +15,7 @@ (let ((name (c1form-name value))) (cond ((eq name 'LOCATION) (c1form-arg 0 value)) - ((and (eq name 'VAR) + ((and (eq name 'VARIABLE) other-forms-flag (not (var-changed-in-form-list (c1form-arg 0 value) other-forms))) (c1form-arg 0 value)) diff --git a/src/cmp/cmpbackend-cxx/cmppass2-cont.lsp b/src/cmp/cmpbackend-cxx/cmppass2-cont.lsp index 03982b60b..2141be826 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-cont.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-cont.lsp @@ -137,7 +137,7 @@ (defun c2throw (c1form tag val &aux loc) (declare (ignore c1form)) (case (c1form-name tag) - ((VAR LOCATION) (setq loc (c1form-arg 0 tag))) + ((VARIABLE LOCATION) (setq loc (c1form-arg 0 tag))) (t (setq loc (make-temp-var)) (let ((*destination* loc)) (c2expr* tag)))) (let ((*destination* 'VALUES)) (c2expr* val)) diff --git a/src/cmp/cmpbackend-cxx/cmppass2-var.lsp b/src/cmp/cmpbackend-cxx/cmppass2-var.lsp index 1bb10328b..e9cd97f5e 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-var.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-var.lsp @@ -15,7 +15,7 @@ (in-package #:compiler) (defun c2let-replaceable-var-ref-p (var form rest-forms) - (when (and (eq (c1form-name form) 'VAR) + (when (and (eq (c1form-name form) 'VARIABLE) (null (var-set-nodes var)) (local var)) (let ((var1 (c1form-arg 0 form))) @@ -67,7 +67,7 @@ ((LEXICAL CLOSURE SPECIAL GLOBAL) (case (c1form-name form) (LOCATION (bind (c1form-arg 0 form) var)) - (VAR (bind (c1form-arg 0 form) var)) + (VARIABLE (bind (c1form-arg 0 form) var)) (t (bind-init form var)))) (t ; local var (let ((*destination* var)) ; nil (ccb) diff --git a/src/cmp/cmpform.lsp b/src/cmp/cmpform.lsp index 45fc4b8a4..1fc845ea6 100644 --- a/src/cmp/cmpform.lsp +++ b/src/cmp/cmpform.lsp @@ -144,7 +144,7 @@ (defun c1form-movable-p (form) (flet ((abort-on-not-pure (form) (let ((name (c1form-name form))) - (cond ((eq name 'VAR) + (cond ((eq name 'VARIABLE) (let ((var (c1form-arg 0 form))) (when (or (global-var-p var) (var-set-nodes var)) @@ -160,7 +160,7 @@ (defun c1form-unmodified-p (form rest-form) (flet ((abort-on-not-pure (form) (let ((name (c1form-name form))) - (cond ((eq name 'VAR) + (cond ((eq name 'VARIABLE) (let ((var (c1form-arg 0 form))) (when (or (global-var-p var) (var-changed-in-form-list var rest-form)) @@ -203,7 +203,7 @@ (when (c1form-side-effects new-fields) (baboon :format-control "Attempted to move a form with side-effects")) ;; The following protocol is only valid for VAR references. - (unless (eq (c1form-name dest) 'VAR) + (unless (eq (c1form-name dest) 'VARIABLE) (baboon :format-control "Cannot replace forms other than VARs:~%~4I~A" :format-arguments (list dest))) ;; We have to relocate the children nodes of NEW-FIELDS in @@ -212,7 +212,7 @@ ;; exceptions are forms that can be fully replaced (case (c1form-name new-fields) (LOCATION) - (VAR + (VARIABLE (let ((var (c1form-arg 0 new-fields))) ;; If this is the first time we replace a reference with this one ;; then we have to remove it from the read nodes of the variable @@ -242,7 +242,7 @@ ;; exactly one occurrence of var is present in forms (defun delete-c1forms (form) (flet ((eliminate-references (form) - (when (eq (c1form-name form) 'VAR) + (when (eq (c1form-name form) 'VARIABLE) (let ((var (c1form-arg 0 form))) (when var (delete-from-read-nodes var form)))))) diff --git a/src/cmp/cmppass1-ffi.lsp b/src/cmp/cmppass1-ffi.lsp index 9d7792282..972c87db9 100644 --- a/src/cmp/cmppass1-ffi.lsp +++ b/src/cmp/cmppass1-ffi.lsp @@ -82,7 +82,7 @@ side-effects one-liner))) (loop for form in arguments - when (eq (c1form-name form) 'VAR) + when (eq (c1form-name form) 'VARIABLE) do (let ((var (c1form-arg 0 form))) (add-to-set-nodes var form))) form))) diff --git a/src/cmp/cmppass1-special.lsp b/src/cmp/cmppass1-special.lsp index 706a4321d..c4f9e14f7 100644 --- a/src/cmp/cmppass1-special.lsp +++ b/src/cmp/cmppass1-special.lsp @@ -68,7 +68,7 @@ (add-fname fun) (ext:if-let ((funob (local-function-ref fun t))) (let ((var (fun-var funob))) - (add-to-read-nodes var (make-c1form* 'VAR :args var nil))) + (add-to-read-nodes var (make-c1form* 'VARIABLE :args var nil))) (make-c1form* 'FUNCTION :type 'FUNCTION :sp-change (not (and (symbolp fun) diff --git a/src/cmp/cmppass1-top.lsp b/src/cmp/cmppass1-top.lsp index aae45449e..387df0fc9 100644 --- a/src/cmp/cmppass1-top.lsp +++ b/src/cmp/cmppass1-top.lsp @@ -179,7 +179,7 @@ ;; Not closed over anything (every #'global-var-p (fun-referenced-vars fun-object)) ;; Referencing the function variable - (eq (c1form-name form) 'VAR) + (eq (c1form-name form) 'VARIABLE) (eq (c1form-arg 0 form) (fun-var fun-object))) (when (fun-no-entry fun-object) diff --git a/src/cmp/cmppass1-var.lsp b/src/cmp/cmppass1-var.lsp index 7cb28fb53..ecfa14519 100644 --- a/src/cmp/cmppass1-var.lsp +++ b/src/cmp/cmppass1-var.lsp @@ -191,7 +191,7 @@ ;; (let ((v1 e1) (v2 e2) (v3 e3)) (expr e4 v2 e5)) ;; - v2 is a read only variable ;; - the value of e2 is not modified in e3 nor in following expressions - (when (eq (c1form-name form) 'VAR) + (when (eq (c1form-name form) 'VARIABLE) (let ((other-var (c1form-arg 0 form))) (unless (or (global-var-p other-var) (member other-var rest-vars) @@ -245,7 +245,7 @@ ;;; When LOC is not NIL then we deal with a constant. (defun c1var (name loc) (let* ((var (c1vref name)) - (output (make-c1form* 'VAR + (output (make-c1form* 'VARIABLE :type (var-type var) :args var loc))) (add-to-read-nodes var output) diff --git a/src/cmp/cmptables.lsp b/src/cmp/cmptables.lsp index 92fa5fedc..6072ed6b8 100644 --- a/src/cmp/cmptables.lsp +++ b/src/cmp/cmptables.lsp @@ -25,7 +25,7 @@ (EXT:COMPILER-LET symbols values body) ;; Places, assignment and binding (LOCATION loc :pure :single-valued) - (VAR var value :single-valued) + (VARIABLE var value :single-valued) (CL:SETQ var value-c1form :side-effects) (CL:PSETQ var-list value-c1form-list :side-effects) (CL:PROGV symbols values form :side-effects) @@ -224,7 +224,7 @@ (cl:tagbody . c2tagbody) (cl:go . c2go) - (var . c2var) + (variable . c2var) (location . c2location) (cl:setq . c2setq) (cl:progv . c2progv) @@ -271,7 +271,7 @@ (cl:unwind-protect . p1unwind-protect) (ordinary . p1ordinary) (si:fset . p1fset) - (var . p1var) + (variable . p1var) (cl:values . p1values) (location . p1trivial) ;; Some of these can be improved (ffi:c-inline . p1trivial) diff --git a/src/cmp/cmpvar.lsp b/src/cmp/cmpvar.lsp index 7347ab4f3..f7bbfc09a 100644 --- a/src/cmp/cmpvar.lsp +++ b/src/cmp/cmpvar.lsp @@ -18,7 +18,7 @@ ;; exactly one occurrence of var is present in forms (defun replaceable (var form) (labels ((abort-on-side-effects (form) - (if (eq (c1form-name form) 'VAR) + (if (eq (c1form-name form) 'VARIABLE) (when (eq var (first (c1form-args form))) (return-from replaceable t)) (when (c1form-side-effects form) @@ -35,7 +35,7 @@ (last-form (car (last (first args))))) ((LET LET* FLET LABELS BLOCK CATCH) (last-form (car (last args)))) - (VAR (c1form-arg 0 x)) + (VARIABLE (c1form-arg 0 x)) (t x)))) (and (not (c1form-side-effects form)) (or (< (var-ref var) 1) @@ -49,7 +49,7 @@ (when (var-functions-reading var) (baboon :format-control "Cannot replace a variable that forms part of a closure")) (dolist (where (var-read-forms var)) - (unless (and (eql (c1form-name where) 'VAR) + (unless (and (eql (c1form-name where) 'VARIABLE) (eql (c1form-arg 0 where) var)) (baboon :format-control "VAR-READ-NODES are only C1FORMS of type VAR")) (delete-from-read-nodes var where) @@ -140,7 +140,7 @@ (var-type var) orig-type) (loop for form in (var-read-forms var) - when (and (eq (c1form-name form) 'VAR) + when (and (eq (c1form-name form) 'VARIABLE) (eq var (c1form-arg 0 form))) do (setf (c1form-type form) (type-and type (c1form-primary-type form))) finally (setf (var-type var) type)))))