Commit 19efb25
Ken Raeburn
Use #N# syntax for repeated symbols in dumped.elc.
Parsing symbol names involves processing for possible multibyte
characters and comparisons against other symbol-name strings in the
obarray. The #N# syntax is simpler, uses an automatically resized
hash table keyed by integers, and is in most cases shorter, so reading
can be a little faster.
When doing this we have to avoid the special "," syntax because we
would wind up printing "#1=,foo" which reads back as setting #1# to
,foo when we really wanted to set #1# to just the comma symbol.
* src/print.c (syms_of_print): Define new Lisp variable
print-symbols-as-references.
(PRINT_CIRCLE_CANDIDATE_P): If it's set, accept interned symbols.
(print_preprocess): Update comment.
(print_object): When printing "," or related symbols with special
syntax, don't use print_object on the special symbol itself.
* lisp/loadup.el: Bind print-symbols-as-references to t while creating
the dumped.elc file.1 parent 1184a17 commit 19efb25
2 files changed
+40
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
| 569 | + | |
569 | 570 | | |
570 | 571 | | |
571 | 572 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1131 | 1131 | | |
1132 | 1132 | | |
1133 | 1133 | | |
1134 | | - | |
1135 | | - | |
1136 | | - | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1144 | 1147 | | |
1145 | 1148 | | |
1146 | 1149 | | |
| |||
1181 | 1184 | | |
1182 | 1185 | | |
1183 | 1186 | | |
1184 | | - | |
1185 | | - | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
1186 | 1190 | | |
1187 | 1191 | | |
1188 | 1192 | | |
| |||
2013 | 2017 | | |
2014 | 2018 | | |
2015 | 2019 | | |
2016 | | - | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
2017 | 2034 | | |
2018 | 2035 | | |
2019 | 2036 | | |
| |||
2422 | 2439 | | |
2423 | 2440 | | |
2424 | 2441 | | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
2425 | 2451 | | |
2426 | 2452 | | |
2427 | 2453 | | |
| |||
0 commit comments