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