]>
Commit | Line | Data |
---|---|---|
0aad0198 RS |
1 | 2015-11-07 Richard Sandiford <richard.sandiford@arm.com> |
2 | ||
3 | * jit-builtins.c: Don't undef DEF_BUILTIN. | |
4 | ||
2adfab87 AM |
5 | 2015-10-29 Andrew MacLeod <amacleod@redhat.com> |
6 | ||
7 | * dummy-frontend.c: Reorder #include's and remove duplicates. | |
8 | * jit-builtins.c: Likewise. | |
9 | * jit-playback.c: Likewise. | |
10 | * jit-recording.c: Likewise. | |
11 | * libgccjit.c: Likewise. | |
12 | ||
d9a6bd32 JJ |
13 | 2015-10-13 Jakub Jelinek <jakub@redhat.com> |
14 | ||
15 | * jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10, | |
16 | DEF_FUNCTION_TYPE_11): Define. | |
17 | * jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10, | |
18 | DEF_FUNCTION_TYPE_11): Define. | |
19 | ||
fa83660d TS |
20 | 2015-09-30 Thomas Schwinge <thomas@codesourcery.com> |
21 | Ulrich Drepper <drepper@gmail.com> | |
22 | ||
23 | * jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use. | |
24 | ||
20a44562 MK |
25 | 2015-09-30 Matthias Klose <doko@ubuntu.com> |
26 | ||
27 | * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6, | |
28 | remove DEF_FUNCTION_TYPE_VAR_11. | |
29 | * jit-builtins.c (builtins_manager::make_type): Define and handle | |
30 | DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11. | |
31 | ||
9376dd63 DM |
32 | 2015-08-25 David Malcolm <dmalcolm@redhat.com> |
33 | ||
34 | * docs/cp/topics/contexts.rst | |
35 | (gccjit::context::set_bool_use_external_driver): New. | |
36 | * docs/internals/test-hello-world.exe.log.txt: Update. | |
37 | * docs/topics/compatibility.rst (LIBGCCJIT_ABI_5): New. | |
38 | * docs/topics/contexts.rst | |
39 | (gcc_jit_context_set_bool_use_external_driver): New. | |
40 | * jit-common.h (enum inner_bool_option): Add | |
41 | INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER. | |
42 | * jit-playback.c (gcc_driver_name): New global. | |
43 | (gcc:jit::playback::context::invoke_driver): Split out second | |
44 | half into... | |
45 | (gcc::jit::playback::context::invoke_embedded_driver): ...this new | |
46 | function, and... | |
47 | (gcc::jit::playback::context::invoke_external_driver): ...this new | |
48 | function. | |
49 | * jit-playback.h | |
50 | (gcc::jit::playback::context::get_inner_bool_option): New. | |
51 | (gcc::jit::playback::context::invoke_embedded_driver): New. | |
52 | (gcc::jit::playback::context::invoke_external_driver): New. | |
53 | * jit-recording.c (inner_bool_option_reproducer_strings): | |
54 | Add entry for INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER. | |
55 | * libgccjit++.h | |
56 | (gccjit::context::set_bool_use_external_driver): New. | |
57 | * libgccjit.c (gcc_jit_context_set_bool_use_external_driver): New. | |
58 | * libgccjit.h (gcc_jit_context_set_bool_use_external_driver): New. | |
59 | (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_use_external_driver): | |
60 | New. | |
61 | * libgccjit.map (LIBGCCJIT_ABI_5): New. | |
62 | * notes.txt: Show invocation of embedded copy of driver. | |
63 | * docs/internals/test-hello-world.exe.log.txt: Update | |
64 | ||
baf3fbad DM |
65 | 2015-08-13 David Malcolm <dmalcolm@redhat.com> |
66 | ||
67 | * jit-playback.c (invoke_driver): On OS X, add | |
68 | "-Wl,-undefined,dynamic_lookup" to the driver arguments. | |
69 | ||
afed3459 DM |
70 | 2015-08-03 David Malcolm <dmalcolm@redhat.com> |
71 | ||
72 | * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New. | |
73 | * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY): | |
74 | We no longer show a profile. | |
75 | * docs/topics/index.rst (Topic Reference): Add performance.rst. | |
76 | * docs/topics/performance.rst: New file. | |
77 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
78 | * jit-playback.c (gcc::jit::playback::context::compile): Add timer | |
79 | param when constructing the "toplev" instance. | |
80 | (gcc::jit::playback::context::acquire_mutex): Add timer param when | |
81 | constructing auto_timevar instance. | |
82 | (gcc::jit::playback::context::make_fake_args): If we have a timer, | |
83 | add "-ftime-report". | |
84 | (gcc::jit::playback::context::invoke_driver): Add timer param when | |
85 | constructing auto_timevar instance. | |
86 | (gcc::jit::playback::context::dlopen_built_dso): Likewise. | |
87 | * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor. | |
88 | * jit-recording.c: Include timevar.h. | |
89 | (gcc::jit::recording::context::context): Initialize field "m_timer". | |
90 | * jit-recording.h: Add forward declaration of class timer. | |
91 | (gcc::jit::recording::context::set_timer): New method. | |
92 | (gcc::jit::recording::context::get_timer): New method. | |
93 | (gcc::jit::recording::context::m_timer): New field. | |
94 | * libgccjit++.h (gccjit::timer): New class. | |
95 | (gccjit::auto_time): New class. | |
96 | (gccjit::context::set_timer): New method. | |
97 | (gccjit::context::get_timer): New. | |
98 | (gccjit::timer::timer): New. | |
99 | (gccjit::timer::push): New. | |
100 | (gccjit::timer::pop): New. | |
101 | (timer::print): New. | |
102 | (timer::get_inner_timer): New. | |
103 | (timer::release): New. | |
104 | (auto_time::auto_time): New. | |
105 | (auto_time::~auto_time): New. | |
106 | * libgccjit.c: Include timevar.h. | |
107 | (struct gcc_jit_timer): New. | |
108 | (gcc_jit_timer_new): New function. | |
109 | (gcc_jit_timer_release): New function. | |
110 | (gcc_jit_context_set_timer): New function. | |
111 | (gcc_jit_context_get_timer): New function. | |
112 | (gcc_jit_timer_push): New function. | |
113 | (gcc_jit_timer_pop): New function. | |
114 | (gcc_jit_timer_print): New function. | |
115 | * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro. | |
116 | (gcc_jit_timer): New typedef. | |
117 | (gcc_jit_timer_new): New function. | |
118 | (gcc_jit_timer_release): New function. | |
119 | (gcc_jit_context_set_timer): New function. | |
120 | (gcc_jit_context_get_timer): New function. | |
121 | (gcc_jit_timer_push): New function. | |
122 | (gcc_jit_timer_pop): New function. | |
123 | (gcc_jit_timer_print): New function. | |
124 | * libgccjit.map (LIBGCCJIT_ABI_4): New. | |
125 | (gcc_jit_timer_new): New function. | |
126 | (gcc_jit_timer_release): New function. | |
127 | (gcc_jit_context_set_timer): New function. | |
128 | (gcc_jit_context_get_timer): New function. | |
129 | (gcc_jit_timer_push): New function. | |
130 | (gcc_jit_timer_pop): New function. | |
131 | (gcc_jit_timer_print): New function. | |
132 | ||
eb3982c1 DM |
133 | 2015-07-23 David Malcolm <dmalcolm@redhat.com> |
134 | ||
135 | * jit-playback.c (invoke_driver): Convert local "argvec" | |
136 | to an auto_argvec, so that it owns copies of the strings, | |
137 | rather than borrows them, updating ADD_ARG to use xstrdup | |
138 | and special-casing the NULL terminator to avoid | |
139 | xstrdup (NULL). Call add_multilib_driver_arguments at the front | |
140 | of the arguments. | |
141 | (MULTILIB_DEFAULTS): Provide a default definition. | |
142 | (multilib_defaults_raw): New constant array. | |
143 | (gcc::jit::playback::context::add_multilib_driver_arguments): New | |
144 | method. | |
145 | * jit-playback.h | |
146 | (gcc::jit::playback::context::add_multilib_driver_arguments): New | |
147 | method. | |
148 | * docs/internals/test-hello-world.exe.log.txt: Update. | |
149 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
150 | ||
1470e75f DM |
151 | 2015-07-16 David Malcolm <dmalcolm@redhat.com> |
152 | ||
153 | * docs/internals/index.rst (Overview of code structure): Add note | |
154 | that the implementation is in C++, despite the .c extension. | |
155 | (Submitting patches): New subsection. | |
156 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
157 | ||
1916bcb5 AM |
158 | 2015-07-09 Andrew MacLeod <amacleod@redhat.com> |
159 | ||
160 | * dummy-frontend.c: Adjust includes for flags.h changes. | |
161 | * jit-common.h: Likewise. | |
162 | * jit-playback.c: Likewise. | |
163 | ||
58c5ad40 DM |
164 | 2015-07-08 David Malcolm <dmalcolm@redhat.com> |
165 | ||
166 | PR jit/66783 | |
167 | * libgccjit.c (gcc_jit_context_new_field): Show name of field in | |
168 | "unknown size" error message. | |
169 | (gcc_jit_struct_set_fields): Show name of struct in error message. | |
170 | (gcc_jit_context_new_global): Show name of global in | |
171 | "unknown size" error message. | |
172 | (gcc_jit_function_new_local): Likewise for local. | |
173 | ||
c7131fb2 AM |
174 | 2015-07-07 Andrew MacLeod <amacleod@redhat.com> |
175 | ||
176 | * dummy-frontend.c: Adjust includes. | |
177 | * jit-common.h: Likewise. | |
178 | * jit-playback.c: Likewise. | |
179 | ||
3457d39e DM |
180 | 2015-07-07 David Malcolm <dmalcolm@redhat.com> |
181 | ||
182 | PR jit/66783 | |
183 | * jit-recording.h: Within namespace gcc:jit::recording... | |
184 | (type::has_known_size): New virtual function. | |
185 | (struct_has_known_size): New function. | |
186 | * libgccjit.c (gcc_jit_context_new_field): Verify that the type | |
187 | has a known size. | |
188 | (gcc_jit_context_new_global): Likewise. | |
189 | (gcc_jit_function_new_local): Likewise. | |
190 | ||
bada4bed DM |
191 | 2015-07-07 David Malcolm <dmalcolm@redhat.com> |
192 | ||
193 | PR jit/66779 | |
194 | * dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we | |
195 | handle modes QI, HI, SI, DI, TI. | |
196 | ||
e09abfa4 DM |
197 | 2015-07-01 David Malcolm <dmalcolm@redhat.com> |
198 | ||
199 | PR jit/66700 | |
200 | * jit-playback.c (jit_mark_addressable): New function. | |
201 | (gcc::jit::playback::lvalue::get_address): Call | |
202 | jit_mark_addressable on the underlying tree. | |
203 | ||
e807aeaa DM |
204 | 2015-07-01 David Malcolm <dmalcolm@redhat.com> |
205 | ||
206 | * docs/topics/types.rst (gcc_jit_context_new_union_type): Add | |
207 | documentation. | |
208 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
209 | ||
c575221a DM |
210 | 2015-07-01 David Malcolm <dmalcolm@redhat.com> |
211 | ||
212 | * docs/topics/contexts.rst (gcc_jit_context_set_bool_option): | |
213 | Clarify lack of lifetime requirements on (const char *) parameter. | |
214 | * docs/topics/expressions.rst | |
215 | (gcc_jit_context_new_string_literal): Likewise. | |
216 | (gcc_jit_context_new_global): Likewise. | |
217 | * docs/topics/functions.rst (gcc_jit_context_new_param): Likewise. | |
218 | (gcc_jit_context_new_function): Likewise. | |
219 | (gcc_jit_function_new_block): Likewise. | |
220 | (gcc_jit_block_add_comment): Likewise. | |
221 | * docs/topics/locations.rst (gcc_jit_context_new_location): | |
222 | Likewise. | |
223 | * docs/topics/types.rst (gcc_jit_context_new_field): Likewise. | |
224 | (gcc_jit_context_new_struct_type): Likewise. | |
225 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
226 | ||
ec5d0088 DM |
227 | 2015-06-30 David Malcolm <dmalcolm@redhat.com> |
228 | ||
229 | * docs/cp/topics/functions.rst (Blocks): Add switch statements to | |
230 | list of ways to terminate a block. | |
231 | (gccjit::block::end_with_switch): Add function description. | |
232 | (gccjit::case_): Add class. | |
233 | (gccjit::context::new_case): Add function description. | |
234 | * docs/cp/topics/objects.rst: Add "case_" to class hierarchy. | |
235 | * docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New. | |
236 | * docs/topics/functions.rst (Blocks): Add switch statements to | |
237 | list of ways to terminate a block. | |
238 | (gcc_jit_block_end_with_switch): Add function description. | |
239 | (gcc_jit_case): Add type. | |
240 | (gcc_jit_context_new_case): Add function description. | |
241 | (gcc_jit_case_as_object): Add function description. | |
242 | * docs/topics/objects.rst: Add gcc_jit_case to class hierarchy. | |
243 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
244 | * jit-common.h (gcc::jit::recording::case_): Add forward decl. | |
245 | (gcc::jit::playback::case_): Add forward decl. | |
246 | * jit-playback.c (add_case): New function. | |
247 | (gcc::jit::playback::block::add_switch): New function. | |
248 | * jit-playback.h (gcc::jit::playback::case_): New struct. | |
249 | (gcc::jit::playback::block::get_function): New method. | |
250 | (gcc::jit::playback::block::add_switch): New method. | |
251 | * jit-recording.c: Within namespace gcc::jit... | |
252 | (recording::context::new_case): New method. | |
253 | (recording::function::validate): Update for change to | |
254 | get_successor_blocks. | |
255 | (recording::block::end_with_switch): New method. | |
256 | (recording::block::get_successor_blocks): Update to support an | |
257 | arbitrary number of successor blocks. | |
258 | (recording::block::dump_edges_to_dot): Likewise. | |
259 | (memento_of_new_rvalue_from_const <int>::get_wide_int): New. | |
260 | (memento_of_new_rvalue_from_const <long>::get_wide_int): New. | |
261 | (memento_of_new_rvalue_from_const <double>::get_wide_int): New. | |
262 | (memento_of_new_rvalue_from_const <void *>::get_wide_int): New. | |
263 | (recording::statement::get_successor_blocks): Update to support an | |
264 | arbitrary number of successor blocks. | |
265 | (recording::conditional::get_successor_blocks): Likewise. | |
266 | (recording::jump::get_successor_blocks): Likewise. | |
267 | (recording::return_::get_successor_blocks): Likewise. | |
268 | (recording::case_::write_reproducer): New. | |
269 | (recording::case_::make_debug_string): New. | |
270 | (recording::switch_::switch_): New. | |
271 | (recording::switch_::replay_into): New. | |
272 | (recording::switch_::get_successor_blocks): New. | |
273 | (recording::switch_::make_debug_string): New. | |
274 | (recording::switch_::write_reproducer): New. | |
275 | * jit-recording.h: Within namespace gcc::jit::recording... | |
276 | (context::new_case): New. | |
277 | (rvalue::is_constant): New. | |
278 | (rvalue::get_wide_int): New. | |
279 | (block::end_with_switch): New. | |
280 | (block::get_successor_blocks): Update to support an arbitrary | |
281 | number of successor blocks. | |
282 | (memento_of_new_rvalue_from_const::is_constant): New. | |
283 | (memento_of_new_rvalue_from_const::get_wide_int): New. | |
284 | (statement::get_successor_blocks): Update to support an arbitrary | |
285 | number of successor blocks. | |
286 | (conditional::get_successor_blocks): Likewise. | |
287 | (jump::get_successor_blocks): Likewise. | |
288 | (return_::get_successor_blocks): Likewise. | |
289 | (case_): New subclass of memento. | |
290 | (switch_): New subclass of statement. | |
291 | * libgccjit++.h (gccjit::case_): New subclass of gccjit::object. | |
292 | (gccjit::context::new_case): New method. | |
293 | (gccjit::block::end_with_switch): New method. | |
294 | (gccjit::case_::case): New ctors. | |
295 | (gccjit::case_::get_inner_case): New method. | |
296 | * libgccjit.c: Include "typed-splay-tree.h" | |
297 | (struct gcc_jit_case): New. | |
298 | (gcc_jit_context_new_case): New function. | |
299 | (gcc_jit_case_as_object): New function. | |
300 | (valid_dest_for_switch): New function. | |
301 | (valid_case_for_switch): New function. | |
302 | (class api_call_validator): New class. | |
303 | (class case_range_validator): New class. | |
304 | (case_range_validator::case_range_validator): New. | |
305 | (case_range_validator::validate): New. | |
306 | (case_range_validator::case_compare): New. | |
307 | (case_range_validator::get_wide_int): new. | |
308 | (gcc_jit_block_end_with_switch): New. | |
309 | * libgccjit.h: Add gcc_jit_case to class hierarchy comment. | |
310 | (gcc_jit_case): New typedef. | |
311 | (gcc_jit_context_new_case): New function. | |
312 | (gcc_jit_case_as_object): New function. | |
313 | (gcc_jit_block_end_with_switch): New function. | |
314 | (LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New. | |
315 | * libgccjit.map: Add gcc_jit_block_end_with_switch, | |
316 | gcc_jit_case_as_object and gcc_jit_context_new_case. | |
317 | ||
6a3603e3 DM |
318 | 2015-06-30 David Malcolm <dmalcolm@redhat.com> |
319 | ||
320 | PR jit/66546 | |
321 | * docs/cp/topics/contexts.rst | |
322 | (gccjit::context::set_bool_allow_unreachable_blocks): New. | |
323 | * docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New. | |
324 | * docs/topics/contexts.rst (Options): Add notes discussing the | |
325 | transition from enums to entrypoints for new options. | |
326 | (gcc_jit_context_set_bool_allow_unreachable_blocks): New. | |
327 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
328 | * jit-common.h (gcc::jit::inner_bool_option): New enum. | |
329 | * jit-recording.c: Within namespace gcc::jit... | |
330 | (recording::context::context): Handle m_inner_bool_options. | |
331 | (recording::context::set_inner_bool_option): New. | |
332 | (inner_bool_option_reproducer_strings): New. | |
333 | (recording::context::log_all_options): Log the "inner" bool | |
334 | options. | |
335 | (recording::context::log_inner_bool_option): New. | |
336 | (recording::context::dump_reproducer_to_file): Write initializers | |
337 | for "inner" bool options. | |
338 | (recording::function::validate): Don't check for block | |
339 | reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set. | |
340 | * jit-recording.h: Within namespace gcc::jit... | |
341 | (recording::context::set_inner_bool_option): New. | |
342 | (recording::context::get_inner_bool_option): New. | |
343 | (recording::context::log_inner_bool_option): New. | |
344 | (recording::context::m_inner_bool_options): New. | |
345 | * libgccjit++.h | |
346 | (gccjit::context::set_bool_allow_unreachable_blocks): New. | |
347 | * libgccjit.c | |
348 | (gcc_jit_context_set_bool_allow_unreachable_blocks): New. | |
349 | * libgccjit.h: Add note about options present in the | |
350 | initial release of libgccjit. | |
351 | (gcc_jit_context_set_bool_allow_unreachable_blocks): New API | |
352 | entrypoint. | |
353 | (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks): | |
354 | New macro. | |
355 | * libgccjit.map (LIBGCCJIT_ABI_2): New, containing... | |
356 | (gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new | |
357 | entrypoint. | |
358 | ||
fa22c20d DM |
359 | 2015-06-30 David Malcolm <dmalcolm@redhat.com> |
360 | ||
361 | PR jit/66628 | |
362 | * docs/cp/topics/contexts.rst (Additional command-line options): | |
363 | New section. | |
364 | * docs/topics/compatibility.rst: New file. | |
365 | * docs/topics/contexts.rst (Additional command-line options): New | |
366 | section. | |
367 | * docs/topics/index.rst: Add compatibility.rst. | |
368 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
369 | * jit-playback.c (make_fake_args): Add call to | |
370 | append_command_line_options. | |
371 | * jit-recording.c: Within namespace gcc::jit... | |
372 | (recording::context::~context): Free the optnames within | |
373 | m_command_line_options. | |
374 | (recording::context::set_bool_option): Likewise. | |
375 | (recording::context::add_command_line_option): New method. | |
376 | (recording::context::append_command_line_options): New method. | |
377 | (recording::context::dump_reproducer_to_file): Add command-line | |
378 | options. | |
379 | * jit-recording.h: Within namespace gcc::jit... | |
380 | (recording::context::add_command_line_option): New method. | |
381 | (recording::context::append_command_line_options): New method. | |
382 | (recording::context::m_command_line_options): New field. | |
383 | * libgccjit++.h (gccjit::context::add_command_line_option): New | |
384 | method. | |
385 | * libgccjit.c (gcc_jit_context_add_command_line_option): New API | |
386 | entrypoint. | |
387 | * libgccjit.h (gcc_jit_context_add_command_line_option): New API | |
388 | entrypoint. | |
389 | (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New | |
390 | macro. | |
391 | * libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add | |
392 | LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option. | |
393 | ||
a6314e15 DM |
394 | 2015-06-30 David Malcolm <dmalcolm@redhat.com> |
395 | ||
396 | * jit-recording.c | |
397 | (gcc::jit::recording::context::dump_reproducer_to_file): | |
398 | Add pragma to generated reproducers to disable -Wunused-variable. | |
399 | Fix handling of NULL string options. | |
400 | ||
adb6d84b DM |
401 | 2015-06-30 David Malcolm <dmalcolm@redhat.com> |
402 | ||
403 | * docs/cp/topics/expressions.rst: Remove stray semicolon. | |
404 | * docs/cp/topics/functions.rst: Remove stray backslash. | |
405 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
406 | ||
f0889939 AM |
407 | 2015-06-25 Andrew MacLeod <amacleod@redhat.com> |
408 | ||
409 | * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list. | |
410 | * jit-playback.c: Likewise. | |
411 | ||
9cad7a76 AM |
412 | 2015-06-25 Andrew Macleod <amacleod@redhat.com> |
413 | ||
414 | * jit-common.h: Don't include alias.h. | |
415 | ||
41571b55 DM |
416 | 2015-06-17 David Malcolm <dmalcolm@redhat.com> |
417 | ||
418 | * libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field | |
419 | is for the correct struct. | |
420 | (gcc_jit_rvalue_access_field): Likewise. | |
421 | ||
abb226c9 AM |
422 | 2015-06-17 Andrew MacLeod <amacleod@redhat.com> |
423 | ||
424 | * dummy-frontend.c: Do not include input.h, line-map.h or is-a.h. | |
425 | * jit-common.h: Likewise. | |
426 | * jit-playback.c: Likewise. | |
427 | ||
bd93aa1a DM |
428 | 2015-06-16 David Malcolm <dmalcolm@redhat.com> |
429 | ||
430 | PR jit/66539 | |
431 | * jit-recording.c: Within namespace gcc::jit::recording:: | |
432 | (rvalue::get_debug_string_parens): New function. | |
433 | (binary_op::make_debug_string): Update to mimic C precedence | |
434 | rules. | |
435 | (binary_op_precedence): New array. | |
436 | (binary_op::get_precedence): New function. | |
437 | (comparison::make_debug_string): Update to mimic C precedence | |
438 | rules. | |
439 | (comparison_precedence): New array. | |
440 | (comparison::get_precedence): New function. | |
441 | (cast::make_debug_string): Update to mimic C precedence rules. | |
442 | (call::make_debug_string): Likewise. | |
443 | (call_through_ptr::make_debug_string): Likewise. | |
444 | (array_access::make_debug_string): Likewise. | |
445 | (access_field_of_lvalue::make_debug_string): Likewise. | |
446 | (access_field_rvalue::make_debug_string): Likewise. | |
447 | (dereference_field_rvalue::make_debug_string): Likewise. | |
448 | (dereference_rvalue::make_debug_string): Likewise. | |
449 | (get_address_of_lvalue::make_debug_string): Likewise. | |
450 | * jit-recording.h: Within namespace gcc::jit::recording:: | |
451 | (precedence): New enum. | |
452 | (rvalue::rvalue): Initialize field "m_parenthesized_string". | |
453 | (rvalue::get_debug_string_parens): New method. | |
454 | (rvalue::get_precedence): New pure virtual function. | |
455 | (rvalue::m_parenthesized_string): New field. | |
456 | (param::get_precedence): New function. | |
457 | (global::get_precedence): New function. | |
458 | (memento_of_new_rvalue_from_const::get_precedence): New function. | |
459 | (memento_of_new_string_literal::get_precedence): New function. | |
460 | (unary_op::get_precedence): New function. | |
461 | (binary_op::get_precedence): New function. | |
462 | (comparison::get_precedence): New function. | |
463 | (cast::get_precedence): New function. | |
464 | (call::get_precedence): New function. | |
465 | (call_through_ptr::get_precedence): New function. | |
466 | (array_access::get_precedence): New function. | |
467 | (access_field_of_lvalue::get_precedence): New function. | |
468 | (access_field_rvalue::get_precedence): New function. | |
469 | (dereference_field_rvalue::get_precedence): New function. | |
470 | (dereference_rvalue::get_precedence): New function. | |
471 | (get_address_of_lvalue::get_precedence): New function. | |
472 | (local::get_precedence): New function. | |
473 | ||
83c1b80e MK |
474 | 2015-06-09 Matthias Klose <doko@ubuntu.com> |
475 | ||
476 | * Make-lang.in (jit.install-common): Install headers using INSTALL_DATA. | |
477 | ||
13fdf2e2 AM |
478 | 2015-06-08 Andrew MacLeod <amacleod@redhat.com> |
479 | ||
480 | * dummy-frontend.c : Adjust include files. | |
481 | * jit-common.h : Likewise. | |
482 | * jit-playback.c : Likewise. | |
483 | ||
e4753451 DM |
484 | 2015-06-05 David Malcolm <dmalcolm@redhat.com> |
485 | ||
486 | * dummy-frontend.c | |
487 | (jit_langhook_post_compilation_parsing_cleanups): Remove. | |
488 | (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove | |
489 | * jit-playback.c (gcc::jit::playback::context::new_global): Add | |
490 | call to varpool_node::finalize_decl. | |
491 | (gcc::jit::playback::context::finalize_global_decls): Remove. | |
492 | * jit-playback.h | |
493 | (gcc::jit::playback::context::finalize_global_decls): Remove. | |
494 | ||
e7547bc6 DM |
495 | 2015-06-05 David Malcolm <dmalcolm@redhat.com> |
496 | ||
497 | * dummy-frontend.c (jit_langhook_write_globals): Rename to... | |
498 | (jit_langhook_post_compilation_parsing_cleanups): ...this, and | |
499 | eliminate calls to finalize_compilation_unit and | |
500 | write_global_decls_2. | |
501 | (LANG_HOOKS_WRITE_GLOBALS): Rename to... | |
502 | (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and | |
503 | redirect from jit_langhook_write_globals to | |
504 | jit_langhook_post_compilation_parsing_cleanups. | |
505 | * jit-playback.c | |
506 | (gcc::jit::playback::context::write_global_decls_1): Rename to... | |
507 | (gcc::jit::playback::context::finalize_global_decls): ...this. | |
508 | (gcc::jit::playback::context::write_global_decls_1): Delete. | |
509 | * jit-playback.h | |
510 | (gcc::jit::playback::context::write_global_decls_1): Rename to... | |
511 | (gcc::jit::playback::context::finalize_global_decls): ...this. | |
512 | (gcc::jit::playback::context::write_global_decls_1): Delete. | |
513 | ||
ecb9f223 AM |
514 | 2015-06-04 Andrew MacLeod <amacleod@redhat.com> |
515 | ||
516 | * dummy-frontend.c: Adjust includes for restructured coretypes.h. | |
517 | * jit-common.h: Likewise. | |
518 | * jit-playback.c: Likewise. | |
519 | ||
2637afb7 DM |
520 | 2015-05-12 David Malcolm <dmalcolm@redhat.com> |
521 | ||
522 | * jit-builtins.c: Include vec.h before target.h. | |
523 | ||
46bf0b0a JW |
524 | 2015-04-27 Jim Wilson <jim.wilson@linaro.org> |
525 | ||
526 | * Make-lang.in (jit.mostlyclean): Remove shared libraries and object | |
527 | files. | |
528 | ||
51c5c6b5 DM |
529 | 2015-04-09 David Malcolm <dmalcolm@redhat.com> |
530 | ||
531 | PR jit/65691 | |
532 | * docs/cp/topics/expressions.rst (Simple expressions): Fix copy | |
533 | and paste error in description of gccjit::context::one. | |
534 | * docs/topics/expressions.rst (Simple expressions): Likewise in | |
535 | description of gcc_jit_context_one. | |
536 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
537 | ||
f40fd895 UB |
538 | 2015-03-13 Uros Bizjak <ubizjak@gmail.com> |
539 | ||
540 | * jit-recording.c (dump::write): Also check vasprintf return value. | |
541 | (recording::context::add_error_va): Ditto. | |
542 | (recording::string::from_printf): Ditto. | |
543 | ||
18eb0d13 DM |
544 | 2015-03-13 David Malcolm <dmalcolm@redhat.com> |
545 | ||
546 | * docs/internals/index.rst (Packaging notes): New section. | |
547 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
548 | ||
7ef96183 DM |
549 | 2015-03-05 David Malcolm <dmalcolm@redhat.com> |
550 | ||
551 | * docs/cp/intro/tutorial03.rst: Add missing arguments to | |
552 | gccjit::block::end_with_conditional call. Add on_true/on_false | |
553 | comments. Tweak the wording. | |
554 | * docs/intro/tutorial03.rst: Add missing arguments to | |
555 | gcc_jit_block_end_with_conditional call. Add some clarifying | |
556 | comments. | |
557 | * docs/topics/compilation.rst: Tweak the wording to avoid an | |
558 | ambiguous use of "this". | |
559 | * docs/topics/contexts.rst: Fix a typo. | |
560 | * docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove | |
561 | a stray backtick. | |
562 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
563 | ||
56a9f6bc TS |
564 | 2015-02-24 Thomas Schwinge <thomas@codesourcery.com> |
565 | ||
566 | PR libgomp/64625 | |
567 | * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8) | |
568 | (DEF_FUNCTION_TYPE_VAR_12): Remove macros. | |
569 | (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros. | |
570 | * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8) | |
571 | (DEF_FUNCTION_TYPE_VAR_12): Remove macros. | |
572 | (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros. | |
573 | ||
a4be4e91 DM |
574 | 2015-02-04 David Malcolm <dmalcolm@redhat.com> |
575 | ||
576 | PR jit/64257 | |
577 | * docs/conf.py (html_theme): Change from 'pyramid' | |
578 | to 'sphinxdoc'. | |
579 | ||
f435bff3 DM |
580 | 2015-02-04 David Malcolm <dmalcolm@redhat.com> |
581 | ||
582 | * docs/topics/contexts.rst (gcc_jit_context_acquire): Fix | |
583 | typo. | |
584 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
585 | ||
0ed4f017 DM |
586 | 2015-02-03 David Malcolm <dmalcolm@redhat.com> |
587 | ||
588 | * jit-logging.h (gcc::jit::log_user::log): Make const. | |
589 | * jit-recording.c (gcc::jit::recording::context::set_str_option): | |
590 | Log the new value of the option. | |
591 | (gcc::jit::recording::context::set_int_option): Likewise. | |
592 | (gcc::jit::recording::context::set_bool_option): Likewise. | |
593 | (gcc::jit::recording::context::compile): Log the value of all | |
594 | options. | |
595 | (gcc::jit::recording::context::compile_to_file): Likewise. | |
596 | (gcc::jit::recording::context::log_all_options): New function. | |
597 | (gcc::jit::recording::context::log_str_option): New function. | |
598 | (gcc::jit::recording::context::log_int_option): New function. | |
599 | (gcc::jit::recording::context::log_bool_option): New function. | |
600 | * jit-recording.h (gcc::jit::recording::context::log_all_options): | |
601 | New function. | |
602 | (gcc::jit::recording::context::log_str_option): New function. | |
603 | (gcc::jit::recording::context::log_int_option): New function. | |
604 | (gcc::jit::recording::context::log_bool_option): New function. | |
605 | * docs/internals/test-hello-world.exe.log.txt: Update for above | |
606 | changes. | |
607 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
608 | ||
2cb844ce DM |
609 | 2015-02-03 David Malcolm <dmalcolm@redhat.com> |
610 | ||
611 | PR jit/64810 | |
612 | * Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o. | |
613 | (LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS. | |
614 | * jit-playback.c: Include gcc.h. | |
615 | (gcc::jit::playback::context::compile): Move mutex acquisition | |
616 | to before the call to make_fake_args. | |
617 | (append_arg_from_driver): New function. | |
618 | (gcc::jit::playback::context::make_fake_args): On the first call, | |
619 | call into driver_get_configure_time_options to get configure-time | |
620 | default options and cache them. Add them to the args for | |
621 | toplev::main. | |
622 | * jit-spec.c: New source file. | |
623 | * docs/internals/test-hello-world.exe.log.txt: Update to reflect | |
624 | above changes. | |
625 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
626 | ||
16a71c50 DM |
627 | 2015-02-02 David Malcolm <dmalcolm@redhat.com> |
628 | ||
629 | PR jit/64810 | |
630 | * dummy-frontend.c (jit_langhook_type_for_mode): Support | |
631 | TYPE_MODE (long_long_integer_type_node). | |
632 | ||
53c04ec9 DM |
633 | 2015-01-27 David Malcolm <dmalcolm@redhat.com> |
634 | ||
635 | * docs/internals/test-hello-world.exe.log.txt: Add example version | |
636 | lines. | |
637 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
638 | * jit-common.h (gcc::jit::dump::get_file): New accessor. | |
639 | * jit-logging.c: Include toplev.h. | |
640 | (gcc::jit::logger::logger): Log the GCC version. | |
641 | * jit-recording.c: Include toplev.h. | |
642 | (gcc:jit::recording::context::dump_reproducer_to_file): Log the | |
643 | GCC version. | |
644 | ||
dc44ee3a DM |
645 | 2015-01-26 David Malcolm <dmalcolm@redhat.com> |
646 | ||
647 | * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo. | |
648 | * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The | |
649 | error buffer is only valid until the next call to the context. | |
650 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
651 | * libgccjit.h (gcc_jit_context_get_first_error): Reword the | |
652 | comment to omit mention of compiling. | |
653 | (gcc_jit_context_get_last_error): The error buffer is only valid | |
654 | until the next call to the context. | |
655 | ||
3349605d DM |
656 | 2015-01-26 David Malcolm <dmalcolm@redhat.com> |
657 | ||
658 | PR jit/64708 | |
659 | * config-lang.in (compilers): Drop "libgccjit.so". | |
660 | ||
6fc2d0f3 DM |
661 | 2015-01-23 David Malcolm <dmalcolm@redhat.com> |
662 | ||
663 | PR jit/64721 | |
664 | * jit-playback.c (gcc::jit::playback::context::compile): Construct | |
665 | toplev instances with init_signals=false. | |
666 | ||
fdce7209 DM |
667 | 2015-01-19 David Malcolm <dmalcolm@redhat.com> |
668 | ||
669 | * docs/cp/topics/results.rst: Rename to... | |
670 | * docs/cp/topics/compilation.rst: ...this, and add section on | |
671 | ahead-of-time compilation. | |
672 | * docs/cp/topics/index.rst: Update for renaming of results.rst | |
673 | to compilation.rst. | |
674 | * docs/examples/emit-alphabet.bf: New file, a sample "brainf" | |
675 | script. | |
676 | * docs/examples/tut05-bf.c: New file, implementing a compiler | |
677 | for "brainf". | |
678 | * docs/internals/test-hello-world.exe.log.txt: Update to reflect | |
679 | changes to logger output. | |
680 | * docs/intro/index.rst: Add tutorial05.rst | |
681 | * docs/intro/tutorial05.rst: New file. | |
682 | * docs/topics/results.rst: Rename to... | |
683 | * docs/topics/compilation.rst: ...this, and add section on | |
684 | ahead-of-time compilation. | |
685 | * docs/topics/index.rst: Update for renaming of results.rst to | |
686 | compilation.rst. | |
687 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
688 | * jit-playback.c (gcc::jit::playback::context::compile): Convert | |
689 | return type from result * to void. Move the code to convert to | |
690 | dso and dlopen the result to a new pure virtual "postprocess" | |
691 | method. | |
692 | (gcc::jit::playback::compile_to_memory::compile_to_memory): New | |
693 | function. | |
694 | (gcc::jit::playback::compile_to_memory::postprocess): New | |
695 | function, based on playback::context::compile. | |
696 | (gcc::jit::playback::compile_to_file::compile_to_file): New | |
697 | function. | |
698 | (gcc::jit::playback::compile_to_file::postprocess): New function. | |
699 | (gcc::jit::playback::compile_to_file::copy_file): New function. | |
700 | (gcc::jit::playback::context::convert_to_dso): Move internals | |
701 | to... | |
702 | (gcc::jit::playback::context::invoke_driver): New method. Add | |
703 | "-shared" and "-c" options to driver's argv as needed. | |
704 | * jit-playback.h: Include "timevar.h". | |
705 | (gcc::jit::playback::context::compile): Convert return type from | |
706 | result * to void. | |
707 | (gcc::jit::playback::context::postprocess): New pure virtual | |
708 | function, making this an abstract base class. | |
709 | (gcc::jit::playback::context::get_tempdir): New accessor. | |
710 | (gcc::jit::playback::context::invoke_driver): New function. | |
711 | (class gcc::jit::playback::compile_to_memory): New subclass of | |
712 | playback::context. | |
713 | (class gcc::jit::playback::compile_to_file): Likewise. | |
714 | * jit-recording.c (gcc::jit::recording::context::compile): Use a | |
715 | playback::compile_to_memory, and extract its result. | |
716 | (gcc::jit::recording::context::compile_to_file): New function. | |
717 | * jit-recording.h (gcc::jit::recording::context::compile_to_file): | |
718 | New function. | |
719 | * libgccjit++.h (gccjit::context::compile_to_file): New method. | |
720 | * libgccjit.c (gcc_jit_context_compile): Update log message to | |
721 | clarify that this is an in-memory compile. | |
722 | (gcc_jit_context_compile_to_file): New function. | |
723 | * libgccjit.h (gcc_jit_context): Clarify that you can compile | |
724 | a context more than once, and that you can compile to a file | |
725 | as well as to memory. | |
726 | (gcc_jit_result): Clarify that this is the result of an | |
727 | in-memory compilation. | |
728 | (gcc_jit_context_compile): Clarify that you can compile, and that | |
729 | this is an in-memory compilation. | |
730 | (enum gcc_jit_output_kind): New enum. | |
731 | (gcc_jit_context_compile_to_file): New function. | |
732 | (gcc_jit_context_enable_dump): Clarify comment to cover both forms | |
733 | of compilation. | |
734 | * libgccjit.map (gcc_jit_context_compile_to_file): New API | |
735 | entrypoint. | |
736 | * notes.txt: Update to show the playback::context::postprocess | |
737 | virtual function. | |
738 | ||
450e225b DM |
739 | 2015-01-19 David Malcolm <dmalcolm@redhat.com> |
740 | ||
741 | * jit-recording.c | |
742 | (gcc::jit::recording::memento_of_new_string_literal::make_debug_string): | |
743 | Add missing format string. | |
744 | ||
499de348 DM |
745 | 2015-01-16 David Malcolm <dmalcolm@redhat.com> |
746 | ||
747 | * Make-lang.in (lang_checks_parallelized): Add "check-jit". | |
748 | (check_jit_parallelize): Set this to an arbitrary value (10). | |
749 | ||
e989e68d JJ |
750 | 2015-01-16 Jakub Jelinek <jakub@redhat.com> |
751 | ||
752 | * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of | |
753 | last argument. | |
754 | (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and | |
755 | undef afterwards. | |
756 | * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): | |
757 | Likewise. | |
758 | ||
179ed8f5 RS |
759 | 2015-01-15 Richard Sandiford <richard.sandiford@arm.com> |
760 | ||
761 | Update copyright years in docs/. | |
762 | ||
96a87981 DM |
763 | 2015-01-15 David Malcolm <dmalcolm@redhat.com> |
764 | ||
765 | * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the | |
766 | lvalue and the rvalue are of compatible type. | |
767 | ||
86d0ac88 DM |
768 | 2015-01-13 David Malcolm <dmalcolm@redhat.com> |
769 | ||
770 | * docs/cp/topics/contexts.rst (Debugging): Add | |
771 | gccjit::context::dump_reproducer_to_file. | |
772 | * docs/internals/index.rst (Design notes): New section, | |
773 | discussing input validation and | |
774 | gcc_jit_context_dump_reproducer_to_file. | |
775 | * docs/topics/contexts.rst (Debugging): Add | |
776 | gcc_jit_context_dump_reproducer_to_file. | |
777 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
778 | * jit-common.h (gcc::jit::dump::get_context): New accessor. | |
779 | * jit-recording.c: Include "hash-map.h". | |
780 | Within namespace ::gcc::jit... | |
781 | (dump::write): Flush each line. | |
782 | (dump::make_location): Pass false for new param "created_by_user". | |
783 | (class allocator): New class. | |
784 | (allocator::~allocator): New function. | |
785 | (allocator::xstrdup_printf): New function. | |
786 | (allocator::xstrdup_printf_va): New function. | |
787 | (class reproducer): New subclass of dump. | |
788 | (reproducer::reproducer): New function. | |
789 | (reproducer::write_params): New function. | |
790 | (reproducer::write_args): New function. | |
791 | (reproducer::make_identifier): New function. | |
792 | (reproducer::make_tmp_identifier): New function. | |
793 | (reproducer::get_identifier): New pair of functions. | |
794 | (reproducer::get_identifier_as_rvalue): New function. | |
795 | (reproducer::get_identifier_as_lvalue): New function. | |
796 | (reproducer::get_identifier_as_type): New function. | |
797 | (reproducer::xstrdup_printf): New function. | |
798 | (recording::context::context): Initialize m_toplevel_ctxt. | |
799 | (recording::context::new_location): Add param created_by_user. | |
800 | (str_option_reproducer_strings): New table of strings. | |
801 | (int_option_reproducer_strings): Likewise. | |
802 | (bool_option_reproducer_strings): Likewise. | |
803 | (get_type_enum_strings): Likewise. | |
804 | (names_of_function_kinds): Likewise. | |
805 | (global_kind_reproducer_strings): Likewise. | |
806 | (unary_op_reproducer_strings): Likewise. | |
807 | (binary_op_reproducer_strings): Likewise. | |
808 | (comparison_reproducer_strings): Likewise. | |
809 | Within namespace ::gcc::jit::recording::... | |
810 | (context::dump_reproducer_to_file): New function. | |
811 | (string::write_reproducer): Likewise. | |
812 | (location::write_reproducer): Likewise. | |
813 | (type::access_as_type): Likewise. | |
814 | (memento_of_get_type::write_reproducer): Likewise. | |
815 | (memento_of_get_pointer::write_reproducer): Likewise. | |
816 | (memento_of_get_const::write_reproducer): Likewise. | |
817 | (memento_of_get_volatile::write_reproducer): Likewise. | |
818 | (array_type::write_reproducer): Likewise. | |
819 | (function_type::write_reproducer): Likewise. | |
820 | (function_type::write_deferred_reproducer): Likewise. | |
821 | (field::write_reproducer): Likewise. | |
822 | (struct_::access_as_type): Likewise. | |
823 | (struct_::write_reproducer): Likewise. | |
824 | (union_::write_reproducer): Likewise. | |
825 | (fields::write_reproducer): Likewise. | |
826 | (rvalue::access_as_rvalue): Likewise. | |
827 | (lvalue::access_as_rvalue): Likewise. | |
828 | (lvalue::access_as_lvalue): Likewise. | |
829 | (param::access_as_rvalue): Likewise. | |
830 | (param::access_as_lvalue): Likewise. | |
831 | (param::write_reproducer): Likewise. | |
832 | (function::write_reproducer): Likewise. | |
833 | (block::write_reproducer): Likewise. | |
834 | (global::write_reproducer): Likewise. | |
835 | (memento_of_new_rvalue_from_const <int>::write_reproducer): | |
836 | Likewise. | |
837 | (memento_of_new_rvalue_from_const <long>::write_reproducer): | |
838 | Likewise. | |
839 | (memento_of_new_rvalue_from_const <double>::write_reproducer): | |
840 | Likewise. | |
841 | (memento_of_new_rvalue_from_const <void *>::write_reproducer): | |
842 | Likewise. | |
843 | (memento_of_new_string_literal::write_reproducer): Likewise. | |
844 | (unary_op::write_reproducer): Likewise. | |
845 | (binary_op::write_reproducer): Likewise. | |
846 | (comparison::write_reproducer): Likewise. | |
847 | (cast::write_reproducer): Likewise. | |
848 | (call::write_reproducer): Likewise. | |
849 | (call_through_ptr::write_reproducer): Likewise. | |
850 | (array_access::write_reproducer): Likewise. | |
851 | (access_field_of_lvalue::write_reproducer): Likewise. | |
852 | (access_field_rvalue::write_reproducer): Likewise. | |
853 | (dereference_field_rvalue::write_reproducer): Likewise. | |
854 | (dereference_rvalue::write_reproducer): Likewise. | |
855 | (get_address_of_lvalue::write_reproducer): Likewise. | |
856 | (local::write_reproducer): Likewise. | |
857 | (eval::write_reproducer): Likewise. | |
858 | (assignment::write_reproducer): Likewise. | |
859 | (assignment_op::write_reproducer): Likewise. | |
860 | (comment::write_reproducer): Likewise. | |
861 | (conditional::write_reproducer): Likewise. | |
862 | (jump::write_reproducer): Likewise. | |
863 | (return_::write_reproducer): Likewise. | |
864 | * jit-recording.h (gcc::jit::reproducer): New forward declararion. | |
865 | Within namespace ::gcc::jit::recording::... | |
866 | (context::new_location): Add "created_by_user" param. | |
867 | (context::dump_reproducer_to_file): New method. | |
868 | (context::m_toplevel_ctxt): New field. | |
869 | (memento::write_reproducer): New pure virtual function. | |
870 | (memento::dyn_cast_location): New virtual function. | |
871 | (string::write_reproducer): | |
872 | (location::location): Add "created_by_user" param. | |
873 | (location::dyn_cast_location): New function. | |
874 | (location::created_by_user): New accessor. | |
875 | (location::write_reproducer): New function. | |
876 | (location::m_created_by_user): New field. | |
877 | (type::access_as_type): New virtual function. | |
878 | (location::write_reproducer): Likewise. | |
879 | (type::access_as_type): Likewise. | |
880 | (memento_of_get_type::write_reproducer): Likewise. | |
881 | (memento_of_get_pointer::write_reproducer): Likewise. | |
882 | (memento_of_get_const::write_reproducer): Likewise. | |
883 | (memento_of_get_volatile::write_reproducer): Likewise. | |
884 | (array_type::write_reproducer): Likewise. | |
885 | (function_type::write_reproducer): Likewise. | |
886 | (function_type::write_deferred_reproducer): Likewise. | |
887 | (field::write_reproducer): Likewise. | |
888 | (struct_::access_as_type): Likewise. | |
889 | (struct_::write_reproducer): Likewise. | |
890 | (union_::write_reproducer): Likewise. | |
891 | (union_::m_fields): Remove stray unused field. | |
892 | (fields::length): New accessor. | |
893 | (fields::get_field): New accessor. | |
894 | (fields::write_reproducer): New function. | |
895 | (rvalue::access_as_rvalue): Likewise. | |
896 | (lvalue::access_as_rvalue): Likewise. | |
897 | (lvalue::access_as_lvalue): Likewise. | |
898 | (param::access_as_rvalue): Likewise. | |
899 | (param::access_as_lvalue): Likewise. | |
900 | (param::write_reproducer): Likewise. | |
901 | (function::write_reproducer): Likewise. | |
902 | (block::write_reproducer): Likewise. | |
903 | (global::write_reproducer): Likewise. | |
904 | (memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer): | |
905 | Likewise. | |
906 | (memento_of_new_string_literal::write_reproducer): Likewise. | |
907 | (unary_op::write_reproducer): Likewise. | |
908 | (binary_op::write_reproducer): Likewise. | |
909 | (comparison::write_reproducer): Likewise. | |
910 | (cast::write_reproducer): Likewise. | |
911 | (call::write_reproducer): Likewise. | |
912 | (call_through_ptr::write_reproducer): Likewise. | |
913 | (array_access::write_reproducer): Likewise. | |
914 | (access_field_of_lvalue::write_reproducer): Likewise. | |
915 | (access_field_rvalue::write_reproducer): Likewise. | |
916 | (dereference_field_rvalue::write_reproducer): Likewise. | |
917 | (dereference_rvalue::write_reproducer): Likewise. | |
918 | (get_address_of_lvalue::write_reproducer): Likewise. | |
919 | (local::write_reproducer): Likewise. | |
920 | (eval::write_reproducer): Likewise. | |
921 | (assignment::write_reproducer): Likewise. | |
922 | (assignment_op::write_reproducer): Likewise. | |
923 | (comment::write_reproducer): Likewise. | |
924 | (conditional::write_reproducer): Likewise. | |
925 | (jump::write_reproducer): Likewise. | |
926 | (return_::write_reproducer): Likewise. | |
927 | * libgccjit++.h (gccjit::context::dump_reproducer_to_file): New. | |
928 | * libgccjit.c (gcc_jit_context_new_location): Pass "true" as | |
929 | param "created_by_user". | |
930 | (gcc_jit_context_dump_reproducer_to_file): New API entrypoint. | |
931 | * libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API | |
932 | entrypoint. | |
933 | * libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API | |
934 | entrypoint. | |
935 | ||
f6f2b019 DM |
936 | 2015-01-12 David Malcolm <dmalcolm@redhat.com> |
937 | ||
938 | * jit-recording.c (class gcc::jit::rvalue_usage_validator): New. | |
939 | (gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New | |
940 | ctor. | |
941 | (gcc::jit::rvalue_usage_validator::visit): New function. | |
942 | (gcc::jit::recording::rvalue::verify_valid_within_stmt): New | |
943 | function. | |
944 | (gcc::jit::recording::rvalue::set_scope): New function. | |
945 | (gcc::jit::recording::function::function): Call set_scope on each | |
946 | param, issuing errors for any params that already have a function. | |
947 | (gcc::jit::recording::block::add_eval): Return the new statement; | |
948 | update the comment given that some error-checking now happens after | |
949 | this returns. | |
950 | (gcc::jit::recording::block::add_assignment): Likewise. | |
951 | (gcc::jit::recording::block::add_assignment_op): Likewise. | |
952 | (gcc::jit::recording::block::add_comment): Likewise. | |
953 | (gcc::jit::recording::block::end_with_conditional): Likewise. | |
954 | (gcc::jit::recording::block::end_with_jump): Likewise. | |
955 | (gcc::jit::recording::block::end_with_return): Likewise. | |
956 | (gcc::jit::recording::block::validate): Add a comment. | |
957 | (gcc::jit::recording::unary_op::visit_children): New function. | |
958 | (gcc::jit::recording::binary_op::visit_children): New function. | |
959 | (gcc::jit::recording::comparison::visit_children): New function. | |
960 | (gcc::jit::recording::cast::visit_children): New function. | |
961 | (gcc::jit::recording::call::visit_children): New function. | |
962 | (gcc::jit::recording::call_through_ptr::visit_children): New function. | |
963 | (gcc::jit::recording::array_access::visit_children): New function. | |
964 | (gcc::jit::recording::access_field_of_lvalue::visit_children): New | |
965 | function. | |
966 | (gcc::jit::recording::access_field_rvalue::visit_children): New | |
967 | function. | |
968 | (gcc::jit::recording::dereference_field_rvalue::visit_children): | |
969 | New function. | |
970 | (gcc::jit::recording::dereference_rvalue::visit_children): New | |
971 | function. | |
972 | (gcc::jit::recording::get_address_of_lvalue::visit_children): New | |
973 | function. | |
974 | * jit-recording.h: Within namespace gcc::jit::recording... | |
975 | (class rvalue_visitor): New. | |
976 | (rvalue::rvalue): Initialize m_scope. | |
977 | (rvalue::get_loc): New accessor. | |
978 | (rvalue::verify_valid_within_stmt): New function. | |
979 | (rvalue::visit_children): New pure virtual function. | |
980 | (rvalue::set_scope): New function. | |
981 | (rvalue::get_scope): New function. | |
982 | (rvalue::dyn_cast_param): New function. | |
983 | (rvalue::m_scope): New field. | |
984 | (param::visit_children): New empty function. | |
985 | (param::dyn_cast_param): New function. | |
986 | (function::get_loc): New function. | |
987 | (block::add_eval): Return the new statement. | |
988 | (block::add_assignment): Likewise. | |
989 | (block::add_assignment_op): Likewise. | |
990 | (block::add_comment): Likewise. | |
991 | (block::end_with_conditional): Likewise. | |
992 | (block::end_with_jump): Likewise. | |
993 | (block::end_with_return): Likewise. | |
994 | (global::visit_children): New function. | |
995 | (memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children): | |
996 | New function. | |
997 | (memento_of_new_string_literal::visit_children): New function. | |
998 | (unary_op::visit_children): New function. | |
999 | (binary_op::visit_children): New function. | |
1000 | (comparison::visit_children): New function. | |
1001 | (cast::visit_children): New function. | |
1002 | (call::visit_children): New function. | |
1003 | (call_through_ptr::visit_children): New function. | |
1004 | (array_access::visit_children): New function. | |
1005 | (access_field_of_lvalue::visit_children): New function. | |
1006 | (access_field_rvalue::visit_children): New function. | |
1007 | (dereference_field_rvalue::visit_children): New function. | |
1008 | (dereference_rvalue::visit_children): New function. | |
1009 | (get_address_of_lvalue::visit_children): New function. | |
1010 | (local::local): Call set_scope. | |
1011 | (local::visit_children): New function. | |
1012 | (statement::get_block): Make public. | |
1013 | * libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro. | |
1014 | (RETURN_NULL_IF_FAIL_PRINTF5): New macro. | |
1015 | (gcc_jit_context_new_function): Verify that each param has | |
1016 | not yet been used for creating another function. | |
1017 | (gcc_jit_block_add_eval): After creating the stmt, verify | |
1018 | that the rvalue expression tree is valid to use within it. | |
1019 | (gcc_jit_block_add_assignment): Likewise for the lvalue and | |
1020 | rvalue expression trees. | |
1021 | (gcc_jit_block_add_assignment_op): Likewise. | |
1022 | (gcc_jit_block_end_with_conditional): Likewise for the boolval | |
1023 | expression tree. | |
1024 | (gcc_jit_block_end_with_return): Likewise for the rvalue | |
1025 | expression tree. | |
1026 | (gcc_jit_block_end_with_void_return): Remove return of "void", | |
1027 | now that block::end_with_return is now non-void. | |
1028 | ||
1c35cc2c DM |
1029 | 2015-01-12 David Malcolm <dmalcolm@redhat.com> |
1030 | ||
1031 | * jit-playback.c (gcc::jit::playback::context::read_dump_file): | |
1032 | Add missing fclose on error-handling path. | |
1033 | ||
791cfef8 DM |
1034 | 2015-01-12 David Malcolm <dmalcolm@redhat.com> |
1035 | ||
1036 | * docs/cp/topics/expressions.rst (Global variables): Add | |
1037 | enum gcc_jit_global_kind param to gccjit::context::new_global. | |
1038 | * docs/topics/expressions.rst (Global variables): Likewise. | |
1039 | Document the new enum. | |
1040 | * docs/topics/results.rst (Compilation results): Document | |
1041 | globals-handling. | |
1042 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1043 | * dummy-frontend.c (jit_langhook_write_globals): Call into the | |
1044 | playback context's write_global_decls_1 and write_global_decls_2 | |
1045 | before and after calling symtab->finalize_compilation_unit (). | |
1046 | * jit-playback.c: Include "debug.h". | |
1047 | (gcc::jit::playback::context::new_global): Add "kind" param and | |
1048 | use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the | |
1049 | underlying VAR_DECL. Call varpool_node::get_create on the | |
1050 | VAR_DECL, and add it to m_globals. | |
1051 | (gcc::jit::playback::context::write_global_decls_1): New function. | |
1052 | (gcc::jit::playback::context::write_global_decls_2): New function. | |
1053 | * jit-playback.h (gcc::jit::playback::context::context): Call | |
1054 | create on m_globals. | |
1055 | (gcc::jit::playback::context::new_global): Add "kind" param. | |
1056 | (gcc::jit::playback::context::write_global_decls_1): New function. | |
1057 | (gcc::jit::playback::context::write_global_decls_2): New function. | |
1058 | (gcc::jit::playback::context::m_globals): New field. | |
1059 | * jit-recording.c (gcc::jit::recording::context::context): | |
1060 | Initialize m_globals. | |
1061 | (gcc::jit::recording::context::new_global): Add param "kind". | |
1062 | Add the new global to m_globals. | |
1063 | (gcc::jit::recording::context::dump_to_file): Dump the globals. | |
1064 | (gcc::jit::recording::global::replay_into): Add field m_kind. | |
1065 | (gcc::jit::recording::global::write_to_dump): New override. | |
1066 | * jit-recording.h (gcc::jit::recording::context::new_global): Add | |
1067 | param "kind". | |
1068 | (gcc::jit::recording::context::m_globals): New field. | |
1069 | (gcc::jit::recording::global::global): Add param kind. | |
1070 | (gcc::jit::recording::global::write_to_dump): New override. | |
1071 | (gcc::jit::recording::global::m_kind): New field. | |
1072 | * jit-result.c (gcc::jit::result::get_global): New function. | |
1073 | * jit-result.h (gcc::jit::result::get_global): New function. | |
1074 | * libgccjit++.h (gccjit::context::new_global): Add "kind" param. | |
1075 | * libgccjit.c (gcc_jit_context_new_global): Likewise. | |
1076 | (gcc_jit_result_get_global): New API entrypoint. | |
1077 | * libgccjit.h (gcc_jit_result_get_global): New API entrypoint. | |
1078 | (enum gcc_jit_global_kind): New enum. | |
1079 | (gcc_jit_context_new_global): API change: add "kind" param. | |
1080 | * libgccjit.map (gcc_jit_result_get_global): New symbol. | |
1081 | ||
860e981c DM |
1082 | 2015-01-09 David Malcolm <dmalcolm@redhat.com> |
1083 | ||
1084 | * dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h", | |
1085 | "symtab.h", "inchash.h". Move include of "hash-set.h" much | |
1086 | earlier. | |
1087 | * jit-builtins.c: Remove redundant includes of "opts.h" and | |
1088 | "tree.h". | |
1089 | * jit-common.h: Include "hash-set.h", "input.h", "vec.h", | |
1090 | "double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h". | |
1091 | * jit-playback.c: Include "hashtab.h", "machmode.h", "input.h", | |
1092 | "statistics.h", "vec.h", "double-int.h", "real.h", | |
1093 | "fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h", | |
1094 | "inchash.h", "fold-const.h". Move include of "hash-set.h" to | |
1095 | earlier. | |
1096 | * jit-recording.c: Remove redundant includes of "opts.h" and | |
1097 | "tree.h". | |
1098 | ||
ccce3b2a DM |
1099 | 2015-01-09 David Malcolm <dmalcolm@redhat.com> |
1100 | ||
1101 | * docs/cp/topics/expressions.rst (Simple expressions): Use | |
1102 | ":c:type:" for C types. Document new overload of | |
1103 | gcc::jit::context::new_rvalue. | |
1104 | * docs/topics/expressions.rst (Simple expressions): Use | |
1105 | ":c:type:" for C types. Document new entrypoint | |
1106 | gcc_jit_context_new_rvalue_from_long. | |
1107 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1108 | * jit-playback.c: Within namespace gcc::jit::playback... | |
1109 | (context::new_rvalue_from_int): Eliminate in favor of... | |
1110 | (context::new_rvalue_from_const <int>): ...this. | |
1111 | (context::new_rvalue_from_double): Eliminate in favor of... | |
1112 | (context::new_rvalue_from_const <double>): ...this. | |
1113 | (context::new_rvalue_from_const <long>): New. | |
1114 | (context::new_rvalue_from_ptr): Eliminate in favor of... | |
1115 | (context::new_rvalue_from_const <void *>): ...this. | |
1116 | * jit-playback.h: Within namespace gcc::jit::playback... | |
1117 | (context::new_rvalue_from_int): Eliminate in favor of... | |
1118 | (context::new_rvalue_from_const <HOST_TYPE>): ...this. | |
1119 | (context::new_rvalue_from_double): Likewise. | |
1120 | (context::new_rvalue_from_ptr): Likewise. | |
1121 | * jit-recording.c: Within namespace gcc::jit::recording... | |
1122 | (context::new_rvalue_from_int): Eliminate. | |
1123 | (context::new_rvalue_from_double): Likewise. | |
1124 | (context::new_rvalue_from_ptr): Likewise. | |
1125 | (class memento_of_new_rvalue_from_const <int>): | |
1126 | Add explicit specialization. | |
1127 | (class memento_of_new_rvalue_from_const <long>): | |
1128 | Likewise. | |
1129 | (class memento_of_new_rvalue_from_const <double>): | |
1130 | Likewise. | |
1131 | (class memento_of_new_rvalue_from_const <void *>): | |
1132 | Likewise. | |
1133 | (memento_of_new_rvalue_from_int::replay_into): | |
1134 | Generalize into... | |
1135 | (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into): | |
1136 | ...this... | |
1137 | (memento_of_new_rvalue_from_double::replay_into): | |
1138 | ...allowing this... | |
1139 | (memento_of_new_rvalue_from_ptr::replay_into): | |
1140 | ...and this to be deleted. | |
1141 | (memento_of_new_rvalue_from_int::make_debug_string): | |
1142 | Convert to... | |
1143 | (memento_of_new_rvalue_from_const <int>::make_debug_string): | |
1144 | ...this. | |
1145 | (memento_of_new_rvalue_from_double::make_debug_string): | |
1146 | Convert to... | |
1147 | (memento_of_new_rvalue_from_const <double>::make_debug_string): | |
1148 | ...this. | |
1149 | (memento_of_new_rvalue_from_ptr::make_debug_string) | |
1150 | Convert to... | |
1151 | (memento_of_new_rvalue_from_const <void *>::make_debug_string): | |
1152 | ...this. | |
1153 | (memento_of_new_rvalue_from_const <long>::make_debug_string): | |
1154 | New function. | |
1155 | * jit-recording.h: Within namespace gcc::jit::recording... | |
1156 | (context::new_rvalue_from_int): Eliminate. | |
1157 | (context::new_rvalue_from_double): Likewise. | |
1158 | (context::new_rvalue_from_ptr): Likewise, all in favor of... | |
1159 | (context::new_rvalue_from_const <HOST_TYPE>): New family of | |
1160 | methods. | |
1161 | (class memento_of_new_rvalue_from_int): Eliminate. | |
1162 | (class memento_of_new_rvalue_from_double): Likewise. | |
1163 | (class memento_of_new_rvalue_from_ptr): Likewise. | |
1164 | (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family | |
1165 | of rvalue subclasses. | |
1166 | * libgccjit++.h (gccjit::context::new_rvalue): New overload, for | |
1167 | "long". | |
1168 | * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for | |
1169 | rewriting of recording::context::new_rvalue_from_int to | |
1170 | recording::context::new_rvalue_from_const <int>. | |
1171 | (gcc_jit_context_new_rvalue_from_long): New API entrypoint. | |
1172 | (gcc_jit_context_new_rvalue_from_double): Update for | |
1173 | rewriting of recording::context::new_rvalue_from_double to | |
1174 | recording::context::new_rvalue_from_const <double>. | |
1175 | (gcc_jit_context_new_rvalue_from_ptr): Update for | |
1176 | rewriting of recording::context::new_rvalue_from_ptr to | |
1177 | recording::context::new_rvalue_from_const <void *>. | |
1178 | * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API | |
1179 | entrypoint. | |
1180 | * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise. | |
1181 | ||
d2286af3 DM |
1182 | 2015-01-09 David Malcolm <dmalcolm@redhat.com> |
1183 | ||
1184 | PR jit/64206 | |
1185 | * docs/internals/test-hello-world.exe.log.txt: Update, the log now | |
1186 | shows tempdir creation/cleanup. | |
1187 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1188 | * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir | |
1189 | to the list of subclasses in the comment. | |
1190 | * jit-playback.c (gcc::jit::playback::context::context): Add a | |
1191 | comment clarifying when the tempdir gets cleaned up. | |
1192 | (gcc::jit::playback::context::compile): Pass the context's logger, | |
1193 | if any, to the tempdir. | |
1194 | (gcc::jit::playback::context::dlopen_built_dso): When creating the | |
1195 | gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand | |
1196 | over ownership of the tempdir to it. | |
1197 | * jit-result.c: Include "jit-tempdir.h". | |
1198 | (gcc::jit::result::result): Add tempdir param, saving it as | |
1199 | m_tempdir. | |
1200 | (gcc::jit::result::~result): Delete m_tempdir. | |
1201 | * jit-result.h (gcc::jit::result::result): Add tempdir param. | |
1202 | (gcc::jit::result::m_tempdir): New field. | |
1203 | * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param; | |
1204 | add JIT_LOG_SCOPE. | |
1205 | (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit, | |
1206 | and log m_path_template and m_path_tempdir. | |
1207 | (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log | |
1208 | entry/exit, and log the unlink and rmdir calls. | |
1209 | * jit-tempdir.h: Include "jit-logging.h". | |
1210 | (class gcc::jit::tempdir): Make this be a subclass of log_user. | |
1211 | (gcc::jit::tempdir::tempdir): Add logger param. | |
1212 | * notes.txt: Update to show the two possible places where the | |
1213 | tempdir can be cleaned up. | |
1214 | ||
7c8db13e DM |
1215 | 2015-01-08 David Malcolm <dmalcolm@redhat.com> |
1216 | ||
1217 | * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive | |
1218 | comment. | |
1219 | ||
303e1d56 DM |
1220 | 2015-01-08 David Malcolm <dmalcolm@redhat.com> |
1221 | ||
1222 | * docs/topics/contexts.rst (Error-handling): Document new | |
1223 | entrypoint gcc_jit_context_get_last_error. | |
1224 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1225 | * jit-recording.c (gcc::jit::recording::context::context): | |
1226 | Initialize new fields "m_last_error_str" and | |
1227 | "m_owns_last_error_str". | |
1228 | (gcc::jit::recording::context::~context): Clean up | |
1229 | m_last_error_str, if needed. | |
1230 | (gcc::jit::recording::context::add_error_va): Update | |
1231 | m_last_error_str and m_owns_last_error_str, freeing the old | |
1232 | value if appropriate. | |
1233 | (gcc::jit::recording::context::get_last_error): New function. | |
1234 | * jit-recording.h (gcc::jit::recording::context::get_last_error): | |
1235 | New function. | |
1236 | (gcc::jit::recording::context): New fields m_last_error_str and | |
1237 | m_owns_last_error_str. | |
1238 | * libgccjit.c (gcc_jit_context_get_last_error): New function. | |
1239 | * libgccjit.h (gcc_jit_context_get_last_error): New declaration. | |
1240 | * libgccjit.map (gcc_jit_context_get_last_error): New function. | |
1241 | ||
eb4c16eb DM |
1242 | 2015-01-08 David Malcolm <dmalcolm@redhat.com> |
1243 | ||
1244 | * Make-lang.in (jit_OBJS): Add jit/jit-logging.o. | |
1245 | * docs/internals/index.rst (Overview of code structure): Mention | |
1246 | gcc_jit_context_set_logfile, and embed the example logfile. | |
1247 | * docs/internals/test-hello-world.exe.log.txt: New file: example | |
1248 | of a logfile. | |
1249 | * docs/topics/contexts.rst (Debugging): Add documentation | |
1250 | for gcc_jit_context_set_logfile. | |
1251 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1252 | * dummy-frontend.c: Include "jit-logging.h". | |
1253 | (jit_langhook_init): Assert that there is an active playback | |
1254 | context. If it has a logger, log entry/exit to this function. | |
1255 | (jit_langhook_write_globals): Likewise. | |
1256 | * jit-common.h (gcc::jit::logger): New forward declaration. | |
1257 | * jit-logging.c: New file. | |
1258 | * jit-logging.h: New file. | |
1259 | * jit-playback.c: Include "jit-logging.h". | |
1260 | (gcc::jit::playback::context::context): Initialize the log_user | |
1261 | base class from the recording context's logger (if any). Use | |
1262 | JIT_LOG_SCOPE to log entry/exit from the function body. | |
1263 | (gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to | |
1264 | log entry/exit from the function body. | |
1265 | (gcc::jit::playback::build_stmt_list): Likewise. | |
1266 | (gcc::jit::playback::function::postprocess): Likewise. | |
1267 | (gcc::jit::playback::context::compile): Likewise. Log the | |
1268 | entry/exit to toplev::main and toplev::finalize. Log the | |
1269 | fake argv passed to toplev::main. | |
1270 | (gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to | |
1271 | log entry/exit from the function body. | |
1272 | (gcc::jit::playback::context::release_mutex): Likewise. | |
1273 | (gcc::jit::playback::context::make_fake_args): Likewise. | |
1274 | (gcc::jit::playback::context::extract_any_requested_dumps): | |
1275 | Likewise. | |
1276 | (gcc::jit::playback::context::convert_to_dso): Likewise. Also, | |
1277 | log the arguments that the driver is invoked with. | |
1278 | (gcc::jit::playback::context::dlopen_built_dso): Likewise. Pass | |
1279 | the logger to the result object. | |
1280 | (gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to | |
1281 | log entry/exit from the function body. | |
1282 | (gcc::jit::playback::context::dump_generated_code): Likewise. | |
1283 | (gcc::jit::playback::context::handle_locations): Likewise. | |
1284 | * jit-playback.h (gcc::jit::playback::context): Make this be | |
1285 | a subclass of gcc::jit::log_user. | |
1286 | * jit-recording.c: Include "jit-logging.h". | |
1287 | (gcc::jit::recording::context::context: Initialize the logger to | |
1288 | NULL for root contexts, or to the parent's logger for child | |
1289 | contexts. | |
1290 | (gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to | |
1291 | log entry/exit from the function body. | |
1292 | (gcc::jit::recording::context::replay_into): Likewise. | |
1293 | (gcc::jit::recording::context::disassociate_from_playback): | |
1294 | Likewise. | |
1295 | (gcc::jit::recording::context::compile): Likewise. | |
1296 | (recording::context::add_error_va): Likewise. Also, log the | |
1297 | error. | |
1298 | (gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to | |
1299 | log entry/exit from the function body. | |
1300 | * jit-recording.h: Include "jit-logging.h". | |
1301 | (gcc::jit::recording::context): Make this be a subclass of | |
1302 | gcc::jit::log_user. | |
1303 | * jit-result.c: Include "jit-common.h" and "jit-logging.h". | |
1304 | (gcc::jit::result::result): Add logger param, recording it. | |
1305 | Use JIT_LOG_SCOPE to log entry/exit from the function body. | |
1306 | (gcc::jit::result::~result(): Use JIT_LOG_SCOPE to | |
1307 | log entry/exit from the function body. | |
1308 | (gcc::jit::result::get_code): Likewise. | |
1309 | * jit-result.h (gcc::jit::result): Make this be a subclass of | |
1310 | gcc::jit::log_user. | |
1311 | (gcc::jit::result::result): Add logger parameter. | |
1312 | * libgccjit++.h (gccjit::context::set_logfile): New function. | |
1313 | * libgccjit.c: Include "jit-logging.h". | |
1314 | (gcc_jit_context_acquire): Log the context. | |
1315 | (gcc_jit_context_release): Use JIT_LOG_FUNC to | |
1316 | log entry/exit from the function body, and log the context. | |
1317 | (gcc_jit_context_new_child_context): Likewise, logging both | |
1318 | contexts. | |
1319 | (gcc_jit_context_new_location): Use JIT_LOG_FUNC to | |
1320 | log entry/exit from the function body. | |
1321 | (gcc_jit_context_get_type): Likewise. | |
1322 | (gcc_jit_context_get_int_type): Likewise. | |
1323 | (gcc_jit_context_new_array_type): Likewise. | |
1324 | (gcc_jit_context_new_field): Likewise. | |
1325 | (gcc_jit_context_new_struct_type): Likewise. | |
1326 | (gcc_jit_context_new_opaque_struct): Likewise. | |
1327 | (gcc_jit_struct_set_fields): Likewise. | |
1328 | (gcc_jit_context_new_union_type): Likewise. | |
1329 | (gcc_jit_context_new_function_ptr_type): Likewise. | |
1330 | (gcc_jit_context_new_param): Likewise. | |
1331 | (gcc_jit_context_new_function): Likewise. | |
1332 | (gcc_jit_context_get_builtin_function): Likewise. | |
1333 | (gcc_jit_function_get_param): Likewise. | |
1334 | (gcc_jit_function_dump_to_dot): Likewise. | |
1335 | (gcc_jit_function_new_block): Likewise. | |
1336 | (gcc_jit_context_new_global): Likewise. | |
1337 | (gcc_jit_context_new_rvalue_from_int): Likewise. | |
1338 | (gcc_jit_context_zero): Likewise. | |
1339 | (gcc_jit_context_one): Likewise. | |
1340 | (gcc_jit_context_new_rvalue_from_double): Likewise. | |
1341 | (gcc_jit_context_new_rvalue_from_ptr): Likewise. | |
1342 | (gcc_jit_context_null): Likewise. | |
1343 | (gcc_jit_context_new_string_literal): Likewise. | |
1344 | (gcc_jit_context_new_unary_op): Likewise. | |
1345 | (gcc_jit_context_new_binary_op): Likewise. | |
1346 | (gcc_jit_context_new_comparison): Likewise. | |
1347 | (gcc_jit_context_new_call): Likewise. | |
1348 | (gcc_jit_context_new_call_through_ptr): Likewise. | |
1349 | (gcc_jit_context_new_cast): Likewise. | |
1350 | (gcc_jit_context_new_array_access): Likewise. | |
1351 | (gcc_jit_lvalue_access_field): Likewise. | |
1352 | (gcc_jit_rvalue_access_field): Likewise. | |
1353 | (gcc_jit_rvalue_dereference_field): Likewise. | |
1354 | (gcc_jit_rvalue_dereference): Likewise. | |
1355 | (gcc_jit_lvalue_get_address): Likewise. | |
1356 | (gcc_jit_function_new_local): Likewise. | |
1357 | (gcc_jit_block_add_eval): Likewise. | |
1358 | (gcc_jit_block_add_assignment): Likewise. | |
1359 | (gcc_jit_block_add_assignment_op): Likewise. | |
1360 | (gcc_jit_block_end_with_conditional): Likewise. | |
1361 | (gcc_jit_block_add_comment): Likewise. | |
1362 | (gcc_jit_block_end_with_jump): Likewise. | |
1363 | (gcc_jit_block_end_with_return): Likewise. | |
1364 | (gcc_jit_block_end_with_void_return): Likewise. | |
1365 | (gcc_jit_context_set_str_option): Likewise. | |
1366 | (gcc_jit_context_set_int_option): Likewise. | |
1367 | (gcc_jit_context_set_bool_option): Likewise. | |
1368 | (gcc_jit_context_enable_dump): Likewise. | |
1369 | (gcc_jit_context_compile): Likewise. Also log the context, | |
1370 | and the result. | |
1371 | (gcc_jit_context_dump_to_file): Likewise. | |
1372 | (gcc_jit_context_set_logfile): New function. | |
1373 | (gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to | |
1374 | log entry/exit from the function body. | |
1375 | (gcc_jit_result_get_code): Likewise. Also log the fnname) | |
1376 | and the ptr to be returned. | |
1377 | (gcc_jit_result_release): Likewise. Also log the result. | |
1378 | * libgccjit.h: Include <stdio.h>, since we need FILE *. | |
1379 | (gcc_jit_context_set_logfile): New declaration. | |
1380 | * libgccjit.map (gcc_jit_context_set_logfile): New. | |
1381 | ||
c211cd23 DM |
1382 | 2015-01-07 David Malcolm <dmalcolm@redhat.com> |
1383 | ||
1384 | * jit-recording.h (gcc::jit::recording::type::is_void): New | |
1385 | virtual function. | |
1386 | (gcc::jit::recording::memento_of_get_type::is_void): New | |
1387 | function, overriding default implementation. | |
1388 | * libgccjit.c (gcc_jit_rvalue_dereference): Verify that | |
1389 | the underlying type is not "void". | |
1390 | ||
18146f45 DM |
1391 | 2015-01-07 David Malcolm <dmalcolm@redhat.com> |
1392 | ||
1393 | * docs/topics/expressions.rst (Unary Operations): Add | |
1394 | GCC_JIT_UNARY_OP_ABS. | |
1395 | * jit-playback.c (gcc::jit::playback::context::new_unary_op): | |
1396 | Likewise. | |
1397 | * jit-recording.c (unary_op_strings): Likewise. | |
1398 | * libgccjit.c (gcc_jit_context_new_unary_op): Update checking | |
1399 | of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS. | |
1400 | * libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS. | |
1401 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1402 | ||
11af98ff DM |
1403 | 2015-01-07 David Malcolm <dmalcolm@redhat.com> |
1404 | ||
1405 | * jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix | |
1406 | typo in comment. | |
1407 | ||
433d16df DM |
1408 | 2015-01-07 David Malcolm <dmalcolm@redhat.com> |
1409 | ||
1410 | * TODO.rst (Test suite): Remove item about running C++ testcases. | |
1411 | * docs/internals/index.rst (Working on the JIT library): Add | |
1412 | "c++" to the enabled languages in the suggested "configure" | |
1413 | invocation, and add a description of why this is necessary. | |
1414 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1415 | ||
50bb6c8e DM |
1416 | 2015-01-07 David Malcolm <dmalcolm@redhat.com> |
1417 | ||
1418 | * docs/internals/index.rst: Update to reflect that built | |
1419 | testcases are now test-foo.c.exe, rather than test-foo.exe. | |
1420 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1421 | ||
1e3b6a3d JJ |
1422 | 2015-01-05 Jakub Jelinek <jakub@redhat.com> |
1423 | ||
1424 | Update copyright years. | |
1425 | ||
e8af59bc DM |
1426 | 2014-12-19 David Malcolm <dmalcolm@redhat.com> |
1427 | ||
1428 | * jit-playback.c (gcc::jit::playback::context::build_cast): In | |
1429 | case BOOLEAN_TYPE, don't assume that the source expression is | |
1430 | of type "int". | |
1431 | ||
5afd44e3 DM |
1432 | 2014-12-19 David Malcolm <dmalcolm@redhat.com> |
1433 | ||
1434 | * jit-recording.c (gcc::jit::recording::context::context): When | |
1435 | copying string options from a parent context, take a copy of the | |
1436 | underlying buffers, rather than simply copying the pointer. | |
1437 | ||
1f0858d7 DM |
1438 | 2014-12-19 David Malcolm <dmalcolm@redhat.com> |
1439 | ||
1440 | * jit-recording.c (gcc::jit::recording::context::set_str_option): | |
1441 | Handle NULL. | |
1442 | ||
35291c7d DM |
1443 | 2014-12-11 David Malcolm <dmalcolm@redhat.com> |
1444 | ||
1445 | * docs/cp/topics/contexts.rst (gccjit::context::set_str_option): | |
1446 | Document new function. | |
1447 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1448 | ||
7b31ff5e DM |
1449 | 2014-12-10 Ulrich Drepper <drepper@gmail.com> |
1450 | ||
1451 | Minor interface cleanups of libgccjit | |
1452 | * jit-playback.c (convert_to_dso): Use auto_vec instead | |
1453 | of automatic array to build up command line. | |
1454 | * jit-recording.c (recording::context::set_str_option): | |
1455 | Make copy of the string. | |
1456 | (recording::context::~context): Free string options. | |
1457 | * jit-recording.h (recording::context): Adjust type | |
1458 | of m_str_options member. | |
1459 | * libgccjit.h: Adjust comment about | |
1460 | gcc_jit_context_set_str_option parameter being used after | |
1461 | the call. | |
1462 | Update comment now that all interfaces are copy strings | |
1463 | if necessary. | |
1464 | * libgccjit++.h (gccjit::context): Add set_str_option | |
1465 | member function. | |
1466 | ||
29df5715 DM |
1467 | 2014-12-10 David Malcolm <dmalcolm@redhat.com> |
1468 | ||
1469 | * docs/cp/index.rst: New file. | |
1470 | * docs/cp/intro/index.rst: New file. | |
1471 | * docs/cp/intro/tutorial01.rst: New file. | |
1472 | * docs/cp/intro/tutorial02.rst: New file. | |
1473 | * docs/cp/intro/tutorial03.rst: New file. | |
1474 | * docs/cp/intro/tutorial04.rst: New file. | |
1475 | * docs/cp/topics/contexts.rst: New file. | |
1476 | * docs/cp/topics/expressions.rst: New file. | |
1477 | * docs/cp/topics/functions.rst: New file. | |
1478 | * docs/cp/topics/index.rst: New file. | |
1479 | * docs/cp/topics/locations.rst: New file. | |
1480 | * docs/cp/topics/objects.rst: New file. | |
1481 | * docs/cp/topics/results.rst: New file. | |
1482 | * docs/cp/topics/types.rst: New file. | |
1483 | * docs/examples/tut01-hello-world.cc: New file. | |
1484 | * docs/examples/tut02-square.c: Fix missing newline in output. | |
1485 | * docs/examples/tut02-square.cc: New file. | |
1486 | * docs/examples/tut03-sum-of-squares.cc: New file. | |
1487 | * docs/examples/tut04-toyvm/toyvm.cc: New file. | |
1488 | * docs/index.rst: Move summary to above the table of contents. | |
1489 | Add text about the C vs C++ APIs. | |
1490 | * docs/topics/contexts.rst: Fix a typo. | |
1491 | ||
1492 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1493 | * docs/_build/texinfo/factorial1.png: New file. | |
1494 | * docs/_build/texinfo/sum-of-squares1.png: New file. | |
1495 | ||
5cd614ce DM |
1496 | 2014-12-09 David Malcolm <dmalcolm@redhat.com> |
1497 | ||
1498 | * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move | |
1499 | logic for determine "funcname" to new function... | |
1500 | (get_function_name): ...here, adding logic to skip any leading | |
1501 | path from the filename. | |
1502 | (toyvm_function_parse): Use the filename for fn_filename, rather | |
1503 | than "name", so that the debugger can locate the source .toy | |
1504 | file. | |
1505 | (toyvm_function_parse): Don't fclose a NULL FILE *. | |
1506 | ||
2712de78 DM |
1507 | 2014-12-09 David Malcolm <dmalcolm@redhat.com> |
1508 | ||
1509 | PR jit/63854 | |
1510 | * docs/internals/index.rst (Running under valgrind): New | |
1511 | subsection. | |
1512 | (docs/_build/texinfo/libgccjit.texi): Regenerate. | |
1513 | ||
d1e5f2c7 DM |
1514 | 2014-12-09 David Malcolm <dmalcolm@redhat.com> |
1515 | ||
1516 | PR jit/64206 | |
1517 | * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o. | |
1518 | * jit-common.h (gcc::jit::tempdir): New forward decl. | |
1519 | * jit-playback.c: Include jit-tempdir.h. | |
1520 | (gcc::jit::playback::context::context): Initialize m_tempdir. | |
1521 | (gcc::jit::playback::context::~context): Move tempdir | |
1522 | cleanup to new file jit-tempdir.c | |
1523 | (make_tempdir_path_template): Move to new file jit-tempdir.c. | |
1524 | (gcc::jit::playback::context::compile): Move tempdir creation | |
1525 | to new tempdir object in new file jit-tempdir.c. | |
1526 | (gcc::jit::playback::context::make_fake_args): Get path from | |
1527 | tempdir object rather than from member data. | |
1528 | (gcc::jit::playback::context::convert_to_dso): Likewise. | |
1529 | (gcc::jit::playback::context::dlopen_built_dso): Likewise. | |
1530 | (gcc::jit::playback::context::dump_generated_code): Likewise. | |
1531 | (gcc::jit::playback::context::get_path_c_file): New function. | |
1532 | (gcc::jit::playback::context::get_path_s_file): New function. | |
1533 | (gcc::jit::playback::context::get_path_so_file): New function. | |
1534 | * jit-playback.h (gcc::jit::playback::context::get_path_c_file): | |
1535 | New function. | |
1536 | (gcc::jit::playback::context::get_path_s_file): New function. | |
1537 | (gcc::jit::playback::context::get_path_so_file): New function. | |
1538 | (gcc::jit::playback::context): Move fields "m_path_template", | |
1539 | "m_path_tempdir", "m_path_c_file", "m_path_s_file", | |
1540 | "m_path_so_file" to new jit::tempdir class; add field "m_tempdir". | |
1541 | * jit-tempdir.c: New file. | |
1542 | * jit-tempdir.h: New file. | |
1543 | ||
38771e4e DM |
1544 | 2014-12-09 David Malcolm <dmalcolm@redhat.com> |
1545 | ||
1546 | * jit-playback.c (gcc::jit::playback::context::compile): Acquire the | |
1547 | mutex here, immediately before using toplev, and release it here, on | |
1548 | each exit path after acquisition. | |
1549 | (jit_mutex): Move this variable here, from jit-recording.c. | |
1550 | (gcc::jit::playback::context::acquire_mutex): New function, based on | |
1551 | code in jit-recording.c. | |
1552 | (gcc::jit::playback::context::release_mutex): Likewise. | |
1553 | * jit-playback.h (gcc::jit::playback::context::acquire_mutex): New | |
1554 | function. | |
1555 | (gcc::jit::playback::context::release_mutex): New function. | |
1556 | * jit-recording.c (jit_mutex): Move this variable to jit-playback.c. | |
1557 | (gcc::jit::recording::context::compile): Move mutex-handling from | |
1558 | here into jit-playback.c's gcc::jit::playback::context::compile. | |
1559 | * notes.txt: Update to show the new locations of ACQUIRE_MUTEX | |
1560 | and RELEASE_MUTEX. | |
1561 | ||
38f4f641 DM |
1562 | 2014-12-09 David Malcolm <dmalcolm@redhat.com> |
1563 | ||
1564 | * jit-playback.c (gcc::jit::playback::context::compile): Move the | |
1565 | dlopen code into... | |
1566 | (gcc::jit::playback::context::dlopen_built_dso): ...this new | |
1567 | function. | |
1568 | * jit-playback.h (gcc::jit::playback::context::dlopen_built_dso): | |
1569 | New function. | |
1570 | ||
82e0c914 DM |
1571 | 2014-12-09 David Malcolm <dmalcolm@redhat.com> |
1572 | ||
1573 | PR jit/64166 | |
1574 | * docs/topics/contexts.rst (Debugging): Add description of | |
1575 | gcc_jit_context_enable_dump. | |
1576 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1577 | * jit-playback.c: Include context.h. | |
1578 | (class auto_argvec): New class. | |
1579 | (auto_argvec::~auto_argvec): New function. | |
1580 | (gcc::jit::playback::context::compile): Convert fake_args to be | |
1581 | an auto_argvec, so that it can contain dynamically-allocated | |
1582 | strings. Construct a vec of all requested dumps, and pass it to | |
1583 | make_fake_args. Extract requested dumps between the calls to | |
1584 | toplev::main and toplev::finalize. | |
1585 | (gcc::jit::playback::context::make_fake_args): Convert param | |
1586 | "argvec" to be a vec <char *>, and gain a "requested_dumps" | |
1587 | param. Convert to dynamically-allocated arg strings by converting | |
1588 | ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP | |
1589 | for args that are already a copy. Add args for all requested dumps. | |
1590 | (gcc::jit::playback::context::extract_any_requested_dumps): New | |
1591 | function. | |
1592 | (gcc::jit::playback::context::read_dump_file): New function. | |
1593 | * jit-playback.h (gcc::jit::playback::context::make_fake_args): | |
1594 | Convert param "argvec" to be a vec <char *>, and gain a | |
1595 | "requested_dumps" param. | |
1596 | (gcc::jit::playback::context::extract_any_requested_dumps): New | |
1597 | function. | |
1598 | (gcc::jit::playback::context::read_dump_file): New function. | |
1599 | * jit-recording.c (gcc::jit::recording::context::enable_dump): New | |
1600 | function. | |
1601 | (gcc::jit::recording::context::get_all_requested_dumps): New | |
1602 | function. | |
1603 | * jit-recording.h (gcc::jit::recording::requested_dump): New | |
1604 | struct. | |
1605 | (gcc::jit::recording::context::enable_dump): New function. | |
1606 | (gcc::jit::recording::context::get_all_requested_dumps): New | |
1607 | function. | |
1608 | (gcc::jit::recording::context::m_requested_dumps): New field. | |
1609 | * libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint. | |
1610 | * libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint. | |
1611 | * libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint. | |
1612 | ||
53b730ff DM |
1613 | 2014-12-08 David Malcolm <dmalcolm@redhat.com> |
1614 | ||
1615 | * libgccjit++.h: Indent the forward declarations of the classes to | |
1616 | show the inheritance hierarchy. | |
1617 | ||
0f379445 DM |
1618 | 2014-12-08 David Malcolm <dmalcolm@redhat.com> |
1619 | ||
1620 | * notes.txt: Show the beginning and ending of | |
1621 | recording::context::compile vs playback::context::compile. Show | |
1622 | the creation and unlinking of the tempdir. Show toplev::finalize. | |
1623 | Move "RELEASE MUTEX" to the correct location. Show | |
1624 | gcc_jit_result_release, and indicate where the | |
1625 | dlopen/dlsym/dlclose occur. | |
1626 | ||
81ba15f1 DM |
1627 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1628 | ||
1629 | * docs/examples/tut02-square.c (main): Release the context | |
1630 | earlier, to show that this is possible. Update error-handling | |
1631 | to avoid a double-release of the context, and to avoid | |
1632 | releasing a NULL result. | |
1633 | * docs/intro/tutorial02.rst: Discuss gcc_jit_context_release. | |
1634 | * docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize | |
1635 | * docs/topics/results.rst (gcc_jit_result): Mention that this | |
1636 | controls the lifetimes of machine code functions. | |
1637 | (gcc_jit_result_get_code): Spell out the requirements for this | |
1638 | to succeed, and the lifetime of the result. | |
1639 | (gcc_jit_result_release): Mention that this invalidates any code | |
1640 | that was obtained from the result. | |
1641 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1642 | ||
e250f0dc DM |
1643 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1644 | ||
1645 | PR jit/64018 | |
1646 | * docs/intro/tutorial02.rst: Spell out lifetime of generated code. | |
1647 | Add description of error-handling, taken in part from... | |
1648 | * docs/topics/contexts.rst (Error-handling): Expand, and move some | |
1649 | content to tutorial02.rst. | |
1650 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1651 | ||
eeafb319 DM |
1652 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1653 | ||
1654 | PR jit/64020 | |
1655 | * docs/topics/types.rst (Standard types) Add new enum values to | |
1656 | the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT, | |
1657 | GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE. | |
1658 | Widen the left-hand column so that | |
1659 | GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit. | |
1660 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1661 | ||
1662 | * jit-builtins.c: Include stringpool.h and jit-playback.h. | |
1663 | Move everything out of the gcc::jit::recording namespace into | |
1664 | just gcc::jit. | |
1665 | (struct builtin_data): Add fields "fnclass", "attr", and | |
1666 | "implicit_p". | |
1667 | (DEF_BUILTIN): Update macro so populate the new fields. | |
1668 | (builtins_manager::builtins_manager): Update for move out of | |
1669 | recording namespace. Initialize the m_attributes array. | |
1670 | (builtins_manager::get_builtin_function): Likewise. | |
1671 | (builtins_manager::get_builtin_function_by_id): New function. | |
1672 | (builtins_manager::make_builtin_function): Update for move out of | |
1673 | recording namespace. Add fix for PR jit/64020 by detecting | |
1674 | specific builtin ids and having them ensure that builtins for | |
1675 | other ids are created as necessary. | |
1676 | (builtins_manager::get_type): Update for move out of recording | |
1677 | namespace. | |
1678 | (builtins_manager::make_type): Likewise. Add some missing | |
1679 | #undefs. | |
1680 | (builtins_manager::make_primitive_type): Update for move out of | |
1681 | recording namespace. Implement the three BT_COMPLEX_ cases and | |
1682 | BT_DOUBLE_PTR. | |
1683 | (builtins_manager::make_fn_type): Update for move out of recording | |
1684 | namespace. | |
1685 | (builtins_manager::make_ptr_type): Likewise. | |
1686 | (builtins_manager::finish_playback): New function. | |
1687 | (builtins_manager::get_class): New function. | |
1688 | (builtins_manager::implicit_p): New function. | |
1689 | (builtins_manager::get_attrs_tree): Two new functions. | |
1690 | (builtins_manager::make_attrs_tree): New function. | |
1691 | ||
1692 | * jit-builtins.h: Move everything out of the gcc::jit::recording | |
1693 | namespace into just gcc::jit. | |
1694 | (enum built_in_attribute): New. | |
1695 | (builtins_manager::builtins_manager): Update decl for namespace | |
1696 | change. | |
1697 | (builtins_manager::get_builtin_function): Likewise. | |
1698 | (builtins_manager::get_class): New. | |
1699 | (builtins_manager::implicit_p): New. | |
1700 | (builtins_manager::get_attrs_tree): Two new functions. | |
1701 | (builtins_manager::make_attrs_tree): New function. | |
1702 | (builtins_manager::finish_playback): New. | |
1703 | (builtins_manager::get_builtin_function_by_id): New. | |
1704 | (builtins_manager::make_builtin_function): Update decl for | |
1705 | namespace change. | |
1706 | (builtins_manager::get_type): Likewise. | |
1707 | (builtins_manager::make_type): Likewise. | |
1708 | (builtins_manager::make_primitive_type): Likewise. | |
1709 | (builtins_manager::make_fn_type): Likewise. | |
1710 | (builtins_manager::make_ptr_type): Likewise. | |
1711 | (builtins_manager): Likewise for fields. Add new field | |
1712 | "m_attributes". | |
1713 | ||
1714 | * jit-common.h (NUM_GCC_JIT_TYPES): Update. | |
1715 | (builtins_manager): Update forward decl to reflect namespace | |
1716 | change. | |
1717 | ||
1718 | * jit-playback.c: Include attribs.h and jit-builtins.h. | |
1719 | (gcc::jit::playback::context::get_tree_node_for_type): Add cases | |
1720 | for the new COMPLEX_ types. | |
1721 | (gcc::jit::playback::context::new_function): If creating a | |
1722 | builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl, | |
1723 | and call set_builtin_decl. | |
1724 | (gcc::jit::playback::context::replay): If we have a | |
1725 | builtins_manager, call its finish_playback method when we're done. | |
1726 | ||
1727 | * jit-playback.h: | |
1728 | (gcc::jit::playback::context::get_builtins_manager): New function. | |
1729 | ||
1730 | * jit-recording.c | |
1731 | (gcc::jit::recording::context::get_builtins_manager): New function. | |
1732 | (gcc::jit::recording::get_builtin_function): Use | |
1733 | get_builtins_manager, in case we're a child context. | |
1734 | (gcc::jit::recording::memento_of_get_type::dereference): Add the | |
1735 | COMPLEX_ types. | |
1736 | (gcc::jit::recording::memento_of_get_type::is_int): Likewise. | |
1737 | (gcc::jit::recording::memento_of_get_type::is_float): Likewise. | |
1738 | (gcc::jit::recording::memento_of_get_type::is_bool): Likewise. | |
1739 | (get_type_strings): Likewise. | |
1740 | ||
1741 | * jit-recording.h | |
1742 | (gcc::jit::recording::context::get_builtins_manager): New. | |
1743 | ||
1744 | * libgccjit.h (enum gcc_jit_types): Add | |
1745 | GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE, | |
1746 | GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE. | |
1747 | ||
23844fd7 DM |
1748 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1749 | ||
1750 | * jit-builtins.c | |
1751 | (gcc::jit::recording::builtins_manager::get_builtin_function): | |
1752 | Check for NULL return from make_builtin_function. | |
1753 | (gcc::jit::recording::builtins_manager::make_builtin_function): | |
1754 | Check for NULL return from get_type. | |
1755 | ||
c6760a13 DM |
1756 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1757 | ||
1758 | * jit-playback.c (gcc::jit::playback::context::compile): Move DSO | |
1759 | creation code into... | |
1760 | (gcc::jit::playback::context::convert_to_dso): New function. | |
1761 | * jit-playback.h (gcc::jit::playback::context::convert_to_dso): | |
1762 | New function. | |
1763 | ||
8f50ee3c DM |
1764 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1765 | ||
1766 | * jit-playback.c (gcc::jit::playback::context::compile): Use an | |
1767 | auto_vec<const char *> rather than a const char *[20] for the | |
1768 | top-level argv, and move the logic to build it to... | |
1769 | (gcc::jit::playback::context::make_fake_args): New function. | |
1770 | * jit-playback.h (gcc::jit::playback::context::make_fake_args): | |
1771 | New function. | |
1772 | ||
56dea35f DM |
1773 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1774 | ||
1775 | * Make-lang.in (jit_OBJS): Add jit/jit-result.o. | |
1776 | * jit-playback.c: Include new header jit-result.h. | |
1777 | (gcc::jit::result::result): Move to new file jit-result.c. | |
1778 | (gcc::jit::result::~result): Likewise. | |
1779 | (gcc::jit::playback::result): Likewise. | |
1780 | * jit-recording.h (class gcc::jit::result): Move to new | |
1781 | header jit-result.h. | |
1782 | * jit-result.c: New file, to contain... | |
1783 | (gcc::jit::result::result): Move here from jit-playback.c, | |
1784 | removing erroneous "playback" namespace from comment. | |
1785 | (gcc::jit::result::~result): Likewise. | |
1786 | (gcc::jit::playback::result): Likewise. | |
1787 | * jit-result.h: New file, to contain... | |
1788 | (class gcc::jit::result): Move from jit-recording.h. | |
1789 | * libgccjit.c: Include jit-result.h. | |
1790 | (gcc_jit_result_get_code): Update comment to reflect move | |
1791 | of implementation. | |
1792 | (gcc_jit_result_release): Likewise. | |
1793 | ||
52b9468f DM |
1794 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1795 | ||
1796 | PR jit/63854 | |
1797 | * docs/examples/tut04-toyvm/toyvm.c | |
1798 | (toyvm_compiled_function): New typedef. | |
1799 | (toyvm_compiled_func) Rename to... | |
1800 | (toyvm_compiled_code) ...this. | |
1801 | (struct toyvm_compiled_function): New struct. | |
1802 | (toyvm_function_compile): Return a toyvm_compiled_function * | |
1803 | rather than a toyvm_compiled_func, so that the caller can fully | |
1804 | clean things up. Free "funcname". | |
1805 | (test_script): Update for change to toyvm_function_compile. | |
1806 | Clean up the toyvm_compiled_function. | |
1807 | (main): Likewise. | |
1808 | (docs/intro/tutorial04.rst): Update to reflect the above changes, | |
1809 | and to better spell out the lifetime of the compiled code. | |
1810 | ||
c8d19a69 DM |
1811 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1812 | ||
1813 | PR jit/63854 | |
1814 | * jit-builtins.c | |
1815 | (gcc::jit::recording::builtins_manager::make_fn_type): Call the | |
1816 | context's new_function_type method, rather than directly creating | |
1817 | a function_type instance. | |
1818 | * jit-recording.c | |
1819 | (gcc::jit::recording::context::new_function_type): New method, | |
1820 | adapted from part of... | |
1821 | (gcc::jit::recording::context::new_function_ptr_type): ...this. | |
1822 | Update to call new_function_type. | |
1823 | * jit-recording.h | |
1824 | (gcc::jit::recording::context::new_function_type): New method. | |
1825 | ||
c985705a DM |
1826 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1827 | ||
1828 | PR jit/63969 | |
1829 | * jit-playback.c: Ensure that ctxt_progname is non-NULL. | |
1830 | ||
b957b2e0 DM |
1831 | 2014-11-19 David Malcolm <dmalcolm@redhat.com> |
1832 | ||
1833 | PR jit/63854 | |
1834 | * jit-playback.c (gcc::jit::playback::compound_type::set_fields): | |
1835 | Convert param from const vec<playback::field *> & to | |
1836 | const auto_vec<playback::field *> *. | |
1837 | (gcc::jit::playback::context::new_function_type): Convert param | |
1838 | "param_types" from vec<type *> * to const auto_vec<type *> *. | |
1839 | (gcc::jit::playback::context::new_function): Convert param | |
1840 | "params" from vec<param *> * to const auto_vec<param *> *. | |
1841 | (gcc::jit::playback::context::build_call): Convert param "args" | |
1842 | from vec<rvalue *> to const auto_vec<rvalue *> *. | |
1843 | (gcc::jit::playback::context::new_call): Likewise. | |
1844 | (gcc::jit::playback::context::new_call_through_ptr): Likewise. | |
1845 | (wrapper_finalizer): New function. | |
1846 | (gcc::jit::playback::wrapper::operator new): Call the finalizer | |
1847 | variant of ggc_internal_cleared_alloc, supplying | |
1848 | wrapper_finalizer. | |
1849 | (gcc::jit::playback::function::finalizer): New. | |
1850 | (gcc::jit::playback::block::finalizer): New. | |
1851 | (gcc::jit::playback::source_file::finalizer): New. | |
1852 | (gcc::jit::playback::source_line::finalizer): New. | |
1853 | ||
1854 | * jit-playback.h | |
1855 | (gcc::jit::playback::context::new_function_type): Convert param | |
1856 | "param_types" from vec<type *> * to const auto_vec<type *> *. | |
1857 | (gcc::jit::playback::context::new_function): Convert param | |
1858 | "params" from vec<param *> * to const auto_vec<param *> *. | |
1859 | (gcc::jit::playback::context::new_call): Convert param | |
1860 | "args" from vec<rvalue *> to const auto_vec<rvalue *> *. | |
1861 | (gcc::jit::playback::context::new_call_through_ptr): Likewise. | |
1862 | (gcc::jit::playback::context::build_call): Likewise. | |
1863 | (gcc::jit::playback::context): Convert fields "m_functions", | |
1864 | "m_source_files", "m_cached_locations" from vec to auto_vec. | |
1865 | (gcc::jit::playback::wrapper::finalizer): New virtual function. | |
1866 | (gcc::jit::playback::compound_type::set_fields): Convert param fro | |
1867 | const vec<playback::field *> & to | |
1868 | const auto_vec<playback::field *> *. | |
1869 | (gcc::jit::playback::function::finalizer): New. | |
1870 | (gcc::jit::playback::block::finalizer): New. | |
1871 | (gcc::jit::playback::source_file::finalizer): New. | |
1872 | (gcc::jit::playback::source_line::finalizer): New. | |
1873 | ||
1874 | * jit-recording.c | |
1875 | (gcc::jit::recording::function_type::replay_into): Convert local | |
1876 | from a vec into an auto_vec. | |
1877 | (gcc::jit::recording::fields::replay_into): Likewise. | |
1878 | (gcc::jit::recording::function::replay_into): Likewise. | |
1879 | (gcc::jit::recording::call::replay_into): Likewise. | |
1880 | (gcc::jit::recording::call_through_ptr::replay_into): Likewise. | |
1881 | ||
1882 | * jit-recording.h (gcc::jit::recording::context): Convert fields | |
1883 | "m_mementos", "m_compound_types", "m_functions" from vec<> to | |
1884 | auto_vec <>. | |
1885 | (gcc::jit::recording::function_type::get_param_types): Convert | |
1886 | return type from vec<type *> to const vec<type *> &. | |
1887 | (gcc::jit::recording::function_type): Convert field | |
1888 | "m_param_types" from a vec<> to an auto_vec<>. | |
1889 | (gcc::jit::recording::fields): Likewise for field "m_fields". | |
1890 | (gcc::jit::recording::function::get_params): Convert return type | |
1891 | from vec <param *> to const vec<param *> &. | |
1892 | (gcc::jit::recording::function): Convert fields "m_params", | |
1893 | "m_locals", "m_blocks" from vec<> to auto_vec<>. | |
1894 | (gcc::jit::recording::block): Likewise for field "m_statements". | |
1895 | vec<> to auto_vec<>. | |
1896 | (gcc::jit::recording::call): Likewise for field "m_args". | |
1897 | (gcc::jit::recording::call_through_ptr): Likewise. | |
1898 | ||
79cafc7a DM |
1899 | 2014-11-19 David Malcolm <dmalcolm@redhat.com> |
1900 | ||
1901 | PR jit/63854 | |
1902 | * jit-recording.c (recording::function::validate): Convert | |
1903 | "worklist" from vec<> to autovec<> to fix a leak. | |
1904 | ||
35485da9 DM |
1905 | 2014-11-11 David Malcolm <dmalcolm@redhat.com> |
1906 | ||
1907 | * ChangeLog.jit: New. | |
1908 | * ChangeLog: New. | |
1909 | * Make-lang.in: New. | |
1910 | * TODO.rst: New. | |
1911 | * config-lang.in: New. | |
1912 | * docs/Makefile: New. | |
1913 | * docs/_build/texinfo/Makefile: New. | |
1914 | * docs/_build/texinfo/factorial.png: New. | |
1915 | * docs/_build/texinfo/libgccjit.texi: New. | |
1916 | * docs/_build/texinfo/sum-of-squares.png: New. | |
1917 | * docs/conf.py: New. | |
1918 | * docs/examples/tut01-hello-world.c: New. | |
1919 | * docs/examples/tut02-square.c: New. | |
1920 | * docs/examples/tut03-sum-of-squares.c: New. | |
1921 | * docs/examples/tut04-toyvm/Makefile: New. | |
1922 | * docs/examples/tut04-toyvm/factorial.toy: New. | |
1923 | * docs/examples/tut04-toyvm/fibonacci.toy: New. | |
1924 | * docs/examples/tut04-toyvm/toyvm.c: New. | |
1925 | * docs/index.rst: New. | |
1926 | * docs/internals/index.rst: New. | |
1927 | * docs/intro/factorial.png: New. | |
1928 | * docs/intro/index.rst: New. | |
1929 | * docs/intro/sum-of-squares.png: New. | |
1930 | * docs/intro/tutorial01.rst: New. | |
1931 | * docs/intro/tutorial02.rst: New. | |
1932 | * docs/intro/tutorial03.rst: New. | |
1933 | * docs/intro/tutorial04.rst: New. | |
1934 | * docs/topics/contexts.rst: New. | |
1935 | * docs/topics/expressions.rst: New. | |
1936 | * docs/topics/functions.rst: New. | |
1937 | * docs/topics/index.rst: New. | |
1938 | * docs/topics/locations.rst: New. | |
1939 | * docs/topics/objects.rst: New. | |
1940 | * docs/topics/results.rst: New. | |
1941 | * docs/topics/types.rst: New. | |
1942 | * dummy-frontend.c: New. | |
1943 | * jit-builtins.c: New. | |
1944 | * jit-builtins.h: New. | |
1945 | * jit-common.h: New. | |
1946 | * jit-playback.c: New. | |
1947 | * jit-playback.h: New. | |
1948 | * jit-recording.c: New. | |
1949 | * jit-recording.h: New. | |
1950 | * libgccjit++.h: New. | |
1951 | * libgccjit.c: New. | |
1952 | * libgccjit.h: New. | |
1953 | * libgccjit.map: New. | |
1954 | * notes.txt: New. | |
1955 | ||
1956 | 2013-07-26 David Malcolm <dmalcolm@redhat.com> | |
1957 | ||
1958 | * Initial creation | |
1959 | ||
1e3b6a3d | 1960 | Copyright (C) 2013-2015 Free Software Foundation, Inc. |
35485da9 DM |
1961 | |
1962 | Copying and distribution of this file, with or without modification, | |
1963 | are permitted in any medium without royalty provided the copyright | |
1964 | notice and this notice are preserved. |