1 2011-04-06 Lawrence Crowl <crowl@google.com>
3 * include/cpplib.h (struct cpp_hashnode): Add used_by_directive and
4 expanded_to_text attributes for macros. Take their bits from
5 directive_index, which does not need them.
6 * include/symtab.h (struct cpp_idents_used): Split max_length into
7 max_ident_len and max_value_len. Reorder fields to avoid gaps.
8 (struct cpp_ident_use): Add used_by_directive and expanded_to_text
10 * internal.h (struct cpp_lookaside): Split max_length into
11 max_ident_len and max_value_len.
12 * macro.c (enter_macro_context): Mark expanded_to_text macro attribute.
13 * directives.c (DIRECTIVE_TABLE): Add sizing comment.
14 (do_define): Mark used_by_directive macro attribute.
17 * expr.c (parse_defined): Mark used_by_directive macro attribute.
18 * symtab.c (cpp_lt_create): Split cpp_lookaside::max_length into
19 max_ident_len and max_value_len.
20 * (lt_macro_value): Likewise.
21 * (lt_lookup): Likewise.
22 * (cpp_lt_capture): Likewise. Also save used_by_directive and
23 expanded_to_text attributes of macros.
24 * (cpp_lt_replay): Split cpp_idents_used::max_lenth into
25 max_ident_len and max_value_len. Allocate a buffer with the sum.
28 2011-03-04 Lawrence Crowl <crowl@google.com>
30 * symtab.h (cpp_lt_verify_1): Temporary new function.
31 * symtab.c (cpp_lt_verify_1): Temporary new function.
32 * (cpp_lt_verify): Permit macro values to match after as well
33 * (lt_query_macro): Remove name of macro from macro value.
34 * (cpp_lt_define_syntax): Likewise, but needs another parameter.
35 * (cpp_lt_replay): Likewise.
36 as before on load of a PPH file.
37 * (cpp_lt_idents_destroy): Delete the right thing.
39 2011-02-24 Lawrence Crowl <crowl@google.com>
41 * include/cpplib.h (cpp_main_missing_guard): Add declaration.
42 * files.c (cpp_main_missing_guard): Add definition.
43 (main_missing_guard): Add to support cpp_main_missing_guard.
45 2011-01-27 Diego Novillo <dnovillo@google.com>
47 * include/cpplib.h (cpp_reset_lexer_state,
48 cpp_restore_lexer_state): Remove.
52 2010-12-17 Diego Novillo <dnovillo@google.com>
54 * internal.h (struct cpp_lookaside): Rename field
55 flag_pth_debug to pth_debug_level.
57 2010-12-09 Lawrence Crowl <crowl@google.com>
59 * include/symtab.h (cpp_lt_exchange): Change parameter name.
60 (cpp_lt_create): Clarify lead comment.
61 (cpp_lt_destroy): Clarify lead comment.
62 (cpp_lt_capture): Change parameter name.
63 (cpp_lt_verify): Clarify lead comment.
64 (cpp_lt_replay): Clarify lead comment.
65 (cpp_lt_num_entries): Unused. Removed.
66 (cpp_lt_max_length): Unused. Removed.
67 (cpp_lt_take_strings): Unused. Removed.
68 (typedef cpp_lookback): Unused. Removed.
69 (cpp_lt_forall): Unused. Removed.
70 (cpp_lt_idents_destroy): New.
71 (cpp_lt_statistics): Functionality move to internal.
73 * symtab.c: Add comment on the lookaside table.
74 (cpp_lt_exchange): Add lead comment. Change parameter name.
75 (lt_clear_stats): New.
76 (cpp_lt_create): Add lead comment. Save original table size order.
78 (lt_statistics): Rename from cpp_lt_statistics for use only internally.
79 Add lead comment. Change parameter type. Refactor clear stats.
80 (cpp_lt_destroy): Add lead comment. Add statistics printing.
81 (cpp_lt_num_entries): Unused. Remove.
82 (cpp_lt_max_length): Unused. Remove.
83 (cpp_lt_take_strings): Unused. Remove.
84 (cpp_lt_forall): Add lead comment. Unused. Disable.
85 (lt_query_macro): Change parameter name.
86 (lt_macro_value): Change parameter name.
87 (cpp_lt_capture): Change parameter name.
88 Reuse existing table if it is close enough to the existing size.
89 Otherwise, allocate a new table. Add internal comments.
90 (cpp_lt_idents_destroy): New.
91 (lt_resize): Add lead comment.
92 (lt_lookup): Change parameter name.
94 * internal.h (struct cpp_lookaside): Added sticky_order field.
96 * initi.c (cpp_destroy): Add call to cpp_lt_destroy.
98 2010-11-02 Lawrence Crowl <crowl@google.com>
99 Diego Novillo <dnovillo@google.com>
101 * symtab.c: Include internal.h
102 (ht_calc_hash): Rename from calc_hash. Declare extern.
104 (cpp_lt_exchange): New.
105 (cpp_lt_create): New.
106 (cpp_lt_statistics): New.
107 (cpp_lt_destroy): New.
108 (cpp_lt_num_entries): New.
109 (cpp_lt_max_length): New.
110 (cpp_lt_take_strings): New.
111 (cpp_lt_forall): New.
112 (lt_query_macro): New.
113 (lt_macro_value): New.
114 (cpp_lt_capture): New.
115 (cpp_lt_verify): New.
116 (cpp_lt_define_syntax): New.
117 (cpp_lt_replay): New.
123 * macro.c (_cpp_save_parameter): Re-write to use new
124 param_buffer field to avoid clobbering macro_buffer.
125 * include/cpplib.h (lexer_state): Define.
126 (enum include_type): Define.
127 (cpp_reset_lexer_state): Define.
128 (cpp_restore_lexer_state): Define.
129 (struct cpp_offset): Define.
130 (cpp_buffer_start): Declare.
131 (cpp_buffer_end): Declare.
132 (cpp_lookup_with_hash): Declare.
133 (cpp_peek_sym): Declare.
134 (cpp_dump_identifier): Declare.
135 (cpp_debug_identifier): Declare.
136 (cpp_dump_identifiers): Declare.
137 (cpp_debug_identifiers): Declare.
138 (cpp_push_include_type): Declare.
139 (cpp_get_pos): Declare.
140 (cpp_set_pos): Declare.
141 (cpp_return_at_eof): Declare.
142 * include/symtab.h (cpp_lookaside): Define.
143 (struct cpp_ident_use): Declare.
144 (struct cpp_idents_used): Declare.
145 (cpp_lt_exchange): Declare.
146 (cpp_lt_create): Declare.
147 (cpp_lt_destroy): Declare.
148 (cpp_lt_capture): Declare.
149 (cpp_lt_verify): Declare.
150 (cpp_lt_replay): Declare.
151 (cpp_lt_num_entries): Declare.
152 (cpp_lt_max_length): Declare.
153 (cpp_lt_take_strings): Declare.
154 (*cpp_lookback): Declare.
155 (cpp_lt_forall): Declare.
156 (cpp_lt_statistics): Declare.
157 * files.c (cpp_buffer_start): Define.
158 (cpp_buffer_end): Define.
159 (_cpp_stack_include): Add argument dname. Adjust
161 (cpp_push_include_type): New.
164 (cpp_return_at_eof): New.
165 * init.c (cpp_create_reader): Initialize field
167 (cpp_destroy): Free field param_buffer, if needed.
168 * identifiers.c (cpp_lookup_with_hash): New.
169 (cpp_lookup): Call it.
171 (cpp_dump_identifier): New.
172 (cpp_debug_identifier): New.
173 (cpp_dump_identifiers_r): New.
174 (cpp_dump_identifiers): New.
175 (cpp_debug_identifiers): New.
176 * internal.h (revision 166136):
177 (struct lae): Declare.
178 (struct cpp_lookaside): Declare.
179 (lt_lookup): Declare.
180 (ht_calc_hash): Declare.
181 (struct cpp_reader): Add fields param_buffer,
182 param_buffer_len and lookaside_table.
183 (_cpp_stack_include): Add new const char * argument.
184 * lex.c (lex_identifier_intern): Call cpp_lookup_with_hash.
185 (lex_identifier): Likewise.
186 (_cpp_lex_token): Initialize result to NULL.
187 (cpp_reset_lexer_state): New.
188 (cpp_restore_lexer_state): New.
189 * charset.c (_cpp_interpret_identifier): Call cpp_lookup.