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