1 2010-12-09 Lawrence Crowl <crowl@google.com>
3 * include/symtab.h (cpp_lt_exchange): Change parameter name.
4 (cpp_lt_create): Clarify lead comment.
5 (cpp_lt_destroy): Clarify lead comment.
6 (cpp_lt_capture): Change parameter name.
7 (cpp_lt_verify): Clarify lead comment.
8 (cpp_lt_replay): Clarify lead comment.
9 (cpp_lt_num_entries): Unused. Removed.
10 (cpp_lt_max_length): Unused. Removed.
11 (cpp_lt_take_strings): Unused. Removed.
12 (typedef cpp_lookback): Unused. Removed.
13 (cpp_lt_forall): Unused. Removed.
14 (cpp_lt_idents_destroy): New.
15 (cpp_lt_statistics): Functionality move to internal.
17 * symtab.c: Add comment on the lookaside table.
18 (cpp_lt_exchange): Add lead comment. Change parameter name.
19 (lt_clear_stats): New.
20 (cpp_lt_create): Add lead comment. Save original table size order.
22 (lt_statistics): Rename from cpp_lt_statistics for use only internally.
23 Add lead comment. Change parameter type. Refactor clear stats.
24 (cpp_lt_destroy): Add lead comment. Add statistics printing.
25 (cpp_lt_num_entries): Unused. Remove.
26 (cpp_lt_max_length): Unused. Remove.
27 (cpp_lt_take_strings): Unused. Remove.
28 (cpp_lt_forall): Add lead comment. Unused. Disable.
29 (lt_query_macro): Change parameter name.
30 (lt_macro_value): Change parameter name.
31 (cpp_lt_capture): Change parameter name.
32 Reuse existing table if it is close enough to the existing size.
33 Otherwise, allocate a new table. Add internal comments.
34 (cpp_lt_idents_destroy): New.
35 (lt_resize): Add lead comment.
36 (lt_lookup): Change parameter name.
38 * internal.h (struct cpp_lookaside): Added sticky_order field.
40 * initi.c (cpp_destroy): Add call to cpp_lt_destroy.
42 2010-11-02 Lawrence Crowl <crowl@google.com>
43 Diego Novillo <dnovillo@google.com>
45 * symtab.c: Include internal.h
46 (ht_calc_hash): Rename from calc_hash. Declare extern.
48 (cpp_lt_exchange): New.
50 (cpp_lt_statistics): New.
51 (cpp_lt_destroy): New.
52 (cpp_lt_num_entries): New.
53 (cpp_lt_max_length): New.
54 (cpp_lt_take_strings): New.
56 (lt_query_macro): New.
57 (lt_macro_value): New.
58 (cpp_lt_capture): New.
60 (cpp_lt_define_syntax): New.
67 * macro.c (_cpp_save_parameter): Re-write to use new
68 param_buffer field to avoid clobbering macro_buffer.
69 * include/cpplib.h (lexer_state): Define.
70 (enum include_type): Define.
71 (cpp_reset_lexer_state): Define.
72 (cpp_restore_lexer_state): Define.
73 (struct cpp_offset): Define.
74 (cpp_buffer_start): Declare.
75 (cpp_buffer_end): Declare.
76 (cpp_lookup_with_hash): Declare.
77 (cpp_peek_sym): Declare.
78 (cpp_dump_identifier): Declare.
79 (cpp_debug_identifier): Declare.
80 (cpp_dump_identifiers): Declare.
81 (cpp_debug_identifiers): Declare.
82 (cpp_push_include_type): Declare.
83 (cpp_get_pos): Declare.
84 (cpp_set_pos): Declare.
85 (cpp_return_at_eof): Declare.
86 * include/symtab.h (cpp_lookaside): Define.
87 (struct cpp_ident_use): Declare.
88 (struct cpp_idents_used): Declare.
89 (cpp_lt_exchange): Declare.
90 (cpp_lt_create): Declare.
91 (cpp_lt_destroy): Declare.
92 (cpp_lt_capture): Declare.
93 (cpp_lt_verify): Declare.
94 (cpp_lt_replay): Declare.
95 (cpp_lt_num_entries): Declare.
96 (cpp_lt_max_length): Declare.
97 (cpp_lt_take_strings): Declare.
98 (*cpp_lookback): Declare.
99 (cpp_lt_forall): Declare.
100 (cpp_lt_statistics): Declare.
101 * files.c (cpp_buffer_start): Define.
102 (cpp_buffer_end): Define.
103 (_cpp_stack_include): Add argument dname. Adjust
105 (cpp_push_include_type): New.
108 (cpp_return_at_eof): New.
109 * init.c (cpp_create_reader): Initialize field
111 (cpp_destroy): Free field param_buffer, if needed.
112 * identifiers.c (cpp_lookup_with_hash): New.
113 (cpp_lookup): Call it.
115 (cpp_dump_identifier): New.
116 (cpp_debug_identifier): New.
117 (cpp_dump_identifiers_r): New.
118 (cpp_dump_identifiers): New.
119 (cpp_debug_identifiers): New.
120 * internal.h (revision 166136):
121 (struct lae): Declare.
122 (struct cpp_lookaside): Declare.
123 (lt_lookup): Declare.
124 (ht_calc_hash): Declare.
125 (struct cpp_reader): Add fields param_buffer,
126 param_buffer_len and lookaside_table.
127 (_cpp_stack_include): Add new const char * argument.
128 * lex.c (lex_identifier_intern): Call cpp_lookup_with_hash.
129 (lex_identifier): Likewise.
130 (_cpp_lex_token): Initialize result to NULL.
131 (cpp_reset_lexer_state): New.
132 (cpp_restore_lexer_state): New.
133 * charset.c (_cpp_interpret_identifier): Call cpp_lookup.