jit: document function pointers
[official-gcc.git] / gcc / jit / ChangeLog
blobaabcefa7c683be8b7ce44601de3964b4c68a434e
1 2017-09-28  David Malcolm  <dmalcolm@redhat.com>
3         * docs/topics/expressions.rst (Function calls): Add link to
4         gcc_jit_context_new_function_ptr_type.
5         (Function pointers): Convert to cross-references to
6         function-pointers.rst, moving material there.
7         * docs/topics/function-pointers.rst: New page.
8         * docs/topics/index.rst: Add function-pointers.rst.
9         * docs/topics/types.rst (Function pointer types): New section.
10         * docs/_build/texinfo/libgccjit.texi: Regenerate.
12 2017-09-28  David Malcolm  <dmalcolm@redhat.com>
14         * jit-recording.c
15         (gcc::jit::recording::function_type::is_same_type_as): New function.
16         * jit-recording.h: In namespace gcc::jit::recording::
17         (type::accepts_writes_from): Use is_same_type_as rather than pointer
18         equality.
19         (type::is_same_type_as): New virtual function.
20         (function_type::is_same_type_as): New override.
22 2017-09-27  David Malcolm  <dmalcolm@redhat.com>
24         * docs/cp/topics/expressions.rst (Function pointers): New section.
25         * docs/topics/compatibility.rst (LIBGCCJIT_ABI_9): New tag.
26         * docs/topics/expressions.rst (Function pointers): New section.
27         * docs/_build/texinfo/libgccjit.texi: Regenerate.
28         * jit-common.h (class gcc::jit::recording::function_pointer): New
29         forward decl.
30         * jit-playback.c (gcc::jit::playback::function::get_address): New
31         method.
32         * jit-playback.h (gcc::jit::playback::function::get_address): New
33         method decl.
34         * jit-recording.c: Within namespace gcc::jit::recording...
35         (function::function): Initialize new field "m_fn_ptr_type".
36         (function::get_address): New method.
37         (function_pointer::replay_into): New method.
38         (function_pointer::visit_children): New method.
39         (function_pointer::make_debug_string): New method.
40         (function_pointer::write_reproducer): New method.
41         * jit-recording.h: Within namespace gcc::jit::recording...
42         (function::get_address): New method.
43         (function): Add field "m_fn_ptr_type".
44         (class function_pointer): New subclass of rvalue.
45         * libgccjit++.h (gccjit::function::get_address): New method.
46         * libgccjit.c (gcc_jit_function_get_address): New function.
47         * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_function_get_address): New
48         macro.
49         (gcc_jit_function_get_address): New API entrypoint.
50         * libgccjit.map (LIBGCCJIT_ABI_9): New tag.
52 2017-09-14  David Malcolm  <dmalcolm@redhat.com>
54         PR jit/82174
55         * jit-builtins.c (matches_builtin): Ignore entries with a NULL
56         name.
58 2017-08-18  David Malcolm  <dmalcolm@redhat.com>
60         PR tree-optimization/46805
61         * dummy-frontend.c (jit_langhook_parse_file): Handle vector types.
63 2017-08-18  David Malcolm  <dmalcolm@redhat.com>
65         * jit-recording.c (class gcc::jit::reproducer): Rename field
66         "m_identifiers" to "m_map_memento_to_identifier".  Add field
67         "m_set_identifiers" and struct hash_traits for it.
68         (gcc::jit::reproducer::reproducer): Update for above.
69         (convert_to_identifier): New function.
70         (gcc::jit::reproducer::ensure_identifier_is_unique): New method.
71         (gcc::jit::reproducer::make_identifier): Avoid appending the %p
72         unless necessary for uniqueness.  Update for field renaming.
73         (gcc::jit::reproducer::get_identifier): Update for field renaming.
75 2017-08-09  David Malcolm  <dmalcolm@redhat.com>
77         * docs/cp/topics/types.rst (Vector types): New section.
78         * docs/topics/compatibility.rst (LIBGCCJIT_ABI_8): New tag.
79         * docs/topics/types.rst (gcc_jit_context_get_type): Fix typo in
80         example.
81         (Vector types): New section.
82         * docs/_build/texinfo/libgccjit.texi: Regenerate.
83         * jit-playback.c (gcc::jit::playback::type::get_vector): New
84         method.
85         * jit-playback.h (gcc::jit::playback::type::get_vector): New
86         method.
87         * jit-recording.c: In namespace gcc::jit::recording::
88         (type::get_vector): New method.
89         (memento_of_get_aligned::write_reproducer): Fix typo
90         in leading comment.
91         (memento_of_get_vector::replay_into): New method.
92         (memento_of_get_vector::make_debug_string): New method.
93         (memento_of_get_vector::write_reproducer): New method.
94         * jit-recording.h: In namespace gcc::jit::recording::
95         (type::get_vector): New
96          method.
97         (class memento_of_get_vector): New class.
98         * libgccjit++.h (gccjit::type::get_vector): New method.
99         * libgccjit.c (gcc_jit_type_get_vector): New public entrypoint.
100         * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_type_get_vector): New
101         define.
102         (gcc_jit_type_get_vector): New decl.
103         * libgccjit.map (LIBGCCJIT_ABI_8): New ABI tag.
105 2017-07-05  Richard Sandiford  <richard.sandiford@linaro.org>
106             Alan Hayward  <alan.hayward@arm.com>
107             David Sherwood  <david.sherwood@arm.com>
109         * dummy-frontend.c (jit_langhook_type_for_mode): Remove "enum" before
110         "machine_mode".
112 2017-04-24  David Malcolm  <dmalcolm@redhat.com>
114         * docs/cp/topics/types.rst (gccjit::type::get_const): Remove
115         comment.
116         (gccjit::type::get_aligned): Add.
117         * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_7.
118         * docs/topics/types.rst: Add gcc_jit_type_get_aligned.
119         * docs/_build/texinfo/libgccjit.texi: Regenerate.
120         * jit-playback.c (gcc::jit::playback::type::get_aligned): New
121         method.
122         * jit-playback.h (gcc::jit::playback::type::get_aligned): New
123         method.
124         * jit-recording.c: Within namespace gcc::jit::recording...
125         (type::get_aligned): New method.
126         (memento_of_get_aligned::replay_into): New method.
127         (memento_of_get_aligned::make_debug_string): New method.
128         (memento_of_get_aligned::write_reproducer): New method.
129         * jit-recording.h: Within namespace gcc::jit::recording...
130         (type::get_aligned): New method.
131         (type::accepts_writes_from): Strip off qualifications from
132         this when comparing pointer equality.
133         (decorated_type): New subclass of type, subsuming the
134         commonality between memento_of_get_const and
135         memento_of_get_volatile.
136         (memento_of_get_const): Make a subclass of decorated_type,
137         rather than type.
138         (memento_of_get_volatile): Likewise.
139         (memento_of_get_aligned): Likewise.
140         * libgccjit++.h: Within namespace gccjit...
141         (type::get_const): New method.
142         (type::get_aligned): New method.
143         * libgccjit.c (gcc_jit_type_get_aligned): New function.
144         * libgccjit.h (gcc_jit_type_get_aligned): New decl.
145         * libgccjit.map (LIBGCCJIT_ABI_7): New
146         (gcc_jit_type_get_aligned): Add.
148 2017-01-19  David Malcolm  <dmalcolm@redhat.com>
150         * dummy-frontend.c (jit_langhook_type_for_size): Delete.
151         (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
153 2017-01-18  David Malcolm  <dmalcolm@redhat.com>
155         * dummy-frontend.c (jit_langhook_type_for_size): Implement, using
156         lto's lto_type_for_size.
158 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
160         Update copyright years.
162 2016-05-20  David Malcolm  <dmalcolm@redhat.com>
164         * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_6.
165         * docs/topics/expressions.rst (Function calls): Add documentation
166         of gcc_jit_rvalue_set_bool_require_tail_call.
167         * docs/_build/texinfo/libgccjit.texi: Regenerate.
168         * jit-common.h (gcc::jit::recording::base_call): Add forward decl.
169         * jit-playback.c: Within namespace gcc::jit::playback...
170         (context::build_call) Add "require_tail_call" param and use it
171         to set CALL_EXPR_MUST_TAIL_CALL.
172         (context::new_call): Add "require_tail_call" param.
173         (context::new_call_through_ptr): Likewise.
174         * jit-playback.h: Within namespace gcc::jit::playback...
175         (context::new_call: Add "require_tail_call" param.
176         (context::new_call_through_ptr): Likewise.
177         (context::build_call): Likewise.
178         * jit-recording.c: Within namespace gcc::jit::recording...
179         (base_call::base_call): New constructor.
180         (base_call::write_reproducer_tail_call): New method.
181         (call::call): Update for inheritance from base_call.
182         (call::replay_into): Provide m_require_tail_call to call
183         to new_call.
184         (call::write_reproducer): Call write_reproducer_tail_call.
185         (call_through_ptr::call_through_ptr): Update for inheritance from
186         base_call.
187         (call_through_ptr::replay_into): Provide m_require_tail_call to call
188         to new_call_through_ptr.
189         (recording::call_through_ptr::write_reproducer): Call
190         write_reproducer_tail_call.
191         * jit-recording.h: Within namespace gcc::jit::recording...
192         (rvalue::dyn_cast_base_call): New virtual function.
193         (class base_call): New subclass of class rvalue.
194         (class call): Inherit from base_call rather than directly from
195         rvalue, moving get_precedence and m_args to base_call.
196         (class call_through_ptr): Likewise.
197         * libgccjit.c (gcc_jit_rvalue_set_bool_require_tail_call): New
198         function.
199         * libgccjit.h
200         (LIBGCCJIT_HAVE_gcc_jit_rvalue_set_bool_require_tail_call): New
201         macro.
202         (gcc_jit_rvalue_set_bool_require_tail_call): New function.
203         * libgccjit.map (LIBGCCJIT_ABI_6): New.
204         (gcc_jit_rvalue_set_bool_require_tail_call): Add.
206 2016-05-17  David Malcolm  <dmalcolm@redhat.com>
208         * dummy-frontend.c: Include diagnostic.h.
209         (jit_begin_diagnostic): New function.
210         (jit_end_diagnostic): New function.
211         (jit_langhook_init): Register jit_begin_diagnostic
212         and jit_end_diagnostic with the global_dc.
213         * jit-playback.c: Include diagnostic.h.
214         (gcc::jit::playback::context::add_diagnostic): New method.
215         * jit-playback.h (struct diagnostic_context): Add forward
216         declaration.
217         (gcc::jit::playback::context::add_diagnostic): New method.
219 2016-05-17  David Malcolm  <dmalcolm@redhat.com>
221         * docs/topics/expressions.rst (Function calls): Document
222         gcc_jit_context_new_call_through_ptr.
223         * docs/_build/texinfo/libgccjit.texi: Regenerate.
225 2016-05-13  David Malcolm  <dmalcolm@redhat.com>
227         * jit-playback.h: Within namespace gcc:jit::playback...
228         (compile_to_memory::postprocess): Mark with FINAL OVERRIDE.
229         (compile_to_file::postprocess): Likewise.
230         (function::finalizer): Likewise.
231         (block::finalizer): Likewise.
232         (source_file::finalizer): Likewise.
233         (source_line::finalizer): Likewise.
234         * jit-recording.c (gcc::jit::rvalue_usage_validator):: Likewise.
235         * jit-recording.h: Within namespace gcc::jit::recording...
236         (string::replay_into): Mark with FINAL OVERRIDE.
237         (string::make_debug_string): Likewise.
238         (string::write_reproducer): Likewise.
239         (location::replay_into): Likewise.
240         (location::dyn_cast_location): Likewise.
241         (location::make_debug_string): Likewise.
242         (location::write_reproducer): Likewise.
243         (memento_of_get_type::dereference): Likewise.
244         (memento_of_get_type::accepts_writes_from): Likewise.
245         (memento_of_get_type::is_int): Likewise.
246         (memento_of_get_type::is_float): Likewise.
247         (memento_of_get_type::is_bool): Likewise.
248         (memento_of_get_type::is_pointer): Likewise.
249         (memento_of_get_type::is_array): Likewise.
250         (memento_of_get_type::is_void): Likewise.
251         (memento_of_get_type::replay_into): Likewise.
252         (memento_of_get_type::make_debug_string): Likewise.
253         (memento_of_get_type::write_reproducer): Likewise.
254         (memento_of_get_pointer::dereference): Likewise.
255         (memento_of_get_pointer::accepts_writes_from): Likewise.
256         (memento_of_get_pointer::replay_into): Likewise.
257         (memento_of_get_pointer::is_int): Likewise.
258         (memento_of_get_pointer::is_float): Likewise.
259         (memento_of_get_pointer::is_bool): Likewise.
260         (memento_of_get_pointer::is_pointer): Likewise.
261         (memento_of_get_pointer::is_array): Likewise.
262         (memento_of_get_pointer::make_debug_string): Likewise.
263         (memento_of_get_pointer::write_reproducer): Likewise.
264         (memento_of_get_const::dereference): Likewise.
265         (memento_of_get_const::accepts_writes_from): Likewise.
266         (memento_of_get_const::unqualified): Likewise.
267         (memento_of_get_const::is_int): Likewise.
268         (memento_of_get_const::is_float): Likewise.
269         (memento_of_get_const::is_bool): Likewise.
270         (memento_of_get_const::is_pointer): Likewise.
271         (memento_of_get_const::is_array): Likewise.
272         (memento_of_get_const::void replay_into): Likewise;
273         (memento_of_get_const::make_debug_string): Likewise.
274         (memento_of_get_const::write_reproducer): Likewise.
275         (memento_of_get_volatile::dereference): Likewise.
276         (memento_of_get_volatile::unqualified): Likewise.
277         (memento_of_get_volatile::is_int): Likewise.
278         (memento_of_get_volatile::is_float): Likewise.
279         (memento_of_get_volatile::is_bool): Likewise.
280         (memento_of_get_volatile::is_pointer): Likewise.
281         (memento_of_get_volatile::is_array): Likewise.
282         (memento_of_get_volatile::replay_into): Likewise;
283         (memento_of_get_volatile::make_debug_string): Likewise.
284         (memento_of_get_volatile::write_reproducer): Likewise.
285         (array_type::dereference): Likewise.
286         (array_type::is_int): Likewise.
287         (array_type::is_float): Likewise.
288         (array_type::is_bool): Likewise.
289         (array_type::is_pointer): Likewise.
290         (array_type::is_array): Likewise.
291         (array_type::replay_into): Likewise;
292         (array_type::make_debug_string): Likewise.
293         (array_type::write_reproducer): Likewise.
294         (function_type::dereference): Likewise.
295         (function_type::function_dyn_cast_function_type): Likewise.
296         (function_type::function_as_a_function_type): Likewise.
297         (function_type::is_int): Likewise.
298         (function_type::is_float): Likewise.
299         (function_type::is_bool): Likewise.
300         (function_type::is_pointer): Likewise.
301         (function_type::is_array): Likewise.
302         (function_type::replay_into): Likewise;
303         (function_type::make_debug_string): Likewise.
304         (function_type::write_reproducer): Likewise.
305         (field::replay_into): Likewise;
306         (field::write_to_dump): Likewise.
307         (field::make_debug_string): Likewise.
308         (field::write_reproducer): Likewise.
309         (compound_type::dereference): Likewise.
310         (compound_type::is_int): Likewise.
311         (compound_type::is_float): Likewise.
312         (compound_type::is_bool): Likewise.
313         (compound_type::is_pointer): Likewise.
314         (compound_type::is_array): Likewise.
315         (compound_type::has_known_size): Likewise.
316         (struct_::dyn_cast_struct): Likewise.
317         (struct_::replay_into): Likewise.
318         (struct_::access_as_type): Likewise.
319         (struct_::make_debug_string): Likewise.
320         (struct_::write_reproducer): Likewise.
321         (fields::replay_into): Likewise.
322         (fields::write_to_dump): Likewise.
323         (fields::make_debug_string): Likewise.
324         (fields::write_reproducer): Likewise.
325         (union_::replay_into): Likewise.
326         (union_::make_debug_string): Likewise.
327         (union_::write_reproducer): Likewise.
328         (lvalue::access_as_rvalue): Mark with OVERRIDE.
329         (param::replay_into): Mark with FINAL OVERRIDE.
330         (param::visit_children): Likewise.
331         (param::dyn_cast_param): Likewise.
332         (param::access_as_rvalue): Likewise.
333         (param::access_as_lvalue): Likewise.
334         (param::make_debug_string): Likewise.
335         (param::write_reproducer): Likewise.
336         (param::get_precedence): Likewise.
337         (function::replay_into): Likewise.
338         (function::write_to_dump): Likewise.
339         (function::make_debug_string): Likewise.
340         (function::write_reproducer): Likewise.
341         (block::write_to_dump): Likewise.
342         (block::make_debug_string): Likewise.
343         (block::write_reproducer): Likewise.
344         (block::replay_into): Likewise.
345         (global::replay_into): Likewise;
346         (global::visit_children): Likewise.
347         (global::write_to_dump): Likewise.
348         (global::make_debug_string): Likewise.
349         (global::write_reproducer): Likewise.
350         (global::get_precedence): Likewise.
351         (memento_of_new_rvalue_from_const::replay_into): Likewise.
352         (memento_of_new_rvalue_from_const::visit_children): Likewise.
353         (memento_of_new_rvalue_from_const::is_constant): Likewise.
354         (memento_of_new_rvalue_from_const::get_wide_int): Likewise.
355         (memento_of_new_rvalue_from_const::make_debug_string): Likewise.
356         (memento_of_new_rvalue_from_const::write_reproducer): Likewise.
357         (memento_of_new_rvalue_from_const::get_precedence): Likewise.
358         (memento_of_new_string_literal::replay_into): Likewise.
359         (memento_of_new_string_literal::visit_children): Likewise.
360         (memento_of_new_string_literal::make_debug_string): Likewise.
361         (memento_of_new_string_literal::write_reproducer): Likewise.
362         (memento_of_new_string_literal::get_precedence): Likewise.
363         (unary_op::replay_into): Likewise.
364         (unary_op::visit_children): Likewise.
365         (unary_op::make_debug_string): Likewise.
366         (unary_op::write_reproducer): Likewise.
367         (unary_op::get_precedence): Likewise.
368         (binary_op::replay_into): Likewise.
369         (binary_op::visit_children): Likewise.
370         (binary_op::make_debug_string): Likewise.
371         (binary_op::write_reproducer): Likewise.
372         (binary_op::get_precedence): Likewise.
373         (comparison::replay_into): Likewise.
374         (comparison::visit_children): Likewise.
375         (comparison::make_debug_string): Likewise.
376         (comparison::write_reproducer): Likewise.
377         (comparison::get_precedence): Likewise.
378         (cast::replay_into): Likewise.
379         (cast::visit_children): Likewise.
380         (cast::make_debug_string): Likewise.
381         (cast::write_reproducer): Likewise.
382         (cast::get_precedence): Likewise.
383         (call::replay_into): Likewise.
384         (call::visit_children): Likewise.
385         (call::make_debug_string): Likewise.
386         (call::write_reproducer): Likewise.
387         (call::get_precedence): Likewise.
388         (call_through_ptr::replay_into): Likewise.
389         (call_through_ptr::visit_children): Likewise.
390         (call_through_ptr::make_debug_string): Likewise.
391         (call_through_ptr::write_reproducer): Likewise.
392         (call_through_ptr::get_precedence): Likewise.
393         (array_access::replay_into): Likewise.
394         (array_access::visit_children): Likewise.
395         (array_access::make_debug_string): Likewise.
396         (array_access::write_reproducer): Likewise.
397         (array_access::get_precedence): Likewise.
398         (access_field_of_lvalue::replay_into): Likewise.
399         (access_field_of_lvalue::visit_children): Likewise.
400         (access_field_of_lvalue::make_debug_string): Likewise.
401         (access_field_of_lvalue::write_reproducer): Likewise.
402         (access_field_of_lvalue::get_precedence): Likewise.
403         (access_field_rvalue::replay_into): Likewise.
404         (access_field_rvalue::visit_children): Likewise.
405         (access_field_rvalue::make_debug_string): Likewise.
406         (access_field_rvalue::write_reproducer): Likewise.
407         (access_field_rvalue::get_precedence): Likewise.
408         (dereference_field_rvalue::replay_into): Likewise.
409         (dereference_field_rvalue::visit_children): Likewise.
410         (dereference_field_rvalue::make_debug_string): Likewise.
411         (dereference_field_rvalue::write_reproducer): Likewise.
412         (dereference_field_rvalue::get_precedence): Likewise.
413         (dereference_rvalue::replay_into): Likewise.
414         (dereference_rvalue::visit_children): Likewise.
415         (dereference_rvalue::make_debug_string): Likewise.
416         (dereference_rvalue::write_reproducer): Likewise.
417         (dereference_rvalue::get_precedence): Likewise.
418         (get_address_of_lvalue::replay_into): Likewise.
419         (get_address_of_lvalue::visit_children): Likewise.
420         (get_address_of_lvalue::make_debug_string): Likewise.
421         (get_address_of_lvalue::write_reproducer): Likewise.
422         (get_address_of_lvalue::get_precedence): Likewise.
423         (local::replay_into): Likewise.
424         (local::visit_children): Likewise.
425         (local::write_to_dump): Likewise.
426         (local::make_debug_string): Likewise.
427         (local::write_reproducer): Likewise.
428         (local::get_precedence): Likewise.
429         (statement::write_to_dump): Likewise.
430         (eval::replay_into): Likewise.
431         (eval::make_debug_string): Likewise.
432         (eval::write_reproducer): Likewise.
433         (assignment::replay_into): Likewise.
434         (assignment::make_debug_string): Likewise.
435         (assignment::write_reproducer): Likewise.
436         (assignment_op::replay_into): Likewise.
437         (assignment_op::make_debug_string): Likewise.
438         (assignment_op::write_reproducer): Likewise.
439         (comment::replay_into): Likewise.
440         (comment::make_debug_string): Likewise.
441         (comment::write_reproducer): Likewise.
442         (conditional::replay_into): Likewise.
443         (conditional::get_successor_blocks): Likewise.
444         (conditional::make_debug_string): Likewise.
445         (conditional::write_reproducer): Likewise.
446         (jump::replay_into): Likewise.
447         (jump::get_successor_blocks): Likewise.
448         (jump::make_debug_string): Likewise.
449         (jump::write_reproducer): Likewise.
450         (return_::replay_into): Likewise.
451         (return_::get_successor_blocks): Likewise.
452         (return_::make_debug_string): Likewise.
453         (return_::write_reproducer): Likewise.
454         (case_::replay_into): Likewise.
455         (case_::write_reproducer): Likewise.
456         (case_::make_debug_string): Likewise.
457         (switch_::replay_into): Likewise.
458         (switch_::get_successor_blocks): Likewise.
459         (switch_::make_debug_string): Likewise.
460         (switch_::write_reproducer): Likewise.
462 2016-02-08  David Malcolm  <dmalcolm@redhat.com>
464         * dummy-frontend.c (jit_langhook_init): Remove
465         second argument to build_common_tree_nodes to
466         track r233218.
468 2016-01-23  Iain Buclaw  <ibuclaw@gdcproject.org>
470         * jit-playback.c: Include pthread.h.
472 2016-01-19  David Malcolm  <dmalcolm@redhat.com>
474         PR jit/69144
475         * jit-playback.c (gcc::jit::playback::compile_to_file::postprocess):
476         Potentially add the temporary artifact to the tempdir's list of
477         tempfiles needing additional cleanup.
478         (gcc::jit::playback::context::extract_any_requested_dumps): Likewise
479         for the dumpfile.
480         * jit-tempdir.c (gcc::jit::tempdir::~tempdir): Clean up additional
481         tempfiles.
482         * jit-tempdir.h (gcc::jit::tempdir::add_temp_file): New method.
483         (gcc::jit::tempdir::m_tempfiles): New field.
484         * docs/cp/intro/tutorial04.rst: Update for changes to toyvm.cc.
485         * docs/examples/tut04-toyvm/toyvm.cc (class compilation_result):
486         New.
487         (toyvm_function::compile): Change return type from function ptr
488         to a compilation_result.
489         (toyvm_function::get_function_name): New accessor.
490         (toyvm_function::m_funcname): New field.
491         (get_function_name): Convert to...
492         (toyvm_function::make_function_name): ...this new method.
493         (toyvm_function::parse): Call make_function_name.
494         (toyvm_function::compile): Convert return type from function ptr
495         to a compilation_result.  Use get_function_name.
496         (compilation_state::compile): Convert return type from
497         gcc_jit_result * to a compilation_result.
498         (test_script): Update for above changes, extracting the code from
499         the compilation_result.
500         (main): Likewise.
501         * docs/_build/texinfo/libgccjit.texi: Regenerate.
503 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
505         Update copyright years.
507 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
509         * dummy-frontend.c: Remove unused header files.
510         * jit-builtins.c: Likewise.
511         * jit-playback.c: Likewise.
512         * jit-recording.c: Likewise.
513         * jit-spec.c: Likewise.
514         * libgccjit.c: Likewise.
516 2015-11-07  Richard Sandiford  <richard.sandiford@arm.com>
518         * jit-builtins.c: Don't undef DEF_BUILTIN.
520 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
522         * dummy-frontend.c: Reorder #include's and remove duplicates.
523         * jit-builtins.c: Likewise.
524         * jit-playback.c: Likewise.
525         * jit-recording.c: Likewise.
526         * libgccjit.c: Likewise.
528 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
530         * jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
531         DEF_FUNCTION_TYPE_11): Define.
532         * jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
533         DEF_FUNCTION_TYPE_11): Define.
535 2015-09-30  Thomas Schwinge  <thomas@codesourcery.com>
536             Ulrich Drepper  <drepper@gmail.com>
538         * jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use.
540 2015-09-30  Matthias Klose  <doko@ubuntu.com>
542         * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,
543         remove DEF_FUNCTION_TYPE_VAR_11.
544         * jit-builtins.c (builtins_manager::make_type): Define and handle
545         DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.
547 2015-08-25  David Malcolm  <dmalcolm@redhat.com>
549         * docs/cp/topics/contexts.rst
550         (gccjit::context::set_bool_use_external_driver): New.
551         * docs/internals/test-hello-world.exe.log.txt: Update.
552         * docs/topics/compatibility.rst (LIBGCCJIT_ABI_5): New.
553         * docs/topics/contexts.rst
554         (gcc_jit_context_set_bool_use_external_driver): New.
555         * jit-common.h (enum inner_bool_option): Add
556         INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
557         * jit-playback.c (gcc_driver_name): New global.
558         (gcc:jit::playback::context::invoke_driver): Split out second
559         half into...
560         (gcc::jit::playback::context::invoke_embedded_driver): ...this new
561         function, and...
562         (gcc::jit::playback::context::invoke_external_driver): ...this new
563         function.
564         * jit-playback.h
565         (gcc::jit::playback::context::get_inner_bool_option): New.
566         (gcc::jit::playback::context::invoke_embedded_driver): New.
567         (gcc::jit::playback::context::invoke_external_driver): New.
568         * jit-recording.c (inner_bool_option_reproducer_strings):
569         Add entry for INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
570         * libgccjit++.h
571         (gccjit::context::set_bool_use_external_driver): New.
572         * libgccjit.c (gcc_jit_context_set_bool_use_external_driver): New.
573         * libgccjit.h (gcc_jit_context_set_bool_use_external_driver): New.
574         (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_use_external_driver):
575         New.
576         * libgccjit.map (LIBGCCJIT_ABI_5): New.
577         * notes.txt: Show invocation of embedded copy of driver.
578         * docs/internals/test-hello-world.exe.log.txt: Update
580 2015-08-13  David Malcolm  <dmalcolm@redhat.com>
582         * jit-playback.c (invoke_driver): On OS X, add
583         "-Wl,-undefined,dynamic_lookup" to the driver arguments.
585 2015-08-03  David Malcolm  <dmalcolm@redhat.com>
587         * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
588         * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY):
589         We no longer show a profile.
590         * docs/topics/index.rst (Topic Reference): Add performance.rst.
591         * docs/topics/performance.rst: New file.
592         * docs/_build/texinfo/libgccjit.texi: Regenerate.
593         * jit-playback.c (gcc::jit::playback::context::compile): Add timer
594         param when constructing the "toplev" instance.
595         (gcc::jit::playback::context::acquire_mutex): Add timer param when
596         constructing auto_timevar instance.
597         (gcc::jit::playback::context::make_fake_args): If we have a timer,
598         add "-ftime-report".
599         (gcc::jit::playback::context::invoke_driver): Add timer param when
600         constructing auto_timevar instance.
601         (gcc::jit::playback::context::dlopen_built_dso): Likewise.
602         * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor.
603         * jit-recording.c: Include timevar.h.
604         (gcc::jit::recording::context::context): Initialize field "m_timer".
605         * jit-recording.h: Add forward declaration of class timer.
606         (gcc::jit::recording::context::set_timer): New method.
607         (gcc::jit::recording::context::get_timer): New method.
608         (gcc::jit::recording::context::m_timer): New field.
609         * libgccjit++.h (gccjit::timer): New class.
610         (gccjit::auto_time): New class.
611         (gccjit::context::set_timer): New method.
612         (gccjit::context::get_timer): New.
613         (gccjit::timer::timer): New.
614         (gccjit::timer::push): New.
615         (gccjit::timer::pop): New.
616         (timer::print): New.
617         (timer::get_inner_timer): New.
618         (timer::release): New.
619         (auto_time::auto_time): New.
620         (auto_time::~auto_time): New.
621         * libgccjit.c: Include timevar.h.
622         (struct gcc_jit_timer): New.
623         (gcc_jit_timer_new): New function.
624         (gcc_jit_timer_release): New function.
625         (gcc_jit_context_set_timer): New function.
626         (gcc_jit_context_get_timer): New function.
627         (gcc_jit_timer_push): New function.
628         (gcc_jit_timer_pop): New function.
629         (gcc_jit_timer_print): New function.
630         * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro.
631         (gcc_jit_timer): New typedef.
632         (gcc_jit_timer_new): New function.
633         (gcc_jit_timer_release): New function.
634         (gcc_jit_context_set_timer): New function.
635         (gcc_jit_context_get_timer): New function.
636         (gcc_jit_timer_push): New function.
637         (gcc_jit_timer_pop): New function.
638         (gcc_jit_timer_print): New function.
639         * libgccjit.map (LIBGCCJIT_ABI_4): New.
640         (gcc_jit_timer_new): New function.
641         (gcc_jit_timer_release): New function.
642         (gcc_jit_context_set_timer): New function.
643         (gcc_jit_context_get_timer): New function.
644         (gcc_jit_timer_push): New function.
645         (gcc_jit_timer_pop): New function.
646         (gcc_jit_timer_print): New function.
648 2015-07-23  David Malcolm  <dmalcolm@redhat.com>
650         * jit-playback.c (invoke_driver): Convert local "argvec"
651         to an auto_argvec, so that it owns copies of the strings,
652         rather than borrows them, updating ADD_ARG to use xstrdup
653         and special-casing the NULL terminator to avoid
654         xstrdup (NULL).  Call add_multilib_driver_arguments at the front
655         of the arguments.
656         (MULTILIB_DEFAULTS): Provide a default definition.
657         (multilib_defaults_raw): New constant array.
658         (gcc::jit::playback::context::add_multilib_driver_arguments): New
659         method.
660         * jit-playback.h
661         (gcc::jit::playback::context::add_multilib_driver_arguments): New
662         method.
663         * docs/internals/test-hello-world.exe.log.txt: Update.
664         * docs/_build/texinfo/libgccjit.texi: Regenerate.
666 2015-07-16  David Malcolm  <dmalcolm@redhat.com>
668         * docs/internals/index.rst (Overview of code structure): Add note
669         that the implementation is in C++, despite the .c extension.
670         (Submitting patches): New subsection.
671         * docs/_build/texinfo/libgccjit.texi: Regenerate.
673 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
675         * dummy-frontend.c: Adjust includes for flags.h changes.
676         * jit-common.h: Likewise.
677         * jit-playback.c: Likewise.
679 2015-07-08  David Malcolm  <dmalcolm@redhat.com>
681         PR jit/66783
682         * libgccjit.c (gcc_jit_context_new_field): Show name of field in
683         "unknown size" error message.
684         (gcc_jit_struct_set_fields): Show name of struct in error message.
685         (gcc_jit_context_new_global): Show name of global in
686         "unknown size" error message.
687         (gcc_jit_function_new_local): Likewise for local.
689 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
691         * dummy-frontend.c: Adjust includes.
692         * jit-common.h: Likewise.
693         * jit-playback.c: Likewise.
695 2015-07-07  David Malcolm  <dmalcolm@redhat.com>
697         PR jit/66783
698         * jit-recording.h: Within namespace gcc:jit::recording...
699         (type::has_known_size): New virtual function.
700         (struct_has_known_size): New function.
701         * libgccjit.c (gcc_jit_context_new_field): Verify that the type
702         has a known size.
703         (gcc_jit_context_new_global): Likewise.
704         (gcc_jit_function_new_local): Likewise.
706 2015-07-07  David Malcolm  <dmalcolm@redhat.com>
708         PR jit/66779
709         * dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we
710         handle modes QI, HI, SI, DI, TI.
712 2015-07-01  David Malcolm  <dmalcolm@redhat.com>
714         PR jit/66700
715         * jit-playback.c (jit_mark_addressable): New function.
716         (gcc::jit::playback::lvalue::get_address): Call
717         jit_mark_addressable on the underlying tree.
719 2015-07-01  David Malcolm  <dmalcolm@redhat.com>
721         * docs/topics/types.rst (gcc_jit_context_new_union_type): Add
722         documentation.
723         * docs/_build/texinfo/libgccjit.texi: Regenerate.
725 2015-07-01  David Malcolm  <dmalcolm@redhat.com>
727         * docs/topics/contexts.rst (gcc_jit_context_set_bool_option):
728         Clarify lack of lifetime requirements on (const char *) parameter.
729         * docs/topics/expressions.rst
730         (gcc_jit_context_new_string_literal): Likewise.
731         (gcc_jit_context_new_global): Likewise.
732         * docs/topics/functions.rst (gcc_jit_context_new_param): Likewise.
733         (gcc_jit_context_new_function): Likewise.
734         (gcc_jit_function_new_block): Likewise.
735         (gcc_jit_block_add_comment): Likewise.
736         * docs/topics/locations.rst (gcc_jit_context_new_location):
737         Likewise.
738         * docs/topics/types.rst (gcc_jit_context_new_field): Likewise.
739         (gcc_jit_context_new_struct_type): Likewise.
740         * docs/_build/texinfo/libgccjit.texi: Regenerate.
742 2015-06-30  David Malcolm  <dmalcolm@redhat.com>
744         * docs/cp/topics/functions.rst (Blocks): Add switch statements to
745         list of ways to terminate a block.
746         (gccjit::block::end_with_switch): Add function description.
747         (gccjit::case_): Add class.
748         (gccjit::context::new_case): Add function description.
749         * docs/cp/topics/objects.rst: Add "case_" to class hierarchy.
750         * docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New.
751         * docs/topics/functions.rst (Blocks): Add switch statements to
752         list of ways to terminate a block.
753         (gcc_jit_block_end_with_switch): Add function description.
754         (gcc_jit_case): Add type.
755         (gcc_jit_context_new_case): Add function description.
756         (gcc_jit_case_as_object): Add function description.
757         * docs/topics/objects.rst: Add gcc_jit_case to class hierarchy.
758         * docs/_build/texinfo/libgccjit.texi: Regenerate.
759         * jit-common.h (gcc::jit::recording::case_): Add forward decl.
760         (gcc::jit::playback::case_): Add forward decl.
761         * jit-playback.c (add_case): New function.
762         (gcc::jit::playback::block::add_switch): New function.
763         * jit-playback.h (gcc::jit::playback::case_): New struct.
764         (gcc::jit::playback::block::get_function): New method.
765         (gcc::jit::playback::block::add_switch): New method.
766         * jit-recording.c: Within namespace gcc::jit...
767         (recording::context::new_case): New method.
768         (recording::function::validate): Update for change to
769         get_successor_blocks.
770         (recording::block::end_with_switch): New method.
771         (recording::block::get_successor_blocks): Update to support an
772         arbitrary number of successor blocks.
773         (recording::block::dump_edges_to_dot): Likewise.
774         (memento_of_new_rvalue_from_const <int>::get_wide_int): New.
775         (memento_of_new_rvalue_from_const <long>::get_wide_int): New.
776         (memento_of_new_rvalue_from_const <double>::get_wide_int): New.
777         (memento_of_new_rvalue_from_const <void *>::get_wide_int): New.
778         (recording::statement::get_successor_blocks): Update to support an
779         arbitrary number of successor blocks.
780         (recording::conditional::get_successor_blocks): Likewise.
781         (recording::jump::get_successor_blocks): Likewise.
782         (recording::return_::get_successor_blocks): Likewise.
783         (recording::case_::write_reproducer): New.
784         (recording::case_::make_debug_string): New.
785         (recording::switch_::switch_): New.
786         (recording::switch_::replay_into): New.
787         (recording::switch_::get_successor_blocks): New.
788         (recording::switch_::make_debug_string): New.
789         (recording::switch_::write_reproducer): New.
790         * jit-recording.h: Within namespace gcc::jit::recording...
791         (context::new_case): New.
792         (rvalue::is_constant): New.
793         (rvalue::get_wide_int): New.
794         (block::end_with_switch): New.
795         (block::get_successor_blocks): Update to support an arbitrary
796         number of successor blocks.
797         (memento_of_new_rvalue_from_const::is_constant): New.
798         (memento_of_new_rvalue_from_const::get_wide_int): New.
799         (statement::get_successor_blocks): Update to support an arbitrary
800         number of successor blocks.
801         (conditional::get_successor_blocks): Likewise.
802         (jump::get_successor_blocks): Likewise.
803         (return_::get_successor_blocks): Likewise.
804         (case_): New subclass of memento.
805         (switch_): New subclass of statement.
806         * libgccjit++.h (gccjit::case_): New subclass of gccjit::object.
807         (gccjit::context::new_case): New method.
808         (gccjit::block::end_with_switch): New method.
809         (gccjit::case_::case): New ctors.
810         (gccjit::case_::get_inner_case): New method.
811         * libgccjit.c: Include "typed-splay-tree.h"
812         (struct gcc_jit_case): New.
813         (gcc_jit_context_new_case): New function.
814         (gcc_jit_case_as_object): New function.
815         (valid_dest_for_switch): New function.
816         (valid_case_for_switch): New function.
817         (class api_call_validator): New class.
818         (class case_range_validator): New class.
819         (case_range_validator::case_range_validator): New.
820         (case_range_validator::validate): New.
821         (case_range_validator::case_compare): New.
822         (case_range_validator::get_wide_int): new.
823         (gcc_jit_block_end_with_switch): New.
824         * libgccjit.h: Add gcc_jit_case to class hierarchy comment.
825         (gcc_jit_case): New typedef.
826         (gcc_jit_context_new_case): New function.
827         (gcc_jit_case_as_object): New function.
828         (gcc_jit_block_end_with_switch): New function.
829         (LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New.
830         * libgccjit.map: Add gcc_jit_block_end_with_switch,
831         gcc_jit_case_as_object and gcc_jit_context_new_case.
833 2015-06-30  David Malcolm  <dmalcolm@redhat.com>
835         PR jit/66546
836         * docs/cp/topics/contexts.rst
837         (gccjit::context::set_bool_allow_unreachable_blocks): New.
838         * docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New.
839         * docs/topics/contexts.rst (Options): Add notes discussing the
840         transition from enums to entrypoints for new options.
841         (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
842         * docs/_build/texinfo/libgccjit.texi: Regenerate.
843         * jit-common.h (gcc::jit::inner_bool_option): New enum.
844         * jit-recording.c: Within namespace gcc::jit...
845         (recording::context::context): Handle m_inner_bool_options.
846         (recording::context::set_inner_bool_option): New.
847         (inner_bool_option_reproducer_strings): New.
848         (recording::context::log_all_options): Log the "inner" bool
849         options.
850         (recording::context::log_inner_bool_option): New.
851         (recording::context::dump_reproducer_to_file): Write initializers
852         for "inner" bool options.
853         (recording::function::validate): Don't check for block
854         reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set.
855         * jit-recording.h: Within namespace gcc::jit...
856         (recording::context::set_inner_bool_option): New.
857         (recording::context::get_inner_bool_option): New.
858         (recording::context::log_inner_bool_option): New.
859         (recording::context::m_inner_bool_options): New.
860         * libgccjit++.h
861         (gccjit::context::set_bool_allow_unreachable_blocks): New.
862         * libgccjit.c
863         (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
864         * libgccjit.h: Add note about options present in the
865         initial release of libgccjit.
866         (gcc_jit_context_set_bool_allow_unreachable_blocks): New API
867         entrypoint.
868         (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks):
869         New macro.
870         * libgccjit.map (LIBGCCJIT_ABI_2): New, containing...
871         (gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new
872         entrypoint.
874 2015-06-30  David Malcolm  <dmalcolm@redhat.com>
876         PR jit/66628
877         * docs/cp/topics/contexts.rst (Additional command-line options):
878         New section.
879         * docs/topics/compatibility.rst: New file.
880         * docs/topics/contexts.rst (Additional command-line options): New
881         section.
882         * docs/topics/index.rst: Add compatibility.rst.
883         * docs/_build/texinfo/libgccjit.texi: Regenerate.
884         * jit-playback.c (make_fake_args): Add call to
885         append_command_line_options.
886         * jit-recording.c: Within namespace gcc::jit...
887         (recording::context::~context): Free the optnames within
888         m_command_line_options.
889         (recording::context::set_bool_option): Likewise.
890         (recording::context::add_command_line_option): New method.
891         (recording::context::append_command_line_options): New method.
892         (recording::context::dump_reproducer_to_file): Add command-line
893         options.
894         * jit-recording.h: Within namespace gcc::jit...
895         (recording::context::add_command_line_option): New method.
896         (recording::context::append_command_line_options): New method.
897         (recording::context::m_command_line_options): New field.
898         * libgccjit++.h (gccjit::context::add_command_line_option): New
899         method.
900         * libgccjit.c (gcc_jit_context_add_command_line_option): New API
901         entrypoint.
902         * libgccjit.h (gcc_jit_context_add_command_line_option): New API
903         entrypoint.
904         (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New
905         macro.
906         * libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add
907         LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option.
909 2015-06-30  David Malcolm  <dmalcolm@redhat.com>
911         * jit-recording.c
912         (gcc::jit::recording::context::dump_reproducer_to_file):
913         Add pragma to generated reproducers to disable -Wunused-variable.
914         Fix handling of NULL string options.
916 2015-06-30  David Malcolm  <dmalcolm@redhat.com>
918         * docs/cp/topics/expressions.rst: Remove stray semicolon.
919         * docs/cp/topics/functions.rst: Remove stray backslash.
920         * docs/_build/texinfo/libgccjit.texi: Regenerate.
922 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
924         * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
925         * jit-playback.c: Likewise.
927 2015-06-25  Andrew Macleod  <amacleod@redhat.com>
929         * jit-common.h: Don't include alias.h.
931 2015-06-17  David Malcolm  <dmalcolm@redhat.com>
933         * libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field
934         is for the correct struct.
935         (gcc_jit_rvalue_access_field): Likewise.
937 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
939         * dummy-frontend.c: Do not include input.h, line-map.h or is-a.h.
940         * jit-common.h: Likewise.
941         * jit-playback.c: Likewise.
943 2015-06-16  David Malcolm  <dmalcolm@redhat.com>
945         PR jit/66539
946         * jit-recording.c: Within namespace gcc::jit::recording::
947         (rvalue::get_debug_string_parens): New function.
948         (binary_op::make_debug_string): Update to mimic C precedence
949         rules.
950         (binary_op_precedence): New array.
951         (binary_op::get_precedence): New function.
952         (comparison::make_debug_string): Update to mimic C precedence
953         rules.
954         (comparison_precedence): New array.
955         (comparison::get_precedence): New function.
956         (cast::make_debug_string): Update to mimic C precedence rules.
957         (call::make_debug_string): Likewise.
958         (call_through_ptr::make_debug_string): Likewise.
959         (array_access::make_debug_string): Likewise.
960         (access_field_of_lvalue::make_debug_string): Likewise.
961         (access_field_rvalue::make_debug_string): Likewise.
962         (dereference_field_rvalue::make_debug_string): Likewise.
963         (dereference_rvalue::make_debug_string): Likewise.
964         (get_address_of_lvalue::make_debug_string): Likewise.
965         * jit-recording.h: Within namespace gcc::jit::recording::
966         (precedence): New enum.
967         (rvalue::rvalue): Initialize field "m_parenthesized_string".
968         (rvalue::get_debug_string_parens): New method.
969         (rvalue::get_precedence): New pure virtual function.
970         (rvalue::m_parenthesized_string): New field.
971         (param::get_precedence): New function.
972         (global::get_precedence): New function.
973         (memento_of_new_rvalue_from_const::get_precedence): New function.
974         (memento_of_new_string_literal::get_precedence): New function.
975         (unary_op::get_precedence): New function.
976         (binary_op::get_precedence): New function.
977         (comparison::get_precedence): New function.
978         (cast::get_precedence): New function.
979         (call::get_precedence): New function.
980         (call_through_ptr::get_precedence): New function.
981         (array_access::get_precedence): New function.
982         (access_field_of_lvalue::get_precedence): New function.
983         (access_field_rvalue::get_precedence): New function.
984         (dereference_field_rvalue::get_precedence): New function.
985         (dereference_rvalue::get_precedence): New function.
986         (get_address_of_lvalue::get_precedence): New function.
987         (local::get_precedence): New function.
989 2015-06-09  Matthias Klose  <doko@ubuntu.com>
991         * Make-lang.in (jit.install-common): Install headers using INSTALL_DATA.
993 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
995         * dummy-frontend.c : Adjust include files.
996         * jit-common.h : Likewise.
997         * jit-playback.c : Likewise.
999 2015-06-05  David Malcolm  <dmalcolm@redhat.com>
1001         * dummy-frontend.c
1002         (jit_langhook_post_compilation_parsing_cleanups): Remove.
1003         (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
1004         * jit-playback.c (gcc::jit::playback::context::new_global): Add
1005         call to varpool_node::finalize_decl.
1006         (gcc::jit::playback::context::finalize_global_decls): Remove.
1007         * jit-playback.h
1008         (gcc::jit::playback::context::finalize_global_decls): Remove.
1010 2015-06-05  David Malcolm  <dmalcolm@redhat.com>
1012         * dummy-frontend.c (jit_langhook_write_globals): Rename to...
1013         (jit_langhook_post_compilation_parsing_cleanups): ...this, and
1014         eliminate calls to finalize_compilation_unit and
1015         write_global_decls_2.
1016         (LANG_HOOKS_WRITE_GLOBALS): Rename to...
1017         (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
1018         redirect from jit_langhook_write_globals to
1019         jit_langhook_post_compilation_parsing_cleanups.
1020         * jit-playback.c
1021         (gcc::jit::playback::context::write_global_decls_1): Rename to...
1022         (gcc::jit::playback::context::finalize_global_decls): ...this.
1023         (gcc::jit::playback::context::write_global_decls_1): Delete.
1024         * jit-playback.h
1025         (gcc::jit::playback::context::write_global_decls_1): Rename to...
1026         (gcc::jit::playback::context::finalize_global_decls): ...this.
1027         (gcc::jit::playback::context::write_global_decls_1): Delete.
1029 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
1031         * dummy-frontend.c: Adjust includes for restructured coretypes.h.
1032         * jit-common.h: Likewise.
1033         * jit-playback.c: Likewise.
1035 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
1037         * jit-builtins.c: Include vec.h before target.h.
1039 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
1041         * Make-lang.in (jit.mostlyclean): Remove shared libraries and object
1042         files.
1044 2015-04-09  David Malcolm  <dmalcolm@redhat.com>
1046         PR jit/65691
1047         * docs/cp/topics/expressions.rst (Simple expressions): Fix copy
1048         and paste error in description of gccjit::context::one.
1049         * docs/topics/expressions.rst (Simple expressions): Likewise in
1050         description of gcc_jit_context_one.
1051         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1053 2015-03-13  Uros Bizjak  <ubizjak@gmail.com>
1055         * jit-recording.c (dump::write): Also check vasprintf return value.
1056         (recording::context::add_error_va): Ditto.
1057         (recording::string::from_printf): Ditto.
1059 2015-03-13  David Malcolm  <dmalcolm@redhat.com>
1061         * docs/internals/index.rst (Packaging notes): New section.
1062         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1064 2015-03-05  David Malcolm  <dmalcolm@redhat.com>
1066         * docs/cp/intro/tutorial03.rst: Add missing arguments to
1067         gccjit::block::end_with_conditional call.  Add on_true/on_false
1068         comments.  Tweak the wording.
1069         * docs/intro/tutorial03.rst: Add missing arguments to
1070         gcc_jit_block_end_with_conditional call.  Add some clarifying
1071         comments.
1072         * docs/topics/compilation.rst: Tweak the wording to avoid an
1073         ambiguous use of "this".
1074         * docs/topics/contexts.rst: Fix a typo.
1075         * docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
1076         a stray backtick.
1077         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1079 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
1081         PR libgomp/64625
1082         * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8)
1083         (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
1084         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1085         * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8)
1086         (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
1087         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1089 2015-02-04  David Malcolm  <dmalcolm@redhat.com>
1091         PR jit/64257
1092         * docs/conf.py (html_theme): Change from 'pyramid'
1093         to 'sphinxdoc'.
1095 2015-02-04  David Malcolm  <dmalcolm@redhat.com>
1097         * docs/topics/contexts.rst (gcc_jit_context_acquire): Fix
1098         typo.
1099         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1101 2015-02-03  David Malcolm  <dmalcolm@redhat.com>
1103         * jit-logging.h (gcc::jit::log_user::log): Make const.
1104         * jit-recording.c (gcc::jit::recording::context::set_str_option):
1105         Log the new value of the option.
1106         (gcc::jit::recording::context::set_int_option): Likewise.
1107         (gcc::jit::recording::context::set_bool_option): Likewise.
1108         (gcc::jit::recording::context::compile): Log the value of all
1109         options.
1110         (gcc::jit::recording::context::compile_to_file): Likewise.
1111         (gcc::jit::recording::context::log_all_options): New function.
1112         (gcc::jit::recording::context::log_str_option): New function.
1113         (gcc::jit::recording::context::log_int_option): New function.
1114         (gcc::jit::recording::context::log_bool_option): New function.
1115         * jit-recording.h (gcc::jit::recording::context::log_all_options):
1116         New function.
1117         (gcc::jit::recording::context::log_str_option): New function.
1118         (gcc::jit::recording::context::log_int_option): New function.
1119         (gcc::jit::recording::context::log_bool_option): New function.
1120         * docs/internals/test-hello-world.exe.log.txt: Update for above
1121         changes.
1122         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1124 2015-02-03  David Malcolm  <dmalcolm@redhat.com>
1126         PR jit/64810
1127         * Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o.
1128         (LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS.
1129         * jit-playback.c: Include gcc.h.
1130         (gcc::jit::playback::context::compile): Move mutex acquisition
1131         to before the call to make_fake_args.
1132         (append_arg_from_driver): New function.
1133         (gcc::jit::playback::context::make_fake_args): On the first call,
1134         call into driver_get_configure_time_options to get configure-time
1135         default options and cache them.  Add them to the args for
1136         toplev::main.
1137         * jit-spec.c: New source file.
1138         * docs/internals/test-hello-world.exe.log.txt: Update to reflect
1139         above changes.
1140         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1142 2015-02-02  David Malcolm  <dmalcolm@redhat.com>
1144         PR jit/64810
1145         * dummy-frontend.c (jit_langhook_type_for_mode): Support
1146         TYPE_MODE (long_long_integer_type_node).
1148 2015-01-27  David Malcolm  <dmalcolm@redhat.com>
1150         * docs/internals/test-hello-world.exe.log.txt: Add example version
1151         lines.
1152         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1153         * jit-common.h (gcc::jit::dump::get_file): New accessor.
1154         * jit-logging.c: Include toplev.h.
1155         (gcc::jit::logger::logger): Log the GCC version.
1156         * jit-recording.c: Include toplev.h.
1157         (gcc:jit::recording::context::dump_reproducer_to_file): Log the
1158         GCC version.
1160 2015-01-26  David Malcolm  <dmalcolm@redhat.com>
1162         * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo.
1163         * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The
1164         error buffer is only valid until the next call to the context.
1165         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1166         * libgccjit.h (gcc_jit_context_get_first_error): Reword the
1167         comment to omit mention of compiling.
1168         (gcc_jit_context_get_last_error): The error buffer is only valid
1169         until the next call to the context.
1171 2015-01-26  David Malcolm  <dmalcolm@redhat.com>
1173         PR jit/64708
1174         * config-lang.in (compilers): Drop "libgccjit.so".
1176 2015-01-23  David Malcolm  <dmalcolm@redhat.com>
1178         PR jit/64721
1179         * jit-playback.c (gcc::jit::playback::context::compile): Construct
1180         toplev instances with init_signals=false.
1182 2015-01-19  David Malcolm  <dmalcolm@redhat.com>
1184         * docs/cp/topics/results.rst: Rename to...
1185         * docs/cp/topics/compilation.rst: ...this, and add section on
1186         ahead-of-time compilation.
1187         * docs/cp/topics/index.rst: Update for renaming of results.rst
1188         to compilation.rst.
1189         * docs/examples/emit-alphabet.bf: New file, a sample "brainf"
1190         script.
1191         * docs/examples/tut05-bf.c: New file, implementing a compiler
1192         for "brainf".
1193         * docs/internals/test-hello-world.exe.log.txt: Update to reflect
1194         changes to logger output.
1195         * docs/intro/index.rst: Add tutorial05.rst
1196         * docs/intro/tutorial05.rst: New file.
1197         * docs/topics/results.rst: Rename to...
1198         * docs/topics/compilation.rst: ...this, and add section on
1199         ahead-of-time compilation.
1200         * docs/topics/index.rst: Update for renaming of results.rst to
1201         compilation.rst.
1202         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1203         * jit-playback.c (gcc::jit::playback::context::compile): Convert
1204         return type from result * to void.  Move the code to convert to
1205         dso and dlopen the result to a new pure virtual "postprocess"
1206         method.
1207         (gcc::jit::playback::compile_to_memory::compile_to_memory): New
1208         function.
1209         (gcc::jit::playback::compile_to_memory::postprocess): New
1210         function, based on playback::context::compile.
1211         (gcc::jit::playback::compile_to_file::compile_to_file): New
1212         function.
1213         (gcc::jit::playback::compile_to_file::postprocess): New function.
1214         (gcc::jit::playback::compile_to_file::copy_file): New function.
1215         (gcc::jit::playback::context::convert_to_dso): Move internals
1216         to...
1217         (gcc::jit::playback::context::invoke_driver): New method.  Add
1218         "-shared" and "-c" options to driver's argv as needed.
1219         * jit-playback.h: Include "timevar.h".
1220         (gcc::jit::playback::context::compile): Convert return type from
1221         result * to void.
1222         (gcc::jit::playback::context::postprocess): New pure virtual
1223         function, making this an abstract base class.
1224         (gcc::jit::playback::context::get_tempdir): New accessor.
1225         (gcc::jit::playback::context::invoke_driver): New function.
1226         (class gcc::jit::playback::compile_to_memory): New subclass of
1227         playback::context.
1228         (class gcc::jit::playback::compile_to_file): Likewise.
1229         * jit-recording.c (gcc::jit::recording::context::compile): Use a
1230         playback::compile_to_memory, and extract its result.
1231         (gcc::jit::recording::context::compile_to_file): New function.
1232         * jit-recording.h (gcc::jit::recording::context::compile_to_file):
1233         New function.
1234         * libgccjit++.h (gccjit::context::compile_to_file): New method.
1235         * libgccjit.c (gcc_jit_context_compile): Update log message to
1236         clarify that this is an in-memory compile.
1237         (gcc_jit_context_compile_to_file): New function.
1238         * libgccjit.h (gcc_jit_context): Clarify that you can compile
1239         a context more than once, and that you can compile to a file
1240         as well as to memory.
1241         (gcc_jit_result): Clarify that this is the result of an
1242         in-memory compilation.
1243         (gcc_jit_context_compile): Clarify that you can compile, and that
1244         this is an in-memory compilation.
1245         (enum gcc_jit_output_kind): New enum.
1246         (gcc_jit_context_compile_to_file): New function.
1247         (gcc_jit_context_enable_dump): Clarify comment to cover both forms
1248         of compilation.
1249         * libgccjit.map (gcc_jit_context_compile_to_file): New API
1250         entrypoint.
1251         * notes.txt: Update to show the playback::context::postprocess
1252         virtual function.
1254 2015-01-19  David Malcolm  <dmalcolm@redhat.com>
1256         * jit-recording.c
1257         (gcc::jit::recording::memento_of_new_string_literal::make_debug_string):
1258         Add missing format string.
1260 2015-01-16  David Malcolm  <dmalcolm@redhat.com>
1262         * Make-lang.in (lang_checks_parallelized): Add "check-jit".
1263         (check_jit_parallelize): Set this to an arbitrary value (10).
1265 2015-01-16  Jakub Jelinek  <jakub@redhat.com>
1267         * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of
1268         last argument.
1269         (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and
1270         undef afterwards.
1271         * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1272         Likewise.
1274 2015-01-15  Richard Sandiford  <richard.sandiford@arm.com>
1276         Update copyright years in docs/.
1278 2015-01-15  David Malcolm  <dmalcolm@redhat.com>
1280         * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the
1281         lvalue and the rvalue are of compatible type.
1283 2015-01-13  David Malcolm  <dmalcolm@redhat.com>
1285         * docs/cp/topics/contexts.rst (Debugging): Add
1286         gccjit::context::dump_reproducer_to_file.
1287         * docs/internals/index.rst (Design notes): New section,
1288         discussing input validation and
1289         gcc_jit_context_dump_reproducer_to_file.
1290         * docs/topics/contexts.rst (Debugging): Add
1291         gcc_jit_context_dump_reproducer_to_file.
1292         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1293         * jit-common.h (gcc::jit::dump::get_context): New accessor.
1294         * jit-recording.c: Include "hash-map.h".
1295         Within namespace ::gcc::jit...
1296         (dump::write): Flush each line.
1297         (dump::make_location): Pass false for new param "created_by_user".
1298         (class allocator): New class.
1299         (allocator::~allocator): New function.
1300         (allocator::xstrdup_printf): New function.
1301         (allocator::xstrdup_printf_va): New function.
1302         (class reproducer): New subclass of dump.
1303         (reproducer::reproducer): New function.
1304         (reproducer::write_params): New function.
1305         (reproducer::write_args): New function.
1306         (reproducer::make_identifier): New function.
1307         (reproducer::make_tmp_identifier): New function.
1308         (reproducer::get_identifier): New pair of functions.
1309         (reproducer::get_identifier_as_rvalue): New function.
1310         (reproducer::get_identifier_as_lvalue): New function.
1311         (reproducer::get_identifier_as_type): New function.
1312         (reproducer::xstrdup_printf): New function.
1313         (recording::context::context): Initialize m_toplevel_ctxt.
1314         (recording::context::new_location): Add param created_by_user.
1315         (str_option_reproducer_strings): New table of strings.
1316         (int_option_reproducer_strings): Likewise.
1317         (bool_option_reproducer_strings): Likewise.
1318         (get_type_enum_strings): Likewise.
1319         (names_of_function_kinds): Likewise.
1320         (global_kind_reproducer_strings): Likewise.
1321         (unary_op_reproducer_strings): Likewise.
1322         (binary_op_reproducer_strings): Likewise.
1323         (comparison_reproducer_strings): Likewise.
1324         Within namespace ::gcc::jit::recording::...
1325         (context::dump_reproducer_to_file): New function.
1326         (string::write_reproducer): Likewise.
1327         (location::write_reproducer): Likewise.
1328         (type::access_as_type): Likewise.
1329         (memento_of_get_type::write_reproducer): Likewise.
1330         (memento_of_get_pointer::write_reproducer): Likewise.
1331         (memento_of_get_const::write_reproducer): Likewise.
1332         (memento_of_get_volatile::write_reproducer): Likewise.
1333         (array_type::write_reproducer): Likewise.
1334         (function_type::write_reproducer): Likewise.
1335         (function_type::write_deferred_reproducer): Likewise.
1336         (field::write_reproducer): Likewise.
1337         (struct_::access_as_type): Likewise.
1338         (struct_::write_reproducer): Likewise.
1339         (union_::write_reproducer): Likewise.
1340         (fields::write_reproducer): Likewise.
1341         (rvalue::access_as_rvalue): Likewise.
1342         (lvalue::access_as_rvalue): Likewise.
1343         (lvalue::access_as_lvalue): Likewise.
1344         (param::access_as_rvalue): Likewise.
1345         (param::access_as_lvalue): Likewise.
1346         (param::write_reproducer): Likewise.
1347         (function::write_reproducer): Likewise.
1348         (block::write_reproducer): Likewise.
1349         (global::write_reproducer): Likewise.
1350         (memento_of_new_rvalue_from_const <int>::write_reproducer):
1351         Likewise.
1352         (memento_of_new_rvalue_from_const <long>::write_reproducer):
1353         Likewise.
1354         (memento_of_new_rvalue_from_const <double>::write_reproducer):
1355         Likewise.
1356         (memento_of_new_rvalue_from_const <void *>::write_reproducer):
1357         Likewise.
1358         (memento_of_new_string_literal::write_reproducer): Likewise.
1359         (unary_op::write_reproducer): Likewise.
1360         (binary_op::write_reproducer): Likewise.
1361         (comparison::write_reproducer): Likewise.
1362         (cast::write_reproducer): Likewise.
1363         (call::write_reproducer): Likewise.
1364         (call_through_ptr::write_reproducer): Likewise.
1365         (array_access::write_reproducer): Likewise.
1366         (access_field_of_lvalue::write_reproducer): Likewise.
1367         (access_field_rvalue::write_reproducer): Likewise.
1368         (dereference_field_rvalue::write_reproducer): Likewise.
1369         (dereference_rvalue::write_reproducer): Likewise.
1370         (get_address_of_lvalue::write_reproducer): Likewise.
1371         (local::write_reproducer): Likewise.
1372         (eval::write_reproducer): Likewise.
1373         (assignment::write_reproducer): Likewise.
1374         (assignment_op::write_reproducer): Likewise.
1375         (comment::write_reproducer): Likewise.
1376         (conditional::write_reproducer): Likewise.
1377         (jump::write_reproducer): Likewise.
1378         (return_::write_reproducer): Likewise.
1379         * jit-recording.h (gcc::jit::reproducer): New forward declararion.
1380         Within namespace ::gcc::jit::recording::...
1381         (context::new_location): Add "created_by_user" param.
1382         (context::dump_reproducer_to_file): New method.
1383         (context::m_toplevel_ctxt): New field.
1384         (memento::write_reproducer): New pure virtual function.
1385         (memento::dyn_cast_location): New virtual function.
1386         (string::write_reproducer):
1387         (location::location): Add "created_by_user" param.
1388         (location::dyn_cast_location): New function.
1389         (location::created_by_user): New accessor.
1390         (location::write_reproducer): New function.
1391         (location::m_created_by_user): New field.
1392         (type::access_as_type): New virtual function.
1393         (location::write_reproducer): Likewise.
1394         (type::access_as_type): Likewise.
1395         (memento_of_get_type::write_reproducer): Likewise.
1396         (memento_of_get_pointer::write_reproducer): Likewise.
1397         (memento_of_get_const::write_reproducer): Likewise.
1398         (memento_of_get_volatile::write_reproducer): Likewise.
1399         (array_type::write_reproducer): Likewise.
1400         (function_type::write_reproducer): Likewise.
1401         (function_type::write_deferred_reproducer): Likewise.
1402         (field::write_reproducer): Likewise.
1403         (struct_::access_as_type): Likewise.
1404         (struct_::write_reproducer): Likewise.
1405         (union_::write_reproducer): Likewise.
1406         (union_::m_fields): Remove stray unused field.
1407         (fields::length): New accessor.
1408         (fields::get_field): New accessor.
1409         (fields::write_reproducer): New function.
1410         (rvalue::access_as_rvalue): Likewise.
1411         (lvalue::access_as_rvalue): Likewise.
1412         (lvalue::access_as_lvalue): Likewise.
1413         (param::access_as_rvalue): Likewise.
1414         (param::access_as_lvalue): Likewise.
1415         (param::write_reproducer): Likewise.
1416         (function::write_reproducer): Likewise.
1417         (block::write_reproducer): Likewise.
1418         (global::write_reproducer): Likewise.
1419         (memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer):
1420         Likewise.
1421         (memento_of_new_string_literal::write_reproducer): Likewise.
1422         (unary_op::write_reproducer): Likewise.
1423         (binary_op::write_reproducer): Likewise.
1424         (comparison::write_reproducer): Likewise.
1425         (cast::write_reproducer): Likewise.
1426         (call::write_reproducer): Likewise.
1427         (call_through_ptr::write_reproducer): Likewise.
1428         (array_access::write_reproducer): Likewise.
1429         (access_field_of_lvalue::write_reproducer): Likewise.
1430         (access_field_rvalue::write_reproducer): Likewise.
1431         (dereference_field_rvalue::write_reproducer): Likewise.
1432         (dereference_rvalue::write_reproducer): Likewise.
1433         (get_address_of_lvalue::write_reproducer): Likewise.
1434         (local::write_reproducer): Likewise.
1435         (eval::write_reproducer): Likewise.
1436         (assignment::write_reproducer): Likewise.
1437         (assignment_op::write_reproducer): Likewise.
1438         (comment::write_reproducer): Likewise.
1439         (conditional::write_reproducer): Likewise.
1440         (jump::write_reproducer): Likewise.
1441         (return_::write_reproducer): Likewise.
1442         * libgccjit++.h (gccjit::context::dump_reproducer_to_file): New.
1443         * libgccjit.c (gcc_jit_context_new_location): Pass "true" as
1444         param "created_by_user".
1445         (gcc_jit_context_dump_reproducer_to_file): New API entrypoint.
1446         * libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API
1447         entrypoint.
1448         * libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API
1449         entrypoint.
1451 2015-01-12  David Malcolm  <dmalcolm@redhat.com>
1453         * jit-recording.c (class gcc::jit::rvalue_usage_validator): New.
1454         (gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New
1455         ctor.
1456         (gcc::jit::rvalue_usage_validator::visit): New function.
1457         (gcc::jit::recording::rvalue::verify_valid_within_stmt): New
1458         function.
1459         (gcc::jit::recording::rvalue::set_scope): New function.
1460         (gcc::jit::recording::function::function): Call set_scope on each
1461         param, issuing errors for any params that already have a function.
1462         (gcc::jit::recording::block::add_eval): Return the new statement;
1463         update the comment given that some error-checking now happens after
1464         this returns.
1465         (gcc::jit::recording::block::add_assignment): Likewise.
1466         (gcc::jit::recording::block::add_assignment_op): Likewise.
1467         (gcc::jit::recording::block::add_comment): Likewise.
1468         (gcc::jit::recording::block::end_with_conditional): Likewise.
1469         (gcc::jit::recording::block::end_with_jump): Likewise.
1470         (gcc::jit::recording::block::end_with_return): Likewise.
1471         (gcc::jit::recording::block::validate): Add a comment.
1472         (gcc::jit::recording::unary_op::visit_children): New function.
1473         (gcc::jit::recording::binary_op::visit_children): New function.
1474         (gcc::jit::recording::comparison::visit_children): New function.
1475         (gcc::jit::recording::cast::visit_children): New function.
1476         (gcc::jit::recording::call::visit_children): New function.
1477         (gcc::jit::recording::call_through_ptr::visit_children): New function.
1478         (gcc::jit::recording::array_access::visit_children): New function.
1479         (gcc::jit::recording::access_field_of_lvalue::visit_children): New
1480         function.
1481         (gcc::jit::recording::access_field_rvalue::visit_children): New
1482         function.
1483         (gcc::jit::recording::dereference_field_rvalue::visit_children):
1484         New function.
1485         (gcc::jit::recording::dereference_rvalue::visit_children): New
1486         function.
1487         (gcc::jit::recording::get_address_of_lvalue::visit_children): New
1488         function.
1489         * jit-recording.h: Within namespace gcc::jit::recording...
1490         (class rvalue_visitor): New.
1491         (rvalue::rvalue): Initialize m_scope.
1492         (rvalue::get_loc): New accessor.
1493         (rvalue::verify_valid_within_stmt): New function.
1494         (rvalue::visit_children): New pure virtual function.
1495         (rvalue::set_scope): New function.
1496         (rvalue::get_scope): New function.
1497         (rvalue::dyn_cast_param): New function.
1498         (rvalue::m_scope): New field.
1499         (param::visit_children): New empty function.
1500         (param::dyn_cast_param): New function.
1501         (function::get_loc): New function.
1502         (block::add_eval): Return the new statement.
1503         (block::add_assignment): Likewise.
1504         (block::add_assignment_op): Likewise.
1505         (block::add_comment): Likewise.
1506         (block::end_with_conditional): Likewise.
1507         (block::end_with_jump): Likewise.
1508         (block::end_with_return): Likewise.
1509         (global::visit_children): New function.
1510         (memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children):
1511         New function.
1512         (memento_of_new_string_literal::visit_children): New function.
1513         (unary_op::visit_children): New function.
1514         (binary_op::visit_children): New function.
1515         (comparison::visit_children): New function.
1516         (cast::visit_children): New function.
1517         (call::visit_children): New function.
1518         (call_through_ptr::visit_children): New function.
1519         (array_access::visit_children): New function.
1520         (access_field_of_lvalue::visit_children): New function.
1521         (access_field_rvalue::visit_children): New function.
1522         (dereference_field_rvalue::visit_children): New function.
1523         (dereference_rvalue::visit_children): New function.
1524         (get_address_of_lvalue::visit_children): New function.
1525         (local::local): Call set_scope.
1526         (local::visit_children): New function.
1527         (statement::get_block): Make public.
1528         * libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro.
1529         (RETURN_NULL_IF_FAIL_PRINTF5): New macro.
1530         (gcc_jit_context_new_function): Verify that each param has
1531         not yet been used for creating another function.
1532         (gcc_jit_block_add_eval): After creating the stmt, verify
1533         that the rvalue expression tree is valid to use within it.
1534         (gcc_jit_block_add_assignment): Likewise for the lvalue and
1535         rvalue expression trees.
1536         (gcc_jit_block_add_assignment_op): Likewise.
1537         (gcc_jit_block_end_with_conditional): Likewise for the boolval
1538         expression tree.
1539         (gcc_jit_block_end_with_return): Likewise for the rvalue
1540         expression tree.
1541         (gcc_jit_block_end_with_void_return): Remove return of "void",
1542         now that block::end_with_return is now non-void.
1544 2015-01-12  David Malcolm  <dmalcolm@redhat.com>
1546         * jit-playback.c (gcc::jit::playback::context::read_dump_file):
1547         Add missing fclose on error-handling path.
1549 2015-01-12  David Malcolm  <dmalcolm@redhat.com>
1551         * docs/cp/topics/expressions.rst (Global variables): Add
1552         enum gcc_jit_global_kind param to gccjit::context::new_global.
1553         * docs/topics/expressions.rst (Global variables): Likewise.
1554         Document the new enum.
1555         * docs/topics/results.rst (Compilation results): Document
1556         globals-handling.
1557         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1558         * dummy-frontend.c (jit_langhook_write_globals): Call into the
1559         playback context's write_global_decls_1 and write_global_decls_2
1560         before and after calling symtab->finalize_compilation_unit ().
1561         * jit-playback.c: Include "debug.h".
1562         (gcc::jit::playback::context::new_global): Add "kind" param and
1563         use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the
1564         underlying VAR_DECL.  Call varpool_node::get_create on the
1565         VAR_DECL, and add it to m_globals.
1566         (gcc::jit::playback::context::write_global_decls_1): New function.
1567         (gcc::jit::playback::context::write_global_decls_2): New function.
1568         * jit-playback.h (gcc::jit::playback::context::context): Call
1569         create on m_globals.
1570         (gcc::jit::playback::context::new_global): Add "kind" param.
1571         (gcc::jit::playback::context::write_global_decls_1): New function.
1572         (gcc::jit::playback::context::write_global_decls_2): New function.
1573         (gcc::jit::playback::context::m_globals): New field.
1574         * jit-recording.c (gcc::jit::recording::context::context):
1575         Initialize m_globals.
1576         (gcc::jit::recording::context::new_global): Add param "kind".
1577         Add the new global to m_globals.
1578         (gcc::jit::recording::context::dump_to_file): Dump the globals.
1579         (gcc::jit::recording::global::replay_into): Add field m_kind.
1580         (gcc::jit::recording::global::write_to_dump): New override.
1581         * jit-recording.h (gcc::jit::recording::context::new_global): Add
1582         param "kind".
1583         (gcc::jit::recording::context::m_globals): New field.
1584         (gcc::jit::recording::global::global): Add param kind.
1585         (gcc::jit::recording::global::write_to_dump): New override.
1586         (gcc::jit::recording::global::m_kind): New field.
1587         * jit-result.c (gcc::jit::result::get_global): New function.
1588         * jit-result.h (gcc::jit::result::get_global): New function.
1589         * libgccjit++.h (gccjit::context::new_global): Add "kind" param.
1590         * libgccjit.c (gcc_jit_context_new_global): Likewise.
1591         (gcc_jit_result_get_global): New API entrypoint.
1592         * libgccjit.h (gcc_jit_result_get_global): New API entrypoint.
1593         (enum gcc_jit_global_kind): New enum.
1594         (gcc_jit_context_new_global): API change: add "kind" param.
1595         * libgccjit.map (gcc_jit_result_get_global): New symbol.
1597 2015-01-09  David Malcolm  <dmalcolm@redhat.com>
1599         * dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h",
1600         "symtab.h", "inchash.h".  Move include of "hash-set.h" much
1601         earlier.
1602         * jit-builtins.c: Remove redundant includes of "opts.h" and
1603         "tree.h".
1604         * jit-common.h: Include "hash-set.h", "input.h", "vec.h",
1605         "double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h".
1606         * jit-playback.c: Include "hashtab.h", "machmode.h", "input.h",
1607         "statistics.h", "vec.h", "double-int.h", "real.h",
1608         "fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h",
1609         "inchash.h", "fold-const.h".  Move include of "hash-set.h" to
1610         earlier.
1611         * jit-recording.c: Remove redundant includes of "opts.h" and
1612         "tree.h".
1614 2015-01-09  David Malcolm  <dmalcolm@redhat.com>
1616         * docs/cp/topics/expressions.rst (Simple expressions): Use
1617         ":c:type:" for C types.  Document new overload of
1618         gcc::jit::context::new_rvalue.
1619         * docs/topics/expressions.rst (Simple expressions): Use
1620         ":c:type:" for C types.  Document new entrypoint
1621         gcc_jit_context_new_rvalue_from_long.
1622         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1623         * jit-playback.c: Within namespace gcc::jit::playback...
1624         (context::new_rvalue_from_int): Eliminate in favor of...
1625         (context::new_rvalue_from_const <int>): ...this.
1626         (context::new_rvalue_from_double): Eliminate in favor of...
1627         (context::new_rvalue_from_const <double>): ...this.
1628         (context::new_rvalue_from_const <long>): New.
1629         (context::new_rvalue_from_ptr): Eliminate in favor of...
1630         (context::new_rvalue_from_const <void *>): ...this.
1631         * jit-playback.h: Within namespace gcc::jit::playback...
1632         (context::new_rvalue_from_int): Eliminate in favor of...
1633         (context::new_rvalue_from_const <HOST_TYPE>): ...this.
1634         (context::new_rvalue_from_double): Likewise.
1635         (context::new_rvalue_from_ptr): Likewise.
1636         * jit-recording.c: Within namespace gcc::jit::recording...
1637         (context::new_rvalue_from_int): Eliminate.
1638         (context::new_rvalue_from_double): Likewise.
1639         (context::new_rvalue_from_ptr): Likewise.
1640         (class memento_of_new_rvalue_from_const <int>):
1641         Add explicit specialization.
1642         (class memento_of_new_rvalue_from_const <long>):
1643         Likewise.
1644         (class memento_of_new_rvalue_from_const <double>):
1645         Likewise.
1646         (class memento_of_new_rvalue_from_const <void *>):
1647         Likewise.
1648         (memento_of_new_rvalue_from_int::replay_into):
1649         Generalize into...
1650         (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into):
1651         ...this...
1652         (memento_of_new_rvalue_from_double::replay_into):
1653         ...allowing this...
1654         (memento_of_new_rvalue_from_ptr::replay_into):
1655         ...and this to be deleted.
1656         (memento_of_new_rvalue_from_int::make_debug_string):
1657         Convert to...
1658         (memento_of_new_rvalue_from_const <int>::make_debug_string):
1659         ...this.
1660         (memento_of_new_rvalue_from_double::make_debug_string):
1661         Convert to...
1662         (memento_of_new_rvalue_from_const <double>::make_debug_string):
1663         ...this.
1664         (memento_of_new_rvalue_from_ptr::make_debug_string)
1665         Convert to...
1666         (memento_of_new_rvalue_from_const <void *>::make_debug_string):
1667         ...this.
1668         (memento_of_new_rvalue_from_const <long>::make_debug_string):
1669         New function.
1670         * jit-recording.h: Within namespace gcc::jit::recording...
1671         (context::new_rvalue_from_int): Eliminate.
1672         (context::new_rvalue_from_double): Likewise.
1673         (context::new_rvalue_from_ptr): Likewise, all in favor of...
1674         (context::new_rvalue_from_const <HOST_TYPE>): New family of
1675         methods.
1676         (class memento_of_new_rvalue_from_int): Eliminate.
1677         (class memento_of_new_rvalue_from_double): Likewise.
1678         (class memento_of_new_rvalue_from_ptr): Likewise.
1679         (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family
1680         of rvalue subclasses.
1681         * libgccjit++.h (gccjit::context::new_rvalue): New overload, for
1682         "long".
1683         * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for
1684         rewriting of recording::context::new_rvalue_from_int to
1685         recording::context::new_rvalue_from_const <int>.
1686         (gcc_jit_context_new_rvalue_from_long): New API entrypoint.
1687         (gcc_jit_context_new_rvalue_from_double): Update for
1688         rewriting of recording::context::new_rvalue_from_double to
1689         recording::context::new_rvalue_from_const <double>.
1690         (gcc_jit_context_new_rvalue_from_ptr): Update for
1691         rewriting of recording::context::new_rvalue_from_ptr to
1692         recording::context::new_rvalue_from_const <void *>.
1693         * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API
1694         entrypoint.
1695         * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise.
1697 2015-01-09  David Malcolm  <dmalcolm@redhat.com>
1699         PR jit/64206
1700         * docs/internals/test-hello-world.exe.log.txt: Update, the log now
1701         shows tempdir creation/cleanup.
1702         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1703         * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir
1704         to the list of subclasses in the comment.
1705         * jit-playback.c (gcc::jit::playback::context::context): Add a
1706         comment clarifying when the tempdir gets cleaned up.
1707         (gcc::jit::playback::context::compile): Pass the context's logger,
1708         if any, to the tempdir.
1709         (gcc::jit::playback::context::dlopen_built_dso): When creating the
1710         gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand
1711         over ownership of the tempdir to it.
1712         * jit-result.c: Include "jit-tempdir.h".
1713         (gcc::jit::result::result): Add tempdir param, saving it as
1714         m_tempdir.
1715         (gcc::jit::result::~result): Delete m_tempdir.
1716         * jit-result.h (gcc::jit::result::result): Add tempdir param.
1717         (gcc::jit::result::m_tempdir): New field.
1718         * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param;
1719         add JIT_LOG_SCOPE.
1720         (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit,
1721         and log m_path_template and m_path_tempdir.
1722         (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log
1723         entry/exit, and log the unlink and rmdir calls.
1724         * jit-tempdir.h: Include "jit-logging.h".
1725         (class gcc::jit::tempdir): Make this be a subclass of log_user.
1726         (gcc::jit::tempdir::tempdir): Add logger param.
1727         * notes.txt: Update to show the two possible places where the
1728         tempdir can be cleaned up.
1730 2015-01-08  David Malcolm  <dmalcolm@redhat.com>
1732         * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive
1733         comment.
1735 2015-01-08  David Malcolm  <dmalcolm@redhat.com>
1737         * docs/topics/contexts.rst (Error-handling): Document new
1738         entrypoint gcc_jit_context_get_last_error.
1739         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1740         * jit-recording.c (gcc::jit::recording::context::context):
1741         Initialize new fields "m_last_error_str" and
1742         "m_owns_last_error_str".
1743         (gcc::jit::recording::context::~context): Clean up
1744         m_last_error_str, if needed.
1745         (gcc::jit::recording::context::add_error_va): Update
1746         m_last_error_str and m_owns_last_error_str, freeing the old
1747         value if appropriate.
1748         (gcc::jit::recording::context::get_last_error): New function.
1749         * jit-recording.h (gcc::jit::recording::context::get_last_error):
1750         New function.
1751         (gcc::jit::recording::context): New fields m_last_error_str and
1752         m_owns_last_error_str.
1753         * libgccjit.c (gcc_jit_context_get_last_error): New function.
1754         * libgccjit.h (gcc_jit_context_get_last_error): New declaration.
1755         * libgccjit.map (gcc_jit_context_get_last_error): New function.
1757 2015-01-08  David Malcolm  <dmalcolm@redhat.com>
1759         * Make-lang.in (jit_OBJS): Add jit/jit-logging.o.
1760         * docs/internals/index.rst (Overview of code structure): Mention
1761         gcc_jit_context_set_logfile, and embed the example logfile.
1762         * docs/internals/test-hello-world.exe.log.txt: New file: example
1763         of a logfile.
1764         * docs/topics/contexts.rst (Debugging): Add documentation
1765         for gcc_jit_context_set_logfile.
1766         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1767         * dummy-frontend.c: Include "jit-logging.h".
1768         (jit_langhook_init): Assert that there is an active playback
1769         context.  If it has a logger, log entry/exit to this function.
1770         (jit_langhook_write_globals): Likewise.
1771         * jit-common.h (gcc::jit::logger): New forward declaration.
1772         * jit-logging.c: New file.
1773         * jit-logging.h: New file.
1774         * jit-playback.c: Include "jit-logging.h".
1775         (gcc::jit::playback::context::context): Initialize the log_user
1776         base class from the recording context's logger (if any).  Use
1777         JIT_LOG_SCOPE to log entry/exit from the function body.
1778         (gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to
1779         log entry/exit from the function body.
1780         (gcc::jit::playback::build_stmt_list): Likewise.
1781         (gcc::jit::playback::function::postprocess): Likewise.
1782         (gcc::jit::playback::context::compile): Likewise.  Log the
1783         entry/exit to toplev::main and toplev::finalize.  Log the
1784         fake argv passed to toplev::main.
1785         (gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to
1786         log entry/exit from the function body.
1787         (gcc::jit::playback::context::release_mutex): Likewise.
1788         (gcc::jit::playback::context::make_fake_args): Likewise.
1789         (gcc::jit::playback::context::extract_any_requested_dumps):
1790         Likewise.
1791         (gcc::jit::playback::context::convert_to_dso): Likewise. Also,
1792         log the arguments that the driver is invoked with.
1793         (gcc::jit::playback::context::dlopen_built_dso): Likewise.  Pass
1794         the logger to the result object.
1795         (gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to
1796         log entry/exit from the function body.
1797         (gcc::jit::playback::context::dump_generated_code): Likewise.
1798         (gcc::jit::playback::context::handle_locations): Likewise.
1799         * jit-playback.h (gcc::jit::playback::context): Make this be
1800         a subclass of gcc::jit::log_user.
1801         * jit-recording.c: Include "jit-logging.h".
1802         (gcc::jit::recording::context::context: Initialize the logger to
1803         NULL for root contexts, or to the parent's logger for child
1804         contexts.
1805         (gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to
1806         log entry/exit from the function body.
1807         (gcc::jit::recording::context::replay_into): Likewise.
1808         (gcc::jit::recording::context::disassociate_from_playback):
1809         Likewise.
1810         (gcc::jit::recording::context::compile): Likewise.
1811         (recording::context::add_error_va): Likewise.  Also, log the
1812         error.
1813         (gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to
1814         log entry/exit from the function body.
1815         * jit-recording.h: Include "jit-logging.h".
1816         (gcc::jit::recording::context): Make this be a subclass of
1817         gcc::jit::log_user.
1818         * jit-result.c: Include "jit-common.h" and "jit-logging.h".
1819         (gcc::jit::result::result): Add logger param, recording it.
1820         Use JIT_LOG_SCOPE to log entry/exit from the function body.
1821         (gcc::jit::result::~result(): Use JIT_LOG_SCOPE to
1822         log entry/exit from the function body.
1823         (gcc::jit::result::get_code): Likewise.
1824         * jit-result.h (gcc::jit::result): Make this be a subclass of
1825         gcc::jit::log_user.
1826         (gcc::jit::result::result): Add logger parameter.
1827         * libgccjit++.h (gccjit::context::set_logfile): New function.
1828         * libgccjit.c: Include "jit-logging.h".
1829         (gcc_jit_context_acquire): Log the context.
1830         (gcc_jit_context_release): Use JIT_LOG_FUNC to
1831         log entry/exit from the function body, and log the context.
1832         (gcc_jit_context_new_child_context): Likewise, logging both
1833         contexts.
1834         (gcc_jit_context_new_location): Use JIT_LOG_FUNC to
1835         log entry/exit from the function body.
1836         (gcc_jit_context_get_type): Likewise.
1837         (gcc_jit_context_get_int_type): Likewise.
1838         (gcc_jit_context_new_array_type): Likewise.
1839         (gcc_jit_context_new_field): Likewise.
1840         (gcc_jit_context_new_struct_type): Likewise.
1841         (gcc_jit_context_new_opaque_struct): Likewise.
1842         (gcc_jit_struct_set_fields): Likewise.
1843         (gcc_jit_context_new_union_type): Likewise.
1844         (gcc_jit_context_new_function_ptr_type): Likewise.
1845         (gcc_jit_context_new_param): Likewise.
1846         (gcc_jit_context_new_function): Likewise.
1847         (gcc_jit_context_get_builtin_function): Likewise.
1848         (gcc_jit_function_get_param): Likewise.
1849         (gcc_jit_function_dump_to_dot): Likewise.
1850         (gcc_jit_function_new_block): Likewise.
1851         (gcc_jit_context_new_global): Likewise.
1852         (gcc_jit_context_new_rvalue_from_int): Likewise.
1853         (gcc_jit_context_zero): Likewise.
1854         (gcc_jit_context_one): Likewise.
1855         (gcc_jit_context_new_rvalue_from_double): Likewise.
1856         (gcc_jit_context_new_rvalue_from_ptr): Likewise.
1857         (gcc_jit_context_null): Likewise.
1858         (gcc_jit_context_new_string_literal): Likewise.
1859         (gcc_jit_context_new_unary_op): Likewise.
1860         (gcc_jit_context_new_binary_op): Likewise.
1861         (gcc_jit_context_new_comparison): Likewise.
1862         (gcc_jit_context_new_call): Likewise.
1863         (gcc_jit_context_new_call_through_ptr): Likewise.
1864         (gcc_jit_context_new_cast): Likewise.
1865         (gcc_jit_context_new_array_access): Likewise.
1866         (gcc_jit_lvalue_access_field): Likewise.
1867         (gcc_jit_rvalue_access_field): Likewise.
1868         (gcc_jit_rvalue_dereference_field): Likewise.
1869         (gcc_jit_rvalue_dereference): Likewise.
1870         (gcc_jit_lvalue_get_address): Likewise.
1871         (gcc_jit_function_new_local): Likewise.
1872         (gcc_jit_block_add_eval): Likewise.
1873         (gcc_jit_block_add_assignment): Likewise.
1874         (gcc_jit_block_add_assignment_op): Likewise.
1875         (gcc_jit_block_end_with_conditional): Likewise.
1876         (gcc_jit_block_add_comment): Likewise.
1877         (gcc_jit_block_end_with_jump): Likewise.
1878         (gcc_jit_block_end_with_return): Likewise.
1879         (gcc_jit_block_end_with_void_return): Likewise.
1880         (gcc_jit_context_set_str_option): Likewise.
1881         (gcc_jit_context_set_int_option): Likewise.
1882         (gcc_jit_context_set_bool_option): Likewise.
1883         (gcc_jit_context_enable_dump): Likewise.
1884         (gcc_jit_context_compile): Likewise.  Also log the context,
1885         and the result.
1886         (gcc_jit_context_dump_to_file): Likewise.
1887         (gcc_jit_context_set_logfile): New function.
1888         (gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to
1889         log entry/exit from the function body.
1890         (gcc_jit_result_get_code): Likewise.  Also log the fnname)
1891         and the ptr to be returned.
1892         (gcc_jit_result_release): Likewise.  Also log the result.
1893         * libgccjit.h: Include <stdio.h>, since we need FILE *.
1894         (gcc_jit_context_set_logfile): New declaration.
1895         * libgccjit.map (gcc_jit_context_set_logfile): New.
1897 2015-01-07  David Malcolm  <dmalcolm@redhat.com>
1899         * jit-recording.h (gcc::jit::recording::type::is_void): New
1900         virtual function.
1901         (gcc::jit::recording::memento_of_get_type::is_void): New
1902         function, overriding default implementation.
1903         * libgccjit.c (gcc_jit_rvalue_dereference): Verify that
1904         the underlying type is not "void".
1906 2015-01-07  David Malcolm  <dmalcolm@redhat.com>
1908         * docs/topics/expressions.rst (Unary Operations): Add
1909         GCC_JIT_UNARY_OP_ABS.
1910         * jit-playback.c (gcc::jit::playback::context::new_unary_op):
1911         Likewise.
1912         * jit-recording.c (unary_op_strings): Likewise.
1913         * libgccjit.c (gcc_jit_context_new_unary_op): Update checking
1914         of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS.
1915         * libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS.
1916         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1918 2015-01-07  David Malcolm  <dmalcolm@redhat.com>
1920         * jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix
1921         typo in comment.
1923 2015-01-07  David Malcolm  <dmalcolm@redhat.com>
1925         * TODO.rst (Test suite): Remove item about running C++ testcases.
1926         * docs/internals/index.rst (Working on the JIT library): Add
1927         "c++" to the enabled languages in the suggested "configure"
1928         invocation, and add a description of why this is necessary.
1929         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1931 2015-01-07  David Malcolm  <dmalcolm@redhat.com>
1933         * docs/internals/index.rst: Update to reflect that built
1934         testcases are now test-foo.c.exe, rather than test-foo.exe.
1935         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1937 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1939         Update copyright years.
1941 2014-12-19  David Malcolm  <dmalcolm@redhat.com>
1943         * jit-playback.c (gcc::jit::playback::context::build_cast): In
1944         case BOOLEAN_TYPE, don't assume that the source expression is
1945         of type "int".
1947 2014-12-19  David Malcolm  <dmalcolm@redhat.com>
1949         * jit-recording.c (gcc::jit::recording::context::context): When
1950         copying string options from a parent context, take a copy of the
1951         underlying buffers, rather than simply copying the pointer.
1953 2014-12-19  David Malcolm  <dmalcolm@redhat.com>
1955         * jit-recording.c (gcc::jit::recording::context::set_str_option):
1956         Handle NULL.
1958 2014-12-11  David Malcolm  <dmalcolm@redhat.com>
1960         * docs/cp/topics/contexts.rst (gccjit::context::set_str_option):
1961         Document new function.
1962         * docs/_build/texinfo/libgccjit.texi: Regenerate.
1964 2014-12-10  Ulrich Drepper  <drepper@gmail.com>
1966         Minor interface cleanups of libgccjit
1967         * jit-playback.c (convert_to_dso): Use auto_vec instead
1968         of automatic array to build up command line.
1969         * jit-recording.c (recording::context::set_str_option):
1970         Make copy of the string.
1971         (recording::context::~context): Free string options.
1972         * jit-recording.h (recording::context): Adjust type
1973         of m_str_options member.
1974         * libgccjit.h: Adjust comment about
1975         gcc_jit_context_set_str_option parameter being used after
1976         the call.
1977         Update comment now that all interfaces are copy strings
1978         if necessary.
1979         * libgccjit++.h (gccjit::context): Add set_str_option
1980         member function.
1982 2014-12-10  David Malcolm  <dmalcolm@redhat.com>
1984         * docs/cp/index.rst: New file.
1985         * docs/cp/intro/index.rst: New file.
1986         * docs/cp/intro/tutorial01.rst: New file.
1987         * docs/cp/intro/tutorial02.rst: New file.
1988         * docs/cp/intro/tutorial03.rst: New file.
1989         * docs/cp/intro/tutorial04.rst: New file.
1990         * docs/cp/topics/contexts.rst: New file.
1991         * docs/cp/topics/expressions.rst: New file.
1992         * docs/cp/topics/functions.rst: New file.
1993         * docs/cp/topics/index.rst: New file.
1994         * docs/cp/topics/locations.rst: New file.
1995         * docs/cp/topics/objects.rst: New file.
1996         * docs/cp/topics/results.rst: New file.
1997         * docs/cp/topics/types.rst: New file.
1998         * docs/examples/tut01-hello-world.cc: New file.
1999         * docs/examples/tut02-square.c: Fix missing newline in output.
2000         * docs/examples/tut02-square.cc: New file.
2001         * docs/examples/tut03-sum-of-squares.cc: New file.
2002         * docs/examples/tut04-toyvm/toyvm.cc: New file.
2003         * docs/index.rst: Move summary to above the table of contents.
2004         Add text about the C vs C++ APIs.
2005         * docs/topics/contexts.rst: Fix a typo.
2007         * docs/_build/texinfo/libgccjit.texi: Regenerate.
2008         * docs/_build/texinfo/factorial1.png: New file.
2009         * docs/_build/texinfo/sum-of-squares1.png: New file.
2011 2014-12-09  David Malcolm  <dmalcolm@redhat.com>
2013         * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move
2014         logic for determine "funcname" to new function...
2015         (get_function_name): ...here, adding logic to skip any leading
2016         path from the filename.
2017         (toyvm_function_parse): Use the filename for fn_filename, rather
2018         than "name", so that the debugger can locate the source .toy
2019         file.
2020         (toyvm_function_parse): Don't fclose a NULL FILE *.
2022 2014-12-09  David Malcolm  <dmalcolm@redhat.com>
2024         PR jit/63854
2025         * docs/internals/index.rst (Running under valgrind): New
2026         subsection.
2027         (docs/_build/texinfo/libgccjit.texi): Regenerate.
2029 2014-12-09  David Malcolm  <dmalcolm@redhat.com>
2031         PR jit/64206
2032         * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o.
2033         * jit-common.h (gcc::jit::tempdir): New forward decl.
2034         * jit-playback.c: Include jit-tempdir.h.
2035         (gcc::jit::playback::context::context): Initialize m_tempdir.
2036         (gcc::jit::playback::context::~context): Move tempdir
2037         cleanup to new file jit-tempdir.c
2038         (make_tempdir_path_template): Move to new file jit-tempdir.c.
2039         (gcc::jit::playback::context::compile): Move tempdir creation
2040         to new tempdir object in new file jit-tempdir.c.
2041         (gcc::jit::playback::context::make_fake_args): Get path from
2042         tempdir object rather than from member data.
2043         (gcc::jit::playback::context::convert_to_dso): Likewise.
2044         (gcc::jit::playback::context::dlopen_built_dso): Likewise.
2045         (gcc::jit::playback::context::dump_generated_code): Likewise.
2046         (gcc::jit::playback::context::get_path_c_file): New function.
2047         (gcc::jit::playback::context::get_path_s_file): New function.
2048         (gcc::jit::playback::context::get_path_so_file): New function.
2049         * jit-playback.h (gcc::jit::playback::context::get_path_c_file):
2050         New function.
2051         (gcc::jit::playback::context::get_path_s_file): New function.
2052         (gcc::jit::playback::context::get_path_so_file): New function.
2053         (gcc::jit::playback::context): Move fields "m_path_template",
2054         "m_path_tempdir", "m_path_c_file", "m_path_s_file",
2055         "m_path_so_file" to new jit::tempdir class; add field "m_tempdir".
2056         * jit-tempdir.c: New file.
2057         * jit-tempdir.h: New file.
2059 2014-12-09  David Malcolm  <dmalcolm@redhat.com>
2061         * jit-playback.c (gcc::jit::playback::context::compile): Acquire the
2062         mutex here, immediately before using toplev, and release it here, on
2063         each exit path after acquisition.
2064         (jit_mutex): Move this variable here, from jit-recording.c.
2065         (gcc::jit::playback::context::acquire_mutex): New function, based on
2066         code in jit-recording.c.
2067         (gcc::jit::playback::context::release_mutex): Likewise.
2068         * jit-playback.h (gcc::jit::playback::context::acquire_mutex): New
2069         function.
2070         (gcc::jit::playback::context::release_mutex): New function.
2071         * jit-recording.c (jit_mutex): Move this variable to jit-playback.c.
2072         (gcc::jit::recording::context::compile): Move mutex-handling from
2073         here into jit-playback.c's gcc::jit::playback::context::compile.
2074         * notes.txt: Update to show the new locations of ACQUIRE_MUTEX
2075         and RELEASE_MUTEX.
2077 2014-12-09  David Malcolm  <dmalcolm@redhat.com>
2079         * jit-playback.c (gcc::jit::playback::context::compile): Move the
2080         dlopen code into...
2081         (gcc::jit::playback::context::dlopen_built_dso): ...this new
2082         function.
2083         * jit-playback.h (gcc::jit::playback::context::dlopen_built_dso):
2084         New function.
2086 2014-12-09  David Malcolm  <dmalcolm@redhat.com>
2088         PR jit/64166
2089         * docs/topics/contexts.rst (Debugging): Add description of
2090         gcc_jit_context_enable_dump.
2091         * docs/_build/texinfo/libgccjit.texi: Regenerate.
2092         * jit-playback.c: Include context.h.
2093         (class auto_argvec): New class.
2094         (auto_argvec::~auto_argvec): New function.
2095         (gcc::jit::playback::context::compile): Convert fake_args to be
2096         an auto_argvec, so that it can contain dynamically-allocated
2097         strings.   Construct a vec of all requested dumps, and pass it to
2098         make_fake_args.  Extract requested dumps between the calls to
2099         toplev::main and toplev::finalize.
2100         (gcc::jit::playback::context::make_fake_args): Convert param
2101         "argvec" to be a vec <char *>, and gain a "requested_dumps"
2102         param.  Convert to dynamically-allocated arg strings by converting
2103         ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP
2104         for args that are already a copy.  Add args for all requested dumps.
2105         (gcc::jit::playback::context::extract_any_requested_dumps): New
2106         function.
2107         (gcc::jit::playback::context::read_dump_file): New function.
2108         * jit-playback.h (gcc::jit::playback::context::make_fake_args):
2109         Convert param "argvec" to be a vec <char *>, and gain a
2110         "requested_dumps" param.
2111         (gcc::jit::playback::context::extract_any_requested_dumps): New
2112         function.
2113         (gcc::jit::playback::context::read_dump_file): New function.
2114         * jit-recording.c (gcc::jit::recording::context::enable_dump): New
2115         function.
2116         (gcc::jit::recording::context::get_all_requested_dumps): New
2117         function.
2118         * jit-recording.h (gcc::jit::recording::requested_dump): New
2119         struct.
2120         (gcc::jit::recording::context::enable_dump): New function.
2121         (gcc::jit::recording::context::get_all_requested_dumps): New
2122         function.
2123         (gcc::jit::recording::context::m_requested_dumps): New field.
2124         * libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint.
2125         * libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint.
2126         * libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint.
2128 2014-12-08  David Malcolm  <dmalcolm@redhat.com>
2130         * libgccjit++.h: Indent the forward declarations of the classes to
2131         show the inheritance hierarchy.
2133 2014-12-08  David Malcolm  <dmalcolm@redhat.com>
2135         * notes.txt: Show the beginning and ending of
2136         recording::context::compile vs playback::context::compile.  Show
2137         the creation and unlinking of the tempdir.  Show toplev::finalize.
2138         Move "RELEASE MUTEX" to the correct location.  Show
2139         gcc_jit_result_release, and indicate where the
2140         dlopen/dlsym/dlclose occur.
2142 2014-12-01  David Malcolm  <dmalcolm@redhat.com>
2144         * docs/examples/tut02-square.c (main): Release the context
2145         earlier, to show that this is possible.  Update error-handling
2146         to avoid a double-release of the context, and to avoid
2147         releasing a NULL result.
2148         * docs/intro/tutorial02.rst: Discuss gcc_jit_context_release.
2149         * docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize
2150         * docs/topics/results.rst (gcc_jit_result): Mention that this
2151         controls the lifetimes of machine code functions.
2152         (gcc_jit_result_get_code): Spell out the requirements for this
2153         to succeed, and the lifetime of the result.
2154         (gcc_jit_result_release): Mention that this invalidates any code
2155         that was obtained from the result.
2156         * docs/_build/texinfo/libgccjit.texi: Regenerate.
2158 2014-12-01  David Malcolm  <dmalcolm@redhat.com>
2160         PR jit/64018
2161         * docs/intro/tutorial02.rst: Spell out lifetime of generated code.
2162         Add description of error-handling, taken in part from...
2163         * docs/topics/contexts.rst (Error-handling): Expand, and move some
2164         content to tutorial02.rst.
2165         * docs/_build/texinfo/libgccjit.texi: Regenerate.
2167 2014-12-01  David Malcolm  <dmalcolm@redhat.com>
2169         PR jit/64020
2170         * docs/topics/types.rst (Standard types) Add new enum values to
2171         the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT,
2172         GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
2173         Widen the left-hand column so that
2174         GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit.
2175         * docs/_build/texinfo/libgccjit.texi: Regenerate.
2177         * jit-builtins.c: Include stringpool.h and jit-playback.h.
2178         Move everything out of the gcc::jit::recording namespace into
2179         just gcc::jit.
2180         (struct builtin_data): Add fields "fnclass", "attr", and
2181         "implicit_p".
2182         (DEF_BUILTIN): Update macro so populate the new fields.
2183         (builtins_manager::builtins_manager): Update for move out of
2184         recording namespace.  Initialize the m_attributes array.
2185         (builtins_manager::get_builtin_function): Likewise.
2186         (builtins_manager::get_builtin_function_by_id): New function.
2187         (builtins_manager::make_builtin_function): Update for move out of
2188         recording namespace.  Add fix for PR jit/64020 by detecting
2189         specific builtin ids and having them ensure that builtins for
2190         other ids are created as necessary.
2191         (builtins_manager::get_type): Update for move out of recording
2192         namespace.
2193         (builtins_manager::make_type): Likewise.  Add some missing
2194         #undefs.
2195         (builtins_manager::make_primitive_type): Update for move out of
2196         recording namespace.  Implement the three BT_COMPLEX_ cases and
2197         BT_DOUBLE_PTR.
2198         (builtins_manager::make_fn_type): Update for move out of recording
2199         namespace.
2200         (builtins_manager::make_ptr_type): Likewise.
2201         (builtins_manager::finish_playback): New function.
2202         (builtins_manager::get_class): New function.
2203         (builtins_manager::implicit_p): New function.
2204         (builtins_manager::get_attrs_tree): Two new functions.
2205         (builtins_manager::make_attrs_tree): New function.
2207         * jit-builtins.h: Move everything out of the gcc::jit::recording
2208         namespace into just gcc::jit.
2209         (enum built_in_attribute): New.
2210         (builtins_manager::builtins_manager): Update decl for namespace
2211         change.
2212         (builtins_manager::get_builtin_function): Likewise.
2213         (builtins_manager::get_class): New.
2214         (builtins_manager::implicit_p): New.
2215         (builtins_manager::get_attrs_tree): Two new functions.
2216         (builtins_manager::make_attrs_tree): New function.
2217         (builtins_manager::finish_playback): New.
2218         (builtins_manager::get_builtin_function_by_id): New.
2219         (builtins_manager::make_builtin_function): Update decl for
2220         namespace change.
2221         (builtins_manager::get_type): Likewise.
2222         (builtins_manager::make_type): Likewise.
2223         (builtins_manager::make_primitive_type): Likewise.
2224         (builtins_manager::make_fn_type): Likewise.
2225         (builtins_manager::make_ptr_type): Likewise.
2226         (builtins_manager): Likewise for fields.  Add new field
2227         "m_attributes".
2229         * jit-common.h (NUM_GCC_JIT_TYPES): Update.
2230         (builtins_manager): Update forward decl to reflect namespace
2231         change.
2233         * jit-playback.c: Include attribs.h and jit-builtins.h.
2234         (gcc::jit::playback::context::get_tree_node_for_type): Add cases
2235         for the new COMPLEX_ types.
2236         (gcc::jit::playback::context::new_function): If creating a
2237         builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl,
2238         and call set_builtin_decl.
2239         (gcc::jit::playback::context::replay): If we have a
2240         builtins_manager, call its finish_playback method when we're done.
2242         * jit-playback.h:
2243         (gcc::jit::playback::context::get_builtins_manager): New function.
2245         * jit-recording.c
2246         (gcc::jit::recording::context::get_builtins_manager): New function.
2247         (gcc::jit::recording::get_builtin_function): Use
2248         get_builtins_manager, in case we're a child context.
2249         (gcc::jit::recording::memento_of_get_type::dereference): Add the
2250         COMPLEX_ types.
2251         (gcc::jit::recording::memento_of_get_type::is_int): Likewise.
2252         (gcc::jit::recording::memento_of_get_type::is_float): Likewise.
2253         (gcc::jit::recording::memento_of_get_type::is_bool): Likewise.
2254         (get_type_strings): Likewise.
2256         * jit-recording.h
2257         (gcc::jit::recording::context::get_builtins_manager): New.
2259         * libgccjit.h (enum gcc_jit_types): Add
2260         GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE,
2261         GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
2263 2014-12-01  David Malcolm  <dmalcolm@redhat.com>
2265         * jit-builtins.c
2266         (gcc::jit::recording::builtins_manager::get_builtin_function):
2267         Check for NULL return from make_builtin_function.
2268         (gcc::jit::recording::builtins_manager::make_builtin_function):
2269         Check for NULL return from get_type.
2271 2014-12-01  David Malcolm  <dmalcolm@redhat.com>
2273         * jit-playback.c (gcc::jit::playback::context::compile): Move DSO
2274         creation code into...
2275         (gcc::jit::playback::context::convert_to_dso): New function.
2276         * jit-playback.h (gcc::jit::playback::context::convert_to_dso):
2277         New function.
2279 2014-12-01  David Malcolm  <dmalcolm@redhat.com>
2281         * jit-playback.c (gcc::jit::playback::context::compile): Use an
2282         auto_vec<const char *> rather than a const char *[20] for the
2283         top-level argv, and move the logic to build it to...
2284         (gcc::jit::playback::context::make_fake_args): New function.
2285         * jit-playback.h (gcc::jit::playback::context::make_fake_args):
2286         New function.
2288 2014-12-01  David Malcolm  <dmalcolm@redhat.com>
2290         * Make-lang.in (jit_OBJS): Add jit/jit-result.o.
2291         * jit-playback.c: Include new header jit-result.h.
2292         (gcc::jit::result::result): Move to new file jit-result.c.
2293         (gcc::jit::result::~result): Likewise.
2294         (gcc::jit::playback::result): Likewise.
2295         * jit-recording.h (class gcc::jit::result): Move to new
2296         header jit-result.h.
2297         * jit-result.c: New file, to contain...
2298         (gcc::jit::result::result): Move here from jit-playback.c,
2299         removing erroneous "playback" namespace from comment.
2300         (gcc::jit::result::~result): Likewise.
2301         (gcc::jit::playback::result): Likewise.
2302         * jit-result.h: New file, to contain...
2303         (class gcc::jit::result): Move from jit-recording.h.
2304         * libgccjit.c: Include jit-result.h.
2305         (gcc_jit_result_get_code): Update comment to reflect move
2306         of implementation.
2307         (gcc_jit_result_release): Likewise.
2309 2014-12-01  David Malcolm  <dmalcolm@redhat.com>
2311         PR jit/63854
2312         * docs/examples/tut04-toyvm/toyvm.c
2313         (toyvm_compiled_function): New typedef.
2314         (toyvm_compiled_func) Rename to...
2315         (toyvm_compiled_code) ...this.
2316         (struct toyvm_compiled_function): New struct.
2317         (toyvm_function_compile): Return a toyvm_compiled_function *
2318         rather than a toyvm_compiled_func, so that the caller can fully
2319         clean things up.  Free "funcname".
2320         (test_script): Update for change to toyvm_function_compile.
2321         Clean up the toyvm_compiled_function.
2322         (main): Likewise.
2323         (docs/intro/tutorial04.rst): Update to reflect the above changes,
2324         and to better spell out the lifetime of the compiled code.
2326 2014-12-01  David Malcolm  <dmalcolm@redhat.com>
2328         PR jit/63854
2329         * jit-builtins.c
2330         (gcc::jit::recording::builtins_manager::make_fn_type): Call the
2331         context's new_function_type method, rather than directly creating
2332         a function_type instance.
2333         * jit-recording.c
2334         (gcc::jit::recording::context::new_function_type): New method,
2335         adapted from part of...
2336         (gcc::jit::recording::context::new_function_ptr_type): ...this.
2337         Update to call new_function_type.
2338         * jit-recording.h
2339         (gcc::jit::recording::context::new_function_type): New method.
2341 2014-12-01  David Malcolm  <dmalcolm@redhat.com>
2343         PR jit/63969
2344         * jit-playback.c: Ensure that ctxt_progname is non-NULL.
2346 2014-11-19  David Malcolm  <dmalcolm@redhat.com>
2348         PR jit/63854
2349         * jit-playback.c (gcc::jit::playback::compound_type::set_fields):
2350         Convert param from const vec<playback::field *> & to
2351         const auto_vec<playback::field *> *.
2352         (gcc::jit::playback::context::new_function_type): Convert param
2353         "param_types" from vec<type *> * to const auto_vec<type *> *.
2354         (gcc::jit::playback::context::new_function): Convert param
2355         "params" from vec<param *> * to const auto_vec<param *> *.
2356         (gcc::jit::playback::context::build_call): Convert param "args"
2357         from vec<rvalue *> to const auto_vec<rvalue *> *.
2358         (gcc::jit::playback::context::new_call): Likewise.
2359         (gcc::jit::playback::context::new_call_through_ptr): Likewise.
2360         (wrapper_finalizer): New function.
2361         (gcc::jit::playback::wrapper::operator new): Call the finalizer
2362         variant of ggc_internal_cleared_alloc, supplying
2363         wrapper_finalizer.
2364         (gcc::jit::playback::function::finalizer): New.
2365         (gcc::jit::playback::block::finalizer): New.
2366         (gcc::jit::playback::source_file::finalizer): New.
2367         (gcc::jit::playback::source_line::finalizer): New.
2369         * jit-playback.h
2370         (gcc::jit::playback::context::new_function_type): Convert param
2371         "param_types" from vec<type *> * to const auto_vec<type *> *.
2372         (gcc::jit::playback::context::new_function): Convert param
2373         "params" from vec<param *> * to const auto_vec<param *> *.
2374         (gcc::jit::playback::context::new_call): Convert param
2375         "args" from vec<rvalue *> to const auto_vec<rvalue *> *.
2376         (gcc::jit::playback::context::new_call_through_ptr): Likewise.
2377         (gcc::jit::playback::context::build_call): Likewise.
2378         (gcc::jit::playback::context): Convert fields "m_functions",
2379         "m_source_files", "m_cached_locations" from vec to auto_vec.
2380         (gcc::jit::playback::wrapper::finalizer): New virtual function.
2381         (gcc::jit::playback::compound_type::set_fields): Convert param fro
2382         const vec<playback::field *> & to
2383         const auto_vec<playback::field *> *.
2384         (gcc::jit::playback::function::finalizer): New.
2385         (gcc::jit::playback::block::finalizer): New.
2386         (gcc::jit::playback::source_file::finalizer): New.
2387         (gcc::jit::playback::source_line::finalizer): New.
2389         * jit-recording.c
2390         (gcc::jit::recording::function_type::replay_into): Convert local
2391         from a vec into an auto_vec.
2392         (gcc::jit::recording::fields::replay_into): Likewise.
2393         (gcc::jit::recording::function::replay_into): Likewise.
2394         (gcc::jit::recording::call::replay_into): Likewise.
2395         (gcc::jit::recording::call_through_ptr::replay_into): Likewise.
2397         * jit-recording.h (gcc::jit::recording::context): Convert fields
2398         "m_mementos", "m_compound_types", "m_functions" from vec<> to
2399         auto_vec <>.
2400         (gcc::jit::recording::function_type::get_param_types): Convert
2401         return type from vec<type *> to const vec<type *> &.
2402         (gcc::jit::recording::function_type): Convert field
2403         "m_param_types" from a vec<> to an auto_vec<>.
2404         (gcc::jit::recording::fields): Likewise for field "m_fields".
2405         (gcc::jit::recording::function::get_params): Convert return type
2406         from vec <param *> to const vec<param *> &.
2407         (gcc::jit::recording::function): Convert fields "m_params",
2408         "m_locals", "m_blocks" from vec<> to auto_vec<>.
2409         (gcc::jit::recording::block): Likewise for field "m_statements".
2410         vec<> to auto_vec<>.
2411         (gcc::jit::recording::call): Likewise for field "m_args".
2412         (gcc::jit::recording::call_through_ptr): Likewise.
2414 2014-11-19  David Malcolm  <dmalcolm@redhat.com>
2416         PR jit/63854
2417         * jit-recording.c (recording::function::validate): Convert
2418         "worklist" from vec<> to autovec<> to fix a leak.
2420 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
2422         * ChangeLog.jit: New.
2423         * ChangeLog: New.
2424         * Make-lang.in: New.
2425         * TODO.rst: New.
2426         * config-lang.in: New.
2427         * docs/Makefile: New.
2428         * docs/_build/texinfo/Makefile: New.
2429         * docs/_build/texinfo/factorial.png: New.
2430         * docs/_build/texinfo/libgccjit.texi: New.
2431         * docs/_build/texinfo/sum-of-squares.png: New.
2432         * docs/conf.py: New.
2433         * docs/examples/tut01-hello-world.c: New.
2434         * docs/examples/tut02-square.c: New.
2435         * docs/examples/tut03-sum-of-squares.c: New.
2436         * docs/examples/tut04-toyvm/Makefile: New.
2437         * docs/examples/tut04-toyvm/factorial.toy: New.
2438         * docs/examples/tut04-toyvm/fibonacci.toy: New.
2439         * docs/examples/tut04-toyvm/toyvm.c: New.
2440         * docs/index.rst: New.
2441         * docs/internals/index.rst: New.
2442         * docs/intro/factorial.png: New.
2443         * docs/intro/index.rst: New.
2444         * docs/intro/sum-of-squares.png: New.
2445         * docs/intro/tutorial01.rst: New.
2446         * docs/intro/tutorial02.rst: New.
2447         * docs/intro/tutorial03.rst: New.
2448         * docs/intro/tutorial04.rst: New.
2449         * docs/topics/contexts.rst: New.
2450         * docs/topics/expressions.rst: New.
2451         * docs/topics/functions.rst: New.
2452         * docs/topics/index.rst: New.
2453         * docs/topics/locations.rst: New.
2454         * docs/topics/objects.rst: New.
2455         * docs/topics/results.rst: New.
2456         * docs/topics/types.rst: New.
2457         * dummy-frontend.c: New.
2458         * jit-builtins.c: New.
2459         * jit-builtins.h: New.
2460         * jit-common.h: New.
2461         * jit-playback.c: New.
2462         * jit-playback.h: New.
2463         * jit-recording.c: New.
2464         * jit-recording.h: New.
2465         * libgccjit++.h: New.
2466         * libgccjit.c: New.
2467         * libgccjit.h: New.
2468         * libgccjit.map: New.
2469         * notes.txt: New.
2471 2013-07-26  David Malcolm  <dmalcolm@redhat.com>
2473         * Initial creation
2475 Copyright (C) 2013-2017 Free Software Foundation, Inc.
2477 Copying and distribution of this file, with or without modification,
2478 are permitted in any medium without royalty provided the copyright
2479 notice and this notice are preserved.