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