aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVibhav Pant2017-01-30 12:03:23 +0530
committerVibhav Pant2017-01-30 12:03:23 +0530
commit9c4dfdd1af9f97c6a8d7e922b68a39052116790c (patch)
tree1fb54fcb7d5eaa61ed88ea67ee9d17fde112bc4a /src
parent8ba236e772b64d0bb021aa691bd7eacf4b7f3ae4 (diff)
downloademacs-9c4dfdd1af9f97c6a8d7e922b68a39052116790c.tar.gz
emacs-9c4dfdd1af9f97c6a8d7e922b68a39052116790c.zip
Fix hash tables not being purified correctly.
* src/alloc.c (purecopy_hash_table) New function, makes a copy of the given hash table in pure storage. Add new struct `pinned_object' and `pinned_objects' linked list for pinning objects. (Fpurecopy) Allow purifying hash tables (purecopy) Pin hash tables that are either weak or not declared with `:purecopy t`, use purecopy_hash_table otherwise. (marked_pinned_objects) New function, marks all objects in pinned_objects. (garbage_collect_1) Use it. Mark all pinned objects before sweeping. * src/lisp.h Add new field `pure' to struct `Lisp_Hash_Table'. * src/fns.c: Add `purecopy' parameter to hash tables. (Fmake_hash_table): Check for a `:purecopy PURECOPY' argument, pass it to make_hash_table. (make_hash_table): Add `pure' parameter, set h->pure to it. (Fclrhash, Fremhash, Fputhash): Enforce that the table is impure with CHECK_IMPURE. * src/lread.c: (read1) Parse for `purecopy' parameter while reading hash tables. * src/print.c: (print_object) add the `purecopy' parameter while printing hash tables. * src/category.c, src/emacs-module.c, src/image.c, src/profiler.c, src/xterm.c: Use new (make_hash_table).
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c76
-rw-r--r--src/category.c2
-rw-r--r--src/emacs-module.c2
-rw-r--r--src/fns.c33
-rw-r--r--src/image.c2
-rw-r--r--src/lisp.h6
-rw-r--r--src/lread.c8
-rw-r--r--src/print.c6
-rw-r--r--src/profiler.c2
-rw-r--r--src/xterm.c2
10 files changed, 123 insertions, 16 deletions
diff --git a/src/alloc.c b/src/alloc.c
index f7b6515f4e7..dd2b688f91e 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5434,6 +5434,37 @@ make_pure_vector (ptrdiff_t len)
5434 return new; 5434 return new;
5435} 5435}
5436 5436
5437/* Copy all contents and parameters of TABLE to a new table allocated
5438 from pure space, return the purified table. */
5439static struct Lisp_Hash_Table *
5440purecopy_hash_table (struct Lisp_Hash_Table *table) {
5441 eassert (NILP (table->weak));
5442 eassert (!NILP (table->pure));
5443
5444 struct Lisp_Hash_Table *pure = pure_alloc (sizeof *pure, Lisp_Vectorlike);
5445 struct hash_table_test pure_test = table->test;
5446
5447 /* Purecopy the hash table test. */
5448 pure_test.name = purecopy (table->test.name);
5449 pure_test.user_hash_function = purecopy (table->test.user_hash_function);
5450 pure_test.user_cmp_function = purecopy (table->test.user_cmp_function);
5451
5452 pure->test = pure_test;
5453 pure->header = table->header;
5454 pure->weak = purecopy (Qnil);
5455 pure->rehash_size = purecopy (table->rehash_size);
5456 pure->rehash_threshold = purecopy (table->rehash_threshold);
5457 pure->hash = purecopy (table->hash);
5458 pure->next = purecopy (table->next);
5459 pure->next_free = purecopy (table->next_free);
5460 pure->index = purecopy (table->index);
5461 pure->count = table->count;
5462 pure->key_and_value = purecopy (table->key_and_value);
5463 pure->pure = purecopy (table->pure);
5464
5465 return pure;
5466}
5467
5437DEFUN ("purecopy", Fpurecopy, Spurecopy, 1, 1, 0, 5468DEFUN ("purecopy", Fpurecopy, Spurecopy, 1, 1, 0,
5438 doc: /* Make a copy of object OBJ in pure storage. 5469 doc: /* Make a copy of object OBJ in pure storage.
5439Recursively copies contents of vectors and cons cells. 5470Recursively copies contents of vectors and cons cells.
@@ -5442,14 +5473,22 @@ Does not copy symbols. Copies strings without text properties. */)
5442{ 5473{
5443 if (NILP (Vpurify_flag)) 5474 if (NILP (Vpurify_flag))
5444 return obj; 5475 return obj;
5445 else if (MARKERP (obj) || OVERLAYP (obj) 5476 else if (MARKERP (obj) || OVERLAYP (obj) || SYMBOLP (obj))
5446 || HASH_TABLE_P (obj) || SYMBOLP (obj))
5447 /* Can't purify those. */ 5477 /* Can't purify those. */
5448 return obj; 5478 return obj;
5449 else 5479 else
5450 return purecopy (obj); 5480 return purecopy (obj);
5451} 5481}
5452 5482
5483struct pinned_object
5484{
5485 Lisp_Object object;
5486 struct pinned_object *next;
5487};
5488
5489/* Pinned objects are marked before every GC cycle. */
5490static struct pinned_object *pinned_objects;
5491
5453static Lisp_Object 5492static Lisp_Object
5454purecopy (Lisp_Object obj) 5493purecopy (Lisp_Object obj)
5455{ 5494{
@@ -5477,7 +5516,27 @@ purecopy (Lisp_Object obj)
5477 obj = make_pure_string (SSDATA (obj), SCHARS (obj), 5516 obj = make_pure_string (SSDATA (obj), SCHARS (obj),
5478 SBYTES (obj), 5517 SBYTES (obj),
5479 STRING_MULTIBYTE (obj)); 5518 STRING_MULTIBYTE (obj));
5480 else if (COMPILEDP (obj) || VECTORP (obj) || HASH_TABLE_P (obj)) 5519 else if (HASH_TABLE_P (obj))
5520 {
5521 struct Lisp_Hash_Table *table = XHASH_TABLE (obj);
5522 /* We cannot purify hash tables which haven't been defined with
5523 :purecopy as non-nil or are weak - they aren't guaranteed to
5524 not change. */
5525 if (!NILP (table->weak) || NILP (table->pure))
5526 {
5527 /* Instead, the hash table is added to the list of pinned objects,
5528 and is marked before GC. */
5529 struct pinned_object *o = xmalloc (sizeof *o);
5530 o->object = obj;
5531 o->next = pinned_objects;
5532 pinned_objects = o;
5533 return obj; /* Don't hash cons it. */
5534 }
5535
5536 struct Lisp_Hash_Table *h = purecopy_hash_table (table);
5537 XSET_HASH_TABLE (obj, h);
5538 }
5539 else if (COMPILEDP (obj) || VECTORP (obj))
5481 { 5540 {
5482 struct Lisp_Vector *objp = XVECTOR (obj); 5541 struct Lisp_Vector *objp = XVECTOR (obj);
5483 ptrdiff_t nbytes = vector_nbytes (objp); 5542 ptrdiff_t nbytes = vector_nbytes (objp);
@@ -5694,6 +5753,16 @@ compact_undo_list (Lisp_Object list)
5694} 5753}
5695 5754
5696static void 5755static void
5756mark_pinned_objects (void)
5757{
5758 struct pinned_object *pobj;
5759 for (pobj = pinned_objects; pobj; pobj = pobj->next)
5760 {
5761 mark_object (pobj->object);
5762 }
5763}
5764
5765static void
5697mark_pinned_symbols (void) 5766mark_pinned_symbols (void)
5698{ 5767{
5699 struct symbol_block *sblk; 5768 struct symbol_block *sblk;
@@ -5813,6 +5882,7 @@ garbage_collect_1 (void *end)
5813 for (i = 0; i < staticidx; i++) 5882 for (i = 0; i < staticidx; i++)
5814 mark_object (*staticvec[i]); 5883 mark_object (*staticvec[i]);
5815 5884
5885 mark_pinned_objects ();
5816 mark_pinned_symbols (); 5886 mark_pinned_symbols ();
5817 mark_terminals (); 5887 mark_terminals ();
5818 mark_kboards (); 5888 mark_kboards ();
diff --git a/src/category.c b/src/category.c
index e5d261c1cff..ff287a4af3d 100644
--- a/src/category.c
+++ b/src/category.c
@@ -67,7 +67,7 @@ hash_get_category_set (Lisp_Object table, Lisp_Object category_set)
67 make_hash_table (hashtest_equal, make_number (DEFAULT_HASH_SIZE), 67 make_hash_table (hashtest_equal, make_number (DEFAULT_HASH_SIZE),
68 make_float (DEFAULT_REHASH_SIZE), 68 make_float (DEFAULT_REHASH_SIZE),
69 make_float (DEFAULT_REHASH_THRESHOLD), 69 make_float (DEFAULT_REHASH_THRESHOLD),
70 Qnil)); 70 Qnil, Qnil));
71 h = XHASH_TABLE (XCHAR_TABLE (table)->extras[1]); 71 h = XHASH_TABLE (XCHAR_TABLE (table)->extras[1]);
72 i = hash_lookup (h, category_set, &hash); 72 i = hash_lookup (h, category_set, &hash);
73 if (i >= 0) 73 if (i >= 0)
diff --git a/src/emacs-module.c b/src/emacs-module.c
index e22c7dc5b72..69fa5c8e64c 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -1016,7 +1016,7 @@ syms_of_module (void)
1016 = make_hash_table (hashtest_eq, make_number (DEFAULT_HASH_SIZE), 1016 = make_hash_table (hashtest_eq, make_number (DEFAULT_HASH_SIZE),
1017 make_float (DEFAULT_REHASH_SIZE), 1017 make_float (DEFAULT_REHASH_SIZE),
1018 make_float (DEFAULT_REHASH_THRESHOLD), 1018 make_float (DEFAULT_REHASH_THRESHOLD),
1019 Qnil); 1019 Qnil, Qnil);
1020 Funintern (Qmodule_refs_hash, Qnil); 1020 Funintern (Qmodule_refs_hash, Qnil);
1021 1021
1022 DEFSYM (Qmodule_environments, "module-environments"); 1022 DEFSYM (Qmodule_environments, "module-environments");
diff --git a/src/fns.c b/src/fns.c
index b8ebfe5b2e7..5769eac9987 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -34,6 +34,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
34#include "buffer.h" 34#include "buffer.h"
35#include "intervals.h" 35#include "intervals.h"
36#include "window.h" 36#include "window.h"
37#include "puresize.h"
37 38
38static void sort_vector_copy (Lisp_Object, ptrdiff_t, 39static void sort_vector_copy (Lisp_Object, ptrdiff_t,
39 Lisp_Object *restrict, Lisp_Object *restrict); 40 Lisp_Object *restrict, Lisp_Object *restrict);
@@ -3750,12 +3751,17 @@ allocate_hash_table (void)
3750 (table size) is >= REHASH_THRESHOLD. 3751 (table size) is >= REHASH_THRESHOLD.
3751 3752
3752 WEAK specifies the weakness of the table. If non-nil, it must be 3753 WEAK specifies the weakness of the table. If non-nil, it must be
3753 one of the symbols `key', `value', `key-or-value', or `key-and-value'. */ 3754 one of the symbols `key', `value', `key-or-value', or `key-and-value'.
3755
3756 If PURECOPY is non-nil, the table can be copied to pure storage via
3757 `purecopy' when Emacs is being dumped. Such tables can no longer be
3758 changed after purecopy. */
3754 3759
3755Lisp_Object 3760Lisp_Object
3756make_hash_table (struct hash_table_test test, 3761make_hash_table (struct hash_table_test test,
3757 Lisp_Object size, Lisp_Object rehash_size, 3762 Lisp_Object size, Lisp_Object rehash_size,
3758 Lisp_Object rehash_threshold, Lisp_Object weak) 3763 Lisp_Object rehash_threshold, Lisp_Object weak,
3764 Lisp_Object pure)
3759{ 3765{
3760 struct Lisp_Hash_Table *h; 3766 struct Lisp_Hash_Table *h;
3761 Lisp_Object table; 3767 Lisp_Object table;
@@ -3796,6 +3802,7 @@ make_hash_table (struct hash_table_test test,
3796 h->hash = Fmake_vector (size, Qnil); 3802 h->hash = Fmake_vector (size, Qnil);
3797 h->next = Fmake_vector (size, Qnil); 3803 h->next = Fmake_vector (size, Qnil);
3798 h->index = Fmake_vector (make_number (index_size), Qnil); 3804 h->index = Fmake_vector (make_number (index_size), Qnil);
3805 h->pure = pure;
3799 3806
3800 /* Set up the free list. */ 3807 /* Set up the free list. */
3801 for (i = 0; i < sz - 1; ++i) 3808 for (i = 0; i < sz - 1; ++i)
@@ -4460,10 +4467,15 @@ key, value, one of key or value, or both key and value, depending on
4460WEAK. WEAK t is equivalent to `key-and-value'. Default value of WEAK 4467WEAK. WEAK t is equivalent to `key-and-value'. Default value of WEAK
4461is nil. 4468is nil.
4462 4469
4470:purecopy PURECOPY -- If PURECOPY is non-nil, the table can be copied
4471to pure storage when Emacs is being dumped, making the contents of the
4472table read only. Any further changes to purified tables will result
4473in an error.
4474
4463usage: (make-hash-table &rest KEYWORD-ARGS) */) 4475usage: (make-hash-table &rest KEYWORD-ARGS) */)
4464 (ptrdiff_t nargs, Lisp_Object *args) 4476 (ptrdiff_t nargs, Lisp_Object *args)
4465{ 4477{
4466 Lisp_Object test, size, rehash_size, rehash_threshold, weak; 4478 Lisp_Object test, size, rehash_size, rehash_threshold, weak, pure;
4467 struct hash_table_test testdesc; 4479 struct hash_table_test testdesc;
4468 ptrdiff_t i; 4480 ptrdiff_t i;
4469 USE_SAFE_ALLOCA; 4481 USE_SAFE_ALLOCA;
@@ -4497,6 +4509,9 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */)
4497 testdesc.cmpfn = cmpfn_user_defined; 4509 testdesc.cmpfn = cmpfn_user_defined;
4498 } 4510 }
4499 4511
4512 /* See if there's a `:purecopy PURECOPY' argument. */
4513 i = get_key_arg (QCpurecopy, nargs, args, used);
4514 pure = i ? args[i] : Qnil;
4500 /* See if there's a `:size SIZE' argument. */ 4515 /* See if there's a `:size SIZE' argument. */
4501 i = get_key_arg (QCsize, nargs, args, used); 4516 i = get_key_arg (QCsize, nargs, args, used);
4502 size = i ? args[i] : Qnil; 4517 size = i ? args[i] : Qnil;
@@ -4538,7 +4553,8 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */)
4538 signal_error ("Invalid argument list", args[i]); 4553 signal_error ("Invalid argument list", args[i]);
4539 4554
4540 SAFE_FREE (); 4555 SAFE_FREE ();
4541 return make_hash_table (testdesc, size, rehash_size, rehash_threshold, weak); 4556 return make_hash_table (testdesc, size, rehash_size, rehash_threshold, weak,
4557 pure);
4542} 4558}
4543 4559
4544 4560
@@ -4617,7 +4633,9 @@ DEFUN ("clrhash", Fclrhash, Sclrhash, 1, 1, 0,
4617 doc: /* Clear hash table TABLE and return it. */) 4633 doc: /* Clear hash table TABLE and return it. */)
4618 (Lisp_Object table) 4634 (Lisp_Object table)
4619{ 4635{
4620 hash_clear (check_hash_table (table)); 4636 struct Lisp_Hash_Table *h = check_hash_table (table);
4637 CHECK_IMPURE (table, h);
4638 hash_clear (h);
4621 /* Be compatible with XEmacs. */ 4639 /* Be compatible with XEmacs. */
4622 return table; 4640 return table;
4623} 4641}
@@ -4641,9 +4659,10 @@ VALUE. In any case, return VALUE. */)
4641 (Lisp_Object key, Lisp_Object value, Lisp_Object table) 4659 (Lisp_Object key, Lisp_Object value, Lisp_Object table)
4642{ 4660{
4643 struct Lisp_Hash_Table *h = check_hash_table (table); 4661 struct Lisp_Hash_Table *h = check_hash_table (table);
4662 CHECK_IMPURE (table, h);
4663
4644 ptrdiff_t i; 4664 ptrdiff_t i;
4645 EMACS_UINT hash; 4665 EMACS_UINT hash;
4646
4647 i = hash_lookup (h, key, &hash); 4666 i = hash_lookup (h, key, &hash);
4648 if (i >= 0) 4667 if (i >= 0)
4649 set_hash_value_slot (h, i, value); 4668 set_hash_value_slot (h, i, value);
@@ -4659,6 +4678,7 @@ DEFUN ("remhash", Fremhash, Sremhash, 2, 2, 0,
4659 (Lisp_Object key, Lisp_Object table) 4678 (Lisp_Object key, Lisp_Object table)
4660{ 4679{
4661 struct Lisp_Hash_Table *h = check_hash_table (table); 4680 struct Lisp_Hash_Table *h = check_hash_table (table);
4681 CHECK_IMPURE (table, h);
4662 hash_remove_from_table (h, key); 4682 hash_remove_from_table (h, key);
4663 return Qnil; 4683 return Qnil;
4664} 4684}
@@ -5029,6 +5049,7 @@ syms_of_fns (void)
5029 DEFSYM (Qequal, "equal"); 5049 DEFSYM (Qequal, "equal");
5030 DEFSYM (QCtest, ":test"); 5050 DEFSYM (QCtest, ":test");
5031 DEFSYM (QCsize, ":size"); 5051 DEFSYM (QCsize, ":size");
5052 DEFSYM (QCpurecopy, ":purecopy");
5032 DEFSYM (QCrehash_size, ":rehash-size"); 5053 DEFSYM (QCrehash_size, ":rehash-size");
5033 DEFSYM (QCrehash_threshold, ":rehash-threshold"); 5054 DEFSYM (QCrehash_threshold, ":rehash-threshold");
5034 DEFSYM (QCweakness, ":weakness"); 5055 DEFSYM (QCweakness, ":weakness");
diff --git a/src/image.c b/src/image.c
index 39677d2add9..ad0143be48b 100644
--- a/src/image.c
+++ b/src/image.c
@@ -4020,7 +4020,7 @@ xpm_make_color_table_h (void (**put_func) (Lisp_Object, const char *, int,
4020 return make_hash_table (hashtest_equal, make_number (DEFAULT_HASH_SIZE), 4020 return make_hash_table (hashtest_equal, make_number (DEFAULT_HASH_SIZE),
4021 make_float (DEFAULT_REHASH_SIZE), 4021 make_float (DEFAULT_REHASH_SIZE),
4022 make_float (DEFAULT_REHASH_THRESHOLD), 4022 make_float (DEFAULT_REHASH_THRESHOLD),
4023 Qnil); 4023 Qnil, Qnil);
4024} 4024}
4025 4025
4026static void 4026static void
diff --git a/src/lisp.h b/src/lisp.h
index 84d53bb1eec..91c430fe98d 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1995,6 +1995,10 @@ struct Lisp_Hash_Table
1995 hash table size to reduce collisions. */ 1995 hash table size to reduce collisions. */
1996 Lisp_Object index; 1996 Lisp_Object index;
1997 1997
1998 /* Non-nil if the table can be purecopied. Any changes the table after
1999 purecopy will result in an error. */
2000 Lisp_Object pure;
2001
1998 /* Only the fields above are traced normally by the GC. The ones below 2002 /* Only the fields above are traced normally by the GC. The ones below
1999 `count' are special and are either ignored by the GC or traced in 2003 `count' are special and are either ignored by the GC or traced in
2000 a special way (e.g. because of weakness). */ 2004 a special way (e.g. because of weakness). */
@@ -3364,7 +3368,7 @@ extern void sweep_weak_hash_tables (void);
3364EMACS_UINT hash_string (char const *, ptrdiff_t); 3368EMACS_UINT hash_string (char const *, ptrdiff_t);
3365EMACS_UINT sxhash (Lisp_Object, int); 3369EMACS_UINT sxhash (Lisp_Object, int);
3366Lisp_Object make_hash_table (struct hash_table_test, Lisp_Object, Lisp_Object, 3370Lisp_Object make_hash_table (struct hash_table_test, Lisp_Object, Lisp_Object,
3367 Lisp_Object, Lisp_Object); 3371 Lisp_Object, Lisp_Object, Lisp_Object);
3368ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, EMACS_UINT *); 3372ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, EMACS_UINT *);
3369ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object, 3373ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object,
3370 EMACS_UINT); 3374 EMACS_UINT);
diff --git a/src/lread.c b/src/lread.c
index ea2a1d1d858..17806922a8c 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2599,7 +2599,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
2599 Lisp_Object val = Qnil; 2599 Lisp_Object val = Qnil;
2600 /* The size is 2 * number of allowed keywords to 2600 /* The size is 2 * number of allowed keywords to
2601 make-hash-table. */ 2601 make-hash-table. */
2602 Lisp_Object params[10]; 2602 Lisp_Object params[12];
2603 Lisp_Object ht; 2603 Lisp_Object ht;
2604 Lisp_Object key = Qnil; 2604 Lisp_Object key = Qnil;
2605 int param_count = 0; 2605 int param_count = 0;
@@ -2636,6 +2636,11 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
2636 if (!NILP (params[param_count + 1])) 2636 if (!NILP (params[param_count + 1]))
2637 param_count += 2; 2637 param_count += 2;
2638 2638
2639 params[param_count] = QCpurecopy;
2640 params[param_count + 1] = Fplist_get (tmp, Qpurecopy);
2641 if (!NILP (params[param_count + 1]))
2642 param_count += 2;
2643
2639 /* This is the hash table data. */ 2644 /* This is the hash table data. */
2640 data = Fplist_get (tmp, Qdata); 2645 data = Fplist_get (tmp, Qdata);
2641 2646
@@ -4849,6 +4854,7 @@ that are loaded before your customizations are read! */);
4849 DEFSYM (Qdata, "data"); 4854 DEFSYM (Qdata, "data");
4850 DEFSYM (Qtest, "test"); 4855 DEFSYM (Qtest, "test");
4851 DEFSYM (Qsize, "size"); 4856 DEFSYM (Qsize, "size");
4857 DEFSYM (Qpurecopy, "purecopy");
4852 DEFSYM (Qweakness, "weakness"); 4858 DEFSYM (Qweakness, "weakness");
4853 DEFSYM (Qrehash_size, "rehash-size"); 4859 DEFSYM (Qrehash_size, "rehash-size");
4854 DEFSYM (Qrehash_threshold, "rehash-threshold"); 4860 DEFSYM (Qrehash_threshold, "rehash-threshold");
diff --git a/src/print.c b/src/print.c
index 36d68a452ec..db3d00f51f2 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1818,6 +1818,12 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
1818 print_object (h->rehash_threshold, printcharfun, escapeflag); 1818 print_object (h->rehash_threshold, printcharfun, escapeflag);
1819 } 1819 }
1820 1820
1821 if (!NILP (h->pure))
1822 {
1823 print_c_string (" purecopy ", printcharfun);
1824 print_object (h->pure, printcharfun, escapeflag);
1825 }
1826
1821 print_c_string (" data ", printcharfun); 1827 print_c_string (" data ", printcharfun);
1822 1828
1823 /* Print the data here as a plist. */ 1829 /* Print the data here as a plist. */
diff --git a/src/profiler.c b/src/profiler.c
index 88825bebdb2..a223a7e7c07 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -48,7 +48,7 @@ make_log (EMACS_INT heap_size, EMACS_INT max_stack_depth)
48 make_number (heap_size), 48 make_number (heap_size),
49 make_float (DEFAULT_REHASH_SIZE), 49 make_float (DEFAULT_REHASH_SIZE),
50 make_float (DEFAULT_REHASH_THRESHOLD), 50 make_float (DEFAULT_REHASH_THRESHOLD),
51 Qnil); 51 Qnil, Qnil);
52 struct Lisp_Hash_Table *h = XHASH_TABLE (log); 52 struct Lisp_Hash_Table *h = XHASH_TABLE (log);
53 53
54 /* What is special about our hash-tables is that the keys are pre-filled 54 /* What is special about our hash-tables is that the keys are pre-filled
diff --git a/src/xterm.c b/src/xterm.c
index 80cf8ce1912..38229a5f31f 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -12877,7 +12877,7 @@ keysyms. The default is nil, which is the same as `super'. */);
12877 Vx_keysym_table = make_hash_table (hashtest_eql, make_number (900), 12877 Vx_keysym_table = make_hash_table (hashtest_eql, make_number (900),
12878 make_float (DEFAULT_REHASH_SIZE), 12878 make_float (DEFAULT_REHASH_SIZE),
12879 make_float (DEFAULT_REHASH_THRESHOLD), 12879 make_float (DEFAULT_REHASH_THRESHOLD),
12880 Qnil); 12880 Qnil, Qnil);
12881 12881
12882 DEFVAR_BOOL ("x-frame-normalize-before-maximize", 12882 DEFVAR_BOOL ("x-frame-normalize-before-maximize",
12883 x_frame_normalize_before_maximize, 12883 x_frame_normalize_before_maximize,