diff --git a/module/mescc/compile.scm b/module/mescc/compile.scm index 326dbbf9..579de2ce 100644 --- a/module/mescc/compile.scm +++ b/module/mescc/compile.scm @@ -42,6 +42,7 @@ c99-input->object)) (define mes? (pair? (current-module))) +(define mes-or-reproducible? #t) (define (cc-amd? info) #f) ; use AMD calling convention? ;; (define %reduced-register-count #f) ; use all registers? (define %reduced-register-count 2) ; use reduced instruction set @@ -581,7 +582,7 @@ (wrap-as `((#:comment ,o)))) (define (ast->comment o) - (if mes? '() + (if mes-or-reproducible? '() (let* ((source (with-output-to-string (lambda () (pretty-print-c99 o)))) ;; Nyacc fixups (source (string-substitute source "\\" "\\\\")) @@ -1514,7 +1515,7 @@ info)) ((or ,a ,b) - (let* ((here (number->string (length (if mes? (.text info) + (let* ((here (number->string (length (if mes-or-reproducible? (.text info) (filter (negate comment?) (.text info)))))) (skip-b-label (string-append label "_skip_b_" here)) (b-label (string-append label "_b_" here)) diff --git a/module/mescc/preprocess.scm b/module/mescc/preprocess.scm index b8c38aa0..d4e9a6c9 100644 --- a/module/mescc/preprocess.scm +++ b/module/mescc/preprocess.scm @@ -31,6 +31,8 @@ #:use-module (mes guile) #:export (c99-input->ast)) +(define mes-or-reproducible? #t) + (when (getenv "MESC_DEBUG") (format (current-error-port) "*nyacc-version*=~a\n" *nyacc-version*)) @@ -97,7 +99,7 @@ "SYSTEM_LIBC=0" "__STDC__=1" "__MESC__=1" - ,(if mes? "__MESC_MES__=1" "__MESC_MES__=0") + ,(if mes-or-reproducible? "__MESC_MES__=1" "__MESC_MES__=0") ,@defines))) (when (and verbose? (> verbose? 1)) (stderr "includes: ~s\n" includes)