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