unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* put more strings in pure memory
@ 2009-10-21  5:51 Dan Nicolaescu
  2009-10-21  6:42 ` Jason Rumney
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Nicolaescu @ 2009-10-21  5:51 UTC (permalink / raw)
  To: emacs-devel


The patch below moves more strings from GC memory to pure memory.
(CVS is dead, so diffs from the ~ files).

OK to check in?

Things in international/* and language/* probably need a bit more work,
they generate a lot of strings that could be in pure memory.
Unfortunately I am not familiar with that code, so help would be
appreciated.



--- ./lisp/mail/rmail.el.~1.556.~	2009-10-16 23:34:03.000000000 -0700
+++ ./lisp/mail/rmail.el	2009-10-20 14:26:40.000000000 -0700
@@ -297,7 +297,7 @@ also the To field, unless this would lea
   :group 'rmail-reply)
 
 ;;;###autoload
-(defvar rmail-default-dont-reply-to-names "\\`info-"
+(defvar rmail-default-dont-reply-to-names (purecopy "\\`info-")
   "Regexp specifying part of the default value of `rmail-dont-reply-to-names'.
 This is used when the user does not set `rmail-dont-reply-to-names'
 explicitly.  (The other part of the default value is the user's
@@ -308,6 +308,7 @@ used for large mailing lists to broadcas
 
 ;;;###autoload
 (defcustom rmail-ignored-headers
+  (purecopy
   (concat "^via:\\|^mail-from:\\|^origin:\\|^references:\\|^sender:"
 	  "\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:"
 	  "\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:"
@@ -324,7 +325,7 @@ used for large mailing lists to broadcas
 	  "\\|^mbox-line:\\|^cancel-lock:"
 	  "\\|^DomainKey-Signature:\\|^dkim-signature:"
 	  "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization:\\|^resent-openpgp:"
-	  "\\|^x-.*:")
+	  "\\|^x-.*:"))
   "Regexp to match header fields that Rmail should normally hide.
 \(See also `rmail-nonignored-headers', which overrides this regexp.)
 This variable is used for reformatting the message header,
@@ -360,14 +361,14 @@ If nil, display all header fields except
   :group 'rmail-headers)
 
 ;;;###autoload
-(defcustom rmail-retry-ignored-headers "^x-authentication-warning:\\|^x-detected-operating-system:\\|^x-spam[-a-z]*:\\|content-type:\\|content-transfer-encoding:\\|mime-version:"
+(defcustom rmail-retry-ignored-headers (purecopy "^x-authentication-warning:\\|^x-detected-operating-system:\\|^x-spam[-a-z]*:\\|content-type:\\|content-transfer-encoding:\\|mime-version:")
   "Headers that should be stripped when retrying a failed message."
   :type '(choice regexp (const nil :tag "None"))
   :group 'rmail-headers
   :version "23.2")	   ; added x-detected-operating-system, x-spam
 
 ;;;###autoload
-(defcustom rmail-highlighted-headers "^From:\\|^Subject:"
+(defcustom rmail-highlighted-headers (purecopy "^From:\\|^Subject:")
   "Regexp to match Header fields that Rmail should normally highlight.
 A value of nil means don't highlight.  Uses the face `rmail-highlight'."
   :type 'regexp
@@ -418,12 +419,12 @@ the frame where you have the RMAIL buffe
   :group 'rmail-reply)
 
 ;;;###autoload
-(defcustom rmail-secondary-file-directory "~/"
+(defcustom rmail-secondary-file-directory (purecopy "~/")
   "Directory for additional secondary Rmail files."
   :type 'directory
   :group 'rmail-files)
 ;;;###autoload
-(defcustom rmail-secondary-file-regexp "\\.xmail$"
+(defcustom rmail-secondary-file-regexp (purecopy "\\.xmail$")
   "Regexp for which files are secondary Rmail files."
   :type 'regexp
   :group 'rmail-files)
--- ./lisp/mail/sendmail.el.~1.332.~	2009-10-03 03:20:54.000000000 -0700
+++ ./lisp/mail/sendmail.el	2009-10-20 12:38:19.000000000 -0700
@@ -172,7 +172,7 @@ This is used by the default mail-sending
   :group 'sendmail)
 
 ;;;###autoload
-(defcustom mail-header-separator "--text follows this line--"
+(defcustom mail-header-separator (purecopy "--text follows this line--")
   "Line used to separate headers from text in messages being composed."
   :type 'string
   :group 'sendmail)
@@ -212,7 +212,7 @@ This variable has no effect unless your 
   :group 'sendmail)
 
 ;;;###autoload
-(defcustom mail-personal-alias-file "~/.mailrc"
+(defcustom mail-personal-alias-file (purecopy "~/.mailrc")
   "If non-nil, the name of the user's personal mail alias file.
 This file typically should be in same format as the `.mailrc' file used by
 the `Mail' or `mailx' program.
--- ./lisp/emacs-lisp/byte-run.el.~1.41.~	2009-10-16 23:34:00.000000000 -0700
+++ ./lisp/emacs-lisp/byte-run.el	2009-10-20 12:23:26.000000000 -0700
@@ -127,7 +127,7 @@ was first made obsolete, for example a d
     (if (eq 'byte-compile-obsolete handler)
 	(setq handler (nth 1 (get obsolete-name 'byte-obsolete-info)))
       (put obsolete-name 'byte-compile 'byte-compile-obsolete))
-    (put obsolete-name 'byte-obsolete-info (list current-name handler when)))
+    (put obsolete-name 'byte-obsolete-info (list current-name handler (purecopy when))))
   obsolete-name)
 (set-advertised-calling-convention
  ;; New code should always provide the `when' argument.
@@ -166,7 +166,11 @@ was first made obsolete, for example a d
       (if (equal str "") (error ""))
       (intern str))
     (car (read-from-string (read-string "Obsoletion replacement: ")))))
-  (put obsolete-name 'byte-obsolete-variable (cons current-name when))
+  (put obsolete-name 'byte-obsolete-variable
+       (cons
+	(if (stringp current-name)
+	    (purecopy current-name)
+	  current-name) (purecopy when)))
   obsolete-name)
 (set-advertised-calling-convention
  ;; New code should always provide the `when' argument.
--- ./lisp/international/mule-cmds.el.~1.376.~	2009-10-16 23:34:02.000000000 -0700
+++ ./lisp/international/mule-cmds.el	2009-10-20 20:45:06.000000000 -0700
@@ -1174,8 +1174,10 @@ where to put this language environment i
 Describe Language Environment and Set Language Environment menus.
 For example, (\"European\") means to put this language environment
 in the European submenu in each of those two menus."
-  (if (symbolp lang-env)
-      (setq lang-env (symbol-name lang-env)))
+  (cond ((symbolp lang-env)
+	 (setq lang-env (symbol-name lang-env)))
+	((stringp lang-env)
+	 (setq lang-env (purecopy lang-env))))
   (let ((describe-map describe-language-environment-map)
 	(setup-map setup-language-environment-map))
     (if parents
@@ -1209,12 +1211,13 @@ in the European submenu in each of those
 	    (setq l (cdr l)))))
 
     ;; Set up menu items for this language env.
-    (let ((doc (assq 'documentation alist)))
-      (when doc
-	(define-key-after describe-map (vector (intern lang-env))
-	  (cons lang-env 'describe-specified-language-support))))
-    (define-key-after setup-map (vector (intern lang-env))
-      (cons lang-env 'setup-specified-language-environment))
+    (let ((vin-lang-env (vector (intern lang-env))))
+      (let ((doc (assq 'documentation alist)))
+	(when doc
+	  (define-key-after describe-map vin-lang-env
+	    (cons lang-env 'describe-specified-language-support) t)))
+      (define-key-after setup-map vin-lang-env
+	(cons lang-env 'setup-specified-language-environment) t))
 
     (dolist (elt alist)
       (set-language-info-internal lang-env (car elt) (cdr elt)))
@@ -1249,7 +1252,7 @@ This file contains a list of libraries o
 in the format of Lisp expression for registering each input method.
 Emacs loads this file at startup time.")
 
-(defvar leim-list-header (format
+(defconst leim-list-header (format
 ";;; %s -- list of LEIM (Library of Emacs Input Method) -*-coding: utf-8;-*-
 ;;
 ;; This file is automatically generated.
@@ -1272,7 +1275,7 @@ Emacs loads this file at startup time.")
 				 leim-list-file-name)
   "Header to be inserted in LEIM list file.")
 
-(defvar leim-list-entry-regexp "^(register-input-method"
+(defconst leim-list-entry-regexp "^(register-input-method"
   "Regexp matching head of each entry in LEIM list file.
 See also the variable `leim-list-header'.")
 
@@ -2745,12 +2748,13 @@ See also the documentation of `get-char-
 	  (error "Invalid char-table: %s" table))
     (or (stringp table)
 	(error "Not a char-table nor a file name: %s" table)))
+  (if (stringp table) (purecopy table))
   (let ((slot (assq name char-code-property-alist)))
     (if slot
 	(setcdr slot table)
       (setq char-code-property-alist
 	    (cons (cons name table) char-code-property-alist))))
-  (put name 'char-code-property-documentation docstring))
+  (put name 'char-code-property-documentation (purecopy docstring)))
 
 (defvar char-code-property-table
   (make-char-table 'char-code-property-table)
--- ./lisp/international/quail.el.~1.176.~	2009-10-16 23:34:02.000000000 -0700
+++ ./lisp/international/quail.el	2009-10-20 20:30:37.000000000 -0700
@@ -500,6 +500,10 @@ non-Quail commands."
 	(define-key conversion-keymap
 	  (car (car conversion-keys)) (cdr (car conversion-keys)))
 	(setq conversion-keys (cdr conversion-keys))))
+    (setq name (purecopy name))
+    (setq title (purecopy title))
+    (setq language (purecopy language))
+    (setq docstring (purecopy docstring))
     (quail-add-package
      (list name title (list nil) guidance (or docstring "")
 	   translation-keymap
--- ./lisp/international/mule.el.~1.289.~	2009-09-12 11:23:16.000000000 -0700
+++ ./lisp/international/mule.el	2009-10-20 20:23:12.000000000 -0700
@@ -277,7 +277,7 @@ attribute."
 
     ;; Add :name and :docstring properties to PROPS.
     (setq props
-	  (cons :name (cons name (cons :docstring (cons docstring props)))))
+	  (cons :name (cons name (cons :docstring (cons (purecopy docstring) props)))))
     (or (plist-get props :short-name)
 	(plist-put props :short-name (symbol-name name)))
     (or (plist-get props :long-name)
--- ./lisp/bindings.el.~1.226.~	2009-10-16 23:33:54.000000000 -0700
+++ ./lisp/bindings.el	2009-10-20 15:34:47.000000000 -0700
@@ -637,24 +637,24 @@ is okay.  See `mode-line-format'.")
 ;; Packages should add to this list appropriately when they are
 ;; loaded, rather than listing everything here.
 (setq debug-ignored-errors
-      '(beginning-of-line beginning-of-buffer end-of-line
+      `(beginning-of-line beginning-of-buffer end-of-line
 	end-of-buffer end-of-file buffer-read-only
 	file-supersession
-      	"^Previous command was not a yank$"
-	"^Minibuffer window is not active$"
-	"^No previous history search regexp$"
-	"^No later matching history item$"
-	"^No earlier matching history item$"
-	"^End of history; no default available$"
-	"^End of defaults; no next item$"
-	"^Beginning of history; no preceding item$"
-	"^No recursive edit is in progress$"
-	"^Changes to be undone are outside visible portion of buffer$"
-	"^No undo information in this buffer$"
-	"^No further undo information"
-	"^Save not confirmed$"
-	"^Recover-file cancelled\\.$"
-	"^Cannot switch buffers in a dedicated window$"
+      	,(purecopy "^Previous command was not a yank$")
+	,(purecopy "^Minibuffer window is not active$")
+	,(purecopy "^No previous history search regexp$")
+	,(purecopy "^No later matching history item$")
+	,(purecopy "^No earlier matching history item$")
+	,(purecopy "^End of history; no default available$")
+	,(purecopy "^End of defaults; no next item$")
+	,(purecopy "^Beginning of history; no preceding item$")
+	,(purecopy "^No recursive edit is in progress$")
+	,(purecopy "^Changes to be undone are outside visible portion of buffer$")
+	,(purecopy "^No undo information in this buffer$")
+	,(purecopy "^No further undo information")
+	,(purecopy "^Save not confirmed$")
+	,(purecopy "^Recover-file cancelled\\.$")
+	,(purecopy "^Cannot switch buffers in a dedicated window$")
         ))
 
 
--- ./lisp/jka-cmpr-hook.el.~1.28.~	2009-06-22 23:37:53.000000000 -0700
+++ ./lisp/jka-cmpr-hook.el	2009-10-20 15:25:32.000000000 -0700
@@ -195,6 +195,7 @@ options through Custom does this automat
   ;; compr-message  compr-prog  compr-args
   ;; uncomp-message uncomp-prog uncomp-args
   ;; can-append strip-extension-flag file-magic-bytes]
+  (purecopy
   '(["\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'"
      "compressing"    "compress"     ("-c")
      ;; gzip is more common than uncompress. It can only read, not write.
@@ -229,7 +230,7 @@ options through Custom does this automat
     ["\\.dz\\'"
      nil              nil            nil
      "uncompressing"      "gzip"         ("-c" "-q" "-d")
-     nil t "\037\213"])
+     nil t "\037\213"]))
 
   "List of vectors that describe available compression techniques.
 Each element, which describes a compression technique, is a vector of
--- ./lisp/ps-print.el.~1.229.~	2009-09-23 22:16:06.000000000 -0700
+++ ./lisp/ps-print.el	2009-10-20 13:12:36.000000000 -0700
@@ -1832,6 +1832,7 @@ If it's nil, automatic feeding takes pla
 
 ;;;###autoload
 (defcustom ps-page-dimensions-database
+ (purecopy
   (list (list 'a4    (/ (* 72 21.0) 2.54)  (/ (* 72 29.7) 2.54) "A4")
 	(list 'a3    (/ (* 72 29.7) 2.54)  (/ (* 72 42.0) 2.54) "A3")
 	(list 'letter       (* 72  8.5)    (* 72 11.0)          "Letter")
@@ -1868,7 +1869,7 @@ If it's nil, automatic feeding takes pla
 	'(topcoatedpaper     396.0     136.0 "TopcoatedPaper150")
 	'(vhsface            205.0     127.0 "VHSFace")
 	'(vhsspine           400.0      50.0 "VHSSpine")
-	'(zipdisk            156.0     136.0 "ZipDisk"))
+	'(zipdisk            156.0     136.0 "ZipDisk")))
   "List associating a symbolic paper type to its width, height and doc media.
 See `ps-paper-type'."
   :type '(repeat (list :tag "Paper Type"
--- ./lisp/loadup.el.~1.185.~	2009-10-11 12:24:11.000000000 -0700
+++ ./lisp/loadup.el	2009-10-20 19:04:44.000000000 -0700
@@ -76,9 +76,13 @@
 (set-buffer "*scratch*")
 (setq buffer-undo-list t)
 
 (load "emacs-lisp/byte-run")
+(garbage-collect)
 (load "emacs-lisp/backquote")
+(garbage-collect)
 (load "subr")
+(garbage-collect)
 
 ;; Do it after subr, since both after-load-functions and add-hook are
 ;; implemented in subr.el.
--- ./lisp/textmodes/ispell.el.~1.259.~	2009-10-16 23:34:06.000000000 -0700
+++ ./lisp/textmodes/ispell.el	2009-10-20 14:40:30.000000000 -0700
@@ -1389,6 +1389,7 @@ The last occurring definition in the buf
 
 ;;;###autoload
 (defvar ispell-skip-region-alist
+  (purecopy
   '((ispell-words-keyword	   forward-line)
     (ispell-dictionary-keyword	   forward-line)
     (ispell-pdict-keyword	   forward-line)
@@ -1412,7 +1413,7 @@ The last occurring definition in the buf
     ;; by not allowing "/" to be the character which triggers the
     ;; identification of the computer name, e.g.:
     ;; "\\(\\w\\|[-_]\\)+[.:@]\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_]\\|~\\)+\\)+"
-    )
+    ))
   "Alist expressing beginning and end of regions not to spell check.
 The alist key must be a regular expression.
 Valid forms include:
@@ -1425,7 +1426,8 @@ Valid forms include:
 
 ;;;###autoload
 (defvar ispell-tex-skip-alists
-  '((;;("%\\[" . "%\\]") ; AMStex block comment...
+  (purecopy
+   '((;;("%\\[" . "%\\]") ; AMStex block comment...
      ;; All the standard LaTeX keywords from L. Lamport's guide:
      ;; \cite, \hspace, \hspace*, \hyphenation, \include, \includeonly, \input,
      ;; \label, \nocite, \rule (in ispell - rest included here)
@@ -1443,7 +1445,7 @@ Valid forms include:
      ("\\(figure\\|table\\)\\*?"	 ispell-tex-arg-end 0)
      ("list"				 ispell-tex-arg-end 2)
      ("program"		. "\\\\end[ \t\n]*{[ \t\n]*program[ \t\n]*}")
-     ("verbatim\\*?"	. "\\\\end[ \t\n]*{[ \t\n]*verbatim\\*?[ \t\n]*}")))
+     ("verbatim\\*?"	. "\\\\end[ \t\n]*{[ \t\n]*verbatim\\*?[ \t\n]*}"))))
   "*Lists of regions to be skipped in TeX mode.
 First list is used raw.
 Second list has key placed inside \\begin{}.
@@ -1455,14 +1457,15 @@ for skipping in latex mode.")
 
 ;;;###autoload
 (defvar ispell-html-skip-alists
-  '(("<[cC][oO][dD][eE]\\>[^>]*>"	  "</[cC][oO][dD][eE]*>")
+  (purecopy
+   '(("<[cC][oO][dD][eE]\\>[^>]*>"	  "</[cC][oO][dD][eE]*>")
     ("<[sS][cC][rR][iI][pP][tT]\\>[^>]*>" "</[sS][cC][rR][iI][pP][tT]>")
     ("<[aA][pP][pP][lL][eE][tT]\\>[^>]*>" "</[aA][pP][pP][lL][eE][tT]>")
     ("<[vV][eE][rR][bB]\\>[^>]*>"         "<[vV][eE][rR][bB]\\>[^>]*>")
     ;;("<[tT][tT]\\>[^>]*>"		  "<[tT][tT]\\>[^>]*>")
     ("<[tT][tT]/"			  "/")
     ("<[^ \t\n>]"			  ">")
-    ("&[^ \t\n;]"			  "[; \t\n]"))
+    ("&[^ \t\n;]"			  "[; \t\n]")))
   "*Lists of start and end keys to skip in HTML buffers.
 Same format as `ispell-skip-region-alist'.
 Note - substrings of other matches must come last
--- ./lisp/minibuffer.el.~1.88.~	2009-10-18 22:14:20.000000000 -0700
+++ ./lisp/minibuffer.el	2009-10-20 12:50:28.000000000 -0700
@@ -312,7 +312,7 @@ the second failed attempt to complete."
   :type '(choice (const nil) (const t) (const lazy))
   :group 'minibuffer)
 
-(defvar completion-styles-alist
+(defconst completion-styles-alist
   '((emacs21
      completion-emacs21-try-completion completion-emacs21-all-completions
      "Simple prefix-based completion.")
--- ./lisp/facemenu.el.~1.109.~	2009-08-17 21:59:08.000000000 -0700
+++ ./lisp/facemenu.el	2009-10-20 11:17:38.000000000 -0700
@@ -667,11 +667,11 @@ This is called whenever you create a new
 	    symbol (intern name)))
     (setq menu 'facemenu-face-menu)
     (setq docstring
-	  (format "Select face `%s' for subsequent insertion.
+	  (purecopy (format "Select face `%s' for subsequent insertion.
 If the mark is active and there is no prefix argument,
 apply face `%s' to the region instead.
 This command was defined by `facemenu-add-new-face'."
-		  name name))
+		  name name)))
     (cond ((facemenu-iterate ; check if equivalent face is already in the menu
 	    (lambda (m) (and (listp m)
 			     (symbolp (car m))
--- ./lisp/term/tty-colors.el.~1.28.~	2009-01-08 14:24:20.000000000 -0800
+++ ./lisp/term/tty-colors.el	2009-10-20 18:49:33.000000000 -0700
@@ -62,8 +62,6 @@
 
 ;;; Code:
 
-(defvar msdos-color-values)
-
 ;; The following list is taken from rgb.txt distributed with X.
 ;;
 ;; WARNING: Some colors, such as "lightred", do not appear in this
@@ -88,7 +86,7 @@
 ;; from the standard 8-bit X definitions (so the upper and lower bytes
 ;; of each value are actually identical).
 ;;
-(defvar color-name-rgb-alist
+(defconst color-name-rgb-alist
   '(("snow"		65535 64250 64250)
     ("ghostwhite"	63736 63736 65535)
     ("whitesmoke"	62965 62965 62965)
@@ -748,7 +746,7 @@
     ("lightgreen"	37008 61166 37008))
   "An alist of X color names and associated 16-bit RGB values.")
 
-(defvar tty-standard-colors
+(defconst tty-standard-colors
   '(("black"	0     0     0     0)
     ("red"	1 65535     0     0)
     ("green"	2     0 65535     0)
@@ -760,7 +758,7 @@
   "An alist of 8 standard tty colors, their indices and RGB values.")
 
 ;; This is used by term.c
-(defvar tty-color-mode-alist
+(defconst tty-color-mode-alist
   '((never . -1)
     (no . -1)
     (default . 0)
--- ./lisp/term/linux.el.~1.15.~	2008-06-15 09:18:40.000000000 -0700
+++ ./lisp/term/linux.el	2009-07-20 09:42:26.000000000 -0700
@@ -1,6 +1,7 @@
-;; -*- no-byte-compile: t -*-
 ;; The Linux console handles Latin-1 by default.
 
+(declare-function gpm-mouse-enable "t-mouse" ())
+
 (defun terminal-init-linux ()
   "Terminal initialization function for linux."
   (unless (terminal-coding-system)
--- ./src/category.c.~1.53.~	2009-10-18 22:14:24.000000000 -0700
+++ ./src/category.c	2009-10-20 10:37:42.000000000 -0700
@@ -136,6 +136,8 @@ the current buffer's category table.  */
 
   if (!NILP (CATEGORY_DOCSTRING (table, XFASTINT (category))))
     error ("Category `%c' is already defined", XFASTINT (category));
+  if (!NILP (Vpurify_flag))
+    docstring = Fpurecopy (docstring);
   CATEGORY_DOCSTRING (table, XFASTINT (category)) = docstring;
 
   return Qnil;
--- ./src/keymap.c.~1.388.~	2009-10-18 22:14:26.000000000 -0700
+++ ./src/keymap.c	2009-10-20 18:09:51.000000000 -0700
@@ -170,7 +170,11 @@ in case you use it as a menu with `x-pop
      Lisp_Object string;
 {
   if (!NILP (string))
-    return Fcons (Qkeymap, Fcons (string, Qnil));
+    {
+      if (!NILP (Vpurify_flag))
+	string = Fpurecopy (string);
+      return Fcons (Qkeymap, Fcons (string, Qnil));
+    }
   return Fcons (Qkeymap, Qnil);
 }
 
--- ./src/puresize.h.~1.117.~	2009-10-17 00:24:01.000000000 -0700
+++ ./src/puresize.h	2009-10-20 14:13:12.000000000 -0700
@@ -41,7 +41,7 @@ along with GNU Emacs.  If not, see <http
 #endif
 
 #ifndef BASE_PURESIZE
-#define BASE_PURESIZE (1310000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
+#define BASE_PURESIZE (1430000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
 #endif
 
 /* Increase BASE_PURESIZE by a ratio depending on the machine's word size.  */
--- ./src/eval.c.~1.316.~	2009-10-18 22:14:26.000000000 -0700
+++ ./src/eval.c	2009-10-20 14:12:06.000000000 -0700
@@ -2113,9 +2116,7 @@ this does nothing and returns nil.  */)
      (function, file, docstring, interactive, type)
      Lisp_Object function, file, docstring, interactive, type;
 {
-#ifdef NO_ARG_ARRAY
   Lisp_Object args[4];
-#endif
 
   CHECK_SYMBOL (function);
   CHECK_STRING (file);
@@ -2131,16 +2132,15 @@ this does nothing and returns nil.  */)
        not useful and else we get loads of them from the loaddefs.el.  */
     LOADHIST_ATTACH (Fcons (Qautoload, function));
 
-#ifdef NO_ARG_ARRAY
-  args[0] = file;
+  if (NILP (Vpurify_flag))
+    args[0] = file;
+  else
+    args[0] = Fpurecopy (file);
   args[1] = docstring;
   args[2] = interactive;
   args[3] = type;
 
   return Ffset (function, Fcons (Qautoload, Flist (4, &args[0])));
-#else /* NO_ARG_ARRAY */
-  return Ffset (function, Fcons (Qautoload, Flist (4, &file)));
-#endif /* not NO_ARG_ARRAY */
 }
 
 Lisp_Object




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: put more strings in pure memory
  2009-10-21  5:51 put more strings in pure memory Dan Nicolaescu
@ 2009-10-21  6:42 ` Jason Rumney
  2009-10-21  6:51   ` Dan Nicolaescu
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Rumney @ 2009-10-21  6:42 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

Dan Nicolaescu wrote:
> The patch below moves more strings from GC memory to pure memory.
> (CVS is dead, so diffs from the ~ files).
>
> +++ ./lisp/mail/rmail.el	2009-10-20 14:26:40.000000000 -0700
> +++ ./lisp/mail/sendmail.el	2009-10-20 12:38:19.000000000 -0700
> +++ ./lisp/international/quail.el	2009-10-20 20:30:37.000000000 -0700
> +++ ./lisp/ps-print.el	2009-10-20 13:12:36.000000000 -0700
> +++ ./lisp/textmodes/ispell.el	2009-10-20 14:40:30.000000000 -0700
>   
The above files are not preloaded by default - is it worth introducing 
this complexity for them?


> +++ ./lisp/term/linux.el	2009-07-20 09:42:26.000000000 -0700
>   
This one may be preloaded on some GNU/Linux systems, but there is no 
sign of that in loadup.el so I am not sure.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: put more strings in pure memory
  2009-10-21  6:42 ` Jason Rumney
@ 2009-10-21  6:51   ` Dan Nicolaescu
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Nicolaescu @ 2009-10-21  6:51 UTC (permalink / raw)
  To: Jason Rumney; +Cc: emacs-devel

Jason Rumney <jasonr@gnu.org> writes:

  > Dan Nicolaescu wrote:
  > > The patch below moves more strings from GC memory to pure memory.
  > > (CVS is dead, so diffs from the ~ files).
  > >
  > > +++ ./lisp/mail/rmail.el	2009-10-20 14:26:40.000000000 -0700
  > > +++ ./lisp/mail/sendmail.el	2009-10-20 12:38:19.000000000 -0700
  > > +++ ./lisp/international/quail.el	2009-10-20 20:30:37.000000000 -0700
  > > +++ ./lisp/ps-print.el	2009-10-20 13:12:36.000000000 -0700
  > > +++ ./lisp/textmodes/ispell.el	2009-10-20 14:40:30.000000000 -0700
  > >   
  > The above files are not preloaded by default - is it worth introducing
  > this complexity for them?

The files are not preloaded, but the code in question is autoloaded, so
the changes have an effect.

  > > +++ ./lisp/term/linux.el	2009-07-20 09:42:26.000000000 -0700
  > >   
  > This one may be preloaded on some GNU/Linux systems, but there is no
  > sign of that in loadup.el so I am not sure.

That's an unrelated patch that was accidentally included .




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-21  6:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-21  5:51 put more strings in pure memory Dan Nicolaescu
2009-10-21  6:42 ` Jason Rumney
2009-10-21  6:51   ` Dan Nicolaescu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).