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