Fixed different uses of *volatile*, which indented wrong or placed it in the wrong place

This commit is contained in:
Juan Jose Garcia Ripoll 2013-05-23 13:47:38 +02:00
parent d1030a643c
commit 2bbc16ac33
6 changed files with 14 additions and 11 deletions

View file

@ -58,7 +58,7 @@
(wt-nl "cl_object " blk-var ";"))
(when (env-grows (blk-ref-ccb blk))
(let ((env-lvl *env-lvl*))
(wt-nl *volatile* "cl_object env" (incf *env-lvl*)
(wt-nl "cl_object " *volatile* "env" (incf *env-lvl*)
" = env" env-lvl ";")))
(bind "ECL_NEW_FRAME_ID(cl_env_copy)" blk-var)
(wt-nl "if (ecl_frs_push(cl_env_copy," blk-var ")!=0) {")

View file

@ -182,7 +182,7 @@
&aux
(*env* *env*)
(*inline-blocks* 0)
(*env-lvl* *env-lvl*) env-grows)
(*env-lvl* *env-lvl*))
(declare (ignore c1form))
;; create location for each function which is returned,
;; either in lexical:
@ -199,13 +199,13 @@
(otherwise
(maybe-open-inline-block)
(bind (next-lcl) var)
(wt-nl *volatile* "cl_object " var ";")))
(wt-nl "cl_object " *volatile* var ";")))
finally
;; if we have closed variables
(when (env-grows env-grows)
(maybe-open-inline-block)
(let ((env-lvl *env-lvl*))
(wt "volatile cl_object env" (incf *env-lvl*) " = env" env-lvl ";")))
(wt "cl_object " *volatile* "env" (incf *env-lvl*) " = env" env-lvl ";")))
;; bind closed locations because of possible circularities
(loop for var in closed-vars
do (bind nil var)))

View file

@ -375,7 +375,7 @@ The function thus belongs to the type of functions that ecl_make_cfun accepts."
(labels ((wt-decl (var)
(let ((lcl (next-lcl (var-name var))))
(wt-nl)
(wt *volatile* (rep-type-name (var-rep-type var)) " " lcl ";")
(wt (rep-type-name (var-rep-type var)) " " *volatile* lcl ";")
lcl))
(do-decl (var)
(when (local var) ; no LCL needed for SPECIAL or LEX

View file

@ -262,7 +262,7 @@
(when (useful-var-p var)
(maybe-open-inline-block)
(bind (next-lcl) var)
(wt-nl *volatile* (rep-type-name kind) " " var ";")
(wt-nl (rep-type-name kind) " " *volatile* var ";")
(wt-comment (var-name var)))
(unless env-grows (setq env-grows (var-ref-ccb var))))))

View file

@ -105,7 +105,7 @@
(defun ctop-write (name h-pathname data-pathname
&aux def top-output-string
(*volatile* " volatile "))
(*volatile* "volatile "))
(setq *top-level-forms* (nreverse *top-level-forms*))
(wt-nl "#include \"" (brief-namestring h-pathname) "\"")
@ -266,8 +266,11 @@
(*compile-to-linking-call* nil)
(*compile-file-truename* (and form (c1form-file form)))
(*compile-file-position* (and form (c1form-file-position form))))
(let ((body (with-output-to-string (*compiler-output1*)
(t2expr form))))
;; We save the C body of the statement, indented, just in case
;; we need to add a {} section with the environment variables.
(let ((body (let ((*opened-c-braces* (1+ *opened-c-braces*)))
(with-output-to-string (*compiler-output1*)
(t2expr form)))))
(if (or (plusp *max-lex*)
(plusp *max-temp*)
(plusp *max-env*)
@ -672,7 +675,7 @@
(wt-nl "const cl_env_ptr cl_env_copy = ecl_process_env();")
(when (eq (fun-closure fun) 'CLOSURE)
(wt-nl "cl_object " *volatile* "env0 = cl_env_copy->function->cclosure.env;"))
(wt-nl *volatile* "cl_object value0;")
(wt-nl "cl_object " *volatile* "value0;")
(when (policy-check-stack-overflow)
(wt-nl "ecl_cs_check(cl_env_copy,value0);"))
(when (eq (fun-closure fun) 'CLOSURE)

View file

@ -452,7 +452,7 @@
(rep-type-name (rep-type-name rep-type))
(temp (make-lcl-var :rep-type rep-type)))
(wt-nl-open-brace)
(wt-nl *volatile* rep-type-name " " temp ";")
(wt-nl rep-type-name " " *volatile* temp ";")
(let ((*destination* temp)) (c2expr* form))
(push (cons var temp) saves))
(let ((*destination* (make-temp-var)))