1 2011-04-17 Lawrence Crowl <crowl@google.com>
3 * directives.c (too_many_directives_for_bitfield): Make static assert
4 extern to avoid allocating any storage.
6 2011-04-18 Lawrence Crowl <crowl@google.com>
8 * init.c: Fix spelling in comment.
10 2011-04-14 Lawrence Crowl <crowl@google.com>
12 * include/cpplib.h (cpp_hashnode): Use a macro for the number of bits
13 in the directive_index bitfield. Change the number of bits back to 7.
14 * directives.c (DIRECTIVE_TABLE): Add a gcc-build-time check that the
15 index of the directive table fits within the number of bits above.
16 * init.c (operator_array): Separate the named operator table into a
17 macro. Use it in operator_array. Test that the values fit within the
20 2011-04-12 Diego Novillo <dnovillo@google.com>
22 * directives.c (do_include_common): If the callback
23 pfile->cb.include returns falose do not call
25 * include/cpplib.h (struct cpp_callbacks): Change return
26 type of field 'include' to bool.
28 2011-04-06 Lawrence Crowl <crowl@google.com>
30 * include/cpplib.h (struct cpp_hashnode): Add used_by_directive and
31 expanded_to_text attributes for macros. Take their bits from
32 directive_index, which does not need them.
33 * include/symtab.h (struct cpp_idents_used): Split max_length into
34 max_ident_len and max_value_len. Reorder fields to avoid gaps.
35 (struct cpp_ident_use): Add used_by_directive and expanded_to_text
36 attributes for macros.
37 * internal.h (struct cpp_lookaside): Split max_length into
38 max_ident_len and max_value_len.
39 * macro.c (enter_macro_context): Mark expanded_to_text macro attribute.
40 * directives.c (DIRECTIVE_TABLE): Add sizing comment.
41 (do_define): Mark used_by_directive macro attribute.
44 * expr.c (parse_defined): Mark used_by_directive macro attribute.
45 * symtab.c (cpp_lt_create): Split cpp_lookaside::max_length into
46 max_ident_len and max_value_len.
47 * (lt_macro_value): Likewise.
48 * (lt_lookup): Likewise.
49 * (cpp_lt_capture): Likewise. Also save used_by_directive and
50 expanded_to_text attributes of macros.
51 * (cpp_lt_replay): Split cpp_idents_used::max_lenth into
52 max_ident_len and max_value_len. Allocate a buffer with the sum.
55 2011-03-04 Lawrence Crowl <crowl@google.com>
57 * symtab.h (cpp_lt_verify_1): Temporary new function.
58 * symtab.c (cpp_lt_verify_1): Temporary new function.
59 * (cpp_lt_verify): Permit macro values to match after as well
60 * (lt_query_macro): Remove name of macro from macro value.
61 * (cpp_lt_define_syntax): Likewise, but needs another parameter.
62 * (cpp_lt_replay): Likewise.
63 as before on load of a PPH file.
64 * (cpp_lt_idents_destroy): Delete the right thing.
66 2011-02-24 Lawrence Crowl <crowl@google.com>
68 * include/cpplib.h (cpp_main_missing_guard): Add declaration.
69 * files.c (cpp_main_missing_guard): Add definition.
70 (main_missing_guard): Add to support cpp_main_missing_guard.
72 2011-01-27 Diego Novillo <dnovillo@google.com>
74 * include/cpplib.h (cpp_reset_lexer_state,
75 cpp_restore_lexer_state): Remove.
79 2010-12-17 Diego Novillo <dnovillo@google.com>
81 * internal.h (struct cpp_lookaside): Rename field
82 flag_pth_debug to pth_debug_level.
84 2010-12-09 Lawrence Crowl <crowl@google.com>
86 * include/symtab.h (cpp_lt_exchange): Change parameter name.
87 (cpp_lt_create): Clarify lead comment.
88 (cpp_lt_destroy): Clarify lead comment.
89 (cpp_lt_capture): Change parameter name.
90 (cpp_lt_verify): Clarify lead comment.
91 (cpp_lt_replay): Clarify lead comment.
92 (cpp_lt_num_entries): Unused. Removed.
93 (cpp_lt_max_length): Unused. Removed.
94 (cpp_lt_take_strings): Unused. Removed.
95 (typedef cpp_lookback): Unused. Removed.
96 (cpp_lt_forall): Unused. Removed.
97 (cpp_lt_idents_destroy): New.
98 (cpp_lt_statistics): Functionality move to internal.
100 * symtab.c: Add comment on the lookaside table.
101 (cpp_lt_exchange): Add lead comment. Change parameter name.
102 (lt_clear_stats): New.
103 (cpp_lt_create): Add lead comment. Save original table size order.
104 Refactor clear stats.
105 (lt_statistics): Rename from cpp_lt_statistics for use only internally.
106 Add lead comment. Change parameter type. Refactor clear stats.
107 (cpp_lt_destroy): Add lead comment. Add statistics printing.
108 (cpp_lt_num_entries): Unused. Remove.
109 (cpp_lt_max_length): Unused. Remove.
110 (cpp_lt_take_strings): Unused. Remove.
111 (cpp_lt_forall): Add lead comment. Unused. Disable.
112 (lt_query_macro): Change parameter name.
113 (lt_macro_value): Change parameter name.
114 (cpp_lt_capture): Change parameter name.
115 Reuse existing table if it is close enough to the existing size.
116 Otherwise, allocate a new table. Add internal comments.
117 (cpp_lt_idents_destroy): New.
118 (lt_resize): Add lead comment.
119 (lt_lookup): Change parameter name.
121 * internal.h (struct cpp_lookaside): Added sticky_order field.
123 * initi.c (cpp_destroy): Add call to cpp_lt_destroy.
125 2010-11-02 Lawrence Crowl <crowl@google.com>
126 Diego Novillo <dnovillo@google.com>
128 * symtab.c: Include internal.h
129 (ht_calc_hash): Rename from calc_hash. Declare extern.
131 (cpp_lt_exchange): New.
132 (cpp_lt_create): New.
133 (cpp_lt_statistics): New.
134 (cpp_lt_destroy): New.
135 (cpp_lt_num_entries): New.
136 (cpp_lt_max_length): New.
137 (cpp_lt_take_strings): New.
138 (cpp_lt_forall): New.
139 (lt_query_macro): New.
140 (lt_macro_value): New.
141 (cpp_lt_capture): New.
142 (cpp_lt_verify): New.
143 (cpp_lt_define_syntax): New.
144 (cpp_lt_replay): New.
150 * macro.c (_cpp_save_parameter): Re-write to use new
151 param_buffer field to avoid clobbering macro_buffer.
152 * include/cpplib.h (lexer_state): Define.
153 (enum include_type): Define.
154 (cpp_reset_lexer_state): Define.
155 (cpp_restore_lexer_state): Define.
156 (struct cpp_offset): Define.
157 (cpp_buffer_start): Declare.
158 (cpp_buffer_end): Declare.
159 (cpp_lookup_with_hash): Declare.
160 (cpp_peek_sym): Declare.
161 (cpp_dump_identifier): Declare.
162 (cpp_debug_identifier): Declare.
163 (cpp_dump_identifiers): Declare.
164 (cpp_debug_identifiers): Declare.
165 (cpp_push_include_type): Declare.
166 (cpp_get_pos): Declare.
167 (cpp_set_pos): Declare.
168 (cpp_return_at_eof): Declare.
169 * include/symtab.h (cpp_lookaside): Define.
170 (struct cpp_ident_use): Declare.
171 (struct cpp_idents_used): Declare.
172 (cpp_lt_exchange): Declare.
173 (cpp_lt_create): Declare.
174 (cpp_lt_destroy): Declare.
175 (cpp_lt_capture): Declare.
176 (cpp_lt_verify): Declare.
177 (cpp_lt_replay): Declare.
178 (cpp_lt_num_entries): Declare.
179 (cpp_lt_max_length): Declare.
180 (cpp_lt_take_strings): Declare.
181 (*cpp_lookback): Declare.
182 (cpp_lt_forall): Declare.
183 (cpp_lt_statistics): Declare.
184 * files.c (cpp_buffer_start): Define.
185 (cpp_buffer_end): Define.
186 (_cpp_stack_include): Add argument dname. Adjust
188 (cpp_push_include_type): New.
191 (cpp_return_at_eof): New.
192 * init.c (cpp_create_reader): Initialize field
194 (cpp_destroy): Free field param_buffer, if needed.
195 * identifiers.c (cpp_lookup_with_hash): New.
196 (cpp_lookup): Call it.
198 (cpp_dump_identifier): New.
199 (cpp_debug_identifier): New.
200 (cpp_dump_identifiers_r): New.
201 (cpp_dump_identifiers): New.
202 (cpp_debug_identifiers): New.
203 * internal.h (revision 166136):
204 (struct lae): Declare.
205 (struct cpp_lookaside): Declare.
206 (lt_lookup): Declare.
207 (ht_calc_hash): Declare.
208 (struct cpp_reader): Add fields param_buffer,
209 param_buffer_len and lookaside_table.
210 (_cpp_stack_include): Add new const char * argument.
211 * lex.c (lex_identifier_intern): Call cpp_lookup_with_hash.
212 (lex_identifier): Likewise.
213 (_cpp_lex_token): Initialize result to NULL.
214 (cpp_reset_lexer_state): New.
215 (cpp_restore_lexer_state): New.
216 * charset.c (_cpp_interpret_identifier): Call cpp_lookup.