1 2018-01-25 David Malcolm <dmalcolm@redhat.com>
4 * jit-recording.h (gcc::jit::recording::union_): Remove fields
7 2018-01-03 Jakub Jelinek <jakub@redhat.com>
9 Update copyright years.
11 2017-12-19 Jakub Jelinek <jakub@redhat.com>
13 * jit-playback.c (get_type, playback::compile_to_file::copy_file,
14 playback::context::acquire_mutex): Replace Yoda conditions with
15 typical order conditions.
16 * libgccjit.c (gcc_jit_context_new_struct_type,
17 gcc_jit_struct_set_fields, gcc_jit_context_new_union_type,
18 gcc_jit_context_new_function, gcc_jit_timer_pop): Likewise.
19 * jit-builtins.c (matches_builtin): Likewise.
20 * jit-recording.c (recording::compound_type::set_fields,
21 recording::fields::write_reproducer, recording::rvalue::set_scope,
22 recording::function::validate): Likewise.
23 * jit-logging.c (logger::decref): Likewise.
25 2017-11-30 Jakub Jelinek <jakub@redhat.com>
28 (recording::memento_of_new_rvalue_from_const <long>::write_reproducer):
31 2017-11-28 Jakub Jelinek <jakub@redhat.com>
33 * jit-playback.c (add_switch): Build SWITCH_EXPR using build2 instead
34 of build3. Formatting fixes. Adjust funciton comment.
36 2017-11-23 Tom de Vries <tom@codesourcery.com>
38 * libgccjit.c (RETURN_NULL_IF_FAIL_NONNULL_NUMERIC_TYPE): Wrap in
41 2017-10-31 David Malcolm <dmalcolm@redhat.com>
43 * docs/internals/index.rst (Running the test suite): Document
45 (Running under valgrind): Add markup to RUN_UNDER_VALGRIND.
46 * docs/_build/texinfo/libgccjit.texi: Regenerate.
48 2017-10-04 David Malcolm <dmalcolm@redhat.com>
50 * docs/cp/topics/expressions.rst (Vector expressions): New
52 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_10): New ABI tag.
53 * docs/topics/expressions.rst (Vector expressions): New section.
54 * docs/topics/types.rst (gcc_jit_type_get_vector): Add link to
55 gcc_jit_context_new_rvalue_from_vector.
56 * docs/_build/texinfo/libgccjit.texi: Regenerate.
57 * jit-common.h (gcc::jit:recording::vector_type): New forward
60 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
62 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
63 * jit-recording.c: In namespace gcc::jit::
64 (class comma_separated_string): New class.
65 (comma_separated_string::comma_separated_string): New ctor,
66 adapted from recording::call::make_debug_string.
67 (comma_separated_string::~comma_separated_string): New dtor.
68 In namespace gcc::jit::recording::
69 (context::new_rvalue_from_vector): New method.
70 (type::get_vector): Update for renaming of memento_of_get_vector.
71 (class memento_of_get_vector): Rename to...
72 (class vector_type): ..this.
73 (memento_of_new_rvalue_from_vector::memento_of_new_rvalue_from_vector):
75 (memento_of_new_rvalue_from_vector::replay_into): New method.
76 (memento_of_new_rvalue_from_vector::visit_children): New method.
77 (memento_of_new_rvalue_from_vector::make_debug_string): New
79 (memento_of_new_rvalue_from_vector::write_reproducer): New method.
80 (call::make_debug_string): Split out arg-printing code into ctor
81 for comma_separated_string.
82 * jit-recording.h: In namespace gcc::jit::recording::
83 (context::new_rvalue_from_vector): New method.
84 (type::dyn_cast_vector_type): New virtual function.
85 (class memento_of_get_vector): Rename to...
86 (class vector_type): ...this.
87 (vector_type::unqualified): Remove this vfunc override in favor
89 (vector_type::get_element_type): ...this new method.
90 (vector_type::get_num_units): New method.
91 (vector_type::dyn_cast_vector_type): New vfunc override.
92 (class memento_of_new_rvalue_from_vector): New class.
93 * libgccjit++.h (gccjit::context::new_rvalue): Add overload for
95 * libgccjit.c (gcc_jit_context_new_binary_op): Strip off type
96 qualifications when checking that both operands have same type.
97 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
99 (LIBGCCJIT_HAVE_gcc_jit_context_new_rvalue_from_vector): New
101 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
102 * libgccjit.map (LIBGCCJIT_ABI_10): New ABI tag.
104 2017-09-28 David Malcolm <dmalcolm@redhat.com>
106 * docs/topics/expressions.rst (Function calls): Add link to
107 gcc_jit_context_new_function_ptr_type.
108 (Function pointers): Convert to cross-references to
109 function-pointers.rst, moving material there.
110 * docs/topics/function-pointers.rst: New page.
111 * docs/topics/index.rst: Add function-pointers.rst.
112 * docs/topics/types.rst (Function pointer types): New section.
113 * docs/_build/texinfo/libgccjit.texi: Regenerate.
115 2017-09-28 David Malcolm <dmalcolm@redhat.com>
118 (gcc::jit::recording::function_type::is_same_type_as): New function.
119 * jit-recording.h: In namespace gcc::jit::recording::
120 (type::accepts_writes_from): Use is_same_type_as rather than pointer
122 (type::is_same_type_as): New virtual function.
123 (function_type::is_same_type_as): New override.
125 2017-09-27 David Malcolm <dmalcolm@redhat.com>
127 * docs/cp/topics/expressions.rst (Function pointers): New section.
128 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_9): New tag.
129 * docs/topics/expressions.rst (Function pointers): New section.
130 * docs/_build/texinfo/libgccjit.texi: Regenerate.
131 * jit-common.h (class gcc::jit::recording::function_pointer): New
133 * jit-playback.c (gcc::jit::playback::function::get_address): New
135 * jit-playback.h (gcc::jit::playback::function::get_address): New
137 * jit-recording.c: Within namespace gcc::jit::recording...
138 (function::function): Initialize new field "m_fn_ptr_type".
139 (function::get_address): New method.
140 (function_pointer::replay_into): New method.
141 (function_pointer::visit_children): New method.
142 (function_pointer::make_debug_string): New method.
143 (function_pointer::write_reproducer): New method.
144 * jit-recording.h: Within namespace gcc::jit::recording...
145 (function::get_address): New method.
146 (function): Add field "m_fn_ptr_type".
147 (class function_pointer): New subclass of rvalue.
148 * libgccjit++.h (gccjit::function::get_address): New method.
149 * libgccjit.c (gcc_jit_function_get_address): New function.
150 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_function_get_address): New
152 (gcc_jit_function_get_address): New API entrypoint.
153 * libgccjit.map (LIBGCCJIT_ABI_9): New tag.
155 2017-09-14 David Malcolm <dmalcolm@redhat.com>
158 * jit-builtins.c (matches_builtin): Ignore entries with a NULL
161 2017-08-18 David Malcolm <dmalcolm@redhat.com>
163 PR tree-optimization/46805
164 * dummy-frontend.c (jit_langhook_parse_file): Handle vector types.
166 2017-08-18 David Malcolm <dmalcolm@redhat.com>
168 * jit-recording.c (class gcc::jit::reproducer): Rename field
169 "m_identifiers" to "m_map_memento_to_identifier". Add field
170 "m_set_identifiers" and struct hash_traits for it.
171 (gcc::jit::reproducer::reproducer): Update for above.
172 (convert_to_identifier): New function.
173 (gcc::jit::reproducer::ensure_identifier_is_unique): New method.
174 (gcc::jit::reproducer::make_identifier): Avoid appending the %p
175 unless necessary for uniqueness. Update for field renaming.
176 (gcc::jit::reproducer::get_identifier): Update for field renaming.
178 2017-08-09 David Malcolm <dmalcolm@redhat.com>
180 * docs/cp/topics/types.rst (Vector types): New section.
181 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_8): New tag.
182 * docs/topics/types.rst (gcc_jit_context_get_type): Fix typo in
184 (Vector types): New section.
185 * docs/_build/texinfo/libgccjit.texi: Regenerate.
186 * jit-playback.c (gcc::jit::playback::type::get_vector): New
188 * jit-playback.h (gcc::jit::playback::type::get_vector): New
190 * jit-recording.c: In namespace gcc::jit::recording::
191 (type::get_vector): New method.
192 (memento_of_get_aligned::write_reproducer): Fix typo
194 (memento_of_get_vector::replay_into): New method.
195 (memento_of_get_vector::make_debug_string): New method.
196 (memento_of_get_vector::write_reproducer): New method.
197 * jit-recording.h: In namespace gcc::jit::recording::
198 (type::get_vector): New
200 (class memento_of_get_vector): New class.
201 * libgccjit++.h (gccjit::type::get_vector): New method.
202 * libgccjit.c (gcc_jit_type_get_vector): New public entrypoint.
203 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_type_get_vector): New
205 (gcc_jit_type_get_vector): New decl.
206 * libgccjit.map (LIBGCCJIT_ABI_8): New ABI tag.
208 2017-07-05 Richard Sandiford <richard.sandiford@linaro.org>
209 Alan Hayward <alan.hayward@arm.com>
210 David Sherwood <david.sherwood@arm.com>
212 * dummy-frontend.c (jit_langhook_type_for_mode): Remove "enum" before
215 2017-04-24 David Malcolm <dmalcolm@redhat.com>
217 * docs/cp/topics/types.rst (gccjit::type::get_const): Remove
219 (gccjit::type::get_aligned): Add.
220 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_7.
221 * docs/topics/types.rst: Add gcc_jit_type_get_aligned.
222 * docs/_build/texinfo/libgccjit.texi: Regenerate.
223 * jit-playback.c (gcc::jit::playback::type::get_aligned): New
225 * jit-playback.h (gcc::jit::playback::type::get_aligned): New
227 * jit-recording.c: Within namespace gcc::jit::recording...
228 (type::get_aligned): New method.
229 (memento_of_get_aligned::replay_into): New method.
230 (memento_of_get_aligned::make_debug_string): New method.
231 (memento_of_get_aligned::write_reproducer): New method.
232 * jit-recording.h: Within namespace gcc::jit::recording...
233 (type::get_aligned): New method.
234 (type::accepts_writes_from): Strip off qualifications from
235 this when comparing pointer equality.
236 (decorated_type): New subclass of type, subsuming the
237 commonality between memento_of_get_const and
238 memento_of_get_volatile.
239 (memento_of_get_const): Make a subclass of decorated_type,
241 (memento_of_get_volatile): Likewise.
242 (memento_of_get_aligned): Likewise.
243 * libgccjit++.h: Within namespace gccjit...
244 (type::get_const): New method.
245 (type::get_aligned): New method.
246 * libgccjit.c (gcc_jit_type_get_aligned): New function.
247 * libgccjit.h (gcc_jit_type_get_aligned): New decl.
248 * libgccjit.map (LIBGCCJIT_ABI_7): New
249 (gcc_jit_type_get_aligned): Add.
251 2017-01-19 David Malcolm <dmalcolm@redhat.com>
253 * dummy-frontend.c (jit_langhook_type_for_size): Delete.
254 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
256 2017-01-18 David Malcolm <dmalcolm@redhat.com>
258 * dummy-frontend.c (jit_langhook_type_for_size): Implement, using
259 lto's lto_type_for_size.
261 2017-01-01 Jakub Jelinek <jakub@redhat.com>
263 Update copyright years.
265 2016-05-20 David Malcolm <dmalcolm@redhat.com>
267 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_6.
268 * docs/topics/expressions.rst (Function calls): Add documentation
269 of gcc_jit_rvalue_set_bool_require_tail_call.
270 * docs/_build/texinfo/libgccjit.texi: Regenerate.
271 * jit-common.h (gcc::jit::recording::base_call): Add forward decl.
272 * jit-playback.c: Within namespace gcc::jit::playback...
273 (context::build_call) Add "require_tail_call" param and use it
274 to set CALL_EXPR_MUST_TAIL_CALL.
275 (context::new_call): Add "require_tail_call" param.
276 (context::new_call_through_ptr): Likewise.
277 * jit-playback.h: Within namespace gcc::jit::playback...
278 (context::new_call: Add "require_tail_call" param.
279 (context::new_call_through_ptr): Likewise.
280 (context::build_call): Likewise.
281 * jit-recording.c: Within namespace gcc::jit::recording...
282 (base_call::base_call): New constructor.
283 (base_call::write_reproducer_tail_call): New method.
284 (call::call): Update for inheritance from base_call.
285 (call::replay_into): Provide m_require_tail_call to call
287 (call::write_reproducer): Call write_reproducer_tail_call.
288 (call_through_ptr::call_through_ptr): Update for inheritance from
290 (call_through_ptr::replay_into): Provide m_require_tail_call to call
291 to new_call_through_ptr.
292 (recording::call_through_ptr::write_reproducer): Call
293 write_reproducer_tail_call.
294 * jit-recording.h: Within namespace gcc::jit::recording...
295 (rvalue::dyn_cast_base_call): New virtual function.
296 (class base_call): New subclass of class rvalue.
297 (class call): Inherit from base_call rather than directly from
298 rvalue, moving get_precedence and m_args to base_call.
299 (class call_through_ptr): Likewise.
300 * libgccjit.c (gcc_jit_rvalue_set_bool_require_tail_call): New
303 (LIBGCCJIT_HAVE_gcc_jit_rvalue_set_bool_require_tail_call): New
305 (gcc_jit_rvalue_set_bool_require_tail_call): New function.
306 * libgccjit.map (LIBGCCJIT_ABI_6): New.
307 (gcc_jit_rvalue_set_bool_require_tail_call): Add.
309 2016-05-17 David Malcolm <dmalcolm@redhat.com>
311 * dummy-frontend.c: Include diagnostic.h.
312 (jit_begin_diagnostic): New function.
313 (jit_end_diagnostic): New function.
314 (jit_langhook_init): Register jit_begin_diagnostic
315 and jit_end_diagnostic with the global_dc.
316 * jit-playback.c: Include diagnostic.h.
317 (gcc::jit::playback::context::add_diagnostic): New method.
318 * jit-playback.h (struct diagnostic_context): Add forward
320 (gcc::jit::playback::context::add_diagnostic): New method.
322 2016-05-17 David Malcolm <dmalcolm@redhat.com>
324 * docs/topics/expressions.rst (Function calls): Document
325 gcc_jit_context_new_call_through_ptr.
326 * docs/_build/texinfo/libgccjit.texi: Regenerate.
328 2016-05-13 David Malcolm <dmalcolm@redhat.com>
330 * jit-playback.h: Within namespace gcc:jit::playback...
331 (compile_to_memory::postprocess): Mark with FINAL OVERRIDE.
332 (compile_to_file::postprocess): Likewise.
333 (function::finalizer): Likewise.
334 (block::finalizer): Likewise.
335 (source_file::finalizer): Likewise.
336 (source_line::finalizer): Likewise.
337 * jit-recording.c (gcc::jit::rvalue_usage_validator):: Likewise.
338 * jit-recording.h: Within namespace gcc::jit::recording...
339 (string::replay_into): Mark with FINAL OVERRIDE.
340 (string::make_debug_string): Likewise.
341 (string::write_reproducer): Likewise.
342 (location::replay_into): Likewise.
343 (location::dyn_cast_location): Likewise.
344 (location::make_debug_string): Likewise.
345 (location::write_reproducer): Likewise.
346 (memento_of_get_type::dereference): Likewise.
347 (memento_of_get_type::accepts_writes_from): Likewise.
348 (memento_of_get_type::is_int): Likewise.
349 (memento_of_get_type::is_float): Likewise.
350 (memento_of_get_type::is_bool): Likewise.
351 (memento_of_get_type::is_pointer): Likewise.
352 (memento_of_get_type::is_array): Likewise.
353 (memento_of_get_type::is_void): Likewise.
354 (memento_of_get_type::replay_into): Likewise.
355 (memento_of_get_type::make_debug_string): Likewise.
356 (memento_of_get_type::write_reproducer): Likewise.
357 (memento_of_get_pointer::dereference): Likewise.
358 (memento_of_get_pointer::accepts_writes_from): Likewise.
359 (memento_of_get_pointer::replay_into): Likewise.
360 (memento_of_get_pointer::is_int): Likewise.
361 (memento_of_get_pointer::is_float): Likewise.
362 (memento_of_get_pointer::is_bool): Likewise.
363 (memento_of_get_pointer::is_pointer): Likewise.
364 (memento_of_get_pointer::is_array): Likewise.
365 (memento_of_get_pointer::make_debug_string): Likewise.
366 (memento_of_get_pointer::write_reproducer): Likewise.
367 (memento_of_get_const::dereference): Likewise.
368 (memento_of_get_const::accepts_writes_from): Likewise.
369 (memento_of_get_const::unqualified): Likewise.
370 (memento_of_get_const::is_int): Likewise.
371 (memento_of_get_const::is_float): Likewise.
372 (memento_of_get_const::is_bool): Likewise.
373 (memento_of_get_const::is_pointer): Likewise.
374 (memento_of_get_const::is_array): Likewise.
375 (memento_of_get_const::void replay_into): Likewise;
376 (memento_of_get_const::make_debug_string): Likewise.
377 (memento_of_get_const::write_reproducer): Likewise.
378 (memento_of_get_volatile::dereference): Likewise.
379 (memento_of_get_volatile::unqualified): Likewise.
380 (memento_of_get_volatile::is_int): Likewise.
381 (memento_of_get_volatile::is_float): Likewise.
382 (memento_of_get_volatile::is_bool): Likewise.
383 (memento_of_get_volatile::is_pointer): Likewise.
384 (memento_of_get_volatile::is_array): Likewise.
385 (memento_of_get_volatile::replay_into): Likewise;
386 (memento_of_get_volatile::make_debug_string): Likewise.
387 (memento_of_get_volatile::write_reproducer): Likewise.
388 (array_type::dereference): Likewise.
389 (array_type::is_int): Likewise.
390 (array_type::is_float): Likewise.
391 (array_type::is_bool): Likewise.
392 (array_type::is_pointer): Likewise.
393 (array_type::is_array): Likewise.
394 (array_type::replay_into): Likewise;
395 (array_type::make_debug_string): Likewise.
396 (array_type::write_reproducer): Likewise.
397 (function_type::dereference): Likewise.
398 (function_type::function_dyn_cast_function_type): Likewise.
399 (function_type::function_as_a_function_type): Likewise.
400 (function_type::is_int): Likewise.
401 (function_type::is_float): Likewise.
402 (function_type::is_bool): Likewise.
403 (function_type::is_pointer): Likewise.
404 (function_type::is_array): Likewise.
405 (function_type::replay_into): Likewise;
406 (function_type::make_debug_string): Likewise.
407 (function_type::write_reproducer): Likewise.
408 (field::replay_into): Likewise;
409 (field::write_to_dump): Likewise.
410 (field::make_debug_string): Likewise.
411 (field::write_reproducer): Likewise.
412 (compound_type::dereference): Likewise.
413 (compound_type::is_int): Likewise.
414 (compound_type::is_float): Likewise.
415 (compound_type::is_bool): Likewise.
416 (compound_type::is_pointer): Likewise.
417 (compound_type::is_array): Likewise.
418 (compound_type::has_known_size): Likewise.
419 (struct_::dyn_cast_struct): Likewise.
420 (struct_::replay_into): Likewise.
421 (struct_::access_as_type): Likewise.
422 (struct_::make_debug_string): Likewise.
423 (struct_::write_reproducer): Likewise.
424 (fields::replay_into): Likewise.
425 (fields::write_to_dump): Likewise.
426 (fields::make_debug_string): Likewise.
427 (fields::write_reproducer): Likewise.
428 (union_::replay_into): Likewise.
429 (union_::make_debug_string): Likewise.
430 (union_::write_reproducer): Likewise.
431 (lvalue::access_as_rvalue): Mark with OVERRIDE.
432 (param::replay_into): Mark with FINAL OVERRIDE.
433 (param::visit_children): Likewise.
434 (param::dyn_cast_param): Likewise.
435 (param::access_as_rvalue): Likewise.
436 (param::access_as_lvalue): Likewise.
437 (param::make_debug_string): Likewise.
438 (param::write_reproducer): Likewise.
439 (param::get_precedence): Likewise.
440 (function::replay_into): Likewise.
441 (function::write_to_dump): Likewise.
442 (function::make_debug_string): Likewise.
443 (function::write_reproducer): Likewise.
444 (block::write_to_dump): Likewise.
445 (block::make_debug_string): Likewise.
446 (block::write_reproducer): Likewise.
447 (block::replay_into): Likewise.
448 (global::replay_into): Likewise;
449 (global::visit_children): Likewise.
450 (global::write_to_dump): Likewise.
451 (global::make_debug_string): Likewise.
452 (global::write_reproducer): Likewise.
453 (global::get_precedence): Likewise.
454 (memento_of_new_rvalue_from_const::replay_into): Likewise.
455 (memento_of_new_rvalue_from_const::visit_children): Likewise.
456 (memento_of_new_rvalue_from_const::is_constant): Likewise.
457 (memento_of_new_rvalue_from_const::get_wide_int): Likewise.
458 (memento_of_new_rvalue_from_const::make_debug_string): Likewise.
459 (memento_of_new_rvalue_from_const::write_reproducer): Likewise.
460 (memento_of_new_rvalue_from_const::get_precedence): Likewise.
461 (memento_of_new_string_literal::replay_into): Likewise.
462 (memento_of_new_string_literal::visit_children): Likewise.
463 (memento_of_new_string_literal::make_debug_string): Likewise.
464 (memento_of_new_string_literal::write_reproducer): Likewise.
465 (memento_of_new_string_literal::get_precedence): Likewise.
466 (unary_op::replay_into): Likewise.
467 (unary_op::visit_children): Likewise.
468 (unary_op::make_debug_string): Likewise.
469 (unary_op::write_reproducer): Likewise.
470 (unary_op::get_precedence): Likewise.
471 (binary_op::replay_into): Likewise.
472 (binary_op::visit_children): Likewise.
473 (binary_op::make_debug_string): Likewise.
474 (binary_op::write_reproducer): Likewise.
475 (binary_op::get_precedence): Likewise.
476 (comparison::replay_into): Likewise.
477 (comparison::visit_children): Likewise.
478 (comparison::make_debug_string): Likewise.
479 (comparison::write_reproducer): Likewise.
480 (comparison::get_precedence): Likewise.
481 (cast::replay_into): Likewise.
482 (cast::visit_children): Likewise.
483 (cast::make_debug_string): Likewise.
484 (cast::write_reproducer): Likewise.
485 (cast::get_precedence): Likewise.
486 (call::replay_into): Likewise.
487 (call::visit_children): Likewise.
488 (call::make_debug_string): Likewise.
489 (call::write_reproducer): Likewise.
490 (call::get_precedence): Likewise.
491 (call_through_ptr::replay_into): Likewise.
492 (call_through_ptr::visit_children): Likewise.
493 (call_through_ptr::make_debug_string): Likewise.
494 (call_through_ptr::write_reproducer): Likewise.
495 (call_through_ptr::get_precedence): Likewise.
496 (array_access::replay_into): Likewise.
497 (array_access::visit_children): Likewise.
498 (array_access::make_debug_string): Likewise.
499 (array_access::write_reproducer): Likewise.
500 (array_access::get_precedence): Likewise.
501 (access_field_of_lvalue::replay_into): Likewise.
502 (access_field_of_lvalue::visit_children): Likewise.
503 (access_field_of_lvalue::make_debug_string): Likewise.
504 (access_field_of_lvalue::write_reproducer): Likewise.
505 (access_field_of_lvalue::get_precedence): Likewise.
506 (access_field_rvalue::replay_into): Likewise.
507 (access_field_rvalue::visit_children): Likewise.
508 (access_field_rvalue::make_debug_string): Likewise.
509 (access_field_rvalue::write_reproducer): Likewise.
510 (access_field_rvalue::get_precedence): Likewise.
511 (dereference_field_rvalue::replay_into): Likewise.
512 (dereference_field_rvalue::visit_children): Likewise.
513 (dereference_field_rvalue::make_debug_string): Likewise.
514 (dereference_field_rvalue::write_reproducer): Likewise.
515 (dereference_field_rvalue::get_precedence): Likewise.
516 (dereference_rvalue::replay_into): Likewise.
517 (dereference_rvalue::visit_children): Likewise.
518 (dereference_rvalue::make_debug_string): Likewise.
519 (dereference_rvalue::write_reproducer): Likewise.
520 (dereference_rvalue::get_precedence): Likewise.
521 (get_address_of_lvalue::replay_into): Likewise.
522 (get_address_of_lvalue::visit_children): Likewise.
523 (get_address_of_lvalue::make_debug_string): Likewise.
524 (get_address_of_lvalue::write_reproducer): Likewise.
525 (get_address_of_lvalue::get_precedence): Likewise.
526 (local::replay_into): Likewise.
527 (local::visit_children): Likewise.
528 (local::write_to_dump): Likewise.
529 (local::make_debug_string): Likewise.
530 (local::write_reproducer): Likewise.
531 (local::get_precedence): Likewise.
532 (statement::write_to_dump): Likewise.
533 (eval::replay_into): Likewise.
534 (eval::make_debug_string): Likewise.
535 (eval::write_reproducer): Likewise.
536 (assignment::replay_into): Likewise.
537 (assignment::make_debug_string): Likewise.
538 (assignment::write_reproducer): Likewise.
539 (assignment_op::replay_into): Likewise.
540 (assignment_op::make_debug_string): Likewise.
541 (assignment_op::write_reproducer): Likewise.
542 (comment::replay_into): Likewise.
543 (comment::make_debug_string): Likewise.
544 (comment::write_reproducer): Likewise.
545 (conditional::replay_into): Likewise.
546 (conditional::get_successor_blocks): Likewise.
547 (conditional::make_debug_string): Likewise.
548 (conditional::write_reproducer): Likewise.
549 (jump::replay_into): Likewise.
550 (jump::get_successor_blocks): Likewise.
551 (jump::make_debug_string): Likewise.
552 (jump::write_reproducer): Likewise.
553 (return_::replay_into): Likewise.
554 (return_::get_successor_blocks): Likewise.
555 (return_::make_debug_string): Likewise.
556 (return_::write_reproducer): Likewise.
557 (case_::replay_into): Likewise.
558 (case_::write_reproducer): Likewise.
559 (case_::make_debug_string): Likewise.
560 (switch_::replay_into): Likewise.
561 (switch_::get_successor_blocks): Likewise.
562 (switch_::make_debug_string): Likewise.
563 (switch_::write_reproducer): Likewise.
565 2016-02-08 David Malcolm <dmalcolm@redhat.com>
567 * dummy-frontend.c (jit_langhook_init): Remove
568 second argument to build_common_tree_nodes to
571 2016-01-23 Iain Buclaw <ibuclaw@gdcproject.org>
573 * jit-playback.c: Include pthread.h.
575 2016-01-19 David Malcolm <dmalcolm@redhat.com>
578 * jit-playback.c (gcc::jit::playback::compile_to_file::postprocess):
579 Potentially add the temporary artifact to the tempdir's list of
580 tempfiles needing additional cleanup.
581 (gcc::jit::playback::context::extract_any_requested_dumps): Likewise
583 * jit-tempdir.c (gcc::jit::tempdir::~tempdir): Clean up additional
585 * jit-tempdir.h (gcc::jit::tempdir::add_temp_file): New method.
586 (gcc::jit::tempdir::m_tempfiles): New field.
587 * docs/cp/intro/tutorial04.rst: Update for changes to toyvm.cc.
588 * docs/examples/tut04-toyvm/toyvm.cc (class compilation_result):
590 (toyvm_function::compile): Change return type from function ptr
591 to a compilation_result.
592 (toyvm_function::get_function_name): New accessor.
593 (toyvm_function::m_funcname): New field.
594 (get_function_name): Convert to...
595 (toyvm_function::make_function_name): ...this new method.
596 (toyvm_function::parse): Call make_function_name.
597 (toyvm_function::compile): Convert return type from function ptr
598 to a compilation_result. Use get_function_name.
599 (compilation_state::compile): Convert return type from
600 gcc_jit_result * to a compilation_result.
601 (test_script): Update for above changes, extracting the code from
602 the compilation_result.
604 * docs/_build/texinfo/libgccjit.texi: Regenerate.
606 2016-01-04 Jakub Jelinek <jakub@redhat.com>
608 Update copyright years.
610 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
612 * dummy-frontend.c: Remove unused header files.
613 * jit-builtins.c: Likewise.
614 * jit-playback.c: Likewise.
615 * jit-recording.c: Likewise.
616 * jit-spec.c: Likewise.
617 * libgccjit.c: Likewise.
619 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
621 * jit-builtins.c: Don't undef DEF_BUILTIN.
623 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
625 * dummy-frontend.c: Reorder #include's and remove duplicates.
626 * jit-builtins.c: Likewise.
627 * jit-playback.c: Likewise.
628 * jit-recording.c: Likewise.
629 * libgccjit.c: Likewise.
631 2015-10-13 Jakub Jelinek <jakub@redhat.com>
633 * jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
634 DEF_FUNCTION_TYPE_11): Define.
635 * jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
636 DEF_FUNCTION_TYPE_11): Define.
638 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
639 Ulrich Drepper <drepper@gmail.com>
641 * jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use.
643 2015-09-30 Matthias Klose <doko@ubuntu.com>
645 * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,
646 remove DEF_FUNCTION_TYPE_VAR_11.
647 * jit-builtins.c (builtins_manager::make_type): Define and handle
648 DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.
650 2015-08-25 David Malcolm <dmalcolm@redhat.com>
652 * docs/cp/topics/contexts.rst
653 (gccjit::context::set_bool_use_external_driver): New.
654 * docs/internals/test-hello-world.exe.log.txt: Update.
655 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_5): New.
656 * docs/topics/contexts.rst
657 (gcc_jit_context_set_bool_use_external_driver): New.
658 * jit-common.h (enum inner_bool_option): Add
659 INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
660 * jit-playback.c (gcc_driver_name): New global.
661 (gcc:jit::playback::context::invoke_driver): Split out second
663 (gcc::jit::playback::context::invoke_embedded_driver): ...this new
665 (gcc::jit::playback::context::invoke_external_driver): ...this new
668 (gcc::jit::playback::context::get_inner_bool_option): New.
669 (gcc::jit::playback::context::invoke_embedded_driver): New.
670 (gcc::jit::playback::context::invoke_external_driver): New.
671 * jit-recording.c (inner_bool_option_reproducer_strings):
672 Add entry for INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
674 (gccjit::context::set_bool_use_external_driver): New.
675 * libgccjit.c (gcc_jit_context_set_bool_use_external_driver): New.
676 * libgccjit.h (gcc_jit_context_set_bool_use_external_driver): New.
677 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_use_external_driver):
679 * libgccjit.map (LIBGCCJIT_ABI_5): New.
680 * notes.txt: Show invocation of embedded copy of driver.
681 * docs/internals/test-hello-world.exe.log.txt: Update
683 2015-08-13 David Malcolm <dmalcolm@redhat.com>
685 * jit-playback.c (invoke_driver): On OS X, add
686 "-Wl,-undefined,dynamic_lookup" to the driver arguments.
688 2015-08-03 David Malcolm <dmalcolm@redhat.com>
690 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
691 * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY):
692 We no longer show a profile.
693 * docs/topics/index.rst (Topic Reference): Add performance.rst.
694 * docs/topics/performance.rst: New file.
695 * docs/_build/texinfo/libgccjit.texi: Regenerate.
696 * jit-playback.c (gcc::jit::playback::context::compile): Add timer
697 param when constructing the "toplev" instance.
698 (gcc::jit::playback::context::acquire_mutex): Add timer param when
699 constructing auto_timevar instance.
700 (gcc::jit::playback::context::make_fake_args): If we have a timer,
702 (gcc::jit::playback::context::invoke_driver): Add timer param when
703 constructing auto_timevar instance.
704 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
705 * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor.
706 * jit-recording.c: Include timevar.h.
707 (gcc::jit::recording::context::context): Initialize field "m_timer".
708 * jit-recording.h: Add forward declaration of class timer.
709 (gcc::jit::recording::context::set_timer): New method.
710 (gcc::jit::recording::context::get_timer): New method.
711 (gcc::jit::recording::context::m_timer): New field.
712 * libgccjit++.h (gccjit::timer): New class.
713 (gccjit::auto_time): New class.
714 (gccjit::context::set_timer): New method.
715 (gccjit::context::get_timer): New.
716 (gccjit::timer::timer): New.
717 (gccjit::timer::push): New.
718 (gccjit::timer::pop): New.
720 (timer::get_inner_timer): New.
721 (timer::release): New.
722 (auto_time::auto_time): New.
723 (auto_time::~auto_time): New.
724 * libgccjit.c: Include timevar.h.
725 (struct gcc_jit_timer): New.
726 (gcc_jit_timer_new): New function.
727 (gcc_jit_timer_release): New function.
728 (gcc_jit_context_set_timer): New function.
729 (gcc_jit_context_get_timer): New function.
730 (gcc_jit_timer_push): New function.
731 (gcc_jit_timer_pop): New function.
732 (gcc_jit_timer_print): New function.
733 * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro.
734 (gcc_jit_timer): New typedef.
735 (gcc_jit_timer_new): New function.
736 (gcc_jit_timer_release): New function.
737 (gcc_jit_context_set_timer): New function.
738 (gcc_jit_context_get_timer): New function.
739 (gcc_jit_timer_push): New function.
740 (gcc_jit_timer_pop): New function.
741 (gcc_jit_timer_print): New function.
742 * libgccjit.map (LIBGCCJIT_ABI_4): New.
743 (gcc_jit_timer_new): New function.
744 (gcc_jit_timer_release): New function.
745 (gcc_jit_context_set_timer): New function.
746 (gcc_jit_context_get_timer): New function.
747 (gcc_jit_timer_push): New function.
748 (gcc_jit_timer_pop): New function.
749 (gcc_jit_timer_print): New function.
751 2015-07-23 David Malcolm <dmalcolm@redhat.com>
753 * jit-playback.c (invoke_driver): Convert local "argvec"
754 to an auto_argvec, so that it owns copies of the strings,
755 rather than borrows them, updating ADD_ARG to use xstrdup
756 and special-casing the NULL terminator to avoid
757 xstrdup (NULL). Call add_multilib_driver_arguments at the front
759 (MULTILIB_DEFAULTS): Provide a default definition.
760 (multilib_defaults_raw): New constant array.
761 (gcc::jit::playback::context::add_multilib_driver_arguments): New
764 (gcc::jit::playback::context::add_multilib_driver_arguments): New
766 * docs/internals/test-hello-world.exe.log.txt: Update.
767 * docs/_build/texinfo/libgccjit.texi: Regenerate.
769 2015-07-16 David Malcolm <dmalcolm@redhat.com>
771 * docs/internals/index.rst (Overview of code structure): Add note
772 that the implementation is in C++, despite the .c extension.
773 (Submitting patches): New subsection.
774 * docs/_build/texinfo/libgccjit.texi: Regenerate.
776 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
778 * dummy-frontend.c: Adjust includes for flags.h changes.
779 * jit-common.h: Likewise.
780 * jit-playback.c: Likewise.
782 2015-07-08 David Malcolm <dmalcolm@redhat.com>
785 * libgccjit.c (gcc_jit_context_new_field): Show name of field in
786 "unknown size" error message.
787 (gcc_jit_struct_set_fields): Show name of struct in error message.
788 (gcc_jit_context_new_global): Show name of global in
789 "unknown size" error message.
790 (gcc_jit_function_new_local): Likewise for local.
792 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
794 * dummy-frontend.c: Adjust includes.
795 * jit-common.h: Likewise.
796 * jit-playback.c: Likewise.
798 2015-07-07 David Malcolm <dmalcolm@redhat.com>
801 * jit-recording.h: Within namespace gcc:jit::recording...
802 (type::has_known_size): New virtual function.
803 (struct_has_known_size): New function.
804 * libgccjit.c (gcc_jit_context_new_field): Verify that the type
806 (gcc_jit_context_new_global): Likewise.
807 (gcc_jit_function_new_local): Likewise.
809 2015-07-07 David Malcolm <dmalcolm@redhat.com>
812 * dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we
813 handle modes QI, HI, SI, DI, TI.
815 2015-07-01 David Malcolm <dmalcolm@redhat.com>
818 * jit-playback.c (jit_mark_addressable): New function.
819 (gcc::jit::playback::lvalue::get_address): Call
820 jit_mark_addressable on the underlying tree.
822 2015-07-01 David Malcolm <dmalcolm@redhat.com>
824 * docs/topics/types.rst (gcc_jit_context_new_union_type): Add
826 * docs/_build/texinfo/libgccjit.texi: Regenerate.
828 2015-07-01 David Malcolm <dmalcolm@redhat.com>
830 * docs/topics/contexts.rst (gcc_jit_context_set_bool_option):
831 Clarify lack of lifetime requirements on (const char *) parameter.
832 * docs/topics/expressions.rst
833 (gcc_jit_context_new_string_literal): Likewise.
834 (gcc_jit_context_new_global): Likewise.
835 * docs/topics/functions.rst (gcc_jit_context_new_param): Likewise.
836 (gcc_jit_context_new_function): Likewise.
837 (gcc_jit_function_new_block): Likewise.
838 (gcc_jit_block_add_comment): Likewise.
839 * docs/topics/locations.rst (gcc_jit_context_new_location):
841 * docs/topics/types.rst (gcc_jit_context_new_field): Likewise.
842 (gcc_jit_context_new_struct_type): Likewise.
843 * docs/_build/texinfo/libgccjit.texi: Regenerate.
845 2015-06-30 David Malcolm <dmalcolm@redhat.com>
847 * docs/cp/topics/functions.rst (Blocks): Add switch statements to
848 list of ways to terminate a block.
849 (gccjit::block::end_with_switch): Add function description.
850 (gccjit::case_): Add class.
851 (gccjit::context::new_case): Add function description.
852 * docs/cp/topics/objects.rst: Add "case_" to class hierarchy.
853 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New.
854 * docs/topics/functions.rst (Blocks): Add switch statements to
855 list of ways to terminate a block.
856 (gcc_jit_block_end_with_switch): Add function description.
857 (gcc_jit_case): Add type.
858 (gcc_jit_context_new_case): Add function description.
859 (gcc_jit_case_as_object): Add function description.
860 * docs/topics/objects.rst: Add gcc_jit_case to class hierarchy.
861 * docs/_build/texinfo/libgccjit.texi: Regenerate.
862 * jit-common.h (gcc::jit::recording::case_): Add forward decl.
863 (gcc::jit::playback::case_): Add forward decl.
864 * jit-playback.c (add_case): New function.
865 (gcc::jit::playback::block::add_switch): New function.
866 * jit-playback.h (gcc::jit::playback::case_): New struct.
867 (gcc::jit::playback::block::get_function): New method.
868 (gcc::jit::playback::block::add_switch): New method.
869 * jit-recording.c: Within namespace gcc::jit...
870 (recording::context::new_case): New method.
871 (recording::function::validate): Update for change to
872 get_successor_blocks.
873 (recording::block::end_with_switch): New method.
874 (recording::block::get_successor_blocks): Update to support an
875 arbitrary number of successor blocks.
876 (recording::block::dump_edges_to_dot): Likewise.
877 (memento_of_new_rvalue_from_const <int>::get_wide_int): New.
878 (memento_of_new_rvalue_from_const <long>::get_wide_int): New.
879 (memento_of_new_rvalue_from_const <double>::get_wide_int): New.
880 (memento_of_new_rvalue_from_const <void *>::get_wide_int): New.
881 (recording::statement::get_successor_blocks): Update to support an
882 arbitrary number of successor blocks.
883 (recording::conditional::get_successor_blocks): Likewise.
884 (recording::jump::get_successor_blocks): Likewise.
885 (recording::return_::get_successor_blocks): Likewise.
886 (recording::case_::write_reproducer): New.
887 (recording::case_::make_debug_string): New.
888 (recording::switch_::switch_): New.
889 (recording::switch_::replay_into): New.
890 (recording::switch_::get_successor_blocks): New.
891 (recording::switch_::make_debug_string): New.
892 (recording::switch_::write_reproducer): New.
893 * jit-recording.h: Within namespace gcc::jit::recording...
894 (context::new_case): New.
895 (rvalue::is_constant): New.
896 (rvalue::get_wide_int): New.
897 (block::end_with_switch): New.
898 (block::get_successor_blocks): Update to support an arbitrary
899 number of successor blocks.
900 (memento_of_new_rvalue_from_const::is_constant): New.
901 (memento_of_new_rvalue_from_const::get_wide_int): New.
902 (statement::get_successor_blocks): Update to support an arbitrary
903 number of successor blocks.
904 (conditional::get_successor_blocks): Likewise.
905 (jump::get_successor_blocks): Likewise.
906 (return_::get_successor_blocks): Likewise.
907 (case_): New subclass of memento.
908 (switch_): New subclass of statement.
909 * libgccjit++.h (gccjit::case_): New subclass of gccjit::object.
910 (gccjit::context::new_case): New method.
911 (gccjit::block::end_with_switch): New method.
912 (gccjit::case_::case): New ctors.
913 (gccjit::case_::get_inner_case): New method.
914 * libgccjit.c: Include "typed-splay-tree.h"
915 (struct gcc_jit_case): New.
916 (gcc_jit_context_new_case): New function.
917 (gcc_jit_case_as_object): New function.
918 (valid_dest_for_switch): New function.
919 (valid_case_for_switch): New function.
920 (class api_call_validator): New class.
921 (class case_range_validator): New class.
922 (case_range_validator::case_range_validator): New.
923 (case_range_validator::validate): New.
924 (case_range_validator::case_compare): New.
925 (case_range_validator::get_wide_int): new.
926 (gcc_jit_block_end_with_switch): New.
927 * libgccjit.h: Add gcc_jit_case to class hierarchy comment.
928 (gcc_jit_case): New typedef.
929 (gcc_jit_context_new_case): New function.
930 (gcc_jit_case_as_object): New function.
931 (gcc_jit_block_end_with_switch): New function.
932 (LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New.
933 * libgccjit.map: Add gcc_jit_block_end_with_switch,
934 gcc_jit_case_as_object and gcc_jit_context_new_case.
936 2015-06-30 David Malcolm <dmalcolm@redhat.com>
939 * docs/cp/topics/contexts.rst
940 (gccjit::context::set_bool_allow_unreachable_blocks): New.
941 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New.
942 * docs/topics/contexts.rst (Options): Add notes discussing the
943 transition from enums to entrypoints for new options.
944 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
945 * docs/_build/texinfo/libgccjit.texi: Regenerate.
946 * jit-common.h (gcc::jit::inner_bool_option): New enum.
947 * jit-recording.c: Within namespace gcc::jit...
948 (recording::context::context): Handle m_inner_bool_options.
949 (recording::context::set_inner_bool_option): New.
950 (inner_bool_option_reproducer_strings): New.
951 (recording::context::log_all_options): Log the "inner" bool
953 (recording::context::log_inner_bool_option): New.
954 (recording::context::dump_reproducer_to_file): Write initializers
955 for "inner" bool options.
956 (recording::function::validate): Don't check for block
957 reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set.
958 * jit-recording.h: Within namespace gcc::jit...
959 (recording::context::set_inner_bool_option): New.
960 (recording::context::get_inner_bool_option): New.
961 (recording::context::log_inner_bool_option): New.
962 (recording::context::m_inner_bool_options): New.
964 (gccjit::context::set_bool_allow_unreachable_blocks): New.
966 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
967 * libgccjit.h: Add note about options present in the
968 initial release of libgccjit.
969 (gcc_jit_context_set_bool_allow_unreachable_blocks): New API
971 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks):
973 * libgccjit.map (LIBGCCJIT_ABI_2): New, containing...
974 (gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new
977 2015-06-30 David Malcolm <dmalcolm@redhat.com>
980 * docs/cp/topics/contexts.rst (Additional command-line options):
982 * docs/topics/compatibility.rst: New file.
983 * docs/topics/contexts.rst (Additional command-line options): New
985 * docs/topics/index.rst: Add compatibility.rst.
986 * docs/_build/texinfo/libgccjit.texi: Regenerate.
987 * jit-playback.c (make_fake_args): Add call to
988 append_command_line_options.
989 * jit-recording.c: Within namespace gcc::jit...
990 (recording::context::~context): Free the optnames within
991 m_command_line_options.
992 (recording::context::set_bool_option): Likewise.
993 (recording::context::add_command_line_option): New method.
994 (recording::context::append_command_line_options): New method.
995 (recording::context::dump_reproducer_to_file): Add command-line
997 * jit-recording.h: Within namespace gcc::jit...
998 (recording::context::add_command_line_option): New method.
999 (recording::context::append_command_line_options): New method.
1000 (recording::context::m_command_line_options): New field.
1001 * libgccjit++.h (gccjit::context::add_command_line_option): New
1003 * libgccjit.c (gcc_jit_context_add_command_line_option): New API
1005 * libgccjit.h (gcc_jit_context_add_command_line_option): New API
1007 (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New
1009 * libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add
1010 LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option.
1012 2015-06-30 David Malcolm <dmalcolm@redhat.com>
1015 (gcc::jit::recording::context::dump_reproducer_to_file):
1016 Add pragma to generated reproducers to disable -Wunused-variable.
1017 Fix handling of NULL string options.
1019 2015-06-30 David Malcolm <dmalcolm@redhat.com>
1021 * docs/cp/topics/expressions.rst: Remove stray semicolon.
1022 * docs/cp/topics/functions.rst: Remove stray backslash.
1023 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1025 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1027 * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
1028 * jit-playback.c: Likewise.
1030 2015-06-25 Andrew Macleod <amacleod@redhat.com>
1032 * jit-common.h: Don't include alias.h.
1034 2015-06-17 David Malcolm <dmalcolm@redhat.com>
1036 * libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field
1037 is for the correct struct.
1038 (gcc_jit_rvalue_access_field): Likewise.
1040 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1042 * dummy-frontend.c: Do not include input.h, line-map.h or is-a.h.
1043 * jit-common.h: Likewise.
1044 * jit-playback.c: Likewise.
1046 2015-06-16 David Malcolm <dmalcolm@redhat.com>
1049 * jit-recording.c: Within namespace gcc::jit::recording::
1050 (rvalue::get_debug_string_parens): New function.
1051 (binary_op::make_debug_string): Update to mimic C precedence
1053 (binary_op_precedence): New array.
1054 (binary_op::get_precedence): New function.
1055 (comparison::make_debug_string): Update to mimic C precedence
1057 (comparison_precedence): New array.
1058 (comparison::get_precedence): New function.
1059 (cast::make_debug_string): Update to mimic C precedence rules.
1060 (call::make_debug_string): Likewise.
1061 (call_through_ptr::make_debug_string): Likewise.
1062 (array_access::make_debug_string): Likewise.
1063 (access_field_of_lvalue::make_debug_string): Likewise.
1064 (access_field_rvalue::make_debug_string): Likewise.
1065 (dereference_field_rvalue::make_debug_string): Likewise.
1066 (dereference_rvalue::make_debug_string): Likewise.
1067 (get_address_of_lvalue::make_debug_string): Likewise.
1068 * jit-recording.h: Within namespace gcc::jit::recording::
1069 (precedence): New enum.
1070 (rvalue::rvalue): Initialize field "m_parenthesized_string".
1071 (rvalue::get_debug_string_parens): New method.
1072 (rvalue::get_precedence): New pure virtual function.
1073 (rvalue::m_parenthesized_string): New field.
1074 (param::get_precedence): New function.
1075 (global::get_precedence): New function.
1076 (memento_of_new_rvalue_from_const::get_precedence): New function.
1077 (memento_of_new_string_literal::get_precedence): New function.
1078 (unary_op::get_precedence): New function.
1079 (binary_op::get_precedence): New function.
1080 (comparison::get_precedence): New function.
1081 (cast::get_precedence): New function.
1082 (call::get_precedence): New function.
1083 (call_through_ptr::get_precedence): New function.
1084 (array_access::get_precedence): New function.
1085 (access_field_of_lvalue::get_precedence): New function.
1086 (access_field_rvalue::get_precedence): New function.
1087 (dereference_field_rvalue::get_precedence): New function.
1088 (dereference_rvalue::get_precedence): New function.
1089 (get_address_of_lvalue::get_precedence): New function.
1090 (local::get_precedence): New function.
1092 2015-06-09 Matthias Klose <doko@ubuntu.com>
1094 * Make-lang.in (jit.install-common): Install headers using INSTALL_DATA.
1096 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1098 * dummy-frontend.c : Adjust include files.
1099 * jit-common.h : Likewise.
1100 * jit-playback.c : Likewise.
1102 2015-06-05 David Malcolm <dmalcolm@redhat.com>
1105 (jit_langhook_post_compilation_parsing_cleanups): Remove.
1106 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
1107 * jit-playback.c (gcc::jit::playback::context::new_global): Add
1108 call to varpool_node::finalize_decl.
1109 (gcc::jit::playback::context::finalize_global_decls): Remove.
1111 (gcc::jit::playback::context::finalize_global_decls): Remove.
1113 2015-06-05 David Malcolm <dmalcolm@redhat.com>
1115 * dummy-frontend.c (jit_langhook_write_globals): Rename to...
1116 (jit_langhook_post_compilation_parsing_cleanups): ...this, and
1117 eliminate calls to finalize_compilation_unit and
1118 write_global_decls_2.
1119 (LANG_HOOKS_WRITE_GLOBALS): Rename to...
1120 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
1121 redirect from jit_langhook_write_globals to
1122 jit_langhook_post_compilation_parsing_cleanups.
1124 (gcc::jit::playback::context::write_global_decls_1): Rename to...
1125 (gcc::jit::playback::context::finalize_global_decls): ...this.
1126 (gcc::jit::playback::context::write_global_decls_1): Delete.
1128 (gcc::jit::playback::context::write_global_decls_1): Rename to...
1129 (gcc::jit::playback::context::finalize_global_decls): ...this.
1130 (gcc::jit::playback::context::write_global_decls_1): Delete.
1132 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1134 * dummy-frontend.c: Adjust includes for restructured coretypes.h.
1135 * jit-common.h: Likewise.
1136 * jit-playback.c: Likewise.
1138 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1140 * jit-builtins.c: Include vec.h before target.h.
1142 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
1144 * Make-lang.in (jit.mostlyclean): Remove shared libraries and object
1147 2015-04-09 David Malcolm <dmalcolm@redhat.com>
1150 * docs/cp/topics/expressions.rst (Simple expressions): Fix copy
1151 and paste error in description of gccjit::context::one.
1152 * docs/topics/expressions.rst (Simple expressions): Likewise in
1153 description of gcc_jit_context_one.
1154 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1156 2015-03-13 Uros Bizjak <ubizjak@gmail.com>
1158 * jit-recording.c (dump::write): Also check vasprintf return value.
1159 (recording::context::add_error_va): Ditto.
1160 (recording::string::from_printf): Ditto.
1162 2015-03-13 David Malcolm <dmalcolm@redhat.com>
1164 * docs/internals/index.rst (Packaging notes): New section.
1165 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1167 2015-03-05 David Malcolm <dmalcolm@redhat.com>
1169 * docs/cp/intro/tutorial03.rst: Add missing arguments to
1170 gccjit::block::end_with_conditional call. Add on_true/on_false
1171 comments. Tweak the wording.
1172 * docs/intro/tutorial03.rst: Add missing arguments to
1173 gcc_jit_block_end_with_conditional call. Add some clarifying
1175 * docs/topics/compilation.rst: Tweak the wording to avoid an
1176 ambiguous use of "this".
1177 * docs/topics/contexts.rst: Fix a typo.
1178 * docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
1180 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1182 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1185 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8)
1186 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
1187 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1188 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8)
1189 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
1190 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1192 2015-02-04 David Malcolm <dmalcolm@redhat.com>
1195 * docs/conf.py (html_theme): Change from 'pyramid'
1198 2015-02-04 David Malcolm <dmalcolm@redhat.com>
1200 * docs/topics/contexts.rst (gcc_jit_context_acquire): Fix
1202 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1204 2015-02-03 David Malcolm <dmalcolm@redhat.com>
1206 * jit-logging.h (gcc::jit::log_user::log): Make const.
1207 * jit-recording.c (gcc::jit::recording::context::set_str_option):
1208 Log the new value of the option.
1209 (gcc::jit::recording::context::set_int_option): Likewise.
1210 (gcc::jit::recording::context::set_bool_option): Likewise.
1211 (gcc::jit::recording::context::compile): Log the value of all
1213 (gcc::jit::recording::context::compile_to_file): Likewise.
1214 (gcc::jit::recording::context::log_all_options): New function.
1215 (gcc::jit::recording::context::log_str_option): New function.
1216 (gcc::jit::recording::context::log_int_option): New function.
1217 (gcc::jit::recording::context::log_bool_option): New function.
1218 * jit-recording.h (gcc::jit::recording::context::log_all_options):
1220 (gcc::jit::recording::context::log_str_option): New function.
1221 (gcc::jit::recording::context::log_int_option): New function.
1222 (gcc::jit::recording::context::log_bool_option): New function.
1223 * docs/internals/test-hello-world.exe.log.txt: Update for above
1225 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1227 2015-02-03 David Malcolm <dmalcolm@redhat.com>
1230 * Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o.
1231 (LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS.
1232 * jit-playback.c: Include gcc.h.
1233 (gcc::jit::playback::context::compile): Move mutex acquisition
1234 to before the call to make_fake_args.
1235 (append_arg_from_driver): New function.
1236 (gcc::jit::playback::context::make_fake_args): On the first call,
1237 call into driver_get_configure_time_options to get configure-time
1238 default options and cache them. Add them to the args for
1240 * jit-spec.c: New source file.
1241 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
1243 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1245 2015-02-02 David Malcolm <dmalcolm@redhat.com>
1248 * dummy-frontend.c (jit_langhook_type_for_mode): Support
1249 TYPE_MODE (long_long_integer_type_node).
1251 2015-01-27 David Malcolm <dmalcolm@redhat.com>
1253 * docs/internals/test-hello-world.exe.log.txt: Add example version
1255 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1256 * jit-common.h (gcc::jit::dump::get_file): New accessor.
1257 * jit-logging.c: Include toplev.h.
1258 (gcc::jit::logger::logger): Log the GCC version.
1259 * jit-recording.c: Include toplev.h.
1260 (gcc:jit::recording::context::dump_reproducer_to_file): Log the
1263 2015-01-26 David Malcolm <dmalcolm@redhat.com>
1265 * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo.
1266 * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The
1267 error buffer is only valid until the next call to the context.
1268 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1269 * libgccjit.h (gcc_jit_context_get_first_error): Reword the
1270 comment to omit mention of compiling.
1271 (gcc_jit_context_get_last_error): The error buffer is only valid
1272 until the next call to the context.
1274 2015-01-26 David Malcolm <dmalcolm@redhat.com>
1277 * config-lang.in (compilers): Drop "libgccjit.so".
1279 2015-01-23 David Malcolm <dmalcolm@redhat.com>
1282 * jit-playback.c (gcc::jit::playback::context::compile): Construct
1283 toplev instances with init_signals=false.
1285 2015-01-19 David Malcolm <dmalcolm@redhat.com>
1287 * docs/cp/topics/results.rst: Rename to...
1288 * docs/cp/topics/compilation.rst: ...this, and add section on
1289 ahead-of-time compilation.
1290 * docs/cp/topics/index.rst: Update for renaming of results.rst
1292 * docs/examples/emit-alphabet.bf: New file, a sample "brainf"
1294 * docs/examples/tut05-bf.c: New file, implementing a compiler
1296 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
1297 changes to logger output.
1298 * docs/intro/index.rst: Add tutorial05.rst
1299 * docs/intro/tutorial05.rst: New file.
1300 * docs/topics/results.rst: Rename to...
1301 * docs/topics/compilation.rst: ...this, and add section on
1302 ahead-of-time compilation.
1303 * docs/topics/index.rst: Update for renaming of results.rst to
1305 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1306 * jit-playback.c (gcc::jit::playback::context::compile): Convert
1307 return type from result * to void. Move the code to convert to
1308 dso and dlopen the result to a new pure virtual "postprocess"
1310 (gcc::jit::playback::compile_to_memory::compile_to_memory): New
1312 (gcc::jit::playback::compile_to_memory::postprocess): New
1313 function, based on playback::context::compile.
1314 (gcc::jit::playback::compile_to_file::compile_to_file): New
1316 (gcc::jit::playback::compile_to_file::postprocess): New function.
1317 (gcc::jit::playback::compile_to_file::copy_file): New function.
1318 (gcc::jit::playback::context::convert_to_dso): Move internals
1320 (gcc::jit::playback::context::invoke_driver): New method. Add
1321 "-shared" and "-c" options to driver's argv as needed.
1322 * jit-playback.h: Include "timevar.h".
1323 (gcc::jit::playback::context::compile): Convert return type from
1325 (gcc::jit::playback::context::postprocess): New pure virtual
1326 function, making this an abstract base class.
1327 (gcc::jit::playback::context::get_tempdir): New accessor.
1328 (gcc::jit::playback::context::invoke_driver): New function.
1329 (class gcc::jit::playback::compile_to_memory): New subclass of
1331 (class gcc::jit::playback::compile_to_file): Likewise.
1332 * jit-recording.c (gcc::jit::recording::context::compile): Use a
1333 playback::compile_to_memory, and extract its result.
1334 (gcc::jit::recording::context::compile_to_file): New function.
1335 * jit-recording.h (gcc::jit::recording::context::compile_to_file):
1337 * libgccjit++.h (gccjit::context::compile_to_file): New method.
1338 * libgccjit.c (gcc_jit_context_compile): Update log message to
1339 clarify that this is an in-memory compile.
1340 (gcc_jit_context_compile_to_file): New function.
1341 * libgccjit.h (gcc_jit_context): Clarify that you can compile
1342 a context more than once, and that you can compile to a file
1343 as well as to memory.
1344 (gcc_jit_result): Clarify that this is the result of an
1345 in-memory compilation.
1346 (gcc_jit_context_compile): Clarify that you can compile, and that
1347 this is an in-memory compilation.
1348 (enum gcc_jit_output_kind): New enum.
1349 (gcc_jit_context_compile_to_file): New function.
1350 (gcc_jit_context_enable_dump): Clarify comment to cover both forms
1352 * libgccjit.map (gcc_jit_context_compile_to_file): New API
1354 * notes.txt: Update to show the playback::context::postprocess
1357 2015-01-19 David Malcolm <dmalcolm@redhat.com>
1360 (gcc::jit::recording::memento_of_new_string_literal::make_debug_string):
1361 Add missing format string.
1363 2015-01-16 David Malcolm <dmalcolm@redhat.com>
1365 * Make-lang.in (lang_checks_parallelized): Add "check-jit".
1366 (check_jit_parallelize): Set this to an arbitrary value (10).
1368 2015-01-16 Jakub Jelinek <jakub@redhat.com>
1370 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of
1372 (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and
1374 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1377 2015-01-15 Richard Sandiford <richard.sandiford@arm.com>
1379 Update copyright years in docs/.
1381 2015-01-15 David Malcolm <dmalcolm@redhat.com>
1383 * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the
1384 lvalue and the rvalue are of compatible type.
1386 2015-01-13 David Malcolm <dmalcolm@redhat.com>
1388 * docs/cp/topics/contexts.rst (Debugging): Add
1389 gccjit::context::dump_reproducer_to_file.
1390 * docs/internals/index.rst (Design notes): New section,
1391 discussing input validation and
1392 gcc_jit_context_dump_reproducer_to_file.
1393 * docs/topics/contexts.rst (Debugging): Add
1394 gcc_jit_context_dump_reproducer_to_file.
1395 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1396 * jit-common.h (gcc::jit::dump::get_context): New accessor.
1397 * jit-recording.c: Include "hash-map.h".
1398 Within namespace ::gcc::jit...
1399 (dump::write): Flush each line.
1400 (dump::make_location): Pass false for new param "created_by_user".
1401 (class allocator): New class.
1402 (allocator::~allocator): New function.
1403 (allocator::xstrdup_printf): New function.
1404 (allocator::xstrdup_printf_va): New function.
1405 (class reproducer): New subclass of dump.
1406 (reproducer::reproducer): New function.
1407 (reproducer::write_params): New function.
1408 (reproducer::write_args): New function.
1409 (reproducer::make_identifier): New function.
1410 (reproducer::make_tmp_identifier): New function.
1411 (reproducer::get_identifier): New pair of functions.
1412 (reproducer::get_identifier_as_rvalue): New function.
1413 (reproducer::get_identifier_as_lvalue): New function.
1414 (reproducer::get_identifier_as_type): New function.
1415 (reproducer::xstrdup_printf): New function.
1416 (recording::context::context): Initialize m_toplevel_ctxt.
1417 (recording::context::new_location): Add param created_by_user.
1418 (str_option_reproducer_strings): New table of strings.
1419 (int_option_reproducer_strings): Likewise.
1420 (bool_option_reproducer_strings): Likewise.
1421 (get_type_enum_strings): Likewise.
1422 (names_of_function_kinds): Likewise.
1423 (global_kind_reproducer_strings): Likewise.
1424 (unary_op_reproducer_strings): Likewise.
1425 (binary_op_reproducer_strings): Likewise.
1426 (comparison_reproducer_strings): Likewise.
1427 Within namespace ::gcc::jit::recording::...
1428 (context::dump_reproducer_to_file): New function.
1429 (string::write_reproducer): Likewise.
1430 (location::write_reproducer): Likewise.
1431 (type::access_as_type): Likewise.
1432 (memento_of_get_type::write_reproducer): Likewise.
1433 (memento_of_get_pointer::write_reproducer): Likewise.
1434 (memento_of_get_const::write_reproducer): Likewise.
1435 (memento_of_get_volatile::write_reproducer): Likewise.
1436 (array_type::write_reproducer): Likewise.
1437 (function_type::write_reproducer): Likewise.
1438 (function_type::write_deferred_reproducer): Likewise.
1439 (field::write_reproducer): Likewise.
1440 (struct_::access_as_type): Likewise.
1441 (struct_::write_reproducer): Likewise.
1442 (union_::write_reproducer): Likewise.
1443 (fields::write_reproducer): Likewise.
1444 (rvalue::access_as_rvalue): Likewise.
1445 (lvalue::access_as_rvalue): Likewise.
1446 (lvalue::access_as_lvalue): Likewise.
1447 (param::access_as_rvalue): Likewise.
1448 (param::access_as_lvalue): Likewise.
1449 (param::write_reproducer): Likewise.
1450 (function::write_reproducer): Likewise.
1451 (block::write_reproducer): Likewise.
1452 (global::write_reproducer): Likewise.
1453 (memento_of_new_rvalue_from_const <int>::write_reproducer):
1455 (memento_of_new_rvalue_from_const <long>::write_reproducer):
1457 (memento_of_new_rvalue_from_const <double>::write_reproducer):
1459 (memento_of_new_rvalue_from_const <void *>::write_reproducer):
1461 (memento_of_new_string_literal::write_reproducer): Likewise.
1462 (unary_op::write_reproducer): Likewise.
1463 (binary_op::write_reproducer): Likewise.
1464 (comparison::write_reproducer): Likewise.
1465 (cast::write_reproducer): Likewise.
1466 (call::write_reproducer): Likewise.
1467 (call_through_ptr::write_reproducer): Likewise.
1468 (array_access::write_reproducer): Likewise.
1469 (access_field_of_lvalue::write_reproducer): Likewise.
1470 (access_field_rvalue::write_reproducer): Likewise.
1471 (dereference_field_rvalue::write_reproducer): Likewise.
1472 (dereference_rvalue::write_reproducer): Likewise.
1473 (get_address_of_lvalue::write_reproducer): Likewise.
1474 (local::write_reproducer): Likewise.
1475 (eval::write_reproducer): Likewise.
1476 (assignment::write_reproducer): Likewise.
1477 (assignment_op::write_reproducer): Likewise.
1478 (comment::write_reproducer): Likewise.
1479 (conditional::write_reproducer): Likewise.
1480 (jump::write_reproducer): Likewise.
1481 (return_::write_reproducer): Likewise.
1482 * jit-recording.h (gcc::jit::reproducer): New forward declararion.
1483 Within namespace ::gcc::jit::recording::...
1484 (context::new_location): Add "created_by_user" param.
1485 (context::dump_reproducer_to_file): New method.
1486 (context::m_toplevel_ctxt): New field.
1487 (memento::write_reproducer): New pure virtual function.
1488 (memento::dyn_cast_location): New virtual function.
1489 (string::write_reproducer):
1490 (location::location): Add "created_by_user" param.
1491 (location::dyn_cast_location): New function.
1492 (location::created_by_user): New accessor.
1493 (location::write_reproducer): New function.
1494 (location::m_created_by_user): New field.
1495 (type::access_as_type): New virtual function.
1496 (location::write_reproducer): Likewise.
1497 (type::access_as_type): Likewise.
1498 (memento_of_get_type::write_reproducer): Likewise.
1499 (memento_of_get_pointer::write_reproducer): Likewise.
1500 (memento_of_get_const::write_reproducer): Likewise.
1501 (memento_of_get_volatile::write_reproducer): Likewise.
1502 (array_type::write_reproducer): Likewise.
1503 (function_type::write_reproducer): Likewise.
1504 (function_type::write_deferred_reproducer): Likewise.
1505 (field::write_reproducer): Likewise.
1506 (struct_::access_as_type): Likewise.
1507 (struct_::write_reproducer): Likewise.
1508 (union_::write_reproducer): Likewise.
1509 (union_::m_fields): Remove stray unused field.
1510 (fields::length): New accessor.
1511 (fields::get_field): New accessor.
1512 (fields::write_reproducer): New function.
1513 (rvalue::access_as_rvalue): Likewise.
1514 (lvalue::access_as_rvalue): Likewise.
1515 (lvalue::access_as_lvalue): Likewise.
1516 (param::access_as_rvalue): Likewise.
1517 (param::access_as_lvalue): Likewise.
1518 (param::write_reproducer): Likewise.
1519 (function::write_reproducer): Likewise.
1520 (block::write_reproducer): Likewise.
1521 (global::write_reproducer): Likewise.
1522 (memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer):
1524 (memento_of_new_string_literal::write_reproducer): Likewise.
1525 (unary_op::write_reproducer): Likewise.
1526 (binary_op::write_reproducer): Likewise.
1527 (comparison::write_reproducer): Likewise.
1528 (cast::write_reproducer): Likewise.
1529 (call::write_reproducer): Likewise.
1530 (call_through_ptr::write_reproducer): Likewise.
1531 (array_access::write_reproducer): Likewise.
1532 (access_field_of_lvalue::write_reproducer): Likewise.
1533 (access_field_rvalue::write_reproducer): Likewise.
1534 (dereference_field_rvalue::write_reproducer): Likewise.
1535 (dereference_rvalue::write_reproducer): Likewise.
1536 (get_address_of_lvalue::write_reproducer): Likewise.
1537 (local::write_reproducer): Likewise.
1538 (eval::write_reproducer): Likewise.
1539 (assignment::write_reproducer): Likewise.
1540 (assignment_op::write_reproducer): Likewise.
1541 (comment::write_reproducer): Likewise.
1542 (conditional::write_reproducer): Likewise.
1543 (jump::write_reproducer): Likewise.
1544 (return_::write_reproducer): Likewise.
1545 * libgccjit++.h (gccjit::context::dump_reproducer_to_file): New.
1546 * libgccjit.c (gcc_jit_context_new_location): Pass "true" as
1547 param "created_by_user".
1548 (gcc_jit_context_dump_reproducer_to_file): New API entrypoint.
1549 * libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API
1551 * libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API
1554 2015-01-12 David Malcolm <dmalcolm@redhat.com>
1556 * jit-recording.c (class gcc::jit::rvalue_usage_validator): New.
1557 (gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New
1559 (gcc::jit::rvalue_usage_validator::visit): New function.
1560 (gcc::jit::recording::rvalue::verify_valid_within_stmt): New
1562 (gcc::jit::recording::rvalue::set_scope): New function.
1563 (gcc::jit::recording::function::function): Call set_scope on each
1564 param, issuing errors for any params that already have a function.
1565 (gcc::jit::recording::block::add_eval): Return the new statement;
1566 update the comment given that some error-checking now happens after
1568 (gcc::jit::recording::block::add_assignment): Likewise.
1569 (gcc::jit::recording::block::add_assignment_op): Likewise.
1570 (gcc::jit::recording::block::add_comment): Likewise.
1571 (gcc::jit::recording::block::end_with_conditional): Likewise.
1572 (gcc::jit::recording::block::end_with_jump): Likewise.
1573 (gcc::jit::recording::block::end_with_return): Likewise.
1574 (gcc::jit::recording::block::validate): Add a comment.
1575 (gcc::jit::recording::unary_op::visit_children): New function.
1576 (gcc::jit::recording::binary_op::visit_children): New function.
1577 (gcc::jit::recording::comparison::visit_children): New function.
1578 (gcc::jit::recording::cast::visit_children): New function.
1579 (gcc::jit::recording::call::visit_children): New function.
1580 (gcc::jit::recording::call_through_ptr::visit_children): New function.
1581 (gcc::jit::recording::array_access::visit_children): New function.
1582 (gcc::jit::recording::access_field_of_lvalue::visit_children): New
1584 (gcc::jit::recording::access_field_rvalue::visit_children): New
1586 (gcc::jit::recording::dereference_field_rvalue::visit_children):
1588 (gcc::jit::recording::dereference_rvalue::visit_children): New
1590 (gcc::jit::recording::get_address_of_lvalue::visit_children): New
1592 * jit-recording.h: Within namespace gcc::jit::recording...
1593 (class rvalue_visitor): New.
1594 (rvalue::rvalue): Initialize m_scope.
1595 (rvalue::get_loc): New accessor.
1596 (rvalue::verify_valid_within_stmt): New function.
1597 (rvalue::visit_children): New pure virtual function.
1598 (rvalue::set_scope): New function.
1599 (rvalue::get_scope): New function.
1600 (rvalue::dyn_cast_param): New function.
1601 (rvalue::m_scope): New field.
1602 (param::visit_children): New empty function.
1603 (param::dyn_cast_param): New function.
1604 (function::get_loc): New function.
1605 (block::add_eval): Return the new statement.
1606 (block::add_assignment): Likewise.
1607 (block::add_assignment_op): Likewise.
1608 (block::add_comment): Likewise.
1609 (block::end_with_conditional): Likewise.
1610 (block::end_with_jump): Likewise.
1611 (block::end_with_return): Likewise.
1612 (global::visit_children): New function.
1613 (memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children):
1615 (memento_of_new_string_literal::visit_children): New function.
1616 (unary_op::visit_children): New function.
1617 (binary_op::visit_children): New function.
1618 (comparison::visit_children): New function.
1619 (cast::visit_children): New function.
1620 (call::visit_children): New function.
1621 (call_through_ptr::visit_children): New function.
1622 (array_access::visit_children): New function.
1623 (access_field_of_lvalue::visit_children): New function.
1624 (access_field_rvalue::visit_children): New function.
1625 (dereference_field_rvalue::visit_children): New function.
1626 (dereference_rvalue::visit_children): New function.
1627 (get_address_of_lvalue::visit_children): New function.
1628 (local::local): Call set_scope.
1629 (local::visit_children): New function.
1630 (statement::get_block): Make public.
1631 * libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro.
1632 (RETURN_NULL_IF_FAIL_PRINTF5): New macro.
1633 (gcc_jit_context_new_function): Verify that each param has
1634 not yet been used for creating another function.
1635 (gcc_jit_block_add_eval): After creating the stmt, verify
1636 that the rvalue expression tree is valid to use within it.
1637 (gcc_jit_block_add_assignment): Likewise for the lvalue and
1638 rvalue expression trees.
1639 (gcc_jit_block_add_assignment_op): Likewise.
1640 (gcc_jit_block_end_with_conditional): Likewise for the boolval
1642 (gcc_jit_block_end_with_return): Likewise for the rvalue
1644 (gcc_jit_block_end_with_void_return): Remove return of "void",
1645 now that block::end_with_return is now non-void.
1647 2015-01-12 David Malcolm <dmalcolm@redhat.com>
1649 * jit-playback.c (gcc::jit::playback::context::read_dump_file):
1650 Add missing fclose on error-handling path.
1652 2015-01-12 David Malcolm <dmalcolm@redhat.com>
1654 * docs/cp/topics/expressions.rst (Global variables): Add
1655 enum gcc_jit_global_kind param to gccjit::context::new_global.
1656 * docs/topics/expressions.rst (Global variables): Likewise.
1657 Document the new enum.
1658 * docs/topics/results.rst (Compilation results): Document
1660 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1661 * dummy-frontend.c (jit_langhook_write_globals): Call into the
1662 playback context's write_global_decls_1 and write_global_decls_2
1663 before and after calling symtab->finalize_compilation_unit ().
1664 * jit-playback.c: Include "debug.h".
1665 (gcc::jit::playback::context::new_global): Add "kind" param and
1666 use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the
1667 underlying VAR_DECL. Call varpool_node::get_create on the
1668 VAR_DECL, and add it to m_globals.
1669 (gcc::jit::playback::context::write_global_decls_1): New function.
1670 (gcc::jit::playback::context::write_global_decls_2): New function.
1671 * jit-playback.h (gcc::jit::playback::context::context): Call
1672 create on m_globals.
1673 (gcc::jit::playback::context::new_global): Add "kind" param.
1674 (gcc::jit::playback::context::write_global_decls_1): New function.
1675 (gcc::jit::playback::context::write_global_decls_2): New function.
1676 (gcc::jit::playback::context::m_globals): New field.
1677 * jit-recording.c (gcc::jit::recording::context::context):
1678 Initialize m_globals.
1679 (gcc::jit::recording::context::new_global): Add param "kind".
1680 Add the new global to m_globals.
1681 (gcc::jit::recording::context::dump_to_file): Dump the globals.
1682 (gcc::jit::recording::global::replay_into): Add field m_kind.
1683 (gcc::jit::recording::global::write_to_dump): New override.
1684 * jit-recording.h (gcc::jit::recording::context::new_global): Add
1686 (gcc::jit::recording::context::m_globals): New field.
1687 (gcc::jit::recording::global::global): Add param kind.
1688 (gcc::jit::recording::global::write_to_dump): New override.
1689 (gcc::jit::recording::global::m_kind): New field.
1690 * jit-result.c (gcc::jit::result::get_global): New function.
1691 * jit-result.h (gcc::jit::result::get_global): New function.
1692 * libgccjit++.h (gccjit::context::new_global): Add "kind" param.
1693 * libgccjit.c (gcc_jit_context_new_global): Likewise.
1694 (gcc_jit_result_get_global): New API entrypoint.
1695 * libgccjit.h (gcc_jit_result_get_global): New API entrypoint.
1696 (enum gcc_jit_global_kind): New enum.
1697 (gcc_jit_context_new_global): API change: add "kind" param.
1698 * libgccjit.map (gcc_jit_result_get_global): New symbol.
1700 2015-01-09 David Malcolm <dmalcolm@redhat.com>
1702 * dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h",
1703 "symtab.h", "inchash.h". Move include of "hash-set.h" much
1705 * jit-builtins.c: Remove redundant includes of "opts.h" and
1707 * jit-common.h: Include "hash-set.h", "input.h", "vec.h",
1708 "double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h".
1709 * jit-playback.c: Include "hashtab.h", "machmode.h", "input.h",
1710 "statistics.h", "vec.h", "double-int.h", "real.h",
1711 "fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h",
1712 "inchash.h", "fold-const.h". Move include of "hash-set.h" to
1714 * jit-recording.c: Remove redundant includes of "opts.h" and
1717 2015-01-09 David Malcolm <dmalcolm@redhat.com>
1719 * docs/cp/topics/expressions.rst (Simple expressions): Use
1720 ":c:type:" for C types. Document new overload of
1721 gcc::jit::context::new_rvalue.
1722 * docs/topics/expressions.rst (Simple expressions): Use
1723 ":c:type:" for C types. Document new entrypoint
1724 gcc_jit_context_new_rvalue_from_long.
1725 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1726 * jit-playback.c: Within namespace gcc::jit::playback...
1727 (context::new_rvalue_from_int): Eliminate in favor of...
1728 (context::new_rvalue_from_const <int>): ...this.
1729 (context::new_rvalue_from_double): Eliminate in favor of...
1730 (context::new_rvalue_from_const <double>): ...this.
1731 (context::new_rvalue_from_const <long>): New.
1732 (context::new_rvalue_from_ptr): Eliminate in favor of...
1733 (context::new_rvalue_from_const <void *>): ...this.
1734 * jit-playback.h: Within namespace gcc::jit::playback...
1735 (context::new_rvalue_from_int): Eliminate in favor of...
1736 (context::new_rvalue_from_const <HOST_TYPE>): ...this.
1737 (context::new_rvalue_from_double): Likewise.
1738 (context::new_rvalue_from_ptr): Likewise.
1739 * jit-recording.c: Within namespace gcc::jit::recording...
1740 (context::new_rvalue_from_int): Eliminate.
1741 (context::new_rvalue_from_double): Likewise.
1742 (context::new_rvalue_from_ptr): Likewise.
1743 (class memento_of_new_rvalue_from_const <int>):
1744 Add explicit specialization.
1745 (class memento_of_new_rvalue_from_const <long>):
1747 (class memento_of_new_rvalue_from_const <double>):
1749 (class memento_of_new_rvalue_from_const <void *>):
1751 (memento_of_new_rvalue_from_int::replay_into):
1753 (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into):
1755 (memento_of_new_rvalue_from_double::replay_into):
1757 (memento_of_new_rvalue_from_ptr::replay_into):
1758 ...and this to be deleted.
1759 (memento_of_new_rvalue_from_int::make_debug_string):
1761 (memento_of_new_rvalue_from_const <int>::make_debug_string):
1763 (memento_of_new_rvalue_from_double::make_debug_string):
1765 (memento_of_new_rvalue_from_const <double>::make_debug_string):
1767 (memento_of_new_rvalue_from_ptr::make_debug_string)
1769 (memento_of_new_rvalue_from_const <void *>::make_debug_string):
1771 (memento_of_new_rvalue_from_const <long>::make_debug_string):
1773 * jit-recording.h: Within namespace gcc::jit::recording...
1774 (context::new_rvalue_from_int): Eliminate.
1775 (context::new_rvalue_from_double): Likewise.
1776 (context::new_rvalue_from_ptr): Likewise, all in favor of...
1777 (context::new_rvalue_from_const <HOST_TYPE>): New family of
1779 (class memento_of_new_rvalue_from_int): Eliminate.
1780 (class memento_of_new_rvalue_from_double): Likewise.
1781 (class memento_of_new_rvalue_from_ptr): Likewise.
1782 (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family
1783 of rvalue subclasses.
1784 * libgccjit++.h (gccjit::context::new_rvalue): New overload, for
1786 * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for
1787 rewriting of recording::context::new_rvalue_from_int to
1788 recording::context::new_rvalue_from_const <int>.
1789 (gcc_jit_context_new_rvalue_from_long): New API entrypoint.
1790 (gcc_jit_context_new_rvalue_from_double): Update for
1791 rewriting of recording::context::new_rvalue_from_double to
1792 recording::context::new_rvalue_from_const <double>.
1793 (gcc_jit_context_new_rvalue_from_ptr): Update for
1794 rewriting of recording::context::new_rvalue_from_ptr to
1795 recording::context::new_rvalue_from_const <void *>.
1796 * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API
1798 * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise.
1800 2015-01-09 David Malcolm <dmalcolm@redhat.com>
1803 * docs/internals/test-hello-world.exe.log.txt: Update, the log now
1804 shows tempdir creation/cleanup.
1805 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1806 * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir
1807 to the list of subclasses in the comment.
1808 * jit-playback.c (gcc::jit::playback::context::context): Add a
1809 comment clarifying when the tempdir gets cleaned up.
1810 (gcc::jit::playback::context::compile): Pass the context's logger,
1811 if any, to the tempdir.
1812 (gcc::jit::playback::context::dlopen_built_dso): When creating the
1813 gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand
1814 over ownership of the tempdir to it.
1815 * jit-result.c: Include "jit-tempdir.h".
1816 (gcc::jit::result::result): Add tempdir param, saving it as
1818 (gcc::jit::result::~result): Delete m_tempdir.
1819 * jit-result.h (gcc::jit::result::result): Add tempdir param.
1820 (gcc::jit::result::m_tempdir): New field.
1821 * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param;
1823 (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit,
1824 and log m_path_template and m_path_tempdir.
1825 (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log
1826 entry/exit, and log the unlink and rmdir calls.
1827 * jit-tempdir.h: Include "jit-logging.h".
1828 (class gcc::jit::tempdir): Make this be a subclass of log_user.
1829 (gcc::jit::tempdir::tempdir): Add logger param.
1830 * notes.txt: Update to show the two possible places where the
1831 tempdir can be cleaned up.
1833 2015-01-08 David Malcolm <dmalcolm@redhat.com>
1835 * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive
1838 2015-01-08 David Malcolm <dmalcolm@redhat.com>
1840 * docs/topics/contexts.rst (Error-handling): Document new
1841 entrypoint gcc_jit_context_get_last_error.
1842 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1843 * jit-recording.c (gcc::jit::recording::context::context):
1844 Initialize new fields "m_last_error_str" and
1845 "m_owns_last_error_str".
1846 (gcc::jit::recording::context::~context): Clean up
1847 m_last_error_str, if needed.
1848 (gcc::jit::recording::context::add_error_va): Update
1849 m_last_error_str and m_owns_last_error_str, freeing the old
1850 value if appropriate.
1851 (gcc::jit::recording::context::get_last_error): New function.
1852 * jit-recording.h (gcc::jit::recording::context::get_last_error):
1854 (gcc::jit::recording::context): New fields m_last_error_str and
1855 m_owns_last_error_str.
1856 * libgccjit.c (gcc_jit_context_get_last_error): New function.
1857 * libgccjit.h (gcc_jit_context_get_last_error): New declaration.
1858 * libgccjit.map (gcc_jit_context_get_last_error): New function.
1860 2015-01-08 David Malcolm <dmalcolm@redhat.com>
1862 * Make-lang.in (jit_OBJS): Add jit/jit-logging.o.
1863 * docs/internals/index.rst (Overview of code structure): Mention
1864 gcc_jit_context_set_logfile, and embed the example logfile.
1865 * docs/internals/test-hello-world.exe.log.txt: New file: example
1867 * docs/topics/contexts.rst (Debugging): Add documentation
1868 for gcc_jit_context_set_logfile.
1869 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1870 * dummy-frontend.c: Include "jit-logging.h".
1871 (jit_langhook_init): Assert that there is an active playback
1872 context. If it has a logger, log entry/exit to this function.
1873 (jit_langhook_write_globals): Likewise.
1874 * jit-common.h (gcc::jit::logger): New forward declaration.
1875 * jit-logging.c: New file.
1876 * jit-logging.h: New file.
1877 * jit-playback.c: Include "jit-logging.h".
1878 (gcc::jit::playback::context::context): Initialize the log_user
1879 base class from the recording context's logger (if any). Use
1880 JIT_LOG_SCOPE to log entry/exit from the function body.
1881 (gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to
1882 log entry/exit from the function body.
1883 (gcc::jit::playback::build_stmt_list): Likewise.
1884 (gcc::jit::playback::function::postprocess): Likewise.
1885 (gcc::jit::playback::context::compile): Likewise. Log the
1886 entry/exit to toplev::main and toplev::finalize. Log the
1887 fake argv passed to toplev::main.
1888 (gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to
1889 log entry/exit from the function body.
1890 (gcc::jit::playback::context::release_mutex): Likewise.
1891 (gcc::jit::playback::context::make_fake_args): Likewise.
1892 (gcc::jit::playback::context::extract_any_requested_dumps):
1894 (gcc::jit::playback::context::convert_to_dso): Likewise. Also,
1895 log the arguments that the driver is invoked with.
1896 (gcc::jit::playback::context::dlopen_built_dso): Likewise. Pass
1897 the logger to the result object.
1898 (gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to
1899 log entry/exit from the function body.
1900 (gcc::jit::playback::context::dump_generated_code): Likewise.
1901 (gcc::jit::playback::context::handle_locations): Likewise.
1902 * jit-playback.h (gcc::jit::playback::context): Make this be
1903 a subclass of gcc::jit::log_user.
1904 * jit-recording.c: Include "jit-logging.h".
1905 (gcc::jit::recording::context::context: Initialize the logger to
1906 NULL for root contexts, or to the parent's logger for child
1908 (gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to
1909 log entry/exit from the function body.
1910 (gcc::jit::recording::context::replay_into): Likewise.
1911 (gcc::jit::recording::context::disassociate_from_playback):
1913 (gcc::jit::recording::context::compile): Likewise.
1914 (recording::context::add_error_va): Likewise. Also, log the
1916 (gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to
1917 log entry/exit from the function body.
1918 * jit-recording.h: Include "jit-logging.h".
1919 (gcc::jit::recording::context): Make this be a subclass of
1921 * jit-result.c: Include "jit-common.h" and "jit-logging.h".
1922 (gcc::jit::result::result): Add logger param, recording it.
1923 Use JIT_LOG_SCOPE to log entry/exit from the function body.
1924 (gcc::jit::result::~result(): Use JIT_LOG_SCOPE to
1925 log entry/exit from the function body.
1926 (gcc::jit::result::get_code): Likewise.
1927 * jit-result.h (gcc::jit::result): Make this be a subclass of
1929 (gcc::jit::result::result): Add logger parameter.
1930 * libgccjit++.h (gccjit::context::set_logfile): New function.
1931 * libgccjit.c: Include "jit-logging.h".
1932 (gcc_jit_context_acquire): Log the context.
1933 (gcc_jit_context_release): Use JIT_LOG_FUNC to
1934 log entry/exit from the function body, and log the context.
1935 (gcc_jit_context_new_child_context): Likewise, logging both
1937 (gcc_jit_context_new_location): Use JIT_LOG_FUNC to
1938 log entry/exit from the function body.
1939 (gcc_jit_context_get_type): Likewise.
1940 (gcc_jit_context_get_int_type): Likewise.
1941 (gcc_jit_context_new_array_type): Likewise.
1942 (gcc_jit_context_new_field): Likewise.
1943 (gcc_jit_context_new_struct_type): Likewise.
1944 (gcc_jit_context_new_opaque_struct): Likewise.
1945 (gcc_jit_struct_set_fields): Likewise.
1946 (gcc_jit_context_new_union_type): Likewise.
1947 (gcc_jit_context_new_function_ptr_type): Likewise.
1948 (gcc_jit_context_new_param): Likewise.
1949 (gcc_jit_context_new_function): Likewise.
1950 (gcc_jit_context_get_builtin_function): Likewise.
1951 (gcc_jit_function_get_param): Likewise.
1952 (gcc_jit_function_dump_to_dot): Likewise.
1953 (gcc_jit_function_new_block): Likewise.
1954 (gcc_jit_context_new_global): Likewise.
1955 (gcc_jit_context_new_rvalue_from_int): Likewise.
1956 (gcc_jit_context_zero): Likewise.
1957 (gcc_jit_context_one): Likewise.
1958 (gcc_jit_context_new_rvalue_from_double): Likewise.
1959 (gcc_jit_context_new_rvalue_from_ptr): Likewise.
1960 (gcc_jit_context_null): Likewise.
1961 (gcc_jit_context_new_string_literal): Likewise.
1962 (gcc_jit_context_new_unary_op): Likewise.
1963 (gcc_jit_context_new_binary_op): Likewise.
1964 (gcc_jit_context_new_comparison): Likewise.
1965 (gcc_jit_context_new_call): Likewise.
1966 (gcc_jit_context_new_call_through_ptr): Likewise.
1967 (gcc_jit_context_new_cast): Likewise.
1968 (gcc_jit_context_new_array_access): Likewise.
1969 (gcc_jit_lvalue_access_field): Likewise.
1970 (gcc_jit_rvalue_access_field): Likewise.
1971 (gcc_jit_rvalue_dereference_field): Likewise.
1972 (gcc_jit_rvalue_dereference): Likewise.
1973 (gcc_jit_lvalue_get_address): Likewise.
1974 (gcc_jit_function_new_local): Likewise.
1975 (gcc_jit_block_add_eval): Likewise.
1976 (gcc_jit_block_add_assignment): Likewise.
1977 (gcc_jit_block_add_assignment_op): Likewise.
1978 (gcc_jit_block_end_with_conditional): Likewise.
1979 (gcc_jit_block_add_comment): Likewise.
1980 (gcc_jit_block_end_with_jump): Likewise.
1981 (gcc_jit_block_end_with_return): Likewise.
1982 (gcc_jit_block_end_with_void_return): Likewise.
1983 (gcc_jit_context_set_str_option): Likewise.
1984 (gcc_jit_context_set_int_option): Likewise.
1985 (gcc_jit_context_set_bool_option): Likewise.
1986 (gcc_jit_context_enable_dump): Likewise.
1987 (gcc_jit_context_compile): Likewise. Also log the context,
1989 (gcc_jit_context_dump_to_file): Likewise.
1990 (gcc_jit_context_set_logfile): New function.
1991 (gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to
1992 log entry/exit from the function body.
1993 (gcc_jit_result_get_code): Likewise. Also log the fnname)
1994 and the ptr to be returned.
1995 (gcc_jit_result_release): Likewise. Also log the result.
1996 * libgccjit.h: Include <stdio.h>, since we need FILE *.
1997 (gcc_jit_context_set_logfile): New declaration.
1998 * libgccjit.map (gcc_jit_context_set_logfile): New.
2000 2015-01-07 David Malcolm <dmalcolm@redhat.com>
2002 * jit-recording.h (gcc::jit::recording::type::is_void): New
2004 (gcc::jit::recording::memento_of_get_type::is_void): New
2005 function, overriding default implementation.
2006 * libgccjit.c (gcc_jit_rvalue_dereference): Verify that
2007 the underlying type is not "void".
2009 2015-01-07 David Malcolm <dmalcolm@redhat.com>
2011 * docs/topics/expressions.rst (Unary Operations): Add
2012 GCC_JIT_UNARY_OP_ABS.
2013 * jit-playback.c (gcc::jit::playback::context::new_unary_op):
2015 * jit-recording.c (unary_op_strings): Likewise.
2016 * libgccjit.c (gcc_jit_context_new_unary_op): Update checking
2017 of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS.
2018 * libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS.
2019 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2021 2015-01-07 David Malcolm <dmalcolm@redhat.com>
2023 * jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix
2026 2015-01-07 David Malcolm <dmalcolm@redhat.com>
2028 * TODO.rst (Test suite): Remove item about running C++ testcases.
2029 * docs/internals/index.rst (Working on the JIT library): Add
2030 "c++" to the enabled languages in the suggested "configure"
2031 invocation, and add a description of why this is necessary.
2032 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2034 2015-01-07 David Malcolm <dmalcolm@redhat.com>
2036 * docs/internals/index.rst: Update to reflect that built
2037 testcases are now test-foo.c.exe, rather than test-foo.exe.
2038 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2040 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2042 Update copyright years.
2044 2014-12-19 David Malcolm <dmalcolm@redhat.com>
2046 * jit-playback.c (gcc::jit::playback::context::build_cast): In
2047 case BOOLEAN_TYPE, don't assume that the source expression is
2050 2014-12-19 David Malcolm <dmalcolm@redhat.com>
2052 * jit-recording.c (gcc::jit::recording::context::context): When
2053 copying string options from a parent context, take a copy of the
2054 underlying buffers, rather than simply copying the pointer.
2056 2014-12-19 David Malcolm <dmalcolm@redhat.com>
2058 * jit-recording.c (gcc::jit::recording::context::set_str_option):
2061 2014-12-11 David Malcolm <dmalcolm@redhat.com>
2063 * docs/cp/topics/contexts.rst (gccjit::context::set_str_option):
2064 Document new function.
2065 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2067 2014-12-10 Ulrich Drepper <drepper@gmail.com>
2069 Minor interface cleanups of libgccjit
2070 * jit-playback.c (convert_to_dso): Use auto_vec instead
2071 of automatic array to build up command line.
2072 * jit-recording.c (recording::context::set_str_option):
2073 Make copy of the string.
2074 (recording::context::~context): Free string options.
2075 * jit-recording.h (recording::context): Adjust type
2076 of m_str_options member.
2077 * libgccjit.h: Adjust comment about
2078 gcc_jit_context_set_str_option parameter being used after
2080 Update comment now that all interfaces are copy strings
2082 * libgccjit++.h (gccjit::context): Add set_str_option
2085 2014-12-10 David Malcolm <dmalcolm@redhat.com>
2087 * docs/cp/index.rst: New file.
2088 * docs/cp/intro/index.rst: New file.
2089 * docs/cp/intro/tutorial01.rst: New file.
2090 * docs/cp/intro/tutorial02.rst: New file.
2091 * docs/cp/intro/tutorial03.rst: New file.
2092 * docs/cp/intro/tutorial04.rst: New file.
2093 * docs/cp/topics/contexts.rst: New file.
2094 * docs/cp/topics/expressions.rst: New file.
2095 * docs/cp/topics/functions.rst: New file.
2096 * docs/cp/topics/index.rst: New file.
2097 * docs/cp/topics/locations.rst: New file.
2098 * docs/cp/topics/objects.rst: New file.
2099 * docs/cp/topics/results.rst: New file.
2100 * docs/cp/topics/types.rst: New file.
2101 * docs/examples/tut01-hello-world.cc: New file.
2102 * docs/examples/tut02-square.c: Fix missing newline in output.
2103 * docs/examples/tut02-square.cc: New file.
2104 * docs/examples/tut03-sum-of-squares.cc: New file.
2105 * docs/examples/tut04-toyvm/toyvm.cc: New file.
2106 * docs/index.rst: Move summary to above the table of contents.
2107 Add text about the C vs C++ APIs.
2108 * docs/topics/contexts.rst: Fix a typo.
2110 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2111 * docs/_build/texinfo/factorial1.png: New file.
2112 * docs/_build/texinfo/sum-of-squares1.png: New file.
2114 2014-12-09 David Malcolm <dmalcolm@redhat.com>
2116 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move
2117 logic for determine "funcname" to new function...
2118 (get_function_name): ...here, adding logic to skip any leading
2119 path from the filename.
2120 (toyvm_function_parse): Use the filename for fn_filename, rather
2121 than "name", so that the debugger can locate the source .toy
2123 (toyvm_function_parse): Don't fclose a NULL FILE *.
2125 2014-12-09 David Malcolm <dmalcolm@redhat.com>
2128 * docs/internals/index.rst (Running under valgrind): New
2130 (docs/_build/texinfo/libgccjit.texi): Regenerate.
2132 2014-12-09 David Malcolm <dmalcolm@redhat.com>
2135 * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o.
2136 * jit-common.h (gcc::jit::tempdir): New forward decl.
2137 * jit-playback.c: Include jit-tempdir.h.
2138 (gcc::jit::playback::context::context): Initialize m_tempdir.
2139 (gcc::jit::playback::context::~context): Move tempdir
2140 cleanup to new file jit-tempdir.c
2141 (make_tempdir_path_template): Move to new file jit-tempdir.c.
2142 (gcc::jit::playback::context::compile): Move tempdir creation
2143 to new tempdir object in new file jit-tempdir.c.
2144 (gcc::jit::playback::context::make_fake_args): Get path from
2145 tempdir object rather than from member data.
2146 (gcc::jit::playback::context::convert_to_dso): Likewise.
2147 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
2148 (gcc::jit::playback::context::dump_generated_code): Likewise.
2149 (gcc::jit::playback::context::get_path_c_file): New function.
2150 (gcc::jit::playback::context::get_path_s_file): New function.
2151 (gcc::jit::playback::context::get_path_so_file): New function.
2152 * jit-playback.h (gcc::jit::playback::context::get_path_c_file):
2154 (gcc::jit::playback::context::get_path_s_file): New function.
2155 (gcc::jit::playback::context::get_path_so_file): New function.
2156 (gcc::jit::playback::context): Move fields "m_path_template",
2157 "m_path_tempdir", "m_path_c_file", "m_path_s_file",
2158 "m_path_so_file" to new jit::tempdir class; add field "m_tempdir".
2159 * jit-tempdir.c: New file.
2160 * jit-tempdir.h: New file.
2162 2014-12-09 David Malcolm <dmalcolm@redhat.com>
2164 * jit-playback.c (gcc::jit::playback::context::compile): Acquire the
2165 mutex here, immediately before using toplev, and release it here, on
2166 each exit path after acquisition.
2167 (jit_mutex): Move this variable here, from jit-recording.c.
2168 (gcc::jit::playback::context::acquire_mutex): New function, based on
2169 code in jit-recording.c.
2170 (gcc::jit::playback::context::release_mutex): Likewise.
2171 * jit-playback.h (gcc::jit::playback::context::acquire_mutex): New
2173 (gcc::jit::playback::context::release_mutex): New function.
2174 * jit-recording.c (jit_mutex): Move this variable to jit-playback.c.
2175 (gcc::jit::recording::context::compile): Move mutex-handling from
2176 here into jit-playback.c's gcc::jit::playback::context::compile.
2177 * notes.txt: Update to show the new locations of ACQUIRE_MUTEX
2180 2014-12-09 David Malcolm <dmalcolm@redhat.com>
2182 * jit-playback.c (gcc::jit::playback::context::compile): Move the
2184 (gcc::jit::playback::context::dlopen_built_dso): ...this new
2186 * jit-playback.h (gcc::jit::playback::context::dlopen_built_dso):
2189 2014-12-09 David Malcolm <dmalcolm@redhat.com>
2192 * docs/topics/contexts.rst (Debugging): Add description of
2193 gcc_jit_context_enable_dump.
2194 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2195 * jit-playback.c: Include context.h.
2196 (class auto_argvec): New class.
2197 (auto_argvec::~auto_argvec): New function.
2198 (gcc::jit::playback::context::compile): Convert fake_args to be
2199 an auto_argvec, so that it can contain dynamically-allocated
2200 strings. Construct a vec of all requested dumps, and pass it to
2201 make_fake_args. Extract requested dumps between the calls to
2202 toplev::main and toplev::finalize.
2203 (gcc::jit::playback::context::make_fake_args): Convert param
2204 "argvec" to be a vec <char *>, and gain a "requested_dumps"
2205 param. Convert to dynamically-allocated arg strings by converting
2206 ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP
2207 for args that are already a copy. Add args for all requested dumps.
2208 (gcc::jit::playback::context::extract_any_requested_dumps): New
2210 (gcc::jit::playback::context::read_dump_file): New function.
2211 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
2212 Convert param "argvec" to be a vec <char *>, and gain a
2213 "requested_dumps" param.
2214 (gcc::jit::playback::context::extract_any_requested_dumps): New
2216 (gcc::jit::playback::context::read_dump_file): New function.
2217 * jit-recording.c (gcc::jit::recording::context::enable_dump): New
2219 (gcc::jit::recording::context::get_all_requested_dumps): New
2221 * jit-recording.h (gcc::jit::recording::requested_dump): New
2223 (gcc::jit::recording::context::enable_dump): New function.
2224 (gcc::jit::recording::context::get_all_requested_dumps): New
2226 (gcc::jit::recording::context::m_requested_dumps): New field.
2227 * libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint.
2228 * libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint.
2229 * libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint.
2231 2014-12-08 David Malcolm <dmalcolm@redhat.com>
2233 * libgccjit++.h: Indent the forward declarations of the classes to
2234 show the inheritance hierarchy.
2236 2014-12-08 David Malcolm <dmalcolm@redhat.com>
2238 * notes.txt: Show the beginning and ending of
2239 recording::context::compile vs playback::context::compile. Show
2240 the creation and unlinking of the tempdir. Show toplev::finalize.
2241 Move "RELEASE MUTEX" to the correct location. Show
2242 gcc_jit_result_release, and indicate where the
2243 dlopen/dlsym/dlclose occur.
2245 2014-12-01 David Malcolm <dmalcolm@redhat.com>
2247 * docs/examples/tut02-square.c (main): Release the context
2248 earlier, to show that this is possible. Update error-handling
2249 to avoid a double-release of the context, and to avoid
2250 releasing a NULL result.
2251 * docs/intro/tutorial02.rst: Discuss gcc_jit_context_release.
2252 * docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize
2253 * docs/topics/results.rst (gcc_jit_result): Mention that this
2254 controls the lifetimes of machine code functions.
2255 (gcc_jit_result_get_code): Spell out the requirements for this
2256 to succeed, and the lifetime of the result.
2257 (gcc_jit_result_release): Mention that this invalidates any code
2258 that was obtained from the result.
2259 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2261 2014-12-01 David Malcolm <dmalcolm@redhat.com>
2264 * docs/intro/tutorial02.rst: Spell out lifetime of generated code.
2265 Add description of error-handling, taken in part from...
2266 * docs/topics/contexts.rst (Error-handling): Expand, and move some
2267 content to tutorial02.rst.
2268 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2270 2014-12-01 David Malcolm <dmalcolm@redhat.com>
2273 * docs/topics/types.rst (Standard types) Add new enum values to
2274 the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT,
2275 GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
2276 Widen the left-hand column so that
2277 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit.
2278 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2280 * jit-builtins.c: Include stringpool.h and jit-playback.h.
2281 Move everything out of the gcc::jit::recording namespace into
2283 (struct builtin_data): Add fields "fnclass", "attr", and
2285 (DEF_BUILTIN): Update macro so populate the new fields.
2286 (builtins_manager::builtins_manager): Update for move out of
2287 recording namespace. Initialize the m_attributes array.
2288 (builtins_manager::get_builtin_function): Likewise.
2289 (builtins_manager::get_builtin_function_by_id): New function.
2290 (builtins_manager::make_builtin_function): Update for move out of
2291 recording namespace. Add fix for PR jit/64020 by detecting
2292 specific builtin ids and having them ensure that builtins for
2293 other ids are created as necessary.
2294 (builtins_manager::get_type): Update for move out of recording
2296 (builtins_manager::make_type): Likewise. Add some missing
2298 (builtins_manager::make_primitive_type): Update for move out of
2299 recording namespace. Implement the three BT_COMPLEX_ cases and
2301 (builtins_manager::make_fn_type): Update for move out of recording
2303 (builtins_manager::make_ptr_type): Likewise.
2304 (builtins_manager::finish_playback): New function.
2305 (builtins_manager::get_class): New function.
2306 (builtins_manager::implicit_p): New function.
2307 (builtins_manager::get_attrs_tree): Two new functions.
2308 (builtins_manager::make_attrs_tree): New function.
2310 * jit-builtins.h: Move everything out of the gcc::jit::recording
2311 namespace into just gcc::jit.
2312 (enum built_in_attribute): New.
2313 (builtins_manager::builtins_manager): Update decl for namespace
2315 (builtins_manager::get_builtin_function): Likewise.
2316 (builtins_manager::get_class): New.
2317 (builtins_manager::implicit_p): New.
2318 (builtins_manager::get_attrs_tree): Two new functions.
2319 (builtins_manager::make_attrs_tree): New function.
2320 (builtins_manager::finish_playback): New.
2321 (builtins_manager::get_builtin_function_by_id): New.
2322 (builtins_manager::make_builtin_function): Update decl for
2324 (builtins_manager::get_type): Likewise.
2325 (builtins_manager::make_type): Likewise.
2326 (builtins_manager::make_primitive_type): Likewise.
2327 (builtins_manager::make_fn_type): Likewise.
2328 (builtins_manager::make_ptr_type): Likewise.
2329 (builtins_manager): Likewise for fields. Add new field
2332 * jit-common.h (NUM_GCC_JIT_TYPES): Update.
2333 (builtins_manager): Update forward decl to reflect namespace
2336 * jit-playback.c: Include attribs.h and jit-builtins.h.
2337 (gcc::jit::playback::context::get_tree_node_for_type): Add cases
2338 for the new COMPLEX_ types.
2339 (gcc::jit::playback::context::new_function): If creating a
2340 builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl,
2341 and call set_builtin_decl.
2342 (gcc::jit::playback::context::replay): If we have a
2343 builtins_manager, call its finish_playback method when we're done.
2346 (gcc::jit::playback::context::get_builtins_manager): New function.
2349 (gcc::jit::recording::context::get_builtins_manager): New function.
2350 (gcc::jit::recording::get_builtin_function): Use
2351 get_builtins_manager, in case we're a child context.
2352 (gcc::jit::recording::memento_of_get_type::dereference): Add the
2354 (gcc::jit::recording::memento_of_get_type::is_int): Likewise.
2355 (gcc::jit::recording::memento_of_get_type::is_float): Likewise.
2356 (gcc::jit::recording::memento_of_get_type::is_bool): Likewise.
2357 (get_type_strings): Likewise.
2360 (gcc::jit::recording::context::get_builtins_manager): New.
2362 * libgccjit.h (enum gcc_jit_types): Add
2363 GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE,
2364 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
2366 2014-12-01 David Malcolm <dmalcolm@redhat.com>
2369 (gcc::jit::recording::builtins_manager::get_builtin_function):
2370 Check for NULL return from make_builtin_function.
2371 (gcc::jit::recording::builtins_manager::make_builtin_function):
2372 Check for NULL return from get_type.
2374 2014-12-01 David Malcolm <dmalcolm@redhat.com>
2376 * jit-playback.c (gcc::jit::playback::context::compile): Move DSO
2377 creation code into...
2378 (gcc::jit::playback::context::convert_to_dso): New function.
2379 * jit-playback.h (gcc::jit::playback::context::convert_to_dso):
2382 2014-12-01 David Malcolm <dmalcolm@redhat.com>
2384 * jit-playback.c (gcc::jit::playback::context::compile): Use an
2385 auto_vec<const char *> rather than a const char *[20] for the
2386 top-level argv, and move the logic to build it to...
2387 (gcc::jit::playback::context::make_fake_args): New function.
2388 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
2391 2014-12-01 David Malcolm <dmalcolm@redhat.com>
2393 * Make-lang.in (jit_OBJS): Add jit/jit-result.o.
2394 * jit-playback.c: Include new header jit-result.h.
2395 (gcc::jit::result::result): Move to new file jit-result.c.
2396 (gcc::jit::result::~result): Likewise.
2397 (gcc::jit::playback::result): Likewise.
2398 * jit-recording.h (class gcc::jit::result): Move to new
2399 header jit-result.h.
2400 * jit-result.c: New file, to contain...
2401 (gcc::jit::result::result): Move here from jit-playback.c,
2402 removing erroneous "playback" namespace from comment.
2403 (gcc::jit::result::~result): Likewise.
2404 (gcc::jit::playback::result): Likewise.
2405 * jit-result.h: New file, to contain...
2406 (class gcc::jit::result): Move from jit-recording.h.
2407 * libgccjit.c: Include jit-result.h.
2408 (gcc_jit_result_get_code): Update comment to reflect move
2410 (gcc_jit_result_release): Likewise.
2412 2014-12-01 David Malcolm <dmalcolm@redhat.com>
2415 * docs/examples/tut04-toyvm/toyvm.c
2416 (toyvm_compiled_function): New typedef.
2417 (toyvm_compiled_func) Rename to...
2418 (toyvm_compiled_code) ...this.
2419 (struct toyvm_compiled_function): New struct.
2420 (toyvm_function_compile): Return a toyvm_compiled_function *
2421 rather than a toyvm_compiled_func, so that the caller can fully
2422 clean things up. Free "funcname".
2423 (test_script): Update for change to toyvm_function_compile.
2424 Clean up the toyvm_compiled_function.
2426 (docs/intro/tutorial04.rst): Update to reflect the above changes,
2427 and to better spell out the lifetime of the compiled code.
2429 2014-12-01 David Malcolm <dmalcolm@redhat.com>
2433 (gcc::jit::recording::builtins_manager::make_fn_type): Call the
2434 context's new_function_type method, rather than directly creating
2435 a function_type instance.
2437 (gcc::jit::recording::context::new_function_type): New method,
2438 adapted from part of...
2439 (gcc::jit::recording::context::new_function_ptr_type): ...this.
2440 Update to call new_function_type.
2442 (gcc::jit::recording::context::new_function_type): New method.
2444 2014-12-01 David Malcolm <dmalcolm@redhat.com>
2447 * jit-playback.c: Ensure that ctxt_progname is non-NULL.
2449 2014-11-19 David Malcolm <dmalcolm@redhat.com>
2452 * jit-playback.c (gcc::jit::playback::compound_type::set_fields):
2453 Convert param from const vec<playback::field *> & to
2454 const auto_vec<playback::field *> *.
2455 (gcc::jit::playback::context::new_function_type): Convert param
2456 "param_types" from vec<type *> * to const auto_vec<type *> *.
2457 (gcc::jit::playback::context::new_function): Convert param
2458 "params" from vec<param *> * to const auto_vec<param *> *.
2459 (gcc::jit::playback::context::build_call): Convert param "args"
2460 from vec<rvalue *> to const auto_vec<rvalue *> *.
2461 (gcc::jit::playback::context::new_call): Likewise.
2462 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
2463 (wrapper_finalizer): New function.
2464 (gcc::jit::playback::wrapper::operator new): Call the finalizer
2465 variant of ggc_internal_cleared_alloc, supplying
2467 (gcc::jit::playback::function::finalizer): New.
2468 (gcc::jit::playback::block::finalizer): New.
2469 (gcc::jit::playback::source_file::finalizer): New.
2470 (gcc::jit::playback::source_line::finalizer): New.
2473 (gcc::jit::playback::context::new_function_type): Convert param
2474 "param_types" from vec<type *> * to const auto_vec<type *> *.
2475 (gcc::jit::playback::context::new_function): Convert param
2476 "params" from vec<param *> * to const auto_vec<param *> *.
2477 (gcc::jit::playback::context::new_call): Convert param
2478 "args" from vec<rvalue *> to const auto_vec<rvalue *> *.
2479 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
2480 (gcc::jit::playback::context::build_call): Likewise.
2481 (gcc::jit::playback::context): Convert fields "m_functions",
2482 "m_source_files", "m_cached_locations" from vec to auto_vec.
2483 (gcc::jit::playback::wrapper::finalizer): New virtual function.
2484 (gcc::jit::playback::compound_type::set_fields): Convert param fro
2485 const vec<playback::field *> & to
2486 const auto_vec<playback::field *> *.
2487 (gcc::jit::playback::function::finalizer): New.
2488 (gcc::jit::playback::block::finalizer): New.
2489 (gcc::jit::playback::source_file::finalizer): New.
2490 (gcc::jit::playback::source_line::finalizer): New.
2493 (gcc::jit::recording::function_type::replay_into): Convert local
2494 from a vec into an auto_vec.
2495 (gcc::jit::recording::fields::replay_into): Likewise.
2496 (gcc::jit::recording::function::replay_into): Likewise.
2497 (gcc::jit::recording::call::replay_into): Likewise.
2498 (gcc::jit::recording::call_through_ptr::replay_into): Likewise.
2500 * jit-recording.h (gcc::jit::recording::context): Convert fields
2501 "m_mementos", "m_compound_types", "m_functions" from vec<> to
2503 (gcc::jit::recording::function_type::get_param_types): Convert
2504 return type from vec<type *> to const vec<type *> &.
2505 (gcc::jit::recording::function_type): Convert field
2506 "m_param_types" from a vec<> to an auto_vec<>.
2507 (gcc::jit::recording::fields): Likewise for field "m_fields".
2508 (gcc::jit::recording::function::get_params): Convert return type
2509 from vec <param *> to const vec<param *> &.
2510 (gcc::jit::recording::function): Convert fields "m_params",
2511 "m_locals", "m_blocks" from vec<> to auto_vec<>.
2512 (gcc::jit::recording::block): Likewise for field "m_statements".
2513 vec<> to auto_vec<>.
2514 (gcc::jit::recording::call): Likewise for field "m_args".
2515 (gcc::jit::recording::call_through_ptr): Likewise.
2517 2014-11-19 David Malcolm <dmalcolm@redhat.com>
2520 * jit-recording.c (recording::function::validate): Convert
2521 "worklist" from vec<> to autovec<> to fix a leak.
2523 2014-11-11 David Malcolm <dmalcolm@redhat.com>
2525 * ChangeLog.jit: New.
2527 * Make-lang.in: New.
2529 * config-lang.in: New.
2530 * docs/Makefile: New.
2531 * docs/_build/texinfo/Makefile: New.
2532 * docs/_build/texinfo/factorial.png: New.
2533 * docs/_build/texinfo/libgccjit.texi: New.
2534 * docs/_build/texinfo/sum-of-squares.png: New.
2535 * docs/conf.py: New.
2536 * docs/examples/tut01-hello-world.c: New.
2537 * docs/examples/tut02-square.c: New.
2538 * docs/examples/tut03-sum-of-squares.c: New.
2539 * docs/examples/tut04-toyvm/Makefile: New.
2540 * docs/examples/tut04-toyvm/factorial.toy: New.
2541 * docs/examples/tut04-toyvm/fibonacci.toy: New.
2542 * docs/examples/tut04-toyvm/toyvm.c: New.
2543 * docs/index.rst: New.
2544 * docs/internals/index.rst: New.
2545 * docs/intro/factorial.png: New.
2546 * docs/intro/index.rst: New.
2547 * docs/intro/sum-of-squares.png: New.
2548 * docs/intro/tutorial01.rst: New.
2549 * docs/intro/tutorial02.rst: New.
2550 * docs/intro/tutorial03.rst: New.
2551 * docs/intro/tutorial04.rst: New.
2552 * docs/topics/contexts.rst: New.
2553 * docs/topics/expressions.rst: New.
2554 * docs/topics/functions.rst: New.
2555 * docs/topics/index.rst: New.
2556 * docs/topics/locations.rst: New.
2557 * docs/topics/objects.rst: New.
2558 * docs/topics/results.rst: New.
2559 * docs/topics/types.rst: New.
2560 * dummy-frontend.c: New.
2561 * jit-builtins.c: New.
2562 * jit-builtins.h: New.
2563 * jit-common.h: New.
2564 * jit-playback.c: New.
2565 * jit-playback.h: New.
2566 * jit-recording.c: New.
2567 * jit-recording.h: New.
2568 * libgccjit++.h: New.
2571 * libgccjit.map: New.
2574 2013-07-26 David Malcolm <dmalcolm@redhat.com>
2578 Copyright (C) 2013-2018 Free Software Foundation, Inc.
2580 Copying and distribution of this file, with or without modification,
2581 are permitted in any medium without royalty provided the copyright
2582 notice and this notice are preserved.