1 2023-12-05 Richard Sandiford <richard.sandiford@arm.com>
3 * dummy-frontend.cc (jit_gnu_attribute_table): Add extra braces
4 to work around PR 16333 in older compilers.
5 (jit_format_attribute_table): Likewise.
7 2023-12-02 Richard Sandiford <richard.sandiford@arm.com>
9 * dummy-frontend.cc (jit_format_attribute_table): Change type to
10 scoped_attribute_specs, using...
11 (jit_format_attributes): ...this as the underlying array.
12 (jit_attribute_table): Change to an array of scoped_attribute_specs
14 (jit_gnu_attributes, jit_gnu_attribute_table): ...these new globals
15 for the original array. Include the format attributes.
16 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete.
17 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete.
18 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
20 2023-11-09 Guillaume Gomez <guillaume1.gomez@gmail.com>
24 2023-11-04 David Malcolm <dmalcolm@redhat.com>
26 * jit-playback.cc: Update for changes to diagnostic_context.
27 * jit-playback.h: Likewise.
29 2023-10-25 Vibhav Pant <vibhavp@gmail.com>
31 * jit-recording.cc (recording::global::write_to_dump): Fix
32 dump of string literal initializers.
34 2023-10-22 Iain Sandoe <iain@sandoe.co.uk>
36 * Make-lang.in: Handle Darwin rpaths.
38 2023-10-02 David Malcolm <dmalcolm@redhat.com>
40 * dummy-frontend.cc (jit_langhook_init): Update for change to
41 diagnostic_context callbacks.
43 2023-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
45 * jit-playback.cc: Change spelling to macOS.
47 2023-08-29 Guillaume Gomez <guillaume1.gomez@gmail.com>
49 * docs/topics/compatibility.rst: Add documentation for LIBGCCJIT_ABI_25.
50 * docs/topics/types.rst: Add documentation for gcc_jit_type_get_restrict.
52 2023-08-29 Guillaume Gomez <guillaume1.gomez@gmail.com>
54 * jit-playback.cc: Remove trailing whitespace characters.
55 * jit-playback.h: Add get_restrict method.
56 * jit-recording.cc: Add get_restrict methods.
57 * jit-recording.h: Add get_restrict methods.
58 * libgccjit++.h: Add get_restrict methods.
59 * libgccjit.cc: Add gcc_jit_type_get_restrict.
60 * libgccjit.h: Declare gcc_jit_type_get_restrict.
61 * libgccjit.map: Declare gcc_jit_type_get_restrict.
63 2023-02-16 Patrick Palka <ppalka@redhat.com>
65 * jit-dejagnu.h: Mechanically drop static from static inline
66 functions via s/^static inline/inline/g.
67 * jit-recording.h: Likewise.
69 2023-01-07 LIU Hao <lh_mouse@126.com>
72 * jit-w32.h: Define `WIN32_LEAN_AND_MEAN` before <windows.h>.
74 2022-12-21 Martin Liska <mliska@suse.cz>
76 * jit-playback.h: Use unused attribute.
78 2022-12-14 Antoni Boucher <bouanto@zoho.com>
79 Guillaume Gomez <guillaume1.gomez@gmail.com>
82 * jit-recording.h: Add vector_type::is_same_type_as method
84 2022-12-07 Antoni Boucher <bouanto@zoho.com>
85 Guillaume Gomez <guillaume1.gomez@gmail.com>
88 * jit-playback.cc: Fix vector float comparison
89 * jit-playback.h: Update comparison function signature
90 * jit-recording.cc: Update call for "new_comparison" function
91 * jit-recording.h: Fix vector float comparison
93 2022-11-20 Jeff Law <jlaw@ventanamicro.com>
96 * jit-playback.cc (playback::lvale::mark_addressable): Remove
99 2022-11-19 Jonathan Wakely <jwakely@redhat.com>
100 LIU Hao <lh_mouse@126.com>
102 * jit-playback.cc (playback::context::scoped_lock): Define RAII
104 (playback::context::compile): Use scoped_lock to acquire mutex
105 for the active playback context.
106 (jit_mutex): Change to std::mutex.
107 (playback::context::acquire_mutex): Rename to ...
108 (playback::context::lock): ... this.
109 (playback::context::release_mutex): Rename to ...
110 (playback::context::unlock): ... this.
111 * jit-playback.h (playback::context): Rename members and declare
113 * jit-recording.cc (INCLUDE_PTHREAD_H): Remove unused define.
114 * libgccjit.cc (version_mutex): Change to std::mutex.
115 (struct jit_version_info): Use std::lock_guard to acquire and
118 2022-11-14 Martin Liska <mliska@suse.cz>
121 2022-11-09 Martin Liska <mliska@suse.cz>
124 * docs/cp/index.rst: Moved to...
125 * doc/cp/index.rst: ...here.
126 * docs/cp/intro/index.rst: Moved to...
127 * doc/cp/intro/index.rst: ...here.
128 * docs/cp/intro/tutorial01.rst: Moved to...
129 * doc/cp/intro/tutorial01.rst: ...here.
130 * docs/cp/intro/tutorial02.rst: Moved to...
131 * doc/cp/intro/tutorial02.rst: ...here.
132 * docs/cp/intro/tutorial03.rst: Moved to...
133 * doc/cp/intro/tutorial03.rst: ...here.
134 * docs/cp/intro/tutorial04.rst: Moved to...
135 * doc/cp/intro/tutorial04.rst: ...here.
136 * docs/cp/topics/asm.rst: Moved to...
137 * doc/cp/topics/asm.rst: ...here.
138 * docs/cp/topics/compilation.rst: Moved to...
139 * doc/cp/topics/compilation.rst: ...here.
140 * docs/cp/topics/contexts.rst: Moved to...
141 * doc/cp/topics/contexts.rst: ...here.
142 * docs/cp/topics/expressions.rst: Moved to...
143 * doc/cp/topics/expressions.rst: ...here.
144 * docs/cp/topics/functions.rst: Moved to...
145 * doc/cp/topics/functions.rst: ...here.
146 * docs/cp/topics/index.rst: Moved to...
147 * doc/cp/topics/index.rst: ...here.
148 * docs/cp/topics/locations.rst: Moved to...
149 * doc/cp/topics/locations.rst: ...here.
150 * docs/cp/topics/objects.rst: Moved to...
151 * doc/cp/topics/objects.rst: ...here.
152 * docs/cp/topics/types.rst: Moved to...
153 * doc/cp/topics/types.rst: ...here.
154 * docs/examples/emit-alphabet.bf: Moved to...
155 * doc/examples/emit-alphabet.bf: ...here.
156 * docs/examples/tut01-hello-world.c: Moved to...
157 * doc/examples/tut01-hello-world.c: ...here.
158 * docs/examples/tut01-hello-world.cc: Moved to...
159 * doc/examples/tut01-hello-world.cc: ...here.
160 * docs/examples/tut02-square.c: Moved to...
161 * doc/examples/tut02-square.c: ...here.
162 * docs/examples/tut02-square.cc: Moved to...
163 * doc/examples/tut02-square.cc: ...here.
164 * docs/examples/tut03-sum-of-squares.c: Moved to...
165 * doc/examples/tut03-sum-of-squares.c: ...here.
166 * docs/examples/tut03-sum-of-squares.cc: Moved to...
167 * doc/examples/tut03-sum-of-squares.cc: ...here.
168 * docs/examples/tut04-toyvm/Makefile: Moved to...
169 * doc/examples/tut04-toyvm/Makefile: ...here.
170 * docs/examples/tut04-toyvm/factorial.toy: Moved to...
171 * doc/examples/tut04-toyvm/factorial.toy: ...here.
172 * docs/examples/tut04-toyvm/fibonacci.toy: Moved to...
173 * doc/examples/tut04-toyvm/fibonacci.toy: ...here.
174 * docs/examples/tut04-toyvm/toyvm.c: Moved to...
175 * doc/examples/tut04-toyvm/toyvm.c: ...here.
176 * docs/examples/tut04-toyvm/toyvm.cc: Moved to...
177 * doc/examples/tut04-toyvm/toyvm.cc: ...here.
178 * docs/examples/tut05-bf.c: Moved to...
179 * doc/examples/tut05-bf.c: ...here.
180 * docs/index.rst: Moved to...
181 * doc/index.rst: ...here.
182 * docs/internals/index.rst: Moved to...
183 * doc/internals/index.rst: ...here.
184 * docs/internals/test-hello-world.exe.log.txt: Moved to...
185 * doc/internals/test-hello-world.exe.log.txt: ...here.
186 * docs/_build/texinfo/libgccjit-figures/factorial.png: Moved to...
187 * doc/intro/factorial.png: ...here.
188 * docs/intro/index.rst: Moved to...
189 * doc/intro/index.rst: ...here.
190 * docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: Moved to...
191 * doc/intro/sum-of-squares.png: ...here.
192 * docs/intro/tutorial01.rst: Moved to...
193 * doc/intro/tutorial01.rst: ...here.
194 * docs/intro/tutorial02.rst: Moved to...
195 * doc/intro/tutorial02.rst: ...here.
196 * docs/intro/tutorial03.rst: Moved to...
197 * doc/intro/tutorial03.rst: ...here.
198 * docs/intro/tutorial04.rst: Moved to...
199 * doc/intro/tutorial04.rst: ...here.
200 * docs/intro/tutorial05.rst: Moved to...
201 * doc/intro/tutorial05.rst: ...here.
202 * docs/topics/asm.rst: Moved to...
203 * doc/topics/asm.rst: ...here.
204 * docs/topics/compatibility.rst: Moved to...
205 * doc/topics/compatibility.rst: ...here.
206 * docs/topics/compilation.rst: Moved to...
207 * doc/topics/compilation.rst: ...here.
208 * docs/topics/contexts.rst: Moved to...
209 * doc/topics/contexts.rst: ...here.
210 * docs/topics/expressions.rst: Moved to...
211 * doc/topics/expressions.rst: ...here.
212 * docs/topics/function-pointers.rst: Moved to...
213 * doc/topics/function-pointers.rst: ...here.
214 * docs/topics/functions.rst: Moved to...
215 * doc/topics/functions.rst: ...here.
216 * docs/topics/index.rst: Moved to...
217 * doc/topics/index.rst: ...here.
218 * docs/topics/locations.rst: Moved to...
219 * doc/topics/locations.rst: ...here.
220 * docs/topics/objects.rst: Moved to...
221 * doc/topics/objects.rst: ...here.
222 * docs/topics/performance.rst: Moved to...
223 * doc/topics/performance.rst: ...here.
224 * docs/topics/types.rst: Moved to...
225 * doc/topics/types.rst: ...here.
226 * docs/Makefile: Removed.
227 * docs/_build/texinfo/Makefile: Removed.
228 * docs/_build/texinfo/libgccjit-figures/factorial1.png: Removed.
229 * docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: Removed.
230 * docs/_build/texinfo/libgccjit.texi: Removed.
231 * docs/conf.py: Removed.
232 * docs/intro/factorial.png: Removed.
233 * docs/intro/sum-of-squares.png: Removed.
234 * doc/conf.py: New file.
236 2022-11-14 Martin Liska <mliska@suse.cz>
239 2022-11-14 Martin Liska <mliska@suse.cz>
241 * Make-lang.in: Support --with-sphinx-build.
243 2022-11-14 Martin Liska <mliska@suse.cz>
246 2022-11-14 Martin Liska <mliska@suse.cz>
248 * doc/internals/index.rst: Fix cross manual refs.
249 * doc/topics/contexts.rst: Likewise.
251 2022-11-14 Martin Liska <mliska@suse.cz>
254 2022-11-14 Martin Liska <mliska@suse.cz>
257 Support installation if sphinx-build is missing.
259 2022-11-14 Martin Liska <mliska@suse.cz>
262 2022-11-14 Martin Liska <mliska@suse.cz>
264 * doc/cp/index.rst: Remove trailing .rst in toctree.
265 * doc/cp/intro/index.rst: Likewise.
266 * doc/cp/topics/index.rst: Likewise.
267 * doc/index.rst: Likewise.
268 * doc/intro/index.rst: Likewise.
269 * doc/topics/index.rst: Likewise.
270 * doc/indices-and-tables.rst: New file.
272 2022-11-11 Martin Liska <mliska@suse.cz>
274 * doc/cp/index.rst: Remove trailing .rst in toctree.
275 * doc/cp/intro/index.rst: Likewise.
276 * doc/cp/topics/index.rst: Likewise.
277 * doc/index.rst: Likewise.
278 * doc/intro/index.rst: Likewise.
279 * doc/topics/index.rst: Likewise.
280 * doc/indices-and-tables.rst: New file.
282 2022-11-09 Martin Liska <mliska@suse.cz>
285 Support installation if sphinx-build is missing.
287 2022-11-09 Martin Liska <mliska@suse.cz>
289 * doc/internals/index.rst: Fix cross manual refs.
290 * doc/topics/contexts.rst: Likewise.
292 2022-11-09 Martin Liska <mliska@suse.cz>
294 * Make-lang.in: Support --with-sphinx-build.
296 2022-11-09 Martin Liska <mliska@suse.cz>
299 * docs/cp/index.rst: Moved to...
300 * doc/cp/index.rst: ...here.
301 * docs/cp/intro/index.rst: Moved to...
302 * doc/cp/intro/index.rst: ...here.
303 * docs/cp/intro/tutorial01.rst: Moved to...
304 * doc/cp/intro/tutorial01.rst: ...here.
305 * docs/cp/intro/tutorial02.rst: Moved to...
306 * doc/cp/intro/tutorial02.rst: ...here.
307 * docs/cp/intro/tutorial03.rst: Moved to...
308 * doc/cp/intro/tutorial03.rst: ...here.
309 * docs/cp/intro/tutorial04.rst: Moved to...
310 * doc/cp/intro/tutorial04.rst: ...here.
311 * docs/cp/topics/asm.rst: Moved to...
312 * doc/cp/topics/asm.rst: ...here.
313 * docs/cp/topics/compilation.rst: Moved to...
314 * doc/cp/topics/compilation.rst: ...here.
315 * docs/cp/topics/contexts.rst: Moved to...
316 * doc/cp/topics/contexts.rst: ...here.
317 * docs/cp/topics/expressions.rst: Moved to...
318 * doc/cp/topics/expressions.rst: ...here.
319 * docs/cp/topics/functions.rst: Moved to...
320 * doc/cp/topics/functions.rst: ...here.
321 * docs/cp/topics/index.rst: Moved to...
322 * doc/cp/topics/index.rst: ...here.
323 * docs/cp/topics/locations.rst: Moved to...
324 * doc/cp/topics/locations.rst: ...here.
325 * docs/cp/topics/objects.rst: Moved to...
326 * doc/cp/topics/objects.rst: ...here.
327 * docs/cp/topics/types.rst: Moved to...
328 * doc/cp/topics/types.rst: ...here.
329 * docs/examples/emit-alphabet.bf: Moved to...
330 * doc/examples/emit-alphabet.bf: ...here.
331 * docs/examples/tut01-hello-world.c: Moved to...
332 * doc/examples/tut01-hello-world.c: ...here.
333 * docs/examples/tut01-hello-world.cc: Moved to...
334 * doc/examples/tut01-hello-world.cc: ...here.
335 * docs/examples/tut02-square.c: Moved to...
336 * doc/examples/tut02-square.c: ...here.
337 * docs/examples/tut02-square.cc: Moved to...
338 * doc/examples/tut02-square.cc: ...here.
339 * docs/examples/tut03-sum-of-squares.c: Moved to...
340 * doc/examples/tut03-sum-of-squares.c: ...here.
341 * docs/examples/tut03-sum-of-squares.cc: Moved to...
342 * doc/examples/tut03-sum-of-squares.cc: ...here.
343 * docs/examples/tut04-toyvm/Makefile: Moved to...
344 * doc/examples/tut04-toyvm/Makefile: ...here.
345 * docs/examples/tut04-toyvm/factorial.toy: Moved to...
346 * doc/examples/tut04-toyvm/factorial.toy: ...here.
347 * docs/examples/tut04-toyvm/fibonacci.toy: Moved to...
348 * doc/examples/tut04-toyvm/fibonacci.toy: ...here.
349 * docs/examples/tut04-toyvm/toyvm.c: Moved to...
350 * doc/examples/tut04-toyvm/toyvm.c: ...here.
351 * docs/examples/tut04-toyvm/toyvm.cc: Moved to...
352 * doc/examples/tut04-toyvm/toyvm.cc: ...here.
353 * docs/examples/tut05-bf.c: Moved to...
354 * doc/examples/tut05-bf.c: ...here.
355 * docs/index.rst: Moved to...
356 * doc/index.rst: ...here.
357 * docs/internals/index.rst: Moved to...
358 * doc/internals/index.rst: ...here.
359 * docs/internals/test-hello-world.exe.log.txt: Moved to...
360 * doc/internals/test-hello-world.exe.log.txt: ...here.
361 * docs/_build/texinfo/libgccjit-figures/factorial.png: Moved to...
362 * doc/intro/factorial.png: ...here.
363 * docs/intro/index.rst: Moved to...
364 * doc/intro/index.rst: ...here.
365 * docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: Moved to...
366 * doc/intro/sum-of-squares.png: ...here.
367 * docs/intro/tutorial01.rst: Moved to...
368 * doc/intro/tutorial01.rst: ...here.
369 * docs/intro/tutorial02.rst: Moved to...
370 * doc/intro/tutorial02.rst: ...here.
371 * docs/intro/tutorial03.rst: Moved to...
372 * doc/intro/tutorial03.rst: ...here.
373 * docs/intro/tutorial04.rst: Moved to...
374 * doc/intro/tutorial04.rst: ...here.
375 * docs/intro/tutorial05.rst: Moved to...
376 * doc/intro/tutorial05.rst: ...here.
377 * docs/topics/asm.rst: Moved to...
378 * doc/topics/asm.rst: ...here.
379 * docs/topics/compatibility.rst: Moved to...
380 * doc/topics/compatibility.rst: ...here.
381 * docs/topics/compilation.rst: Moved to...
382 * doc/topics/compilation.rst: ...here.
383 * docs/topics/contexts.rst: Moved to...
384 * doc/topics/contexts.rst: ...here.
385 * docs/topics/expressions.rst: Moved to...
386 * doc/topics/expressions.rst: ...here.
387 * docs/topics/function-pointers.rst: Moved to...
388 * doc/topics/function-pointers.rst: ...here.
389 * docs/topics/functions.rst: Moved to...
390 * doc/topics/functions.rst: ...here.
391 * docs/topics/index.rst: Moved to...
392 * doc/topics/index.rst: ...here.
393 * docs/topics/locations.rst: Moved to...
394 * doc/topics/locations.rst: ...here.
395 * docs/topics/objects.rst: Moved to...
396 * doc/topics/objects.rst: ...here.
397 * docs/topics/performance.rst: Moved to...
398 * doc/topics/performance.rst: ...here.
399 * docs/topics/types.rst: Moved to...
400 * doc/topics/types.rst: ...here.
401 * docs/Makefile: Removed.
402 * docs/_build/texinfo/Makefile: Removed.
403 * docs/_build/texinfo/libgccjit-figures/factorial1.png: Removed.
404 * docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: Removed.
405 * docs/_build/texinfo/libgccjit.texi: Removed.
406 * docs/conf.py: Removed.
407 * docs/intro/factorial.png: Removed.
408 * docs/intro/sum-of-squares.png: Removed.
409 * doc/conf.py: New file.
411 2022-09-15 Richard Biener <rguenther@suse.de>
413 * dummy-frontend.cc (jit_langhook_init): Do not initialize
416 2022-08-09 Vibhav Pant <vibhavp@gmail.com>
418 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_context_new_bitcast): Move
419 definition out of comment.
421 2022-07-28 David Malcolm <dmalcolm@redhat.com>
423 * docs/internals/index.rst: Remove reference to ".c" extensions
426 2022-07-28 Martin Liška <mliska@suse.cz>
428 * docs/cp/intro/tutorial02.rst:
429 Shorten the assembly example so that there is not slider.
430 * docs/cp/intro/tutorial04.rst: Likewise.
431 * docs/intro/tutorial02.rst: Likewise.
432 * docs/intro/tutorial04.rst: Likewise.
433 * docs/topics/contexts.rst: Likewise.
435 2022-07-28 marxin <mliska@suse.cz>
437 * docs/index.rst: Remove reference to module index
438 as we don't emit any.
440 2022-07-28 marxin <mliska@suse.cz>
442 * docs/cp/intro/tutorial02.rst: Use :expr:`type *` for pointers to a type
443 * docs/cp/topics/asm.rst: Likewise.
444 * docs/cp/topics/contexts.rst: Likewise.
445 * docs/cp/topics/expressions.rst: Likewise.
446 * docs/cp/topics/functions.rst: Likewise.
447 * docs/cp/topics/objects.rst: Likewise.
448 * docs/intro/tutorial02.rst: Likewise.
449 * docs/intro/tutorial03.rst: Likewise.
450 * docs/intro/tutorial04.rst: Likewise.
451 * docs/intro/tutorial05.rst: Likewise.
452 * docs/topics/compilation.rst: Likewise.
453 * docs/topics/contexts.rst: Likewise.
454 * docs/topics/objects.rst: Likewise.
456 2022-07-28 marxin <mliska@suse.cz>
458 * docs/cp/intro/tutorial04.rst: Use list-table.
459 * docs/intro/tutorial04.rst: Likewise.
460 * docs/intro/tutorial05.rst: Likewise.
461 * docs/topics/compilation.rst: Likewise.
462 * docs/topics/expressions.rst: Likewise.
463 * docs/topics/types.rst: Likewise.
465 2022-07-28 marxin <mliska@suse.cz>
467 * docs/cp/topics/expressions.rst: Compact so that the generated
468 output is also more compact.
470 2022-07-28 marxin <mliska@suse.cz>
472 * docs/cp/intro/tutorial02.rst: Use proper reference.
473 * docs/cp/topics/contexts.rst: Likewise.
474 * docs/cp/topics/functions.rst: Put `class` directive before a
475 function as it is not allowed declaring a class in a fn.
476 * docs/cp/topics/types.rst: Add template keyword.
477 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile):
478 Add removed comment used for code snippet ending detection.
479 * docs/intro/tutorial04.rst: Fix to match the real comment.
481 2022-07-28 marxin <mliska@suse.cz>
483 * docs/cp/topics/expressions.rst: Use :expr: for basic types.
484 * docs/topics/compilation.rst: Likewise.
485 * docs/topics/expressions.rst: Likewise.
486 * docs/topics/function-pointers.rst: Likewise.
488 2022-07-28 marxin <mliska@suse.cz>
490 * docs/conf.py: Add needs_sphinx = '3.0' where c:type was added.
491 * docs/index.rst: Remove note about it.
492 * docs/topics/compilation.rst: Use enum directive and reference.
493 * docs/topics/contexts.rst: Likewise.
494 * docs/topics/expressions.rst: Likewise.
495 * docs/topics/functions.rst: Likewise.
497 2022-07-14 Jonathan Wakely <jwakely@redhat.com>
499 * jit-recording.h (recording::memento): Define copy constructor
500 and copy assignment operator as deleted.
501 (recording::string): Likewise.
502 (recording::string::c_str): Add const qualifier.
504 2022-06-29 Antoni Boucher <bouanto@zoho.com>
507 * jit-playback.cc: Use the correct return type when folding in
510 2022-06-29 Sergei Trofimovich <siarheit@google.com>
513 * jit-playback.cc: Include <pthread.h> via "system.h" to avoid calloc()
515 * jit-recording.cc: Ditto.
516 * libgccjit.cc: Ditto.
518 2022-06-10 Antoni Boucher <bouanto@zoho.com>
521 * libgccjit.cc: Add support for floating-point types in
522 gcc_jit_type_get_size.
524 2022-06-08 Yang Yujie <yangyujie@loongson.cn>
526 * Make-lang.in: only link objects from $(EXTRA_GCC_OBJS)
527 that's not in $(EXTRA_OBJS) into libgccjit.
529 2022-05-23 David Malcolm <dmalcolm@redhat.com>
531 * jit-recording.h: Add "final" and "override" to all vfunc
532 implementations that were missing them, as appropriate.
534 2022-05-20 David Malcolm <dmalcolm@redhat.com>
536 * jit-playback.h: Replace uses of "FINAL" and "OVERRIDE" with
537 "final" and "override".
538 * jit-recording.cc: Likewise.
539 * jit-recording.h: Likewise.
541 2022-05-16 Martin Liska <mliska@suse.cz>
543 * jit-builtins.cc (find_builtin_by_name): Use ARRAY_SIZE.
544 (get_string_for_type_id): Likewise.
545 * jit-recording.cc (recording::context::context): Likewise.
547 2022-04-14 Iain Sandoe <iain@sandoe.co.uk>
549 * jit-playback.cc (new_bitcast): Cast values returned by tree_to_uhwi
550 to 'long' to match the print format.
552 2022-04-12 Antoni Boucher <bouanto@zoho.com>
555 * docs/_build/texinfo/libgccjit.texi: Regenerate.
556 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_24): New ABI tag.
557 * docs/topics/expressions.rst: Add documentation for the
558 functions gcc_jit_lvalue_set_alignment and
559 gcc_jit_lvalue_get_alignment.
560 * jit-playback.h: New function (set_alignment).
561 * jit-recording.cc: New function (set_alignment).
562 * jit-recording.h: New functions (set_alignment, get_alignment)
563 and new field (m_alignment).
564 * libgccjit.cc: New functions (gcc_jit_lvalue_get_alignment,
565 gcc_jit_lvalue_set_alignment)
566 * libgccjit.h: New functions (gcc_jit_lvalue_get_alignment,
567 gcc_jit_lvalue_set_alignment)
568 * libgccjit.map (LIBGCCJIT_ABI_24): New ABI tag.
570 2022-04-12 Antoni Boucher <bouanto@zoho.com>
573 * docs/_build/texinfo/libgccjit.texi: Regenerate.
574 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_23): New ABI tag.
575 * docs/topics/contexts.rst: Add documentation for the new
576 function gcc_jit_context_set_bool_print_errors_to_stderr.
577 * jit-common.h: New enum value
578 (INNER_BOOL_OPTION_PRINT_ERRORS_TO_STDERR).
579 * jit-recording.cc: Handle the new option
580 INNER_BOOL_OPTION_PRINT_ERRORS_TO_STDERR.
581 * libgccjit.cc: New function
582 (gcc_jit_context_set_bool_print_errors_to_stderr).
583 * libgccjit.h: New function
584 (gcc_jit_context_set_bool_print_errors_to_stderr).
585 * libgccjit.map (LIBGCCJIT_ABI_23): New ABI tag.
587 2022-04-12 Antoni Boucher <bouanto@zoho.com>
590 * docs/_build/texinfo/libgccjit.texi: Regenerate.
591 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_22): New ABI tag.
592 * docs/topics/expressions.rst: Add documentation for the
593 function gcc_jit_lvalue_set_register_name.
594 * jit-playback.h: New function (set_register_name).
595 * jit-recording.cc: New function (set_register_name) and add
596 support for register variables.
597 * jit-recording.h: New field (m_reg_name) and new function
599 * libgccjit.cc: New function (gcc_jit_lvalue_set_register_name).
600 * libgccjit.h: New function (gcc_jit_lvalue_set_register_name).
601 * libgccjit.map (LIBGCCJIT_ABI_22): New ABI tag.
603 2022-04-12 Antoni Boucher <bouanto@zoho.com>
606 * docs/_build/texinfo/libgccjit.texi: Regenerate.
607 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_21): New ABI tag.
608 * docs/topics/expressions.rst: Add documentation for the
609 function gcc_jit_context_new_bitcast.
610 * jit-playback.cc: New function (new_bitcast).
611 * jit-playback.h: New function (new_bitcast).
612 * jit-recording.cc: New functions (new_bitcast,
613 bitcast::replay_into, bitcast::visit_children,
614 bitcast::make_debug_string, bitcast::write_reproducer).
615 * jit-recording.h: New class (bitcast) and new function
616 (new_bitcast, bitcast::replay_into, bitcast::visit_children,
617 bitcast::make_debug_string, bitcast::write_reproducer,
618 bitcast::get_precedence).
619 * libgccjit.cc: New function (gcc_jit_context_new_bitcast)
620 * libgccjit.h: New function (gcc_jit_context_new_bitcast)
621 * libgccjit.map (LIBGCCJIT_ABI_21): New ABI tag.
623 2022-04-12 Antoni Boucher <bouanto@zoho.com>
626 * docs/_build/texinfo/libgccjit.texi: Regenerate
627 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_20): New ABI tag.
628 * docs/topics/types.rst: Add documentation for the new types
629 GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T,
630 GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T,
631 GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T, GCC_JIT_TYPE_INT16_T,
632 GCC_JIT_TYPE_INT32_T, GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T and
633 new functions (gcc_jit_compatible_types, gcc_jit_type_get_size).
634 * jit-builtins.cc: Add support for BT_UINT128.
635 * jit-common.h: Update the value of NUM_GCC_JIT_TYPES.
636 * jit-playback.cc: Add support for the sized integer types.
637 * jit-recording.cc: Add support for the sized integer types.
638 * jit-recording.h: Add support for comparing integer types
639 and new function (is_signed).
640 * libgccjit.cc (gcc_jit_compatible_types): New.
641 (gcc_jit_type_get_size) New.
642 * libgccjit.h: New enum variants for gcc_jit_types
643 (GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T,
644 GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T,
645 GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T,
646 GCC_JIT_TYPE_INT16_T, GCC_JIT_TYPE_INT32_T,
647 GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T) and new functions
648 (gcc_jit_compatible_types, gcc_jit_type_get_size).
649 * libgccjit.map (LIBGCCJIT_ABI_20): New ABI tag.
651 2022-04-06 David Malcolm <dmalcolm@redhat.com>
654 * docs/_build/texinfo/factorial.png: Move to...
655 * docs/_build/texinfo/libgccjit-figures/factorial.png: ...here.
656 * docs/_build/texinfo/factorial1.png: Move to...
657 * docs/_build/texinfo/libgccjit-figures/factorial1.png: ...here.
658 * docs/_build/texinfo/sum-of-squares.png: Move to...
659 * docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: ...here.
660 * docs/_build/texinfo/sum-of-squares1.png: Move to...
661 * docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: ...here.
663 2022-04-01 David Malcolm <dmalcolm@redhat.com>
665 * docs/topics/expressions.rst: Fix formatting.
666 * docs/topics/types.rst: Likewise.
667 * docs/_build/texinfo/libgccjit.texi: Regenerate
669 2022-04-01 Petter Tomner <tomner@kth.se>
671 * docs/topics/compatibility.rst: Add 19 tag
672 * docs/topics/compilation.rst: Linking
673 * docs/topics/contexts.rst: Linking example
674 * docs/topics/expressions.rst: Fix formatting and dropped 's'
676 2022-03-07 Jakub Jelinek <jakub@redhat.com>
678 * libgccjit.h: Fix up duplicated word issue in a comment.
680 2022-01-17 Martin Liska <mliska@suse.cz>
682 * config-lang.in: Rename .c names to .cc.
683 * docs/_build/texinfo/libgccjit.texi: Likewise.
684 * docs/internals/index.rst: Likewise.
685 * jit-builtins.cc (builtins_manager::make_builtin_function): Likewise.
686 * jit-playback.cc (fold_const_var): Likewise.
687 (playback::context::~context): Likewise.
688 (new_field): Likewise.
689 (new_bitfield): Likewise.
690 (new_compound_type): Likewise.
691 (playback::compound_type::set_fields): Likewise.
692 (global_set_init_rvalue): Likewise.
693 (load_blob_in_ctor): Likewise.
694 (new_global_initialized): Likewise.
696 (new_string_literal): Likewise.
697 (as_truth_value): Likewise.
698 (build_call): Likewise.
699 (playback::context::build_cast): Likewise.
700 (new_array_access): Likewise.
701 (new_field_access): Likewise.
702 (dereference): Likewise.
703 (postprocess): Likewise.
704 (add_jump): Likewise.
705 (add_switch): Likewise.
706 (build_goto_operands): Likewise.
707 (playback::context::read_dump_file): Likewise.
708 (init_types): Likewise.
709 * jit-recording.cc (recording::context::get_int_type): Likewise.
710 * jit-recording.h: Likewise.
711 * libgccjit.cc (compatible_types): Likewise.
712 (gcc_jit_context_acquire): Likewise.
713 (gcc_jit_context_release): Likewise.
714 (gcc_jit_context_new_child_context): Likewise.
715 (gcc_jit_type_as_object): Likewise.
716 (gcc_jit_context_get_type): Likewise.
717 (gcc_jit_context_get_int_type): Likewise.
718 (gcc_jit_type_get_pointer): Likewise.
719 (gcc_jit_type_get_const): Likewise.
720 (gcc_jit_type_get_volatile): Likewise.
721 (gcc_jit_type_dyncast_array): Likewise.
722 (gcc_jit_type_is_bool): Likewise.
723 (gcc_jit_type_is_pointer): Likewise.
724 (gcc_jit_type_is_integral): Likewise.
725 (gcc_jit_type_dyncast_vector): Likewise.
726 (gcc_jit_type_is_struct): Likewise.
727 (gcc_jit_vector_type_get_num_units): Likewise.
728 (gcc_jit_vector_type_get_element_type): Likewise.
729 (gcc_jit_type_unqualified): Likewise.
730 (gcc_jit_type_dyncast_function_ptr_type): Likewise.
731 (gcc_jit_function_type_get_return_type): Likewise.
732 (gcc_jit_function_type_get_param_count): Likewise.
733 (gcc_jit_function_type_get_param_type): Likewise.
734 (gcc_jit_context_new_array_type): Likewise.
735 (gcc_jit_context_new_field): Likewise.
736 (gcc_jit_field_as_object): Likewise.
737 (gcc_jit_context_new_struct_type): Likewise.
738 (gcc_jit_struct_as_type): Likewise.
739 (gcc_jit_struct_set_fields): Likewise.
740 (gcc_jit_struct_get_field_count): Likewise.
741 (gcc_jit_context_new_union_type): Likewise.
742 (gcc_jit_context_new_function_ptr_type): Likewise.
743 (gcc_jit_param_as_rvalue): Likewise.
744 (gcc_jit_context_new_function): Likewise.
745 (gcc_jit_function_get_return_type): Likewise.
746 (gcc_jit_function_dump_to_dot): Likewise.
747 (gcc_jit_block_get_function): Likewise.
748 (gcc_jit_global_set_initializer_rvalue): Likewise.
749 (gcc_jit_rvalue_get_type): Likewise.
750 (gcc_jit_context_new_rvalue_from_int): Likewise.
751 (gcc_jit_context_one): Likewise.
752 (gcc_jit_context_new_rvalue_from_double): Likewise.
753 (gcc_jit_context_null): Likewise.
754 (gcc_jit_context_new_string_literal): Likewise.
755 (valid_binary_op_p): Likewise.
756 (gcc_jit_context_new_binary_op): Likewise.
757 (gcc_jit_context_new_comparison): Likewise.
758 (gcc_jit_context_new_call): Likewise.
759 (is_valid_cast): Likewise.
760 (gcc_jit_context_new_cast): Likewise.
761 (gcc_jit_object_get_context): Likewise.
762 (gcc_jit_object_get_debug_string): Likewise.
763 (gcc_jit_lvalue_access_field): Likewise.
764 (gcc_jit_rvalue_access_field): Likewise.
765 (gcc_jit_rvalue_dereference_field): Likewise.
766 (gcc_jit_rvalue_dereference): Likewise.
767 (gcc_jit_lvalue_get_address): Likewise.
768 (gcc_jit_lvalue_set_tls_model): Likewise.
769 (gcc_jit_lvalue_set_link_section): Likewise.
770 (gcc_jit_function_new_local): Likewise.
771 (gcc_jit_block_add_eval): Likewise.
772 (gcc_jit_block_add_assignment): Likewise.
774 (gcc_jit_block_end_with_conditional): Likewise.
775 (gcc_jit_block_add_comment): Likewise.
776 (gcc_jit_block_end_with_jump): Likewise.
777 (gcc_jit_block_end_with_return): Likewise.
778 (gcc_jit_block_end_with_void_return): Likewise.
779 (case_range_validator::case_range_validator): Likewise.
780 (case_range_validator::validate): Likewise.
781 (case_range_validator::get_wide_int): Likewise.
782 (gcc_jit_block_end_with_switch): Likewise.
783 (gcc_jit_context_set_str_option): Likewise.
784 (gcc_jit_context_set_int_option): Likewise.
785 (gcc_jit_context_set_bool_option): Likewise.
786 (gcc_jit_context_set_bool_allow_unreachable_blocks): Likewise.
787 (gcc_jit_context_set_bool_use_external_driver): Likewise.
788 (gcc_jit_context_add_command_line_option): Likewise.
789 (gcc_jit_context_add_driver_option): Likewise.
790 (gcc_jit_context_enable_dump): Likewise.
791 (gcc_jit_context_compile): Likewise.
792 (gcc_jit_context_compile_to_file): Likewise.
793 (gcc_jit_context_set_logfile): Likewise.
794 (gcc_jit_context_dump_reproducer_to_file): Likewise.
795 (gcc_jit_context_get_first_error): Likewise.
796 (gcc_jit_context_get_last_error): Likewise.
797 (gcc_jit_result_get_code): Likewise.
798 (gcc_jit_result_get_global): Likewise.
799 (gcc_jit_rvalue_set_bool_require_tail_call): Likewise.
800 (gcc_jit_type_get_aligned): Likewise.
801 (gcc_jit_type_get_vector): Likewise.
802 (gcc_jit_function_get_address): Likewise.
803 (gcc_jit_version_patchlevel): Likewise.
804 (gcc_jit_block_add_extended_asm): Likewise.
805 (gcc_jit_extended_asm_as_object): Likewise.
806 (gcc_jit_extended_asm_set_volatile_flag): Likewise.
807 (gcc_jit_extended_asm_set_inline_flag): Likewise.
808 (gcc_jit_extended_asm_add_output_operand): Likewise.
809 (gcc_jit_extended_asm_add_input_operand): Likewise.
810 (gcc_jit_extended_asm_add_clobber): Likewise.
811 * notes.txt: Likewise.
813 2022-01-17 Martin Liska <mliska@suse.cz>
815 * dummy-frontend.c: Moved to...
816 * dummy-frontend.cc: ...here.
817 * jit-builtins.c: Moved to...
818 * jit-builtins.cc: ...here.
819 * jit-logging.c: Moved to...
820 * jit-logging.cc: ...here.
821 * jit-playback.c: Moved to...
822 * jit-playback.cc: ...here.
823 * jit-recording.c: Moved to...
824 * jit-recording.cc: ...here.
825 * jit-result.c: Moved to...
826 * jit-result.cc: ...here.
827 * jit-spec.c: Moved to...
828 * jit-spec.cc: ...here.
829 * jit-tempdir.c: Moved to...
830 * jit-tempdir.cc: ...here.
831 * jit-w32.c: Moved to...
832 * jit-w32.cc: ...here.
833 * libgccjit.c: Moved to...
834 * libgccjit.cc: ...here.
836 2021-12-28 Martin Liska <mliska@suse.cz>
838 * docs/_build/texinfo/libgccjit.texi: Replace http:// with https.
839 * docs/cp/index.rst: Likewise.
840 * docs/cp/intro/index.rst: Likewise.
841 * docs/cp/intro/tutorial01.rst: Likewise.
842 * docs/cp/intro/tutorial02.rst: Likewise.
843 * docs/cp/intro/tutorial03.rst: Likewise.
844 * docs/cp/intro/tutorial04.rst: Likewise.
845 * docs/cp/topics/asm.rst: Likewise.
846 * docs/cp/topics/compilation.rst: Likewise.
847 * docs/cp/topics/contexts.rst: Likewise.
848 * docs/cp/topics/expressions.rst: Likewise.
849 * docs/cp/topics/functions.rst: Likewise.
850 * docs/cp/topics/index.rst: Likewise.
851 * docs/cp/topics/locations.rst: Likewise.
852 * docs/cp/topics/objects.rst: Likewise.
853 * docs/cp/topics/types.rst: Likewise.
854 * docs/index.rst: Likewise.
855 * docs/internals/index.rst: Likewise.
856 * docs/intro/index.rst: Likewise.
857 * docs/intro/tutorial01.rst: Likewise.
858 * docs/intro/tutorial02.rst: Likewise.
859 * docs/intro/tutorial03.rst: Likewise.
860 * docs/intro/tutorial04.rst: Likewise.
861 * docs/intro/tutorial05.rst: Likewise.
862 * docs/topics/asm.rst: Likewise.
863 * docs/topics/compatibility.rst: Likewise.
864 * docs/topics/compilation.rst: Likewise.
865 * docs/topics/contexts.rst: Likewise.
866 * docs/topics/expressions.rst: Likewise.
867 * docs/topics/function-pointers.rst: Likewise.
868 * docs/topics/functions.rst: Likewise.
869 * docs/topics/index.rst: Likewise.
870 * docs/topics/locations.rst: Likewise.
871 * docs/topics/objects.rst: Likewise.
872 * docs/topics/performance.rst: Likewise.
873 * docs/topics/types.rst: Likewise.
875 2021-12-20 Martin Liska <mliska@suse.cz>
877 * libgccjit.c (struct version_info): Rename to jit_version_info.
878 (struct jit_version_info): Likewise.
879 (gcc_jit_version_major): Likewise.
880 (gcc_jit_version_minor): Likewise.
881 (gcc_jit_version_patchlevel): Likewise.
883 2021-12-14 Petter Tomner <tomner@kth.se>
885 * jit-common.h: New enum
886 * jit-playback.c : Folding an setting intitial
887 (global_new_decl) : Handle const global generation
888 (new_global) : New flag
889 (global_set_init_rvalue) : New
891 (new_global_initialized) : Flag
892 (as_truth_value) : Fold
893 (new_unary_op) : Fold
894 (new_binary_op) : Fold
895 (new_comparison) : Fold
896 (new_array_access) : Fold
897 (new_dereference) : Fold
900 (global_set_init_rvalue) : New
904 (new_global_init_rvalue) : New
906 (ctor) : New, inherits rvalue
907 (global_init_rvalue) : New, inherits memento
908 (type::is_union) : New
909 * libgccjit++.h : New entrypoints, see C-header
910 * libgccjit.c : See .h
911 * libgccjit.h : New entrypoints
912 (gcc_jit_context_new_array_constructor) : New
913 (gcc_jit_context_new_struct_constructor) : New
914 (gcc_jit_context_new_union_constructor) : New
915 (gcc_jit_global_set_initializer_rvalue) : New
916 (LIBGCCJIT_HAVE_CTORS) : New feuture macro
917 * libgccjit.map : New entrypoints added to ABI 19
918 * docs/topics/expressions.rst : Updated docs
920 2021-12-12 Antoni Boucher <bouanto@zoho.com>
923 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_18): New ABI
925 * docs/topics/expressions.rst: Add documentation for the
926 function gcc_jit_lvalue_set_link_section.
927 * jit-playback.h: New function (set_link_section).
928 * jit-recording.c: New function (set_link_section) and
929 support for setting the link section.
930 * jit-recording.h: New function (set_link_section) and new
931 field m_link_section.
932 * libgccjit.c: New function (gcc_jit_lvalue_set_link_section).
933 * libgccjit.h: New function (gcc_jit_lvalue_set_link_section).
934 * libgccjit.map (LIBGCCJIT_ABI_18): New ABI tag.
936 2021-12-12 Antoni Boucher <bouanto@zoho.com>
939 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_17): New ABI
941 * docs/topics/expressions.rst: Add document for the function
942 gcc_jit_lvalue_set_tls_model.
943 * jit-playback.h: New function (set_tls_model).
944 * jit-recording.c: New function (set_tls_model), new
945 variables (tls_models and tls_model_enum_strings) and support
946 for setting the tls model.
947 * jit-recording.h: New function (set_tls_model) and new
949 * libgccjit.c: New function (gcc_jit_lvalue_set_tls_model).
950 * libgccjit.h: New function (gcc_jit_lvalue_set_tls_model)
951 and new enum (gcc_jit_tls_model).
952 * libgccjit.map (LIBGCCJIT_ABI_17): New ABI tag.
954 2021-12-11 Antoni Boucher <bouanto@zoho.com>
958 * jit-builtins.c: Implement missing types for builtins.
959 * jit-recording.c:: Allow sending a volatile const void * as
961 * jit-recording.h: New functions (is_volatile, is_const) and
962 allow comparing qualified types.
964 2021-12-10 David Malcolm <dmalcolm@redhat.com>
967 * jit-playback.c (gcc::jit::playback::context::new_function): Set
968 DECL_CONTEXT of the result_decl.
970 2021-11-27 Petter Tomner <tomner@kth.se>
972 * libgccjit.c: %ld -> %zu
974 2021-11-24 Martin Liska <mliska@suse.cz>
976 * jit-playback.c (function): Initialize m_blocks vector.
978 2021-11-20 Antoni Boucher <bouanto@zoho.com>
981 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_16): New ABI tag.
982 * docs/topics/functions.rst: Add documentation for the
983 functions gcc_jit_function_get_return_type and
984 gcc_jit_function_get_param_count
985 * docs/topics/types.rst: Add documentation for the functions
986 gcc_jit_function_type_get_return_type,
987 gcc_jit_function_type_get_param_count,
988 gcc_jit_function_type_get_param_type,
989 gcc_jit_type_unqualified, gcc_jit_type_dyncast_array,
990 gcc_jit_type_is_bool,
991 gcc_jit_type_dyncast_function_ptr_type,
992 gcc_jit_type_is_integral, gcc_jit_type_is_pointer,
993 gcc_jit_type_dyncast_vector,
994 gcc_jit_vector_type_get_element_type,
995 gcc_jit_vector_type_get_num_units,
996 gcc_jit_struct_get_field, gcc_jit_type_is_struct,
997 and gcc_jit_struct_get_field_count
999 (gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
1000 gcc_jit_function_type_get_return_type,
1001 gcc_jit_function_type_get_param_count,
1002 gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
1003 gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
1004 gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
1005 gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
1006 gcc_jit_vector_type_get_element_type,
1007 gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
1008 gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
1010 (struct gcc_jit_function_type, struct gcc_jit_vector_type):
1013 (gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
1014 gcc_jit_function_type_get_return_type,
1015 gcc_jit_function_type_get_param_count,
1016 gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
1017 gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
1018 gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
1019 gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
1020 gcc_jit_vector_type_get_element_type,
1021 gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
1022 gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
1023 function declarations.
1024 (struct gcc_jit_function_type, struct gcc_jit_vector_type):
1026 * jit-recording.h: New functions (is_struct and is_vector)
1027 * libgccjit.map (LIBGCCJIT_ABI_16): New ABI tag.
1029 2021-11-12 David Malcolm <dmalcolm@redhat.com>
1032 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile):
1033 Increase size of buffer.
1034 * docs/examples/tut04-toyvm/toyvm.cc
1035 (compilation_state::create_function): Likewise.
1037 2021-09-10 Petter Tomner <tomner@kth.se>
1039 * jit-playback.c: Moved global var processing to after loc handling.
1040 Setting TYPE_NAME for fundamental types.
1041 Using common functions for finalizing globals.
1042 * jit-playback.h: New method init_types().
1043 Changed get_tree_node_for_type() to method.
1045 2021-08-19 Iain Sandoe <iain@sandoe.co.uk>
1047 * docs/examples/tut04-toyvm/toyvm.c: Include jit-dejagnu.h.
1048 * docs/examples/tut04-toyvm/toyvm.cc: Likewise.
1049 * jit-dejagnu.h: New file, imported from dejagnu-1.6.2 and
1050 patched for this application.
1052 2021-08-18 Iain Sandoe <iain@sandoe.co.uk>
1055 * Make-lang.in: Provide clauses for Darwin hosts.
1057 2021-07-18 Antoni Boucher <bouanto@zoho.com>
1060 * jit-playback.c (convert): Add support to handle truncation and
1061 extension in the convert function.
1063 2021-05-19 Martin Liska <mliska@suse.cz>
1066 * libgccjit.c (gcc_jit_context_new_function): Fix typos.
1068 2021-03-24 Matthias Klose <doko@ubuntu.com>
1070 * Make-lang.in (jit.sphinx.html, jit.sphinx.pdf): Use $(mkinstalldirs),
1071 (jit.install-headers): Depend on installdirs.
1073 2021-02-19 David Malcolm <dmalcolm@redhat.com>
1077 (gcc::jit::builtins_manager::get_builtin_function_by_id):
1078 Update assertion to reject BUILT_IN_NONE.
1079 (gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
1082 (gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
1084 * jit-playback.c (gcc::jit::playback::context::replay): Call it.
1085 Remove redundant conditional on bm.
1087 2021-01-14 David Malcolm <dmalcolm@redhat.com>
1089 * docs/cp/index.rst: Remove "Alpha" warning.
1090 * docs/index.rst: Likewise.
1091 * docs/_build/texinfo/libgccjit.texi: Regenerate
1093 2020-11-25 Martin Sebor <msebor@redhat.com>
1096 * jit-recording.c (recording::function::dump_to_dot): Avoid
1098 (recording::block::dump_to_dot): Same.
1100 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1103 * Make-lang.in (jit.serial): Change from goal to a
1105 (.PHONY): Drop jit.serial and jit.prev.
1106 ($(LIBGCCJIT_FILENAME)): Depend on $(jit.serial) rather than
1109 2020-11-18 Jakub Jelinek <jakub@redhat.com>
1111 * Make-lang.in (jit.serial): New goal.
1112 (.PHONY): Add jit.serial jit.prev.
1113 ($(LIBGCCJIT_FILENAME)): Depend on jit.prev. Call LINK_PROGRESS.
1115 2020-11-12 David Malcolm <dmalcolm@redhat.com>
1118 * docs/cp/topics/asm.rst: New file.
1119 * docs/cp/topics/index.rst (Topic Reference): Add it.
1120 * docs/topics/asm.rst: New file.
1121 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_15): New.
1122 * docs/topics/functions.rst (Statements): Add link to extended
1124 * docs/topics/index.rst (Topic Reference): Add asm.rst.
1125 * docs/topics/objects.rst: Add gcc_jit_extended_asm to ASCII art.
1126 * docs/_build/texinfo/Makefile: Regenerate.
1127 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1128 * jit-common.h (gcc::jit::recording::extended_asm): New forward
1130 (gcc::jit::recording::top_level_asm): Likewise.
1131 * jit-playback.c: Include "stmt.h".
1132 (build_string): New.
1133 (gcc::jit::playback::context::new_string_literal): Disambiguate
1135 (gcc::jit::playback::context::add_top_level_asm): New.
1136 (build_operand_chain): New.
1137 (build_clobbers): New.
1138 (build_goto_operands): New.
1139 (gcc::jit::playback::block::add_extended_asm): New.
1140 * jit-playback.h (gcc::jit::playback::context::add_top_level_asm):
1142 (struct gcc::jit::playback::asm_operand): New struct.
1143 (gcc::jit::playback::block::add_extended_asm): New decl.
1144 * jit-recording.c (gcc::jit::recording::context::dump_to_file):
1145 Dump top-level asms.
1146 (gcc::jit::recording::context::add_top_level_asm): New.
1147 (gcc::jit::recording::block::add_extended_asm): New.
1148 (gcc::jit::recording::block::end_with_extended_asm_goto): New.
1149 (gcc::jit::recording::asm_operand::asm_operand): New.
1150 (gcc::jit::recording::asm_operand::print): New.
1151 (gcc::jit::recording::asm_operand::make_debug_string): New.
1152 (gcc::jit::recording::output_asm_operand::write_reproducer): New.
1153 (gcc::jit::recording::output_asm_operand::print): New.
1154 (gcc::jit::recording::input_asm_operand::write_reproducer): New.
1155 (gcc::jit::recording::input_asm_operand::print): New.
1156 (gcc::jit::recording::extended_asm::add_output_operand): New.
1157 (gcc::jit::recording::extended_asm::add_input_operand): New.
1158 (gcc::jit::recording::extended_asm::add_clobber): New.
1159 (gcc::jit::recording::extended_asm::replay_into): New.
1160 (gcc::jit::recording::extended_asm::make_debug_string): New.
1161 (gcc::jit::recording::extended_asm::write_flags): New.
1162 (gcc::jit::recording::extended_asm::write_clobbers): New.
1163 (gcc::jit::recording::extended_asm_simple::write_reproducer): New.
1164 (gcc::jit::recording::extended_asm::maybe_populate_playback_blocks):
1166 (gcc::jit::recording::extended_asm_goto::extended_asm_goto): New.
1167 (gcc::jit::recording::extended_asm_goto::replay_into): New.
1168 (gcc::jit::recording::extended_asm_goto::write_reproducer): New.
1169 (gcc::jit::recording::extended_asm_goto::get_successor_blocks):
1171 (gcc::jit::recording::extended_asm_goto::maybe_print_gotos): New.
1172 (gcc::jit::recording::extended_asm_goto::maybe_populate_playback_blocks):
1174 (gcc::jit::recording::top_level_asm::top_level_asm): New.
1175 (gcc::jit::recording::top_level_asm::replay_into): New.
1176 (gcc::jit::recording::top_level_asm::make_debug_string): New.
1177 (gcc::jit::recording::top_level_asm::write_to_dump): New.
1178 (gcc::jit::recording::top_level_asm::write_reproducer): New.
1180 (gcc::jit::recording::context::add_top_level_asm): New decl.
1181 (gcc::jit::recording::context::m_top_level_asms): New field.
1182 (gcc::jit::recording::block::add_extended_asm): New decl.
1183 (gcc::jit::recording::block::end_with_extended_asm_goto): New
1185 (gcc::jit::recording::asm_operand): New class.
1186 (gcc::jit::recording::output_asm_operand): New class.
1187 (gcc::jit::recording::input_asm_operand): New class.
1188 (gcc::jit::recording::extended_asm): New class.
1189 (gcc::jit::recording::extended_asm_simple): New class.
1190 (gcc::jit::recording::extended_asm_goto): New class.
1191 (gcc::jit::recording::top_level_asm): New class.
1192 * libgccjit++.h (gccjit::extended_asm): New forward decl.
1193 (gccjit::context::add_top_level_asm): New.
1194 (gccjit::block::add_extended_asm): New.
1195 (gccjit::block::end_with_extended_asm_goto): New.
1196 (gccjit::extended_asm): New class.
1197 (gccjit::extended_asm::extended_asm): New ctors.
1198 (gccjit::extended_asm::set_volatile_flag): New.
1199 (gccjit::extended_asm::set_inline_flag): New.
1200 (gccjit::extended_asm::add_output_operand): New.
1201 (gccjit::extended_asm::add_input_operand): New.
1202 (gccjit::extended_asm::add_clobber): New.
1203 (gccjit::extended_asm::get_inner_extended_asm): New.
1204 * libgccjit.c (struct gcc_jit_extended_asm): New.
1205 (jit_error): Make "loc" param take a gcc::jit::recording::location *
1206 rather than a gcc_jit_location *.
1207 (gcc_jit_block_add_extended_asm): New entrypoint.
1208 (gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
1209 (gcc_jit_extended_asm_as_object): New entrypoint.
1210 (gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
1211 (gcc_jit_extended_asm_set_inline_flag): New entrypoint.
1212 (gcc_jit_extended_asm_add_output_operand): New entrypoint.
1213 (gcc_jit_extended_asm_add_clobber): New entrypoint.
1214 (gcc_jit_context_add_top_level_asm): New entrypoint.
1215 * libgccjit.h: Add gcc_jit_extended_asm to ASCII art.
1216 (gcc_jit_extended_asm): New typedef.
1217 (LIBGCCJIT_HAVE_ASM_STATEMENTS): New define.
1218 (gcc_jit_block_add_extended_asm): New entrypoint.
1219 (gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
1220 (gcc_jit_extended_asm_as_object): New entrypoint.
1221 (gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
1222 (gcc_jit_extended_asm_set_inline_flag): New entrypoint.
1223 (gcc_jit_extended_asm_add_output_operand): New entrypoint.
1224 (gcc_jit_extended_asm_add_input_operand): New entrypoint.
1225 (gcc_jit_extended_asm_add_clobber): New entrypoint.
1226 (gcc_jit_context_add_top_level_asm): New entrypoint.
1227 * libgccjit.map (LIBGCCJIT_ABI_15): New.
1229 2020-11-12 David Malcolm <dmalcolm@redhat.com>
1231 * jit-recording.c (recording::context::new_string): Add "escaped"
1232 param and use it when creating the new recording::string instance.
1233 (recording::string::string): Add "escaped" param and use it to
1234 initialize m_escaped.
1235 (recording::string::make_debug_string): Replace check that first
1236 char is double-quote with use of m_escaped. Fix escaping of
1237 '\t' and '\n'. Set "escaped" on the result.
1238 * jit-recording.h (recording::context::new_string): Add "escaped"
1240 (recording::string::string): Add "escaped" param.
1241 (recording::string::m_escaped): New field.
1243 2020-11-12 David Malcolm <dmalcolm@redhat.com>
1245 * libgccjit.h: Fix typo in comment.
1247 2020-09-14 Andrea Corallo <andrea.corallo@arm.com>
1249 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1251 2020-09-11 Andrea Corallo <andrea.corallo@arm.com>
1253 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_14): New ABI tag.
1254 * docs/topics/expressions.rst (gcc_jit_global_set_initializer):
1255 Document new entry point in section 'Global variables'.
1256 * jit-playback.c (global_new_decl, global_finalize_lvalue): New
1258 (playback::context::new_global): Make use of global_new_decl,
1259 global_finalize_lvalue.
1260 (load_blob_in_ctor): New template function in use by the
1262 (playback::context::new_global_initialized): New method.
1263 * jit-playback.h (class context): Decl 'new_global_initialized',
1264 'global_new_decl', 'global_finalize_lvalue'.
1265 (lvalue::set_initializer): Add implementation.
1266 * jit-recording.c (recording::memento_of_get_pointer::get_size)
1267 (recording::memento_of_get_type::get_size): Add implementation.
1268 (recording::global::write_initializer_reproducer): New function in
1269 use by 'recording::global::write_reproducer'.
1270 (recording::global::replay_into)
1271 (recording::global::write_to_dump)
1272 (recording::global::write_reproducer): Handle
1274 * jit-recording.h (class type): Decl 'get_size' and
1276 * libgccjit++.h (class lvalue): Declare new 'set_initializer'
1278 (class lvalue): Decl 'is_global' and 'set_initializer'.
1279 (class global) Decl 'write_initializer_reproducer'. Add
1280 'm_initializer', 'm_initializer_num_bytes' fields. Implement
1281 'set_initializer'. Add a destructor to free 'm_initializer'.
1282 * libgccjit.c (gcc_jit_global_set_initializer): New function.
1283 * libgccjit.h (gcc_jit_global_set_initializer): New function
1285 * libgccjit.map (LIBGCCJIT_ABI_14): New ABI tag.
1287 2020-08-28 Martin Sebor <msebor@redhat.com>
1289 * jit-recording.c (recording::switch_::make_debug_string): Add argument
1292 2020-08-22 Andrea Corallo <andrea.corallo@arm.com>
1295 (gcc_jit_context_new_rvalue_from_int)
1296 (gcc_jit_context_new_rvalue_from_long)
1297 (gcc_jit_context_new_rvalue_from_double)
1298 (gcc_jit_context_new_rvalue_from_ptr): Update function heading
1301 2020-06-16 Nicolas Bértolo <nicolasbertolo@gmail.com>
1303 * Make-lang.in: Always define version, minor and release
1304 numbers. Create the Windows shared library as
1305 libgccjit-$(LIBGCCJIT_VERSION_NUM).dll.
1307 2020-06-03 David Malcolm <dmalcolm@redhat.com>
1310 * jit-builtins.c (builtins_manager::make_primitive_type):
1311 Implement BT_CONST_VOLATILE_PTR.
1313 2020-06-02 David Malcolm <dmalcolm@redhat.com>
1316 * dummy-frontend.c: Include "options.h", "stringpool.h", and
1318 (ATTR_EXCL): New, copied from lto/lto-lang.c.
1319 (attr_noreturn_exclusions): Likewise.
1320 (attr_returns_twice_exclusions): Likewise.
1321 (attr_const_pure_exclusions): Likewise.
1322 (jit_attribute_table): Likewise, copied from lto_attribute_table.
1323 (jit_format_attribute_table): Likewise, copied from
1324 lto_format_attribute_table.
1325 (handle_noreturn_attribute): New, copied from lto/lto-lang.c.
1326 (handle_leaf_attribute): Likewise.
1327 (handle_const_attribute): Likewise.
1328 (handle_malloc_attribute): Likewise.
1329 (handle_pure_attribute): Likewise.
1330 (handle_novops_attribute): Likewise.
1331 (get_nonnull_operand): Likewise.
1332 (handle_nonnull_attribute): Likewise.
1333 (handle_nothrow_attribute): Likewise.
1334 (handle_sentinel_attribute): Likewise.
1335 (handle_type_generic_attribute): Likewise.
1336 (handle_transaction_pure_attribute): Likewise.
1337 (handle_returns_twice_attribute): Likewise.
1338 (handle_patchable_function_entry_attribute): Likewise.
1339 (ignore_attribute): Likewise.
1340 (handle_format_attribute): Likewise.
1341 (handle_format_arg_attribute): Likewise.
1342 (handle_fnspec_attribute): Likewise.
1343 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
1344 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
1346 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1348 * Make-lang.in: Remove extra slash. Build libgccjit.dll and its
1349 import library in Windows.
1350 * config-lang.in: Update comment about --enable-host-shared.
1351 * jit-w32.h: New file.
1352 * jit-w32.c: New file.
1353 (print_last_error): New function that prints the error
1354 string corresponding to GetLastError().
1355 (get_TOKEN_USER_current_user): Helper function used for getting
1356 the SID belonging to the current user.
1357 (create_directory_for_current_user): Helper function to create
1358 a directory with permissions such that only the current user can
1360 (win_mkdtemp): Create a temporary directory using Windows APIs.
1361 * jit-playback.c: Do not chmod files in Windows. Use LoadLibrary,
1362 FreeLibrary and GetProcAddress instead of libdl.
1363 * jit-result.h, jit-result.c: Introduce result::handle_t to
1364 abstract over the types used for dynamic library handles.
1365 * jit-tempdir.c: Do not use mkdtemp() in Windows, use
1368 2020-05-27 David Malcolm <dmalcolm@redhat.com>
1371 * dummy-frontend.c (LANG_HOOKS_DEEP_UNSHARING): Define to be true.
1372 * jit-playback.h (gcc::jit::playback::rvalue): Mark tree node with
1375 2020-05-27 Tom Tromey <tromey@gcc.gnu.org>
1378 * docs/conf.py (texinfo_documents): Set description.
1379 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1381 2020-05-26 David Malcolm <dmalcolm@redhat.com>
1384 * docs/topics/functions.rst
1385 (gcc_jit_context_get_builtin_function): Document.
1386 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1387 * dummy-frontend.c (jit_langhook_global_bindings_p): Remove
1389 * jit-builtins.c (type_names): New array.
1390 (get_string_for_type_id): New function.
1391 (gcc::jit::builtins_manager::make_primitive_type): Show name of
1392 type in error messages. Update cases to reflect the order in
1393 builtin-types.def. Implement cases for BT_INT8, BT_INT16,
1394 BT_UINT8, BT_CONST_PTR, BT_VOLATILE_PTR, BT_INT_PTR, BT_FLOAT_PTR,
1395 BT_CONST_DOUBLE_PTR, BT_SIZE, BT_CONST_SIZE.
1397 2020-05-26 David Malcolm <dmalcolm@redhat.com>
1399 * docs/topics/compatibility.rst: Fix underline.
1401 * docs/topics/types.rst: Fix missing blank line.
1402 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1404 2020-05-26 David Malcolm <dmalcolm@redhat.com>
1407 * docs/topics/expressions.rst (Unary Operations): Document that
1408 result_type of gcc_jit_context_new_unary_op must be a numeric type.
1409 (Binary Operations): Likewise for gcc_jit_context_new_binary_op.
1410 (Global variables): Document that "type" of
1411 gcc_jit_context_new_global must be non-`void`.
1412 * docs/topics/function-pointers.rst
1413 (gcc_jit_context_new_function_ptr_type): Document that the
1414 param_types must be non-void, but that return_type may be.
1415 * docs/topics/functions.rst (Params): Document that
1416 gcc_jit_context_new_param's type must be non-void.
1417 (Functions): Likewise for gcc_jit_function_new_local.
1418 * docs/topics/types.rst (gcc_jit_context_new_array_type): Document
1419 that the type must be non-void.
1420 (gcc_jit_context_new_field): Likewise.
1421 * docs/_build/texinfo/Makefile: Regenerate.
1422 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1423 * libgccjit.c (gcc_jit_context_new_array_type): Fail if
1424 element_type is void.
1425 (gcc_jit_context_new_field): Likewise for "type".
1426 (gcc_jit_context_new_function_ptr_type): Likewise for each
1427 element of param_types.
1428 (gcc_jit_context_new_param): Likewise for "type".
1429 (gcc_jit_context_new_global): Likewise.
1430 (gcc_jit_function_new_local): Likewise.
1431 (gcc_jit_type_get_aligned): Likewise.
1433 2020-03-31 Andrea Corallo <andrea.corallo@arm.com>
1434 David Malcolm <dmalcolm@redhat.com>
1436 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_13): New ABI tag
1437 plus add version paragraph.
1438 * libgccjit++.h (namespace gccjit::version): Add new namespace.
1439 * libgccjit.c (gcc_jit_version_major, gcc_jit_version_minor)
1440 (gcc_jit_version_patchlevel): New functions.
1441 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_version): New macro.
1442 (gcc_jit_version_major, gcc_jit_version_minor)
1443 (gcc_jit_version_patchlevel): New functions.
1444 * libgccjit.map (LIBGCCJIT_ABI_13) New ABI tag.
1446 2020-03-23 Andrea Corallo <andrea.corallo@arm.com>
1449 (gcc::jit::playback::context m_recording_ctxt): Remove
1450 m_char_array_type_node field.
1452 (playback::context::context) Remove m_char_array_type_node from member
1454 (playback::context::new_string_literal) Fix logic to handle string
1457 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1459 Update copyright years.
1461 2019-11-29 Julian Brown <julian@codesourcery.com>
1463 * jit-builtins.c (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR):
1464 Remove commented-out cases.
1466 2019-11-20 David Malcolm <dmalcolm@redhat.com>
1469 * jit-playback.c (gcc::jit::playback::context::make_fake_args):
1470 Update GCC_JIT_BOOL_OPTION_SELFCHECK_GC for new --param syntax.
1472 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1475 * jit-playback.c (new_function): Use set_decl_built_in_function.
1477 2019-07-22 Andrea Corallo <andrea.corallo@arm.com>
1479 * jit-recording.c (unary_op_reproducer_strings): Make it extern.
1480 (binary_op_reproducer_strings): Likewise.
1481 * jit-recording.h (unary_op_reproducer_strings): Likewise.
1482 (binary_op_reproducer_strings): Likewise.
1483 * libgccjit.c (gcc_jit_context_new_unary_op): Check result_type to be a
1485 * libgccjit.c (gcc_jit_context_new_binary_op): Improve error message.
1487 2019-07-04 Andrea Corallo <andrea.corallo@arm.com>
1489 * libgccjit.c (gcc_jit_context_new_binary_op): Check result_type to be a
1492 2019-07-04 Andrea Corallo <andrea.corallo@arm.com>
1494 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_12): New ABI tag.
1495 * docs/topics/types.rst: Add gcc_jit_context_new_bitfield.
1496 * jit-common.h (namespace recording): Add class bitfield.
1498 (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): Add macros.
1499 (playback::context::new_bitfield): New method.
1500 (playback::compound_type::set_fields): Add bitfield support.
1501 (playback::lvalue::mark_addressable): Was jit_mark_addressable make this
1502 a method of lvalue plus return a bool to communicate success.
1503 (playback::lvalue::get_address): Check for jit_mark_addressable return
1505 * jit-playback.h (new_bitfield): New method.
1506 (class bitfield): New class.
1507 (class lvalue): Add jit_mark_addressable method.
1508 * jit-recording.c (recording::context::new_bitfield): New method.
1509 (recording::bitfield::replay_into): New method.
1510 (recording::bitfield::write_to_dump): Likewise.
1511 (recording::bitfield::make_debug_string): Likewise.
1512 (recording::bitfield::write_reproducer): Likewise.
1513 * jit-recording.h (class context): Add new_bitfield method.
1514 (class field): Make it derivable by class bitfield.
1515 (class bitfield): Add new class.
1516 * libgccjit++.h (class context): Add new_bitfield method.
1517 * libgccjit.c (struct gcc_jit_bitfield): New structure.
1518 (gcc_jit_context_new_bitfield): New function.
1520 (LIBGCCJIT_HAVE_gcc_jit_context_new_bitfield) New macro.
1521 (gcc_jit_context_new_bitfield): New function.
1522 * libgccjit.map (LIBGCCJIT_ABI_12) New ABI tag.
1524 2019-03-21 Jakub Jelinek <jakub@redhat.com>
1526 * jit-recording.c (reproducer::m_set_identifiers): Use false as Lazy
1527 in hash_set template param.
1529 2019-02-05 Andrea Corallo <andrea.corallo@arm.com>
1531 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_11): New ABI tag.
1532 * docs/topics/contexts.rst (Additional driver options): New
1534 * jit-playback.c (invoke_driver): Add call to append_driver_options.
1535 * jit-recording.c: Within namespace gcc::jit...
1536 (recording::context::~context): Free the optnames within
1538 (recording::context::add_driver_option): New method.
1539 (recording::context::append_driver_options): New method.
1540 (recording::context::dump_reproducer_to_file): Add driver
1542 * jit-recording.h: Within namespace gcc::jit...
1543 (recording::context::add_driver_option): New method.
1544 (recording::context::append_driver_options): New method.
1545 (recording::context::m_driver_options): New field.
1546 * libgccjit++.h (gccjit::context::add_driver_option): New
1548 * libgccjit.c (gcc_jit_context_add_driver_option): New API
1550 * libgccjit.h (gcc_jit_context_add_driver_option): New API
1552 (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option): New
1554 * libgccjit.map (LIBGCCJIT_ABI_11): New ABI tag.
1556 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1558 Update copyright years.
1560 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1563 * dummy-frontend.c (jit_begin_diagnostic): Add diagnostic_t param.
1565 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1567 * jit-playback.c: Replace "source_location" with "location_t".
1569 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1571 * Make-lang.in (selftest-jit): New.
1573 2018-06-28 Martin Liska <mliska@suse.cz>
1575 * jit-playback.c: Include opt-suggestions.h.
1577 2018-06-28 Martin Liska <mliska@suse.cz>
1579 * jit-playback.c (class auto_argvec): Moved to vec.h.
1580 (auto_argvec::~auto_argvec): Likewise.
1581 (compile): Use the renamed name.
1582 (invoke_driver): Likewise.
1584 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1587 * Make-lang.in ($(LIBGCCJIT_FILENAME)): Add $(EXTRA_GCC_LIBS).
1589 2018-03-09 David Malcolm <dmalcolm@redhat.com>
1590 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1594 * Make-lang.in (COMMA): New.
1595 (LIBGCCJIT_VERSION_SCRIPT_OPTION): New.
1596 (LIBGCCJIT_SONAME_OPTION): New.
1597 (jit): Move --version-script and -soname linker options to the
1600 2018-01-25 David Malcolm <dmalcolm@redhat.com>
1603 * jit-recording.h (gcc::jit::recording::union_): Remove fields
1604 "m_loc" and "m_name".
1606 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1608 Update copyright years.
1610 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1612 * jit-playback.c (get_type, playback::compile_to_file::copy_file,
1613 playback::context::acquire_mutex): Replace Yoda conditions with
1614 typical order conditions.
1615 * libgccjit.c (gcc_jit_context_new_struct_type,
1616 gcc_jit_struct_set_fields, gcc_jit_context_new_union_type,
1617 gcc_jit_context_new_function, gcc_jit_timer_pop): Likewise.
1618 * jit-builtins.c (matches_builtin): Likewise.
1619 * jit-recording.c (recording::compound_type::set_fields,
1620 recording::fields::write_reproducer, recording::rvalue::set_scope,
1621 recording::function::validate): Likewise.
1622 * jit-logging.c (logger::decref): Likewise.
1624 2017-11-30 Jakub Jelinek <jakub@redhat.com>
1627 (recording::memento_of_new_rvalue_from_const <long>::write_reproducer):
1628 Use ; instead of ;;.
1630 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1632 * jit-playback.c (add_switch): Build SWITCH_EXPR using build2 instead
1633 of build3. Formatting fixes. Adjust funciton comment.
1635 2017-11-23 Tom de Vries <tom@codesourcery.com>
1637 * libgccjit.c (RETURN_NULL_IF_FAIL_NONNULL_NUMERIC_TYPE): Wrap in
1638 JIT_{BEGIN,END}_STMT.
1640 2017-10-31 David Malcolm <dmalcolm@redhat.com>
1642 * docs/internals/index.rst (Running the test suite): Document
1643 PRESERVE_EXECUTABLES.
1644 (Running under valgrind): Add markup to RUN_UNDER_VALGRIND.
1645 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1647 2017-10-04 David Malcolm <dmalcolm@redhat.com>
1649 * docs/cp/topics/expressions.rst (Vector expressions): New
1651 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_10): New ABI tag.
1652 * docs/topics/expressions.rst (Vector expressions): New section.
1653 * docs/topics/types.rst (gcc_jit_type_get_vector): Add link to
1654 gcc_jit_context_new_rvalue_from_vector.
1655 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1656 * jit-common.h (gcc::jit:recording::vector_type): New forward
1659 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
1661 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
1662 * jit-recording.c: In namespace gcc::jit::
1663 (class comma_separated_string): New class.
1664 (comma_separated_string::comma_separated_string): New ctor,
1665 adapted from recording::call::make_debug_string.
1666 (comma_separated_string::~comma_separated_string): New dtor.
1667 In namespace gcc::jit::recording::
1668 (context::new_rvalue_from_vector): New method.
1669 (type::get_vector): Update for renaming of memento_of_get_vector.
1670 (class memento_of_get_vector): Rename to...
1671 (class vector_type): ..this.
1672 (memento_of_new_rvalue_from_vector::memento_of_new_rvalue_from_vector):
1674 (memento_of_new_rvalue_from_vector::replay_into): New method.
1675 (memento_of_new_rvalue_from_vector::visit_children): New method.
1676 (memento_of_new_rvalue_from_vector::make_debug_string): New
1678 (memento_of_new_rvalue_from_vector::write_reproducer): New method.
1679 (call::make_debug_string): Split out arg-printing code into ctor
1680 for comma_separated_string.
1681 * jit-recording.h: In namespace gcc::jit::recording::
1682 (context::new_rvalue_from_vector): New method.
1683 (type::dyn_cast_vector_type): New virtual function.
1684 (class memento_of_get_vector): Rename to...
1685 (class vector_type): ...this.
1686 (vector_type::unqualified): Remove this vfunc override in favor
1688 (vector_type::get_element_type): ...this new method.
1689 (vector_type::get_num_units): New method.
1690 (vector_type::dyn_cast_vector_type): New vfunc override.
1691 (class memento_of_new_rvalue_from_vector): New class.
1692 * libgccjit++.h (gccjit::context::new_rvalue): Add overload for
1694 * libgccjit.c (gcc_jit_context_new_binary_op): Strip off type
1695 qualifications when checking that both operands have same type.
1696 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
1698 (LIBGCCJIT_HAVE_gcc_jit_context_new_rvalue_from_vector): New
1700 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
1701 * libgccjit.map (LIBGCCJIT_ABI_10): New ABI tag.
1703 2017-09-28 David Malcolm <dmalcolm@redhat.com>
1705 * docs/topics/expressions.rst (Function calls): Add link to
1706 gcc_jit_context_new_function_ptr_type.
1707 (Function pointers): Convert to cross-references to
1708 function-pointers.rst, moving material there.
1709 * docs/topics/function-pointers.rst: New page.
1710 * docs/topics/index.rst: Add function-pointers.rst.
1711 * docs/topics/types.rst (Function pointer types): New section.
1712 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1714 2017-09-28 David Malcolm <dmalcolm@redhat.com>
1717 (gcc::jit::recording::function_type::is_same_type_as): New function.
1718 * jit-recording.h: In namespace gcc::jit::recording::
1719 (type::accepts_writes_from): Use is_same_type_as rather than pointer
1721 (type::is_same_type_as): New virtual function.
1722 (function_type::is_same_type_as): New override.
1724 2017-09-27 David Malcolm <dmalcolm@redhat.com>
1726 * docs/cp/topics/expressions.rst (Function pointers): New section.
1727 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_9): New tag.
1728 * docs/topics/expressions.rst (Function pointers): New section.
1729 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1730 * jit-common.h (class gcc::jit::recording::function_pointer): New
1732 * jit-playback.c (gcc::jit::playback::function::get_address): New
1734 * jit-playback.h (gcc::jit::playback::function::get_address): New
1736 * jit-recording.c: Within namespace gcc::jit::recording...
1737 (function::function): Initialize new field "m_fn_ptr_type".
1738 (function::get_address): New method.
1739 (function_pointer::replay_into): New method.
1740 (function_pointer::visit_children): New method.
1741 (function_pointer::make_debug_string): New method.
1742 (function_pointer::write_reproducer): New method.
1743 * jit-recording.h: Within namespace gcc::jit::recording...
1744 (function::get_address): New method.
1745 (function): Add field "m_fn_ptr_type".
1746 (class function_pointer): New subclass of rvalue.
1747 * libgccjit++.h (gccjit::function::get_address): New method.
1748 * libgccjit.c (gcc_jit_function_get_address): New function.
1749 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_function_get_address): New
1751 (gcc_jit_function_get_address): New API entrypoint.
1752 * libgccjit.map (LIBGCCJIT_ABI_9): New tag.
1754 2017-09-14 David Malcolm <dmalcolm@redhat.com>
1757 * jit-builtins.c (matches_builtin): Ignore entries with a NULL
1760 2017-08-18 David Malcolm <dmalcolm@redhat.com>
1762 PR tree-optimization/46805
1763 * dummy-frontend.c (jit_langhook_parse_file): Handle vector types.
1765 2017-08-18 David Malcolm <dmalcolm@redhat.com>
1767 * jit-recording.c (class gcc::jit::reproducer): Rename field
1768 "m_identifiers" to "m_map_memento_to_identifier". Add field
1769 "m_set_identifiers" and struct hash_traits for it.
1770 (gcc::jit::reproducer::reproducer): Update for above.
1771 (convert_to_identifier): New function.
1772 (gcc::jit::reproducer::ensure_identifier_is_unique): New method.
1773 (gcc::jit::reproducer::make_identifier): Avoid appending the %p
1774 unless necessary for uniqueness. Update for field renaming.
1775 (gcc::jit::reproducer::get_identifier): Update for field renaming.
1777 2017-08-09 David Malcolm <dmalcolm@redhat.com>
1779 * docs/cp/topics/types.rst (Vector types): New section.
1780 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_8): New tag.
1781 * docs/topics/types.rst (gcc_jit_context_get_type): Fix typo in
1783 (Vector types): New section.
1784 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1785 * jit-playback.c (gcc::jit::playback::type::get_vector): New
1787 * jit-playback.h (gcc::jit::playback::type::get_vector): New
1789 * jit-recording.c: In namespace gcc::jit::recording::
1790 (type::get_vector): New method.
1791 (memento_of_get_aligned::write_reproducer): Fix typo
1793 (memento_of_get_vector::replay_into): New method.
1794 (memento_of_get_vector::make_debug_string): New method.
1795 (memento_of_get_vector::write_reproducer): New method.
1796 * jit-recording.h: In namespace gcc::jit::recording::
1797 (type::get_vector): New
1799 (class memento_of_get_vector): New class.
1800 * libgccjit++.h (gccjit::type::get_vector): New method.
1801 * libgccjit.c (gcc_jit_type_get_vector): New public entrypoint.
1802 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_type_get_vector): New
1804 (gcc_jit_type_get_vector): New decl.
1805 * libgccjit.map (LIBGCCJIT_ABI_8): New ABI tag.
1807 2017-07-05 Richard Sandiford <richard.sandiford@linaro.org>
1808 Alan Hayward <alan.hayward@arm.com>
1809 David Sherwood <david.sherwood@arm.com>
1811 * dummy-frontend.c (jit_langhook_type_for_mode): Remove "enum" before
1814 2017-04-24 David Malcolm <dmalcolm@redhat.com>
1816 * docs/cp/topics/types.rst (gccjit::type::get_const): Remove
1818 (gccjit::type::get_aligned): Add.
1819 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_7.
1820 * docs/topics/types.rst: Add gcc_jit_type_get_aligned.
1821 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1822 * jit-playback.c (gcc::jit::playback::type::get_aligned): New
1824 * jit-playback.h (gcc::jit::playback::type::get_aligned): New
1826 * jit-recording.c: Within namespace gcc::jit::recording...
1827 (type::get_aligned): New method.
1828 (memento_of_get_aligned::replay_into): New method.
1829 (memento_of_get_aligned::make_debug_string): New method.
1830 (memento_of_get_aligned::write_reproducer): New method.
1831 * jit-recording.h: Within namespace gcc::jit::recording...
1832 (type::get_aligned): New method.
1833 (type::accepts_writes_from): Strip off qualifications from
1834 this when comparing pointer equality.
1835 (decorated_type): New subclass of type, subsuming the
1836 commonality between memento_of_get_const and
1837 memento_of_get_volatile.
1838 (memento_of_get_const): Make a subclass of decorated_type,
1840 (memento_of_get_volatile): Likewise.
1841 (memento_of_get_aligned): Likewise.
1842 * libgccjit++.h: Within namespace gccjit...
1843 (type::get_const): New method.
1844 (type::get_aligned): New method.
1845 * libgccjit.c (gcc_jit_type_get_aligned): New function.
1846 * libgccjit.h (gcc_jit_type_get_aligned): New decl.
1847 * libgccjit.map (LIBGCCJIT_ABI_7): New
1848 (gcc_jit_type_get_aligned): Add.
1850 2017-01-19 David Malcolm <dmalcolm@redhat.com>
1852 * dummy-frontend.c (jit_langhook_type_for_size): Delete.
1853 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
1855 2017-01-18 David Malcolm <dmalcolm@redhat.com>
1857 * dummy-frontend.c (jit_langhook_type_for_size): Implement, using
1858 lto's lto_type_for_size.
1860 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1862 Update copyright years.
1864 2016-05-20 David Malcolm <dmalcolm@redhat.com>
1866 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_6.
1867 * docs/topics/expressions.rst (Function calls): Add documentation
1868 of gcc_jit_rvalue_set_bool_require_tail_call.
1869 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1870 * jit-common.h (gcc::jit::recording::base_call): Add forward decl.
1871 * jit-playback.c: Within namespace gcc::jit::playback...
1872 (context::build_call) Add "require_tail_call" param and use it
1873 to set CALL_EXPR_MUST_TAIL_CALL.
1874 (context::new_call): Add "require_tail_call" param.
1875 (context::new_call_through_ptr): Likewise.
1876 * jit-playback.h: Within namespace gcc::jit::playback...
1877 (context::new_call: Add "require_tail_call" param.
1878 (context::new_call_through_ptr): Likewise.
1879 (context::build_call): Likewise.
1880 * jit-recording.c: Within namespace gcc::jit::recording...
1881 (base_call::base_call): New constructor.
1882 (base_call::write_reproducer_tail_call): New method.
1883 (call::call): Update for inheritance from base_call.
1884 (call::replay_into): Provide m_require_tail_call to call
1886 (call::write_reproducer): Call write_reproducer_tail_call.
1887 (call_through_ptr::call_through_ptr): Update for inheritance from
1889 (call_through_ptr::replay_into): Provide m_require_tail_call to call
1890 to new_call_through_ptr.
1891 (recording::call_through_ptr::write_reproducer): Call
1892 write_reproducer_tail_call.
1893 * jit-recording.h: Within namespace gcc::jit::recording...
1894 (rvalue::dyn_cast_base_call): New virtual function.
1895 (class base_call): New subclass of class rvalue.
1896 (class call): Inherit from base_call rather than directly from
1897 rvalue, moving get_precedence and m_args to base_call.
1898 (class call_through_ptr): Likewise.
1899 * libgccjit.c (gcc_jit_rvalue_set_bool_require_tail_call): New
1902 (LIBGCCJIT_HAVE_gcc_jit_rvalue_set_bool_require_tail_call): New
1904 (gcc_jit_rvalue_set_bool_require_tail_call): New function.
1905 * libgccjit.map (LIBGCCJIT_ABI_6): New.
1906 (gcc_jit_rvalue_set_bool_require_tail_call): Add.
1908 2016-05-17 David Malcolm <dmalcolm@redhat.com>
1910 * dummy-frontend.c: Include diagnostic.h.
1911 (jit_begin_diagnostic): New function.
1912 (jit_end_diagnostic): New function.
1913 (jit_langhook_init): Register jit_begin_diagnostic
1914 and jit_end_diagnostic with the global_dc.
1915 * jit-playback.c: Include diagnostic.h.
1916 (gcc::jit::playback::context::add_diagnostic): New method.
1917 * jit-playback.h (struct diagnostic_context): Add forward
1919 (gcc::jit::playback::context::add_diagnostic): New method.
1921 2016-05-17 David Malcolm <dmalcolm@redhat.com>
1923 * docs/topics/expressions.rst (Function calls): Document
1924 gcc_jit_context_new_call_through_ptr.
1925 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1927 2016-05-13 David Malcolm <dmalcolm@redhat.com>
1929 * jit-playback.h: Within namespace gcc:jit::playback...
1930 (compile_to_memory::postprocess): Mark with FINAL OVERRIDE.
1931 (compile_to_file::postprocess): Likewise.
1932 (function::finalizer): Likewise.
1933 (block::finalizer): Likewise.
1934 (source_file::finalizer): Likewise.
1935 (source_line::finalizer): Likewise.
1936 * jit-recording.c (gcc::jit::rvalue_usage_validator):: Likewise.
1937 * jit-recording.h: Within namespace gcc::jit::recording...
1938 (string::replay_into): Mark with FINAL OVERRIDE.
1939 (string::make_debug_string): Likewise.
1940 (string::write_reproducer): Likewise.
1941 (location::replay_into): Likewise.
1942 (location::dyn_cast_location): Likewise.
1943 (location::make_debug_string): Likewise.
1944 (location::write_reproducer): Likewise.
1945 (memento_of_get_type::dereference): Likewise.
1946 (memento_of_get_type::accepts_writes_from): Likewise.
1947 (memento_of_get_type::is_int): Likewise.
1948 (memento_of_get_type::is_float): Likewise.
1949 (memento_of_get_type::is_bool): Likewise.
1950 (memento_of_get_type::is_pointer): Likewise.
1951 (memento_of_get_type::is_array): Likewise.
1952 (memento_of_get_type::is_void): Likewise.
1953 (memento_of_get_type::replay_into): Likewise.
1954 (memento_of_get_type::make_debug_string): Likewise.
1955 (memento_of_get_type::write_reproducer): Likewise.
1956 (memento_of_get_pointer::dereference): Likewise.
1957 (memento_of_get_pointer::accepts_writes_from): Likewise.
1958 (memento_of_get_pointer::replay_into): Likewise.
1959 (memento_of_get_pointer::is_int): Likewise.
1960 (memento_of_get_pointer::is_float): Likewise.
1961 (memento_of_get_pointer::is_bool): Likewise.
1962 (memento_of_get_pointer::is_pointer): Likewise.
1963 (memento_of_get_pointer::is_array): Likewise.
1964 (memento_of_get_pointer::make_debug_string): Likewise.
1965 (memento_of_get_pointer::write_reproducer): Likewise.
1966 (memento_of_get_const::dereference): Likewise.
1967 (memento_of_get_const::accepts_writes_from): Likewise.
1968 (memento_of_get_const::unqualified): Likewise.
1969 (memento_of_get_const::is_int): Likewise.
1970 (memento_of_get_const::is_float): Likewise.
1971 (memento_of_get_const::is_bool): Likewise.
1972 (memento_of_get_const::is_pointer): Likewise.
1973 (memento_of_get_const::is_array): Likewise.
1974 (memento_of_get_const::void replay_into): Likewise;
1975 (memento_of_get_const::make_debug_string): Likewise.
1976 (memento_of_get_const::write_reproducer): Likewise.
1977 (memento_of_get_volatile::dereference): Likewise.
1978 (memento_of_get_volatile::unqualified): Likewise.
1979 (memento_of_get_volatile::is_int): Likewise.
1980 (memento_of_get_volatile::is_float): Likewise.
1981 (memento_of_get_volatile::is_bool): Likewise.
1982 (memento_of_get_volatile::is_pointer): Likewise.
1983 (memento_of_get_volatile::is_array): Likewise.
1984 (memento_of_get_volatile::replay_into): Likewise;
1985 (memento_of_get_volatile::make_debug_string): Likewise.
1986 (memento_of_get_volatile::write_reproducer): Likewise.
1987 (array_type::dereference): Likewise.
1988 (array_type::is_int): Likewise.
1989 (array_type::is_float): Likewise.
1990 (array_type::is_bool): Likewise.
1991 (array_type::is_pointer): Likewise.
1992 (array_type::is_array): Likewise.
1993 (array_type::replay_into): Likewise;
1994 (array_type::make_debug_string): Likewise.
1995 (array_type::write_reproducer): Likewise.
1996 (function_type::dereference): Likewise.
1997 (function_type::function_dyn_cast_function_type): Likewise.
1998 (function_type::function_as_a_function_type): Likewise.
1999 (function_type::is_int): Likewise.
2000 (function_type::is_float): Likewise.
2001 (function_type::is_bool): Likewise.
2002 (function_type::is_pointer): Likewise.
2003 (function_type::is_array): Likewise.
2004 (function_type::replay_into): Likewise;
2005 (function_type::make_debug_string): Likewise.
2006 (function_type::write_reproducer): Likewise.
2007 (field::replay_into): Likewise;
2008 (field::write_to_dump): Likewise.
2009 (field::make_debug_string): Likewise.
2010 (field::write_reproducer): Likewise.
2011 (compound_type::dereference): Likewise.
2012 (compound_type::is_int): Likewise.
2013 (compound_type::is_float): Likewise.
2014 (compound_type::is_bool): Likewise.
2015 (compound_type::is_pointer): Likewise.
2016 (compound_type::is_array): Likewise.
2017 (compound_type::has_known_size): Likewise.
2018 (struct_::dyn_cast_struct): Likewise.
2019 (struct_::replay_into): Likewise.
2020 (struct_::access_as_type): Likewise.
2021 (struct_::make_debug_string): Likewise.
2022 (struct_::write_reproducer): Likewise.
2023 (fields::replay_into): Likewise.
2024 (fields::write_to_dump): Likewise.
2025 (fields::make_debug_string): Likewise.
2026 (fields::write_reproducer): Likewise.
2027 (union_::replay_into): Likewise.
2028 (union_::make_debug_string): Likewise.
2029 (union_::write_reproducer): Likewise.
2030 (lvalue::access_as_rvalue): Mark with OVERRIDE.
2031 (param::replay_into): Mark with FINAL OVERRIDE.
2032 (param::visit_children): Likewise.
2033 (param::dyn_cast_param): Likewise.
2034 (param::access_as_rvalue): Likewise.
2035 (param::access_as_lvalue): Likewise.
2036 (param::make_debug_string): Likewise.
2037 (param::write_reproducer): Likewise.
2038 (param::get_precedence): Likewise.
2039 (function::replay_into): Likewise.
2040 (function::write_to_dump): Likewise.
2041 (function::make_debug_string): Likewise.
2042 (function::write_reproducer): Likewise.
2043 (block::write_to_dump): Likewise.
2044 (block::make_debug_string): Likewise.
2045 (block::write_reproducer): Likewise.
2046 (block::replay_into): Likewise.
2047 (global::replay_into): Likewise;
2048 (global::visit_children): Likewise.
2049 (global::write_to_dump): Likewise.
2050 (global::make_debug_string): Likewise.
2051 (global::write_reproducer): Likewise.
2052 (global::get_precedence): Likewise.
2053 (memento_of_new_rvalue_from_const::replay_into): Likewise.
2054 (memento_of_new_rvalue_from_const::visit_children): Likewise.
2055 (memento_of_new_rvalue_from_const::is_constant): Likewise.
2056 (memento_of_new_rvalue_from_const::get_wide_int): Likewise.
2057 (memento_of_new_rvalue_from_const::make_debug_string): Likewise.
2058 (memento_of_new_rvalue_from_const::write_reproducer): Likewise.
2059 (memento_of_new_rvalue_from_const::get_precedence): Likewise.
2060 (memento_of_new_string_literal::replay_into): Likewise.
2061 (memento_of_new_string_literal::visit_children): Likewise.
2062 (memento_of_new_string_literal::make_debug_string): Likewise.
2063 (memento_of_new_string_literal::write_reproducer): Likewise.
2064 (memento_of_new_string_literal::get_precedence): Likewise.
2065 (unary_op::replay_into): Likewise.
2066 (unary_op::visit_children): Likewise.
2067 (unary_op::make_debug_string): Likewise.
2068 (unary_op::write_reproducer): Likewise.
2069 (unary_op::get_precedence): Likewise.
2070 (binary_op::replay_into): Likewise.
2071 (binary_op::visit_children): Likewise.
2072 (binary_op::make_debug_string): Likewise.
2073 (binary_op::write_reproducer): Likewise.
2074 (binary_op::get_precedence): Likewise.
2075 (comparison::replay_into): Likewise.
2076 (comparison::visit_children): Likewise.
2077 (comparison::make_debug_string): Likewise.
2078 (comparison::write_reproducer): Likewise.
2079 (comparison::get_precedence): Likewise.
2080 (cast::replay_into): Likewise.
2081 (cast::visit_children): Likewise.
2082 (cast::make_debug_string): Likewise.
2083 (cast::write_reproducer): Likewise.
2084 (cast::get_precedence): Likewise.
2085 (call::replay_into): Likewise.
2086 (call::visit_children): Likewise.
2087 (call::make_debug_string): Likewise.
2088 (call::write_reproducer): Likewise.
2089 (call::get_precedence): Likewise.
2090 (call_through_ptr::replay_into): Likewise.
2091 (call_through_ptr::visit_children): Likewise.
2092 (call_through_ptr::make_debug_string): Likewise.
2093 (call_through_ptr::write_reproducer): Likewise.
2094 (call_through_ptr::get_precedence): Likewise.
2095 (array_access::replay_into): Likewise.
2096 (array_access::visit_children): Likewise.
2097 (array_access::make_debug_string): Likewise.
2098 (array_access::write_reproducer): Likewise.
2099 (array_access::get_precedence): Likewise.
2100 (access_field_of_lvalue::replay_into): Likewise.
2101 (access_field_of_lvalue::visit_children): Likewise.
2102 (access_field_of_lvalue::make_debug_string): Likewise.
2103 (access_field_of_lvalue::write_reproducer): Likewise.
2104 (access_field_of_lvalue::get_precedence): Likewise.
2105 (access_field_rvalue::replay_into): Likewise.
2106 (access_field_rvalue::visit_children): Likewise.
2107 (access_field_rvalue::make_debug_string): Likewise.
2108 (access_field_rvalue::write_reproducer): Likewise.
2109 (access_field_rvalue::get_precedence): Likewise.
2110 (dereference_field_rvalue::replay_into): Likewise.
2111 (dereference_field_rvalue::visit_children): Likewise.
2112 (dereference_field_rvalue::make_debug_string): Likewise.
2113 (dereference_field_rvalue::write_reproducer): Likewise.
2114 (dereference_field_rvalue::get_precedence): Likewise.
2115 (dereference_rvalue::replay_into): Likewise.
2116 (dereference_rvalue::visit_children): Likewise.
2117 (dereference_rvalue::make_debug_string): Likewise.
2118 (dereference_rvalue::write_reproducer): Likewise.
2119 (dereference_rvalue::get_precedence): Likewise.
2120 (get_address_of_lvalue::replay_into): Likewise.
2121 (get_address_of_lvalue::visit_children): Likewise.
2122 (get_address_of_lvalue::make_debug_string): Likewise.
2123 (get_address_of_lvalue::write_reproducer): Likewise.
2124 (get_address_of_lvalue::get_precedence): Likewise.
2125 (local::replay_into): Likewise.
2126 (local::visit_children): Likewise.
2127 (local::write_to_dump): Likewise.
2128 (local::make_debug_string): Likewise.
2129 (local::write_reproducer): Likewise.
2130 (local::get_precedence): Likewise.
2131 (statement::write_to_dump): Likewise.
2132 (eval::replay_into): Likewise.
2133 (eval::make_debug_string): Likewise.
2134 (eval::write_reproducer): Likewise.
2135 (assignment::replay_into): Likewise.
2136 (assignment::make_debug_string): Likewise.
2137 (assignment::write_reproducer): Likewise.
2138 (assignment_op::replay_into): Likewise.
2139 (assignment_op::make_debug_string): Likewise.
2140 (assignment_op::write_reproducer): Likewise.
2141 (comment::replay_into): Likewise.
2142 (comment::make_debug_string): Likewise.
2143 (comment::write_reproducer): Likewise.
2144 (conditional::replay_into): Likewise.
2145 (conditional::get_successor_blocks): Likewise.
2146 (conditional::make_debug_string): Likewise.
2147 (conditional::write_reproducer): Likewise.
2148 (jump::replay_into): Likewise.
2149 (jump::get_successor_blocks): Likewise.
2150 (jump::make_debug_string): Likewise.
2151 (jump::write_reproducer): Likewise.
2152 (return_::replay_into): Likewise.
2153 (return_::get_successor_blocks): Likewise.
2154 (return_::make_debug_string): Likewise.
2155 (return_::write_reproducer): Likewise.
2156 (case_::replay_into): Likewise.
2157 (case_::write_reproducer): Likewise.
2158 (case_::make_debug_string): Likewise.
2159 (switch_::replay_into): Likewise.
2160 (switch_::get_successor_blocks): Likewise.
2161 (switch_::make_debug_string): Likewise.
2162 (switch_::write_reproducer): Likewise.
2164 2016-02-08 David Malcolm <dmalcolm@redhat.com>
2166 * dummy-frontend.c (jit_langhook_init): Remove
2167 second argument to build_common_tree_nodes to
2170 2016-01-23 Iain Buclaw <ibuclaw@gdcproject.org>
2172 * jit-playback.c: Include pthread.h.
2174 2016-01-19 David Malcolm <dmalcolm@redhat.com>
2177 * jit-playback.c (gcc::jit::playback::compile_to_file::postprocess):
2178 Potentially add the temporary artifact to the tempdir's list of
2179 tempfiles needing additional cleanup.
2180 (gcc::jit::playback::context::extract_any_requested_dumps): Likewise
2182 * jit-tempdir.c (gcc::jit::tempdir::~tempdir): Clean up additional
2184 * jit-tempdir.h (gcc::jit::tempdir::add_temp_file): New method.
2185 (gcc::jit::tempdir::m_tempfiles): New field.
2186 * docs/cp/intro/tutorial04.rst: Update for changes to toyvm.cc.
2187 * docs/examples/tut04-toyvm/toyvm.cc (class compilation_result):
2189 (toyvm_function::compile): Change return type from function ptr
2190 to a compilation_result.
2191 (toyvm_function::get_function_name): New accessor.
2192 (toyvm_function::m_funcname): New field.
2193 (get_function_name): Convert to...
2194 (toyvm_function::make_function_name): ...this new method.
2195 (toyvm_function::parse): Call make_function_name.
2196 (toyvm_function::compile): Convert return type from function ptr
2197 to a compilation_result. Use get_function_name.
2198 (compilation_state::compile): Convert return type from
2199 gcc_jit_result * to a compilation_result.
2200 (test_script): Update for above changes, extracting the code from
2201 the compilation_result.
2203 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2205 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2207 Update copyright years.
2209 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2211 * dummy-frontend.c: Remove unused header files.
2212 * jit-builtins.c: Likewise.
2213 * jit-playback.c: Likewise.
2214 * jit-recording.c: Likewise.
2215 * jit-spec.c: Likewise.
2216 * libgccjit.c: Likewise.
2218 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
2220 * jit-builtins.c: Don't undef DEF_BUILTIN.
2222 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2224 * dummy-frontend.c: Reorder #include's and remove duplicates.
2225 * jit-builtins.c: Likewise.
2226 * jit-playback.c: Likewise.
2227 * jit-recording.c: Likewise.
2228 * libgccjit.c: Likewise.
2230 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2232 * jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
2233 DEF_FUNCTION_TYPE_11): Define.
2234 * jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
2235 DEF_FUNCTION_TYPE_11): Define.
2237 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
2238 Ulrich Drepper <drepper@gmail.com>
2240 * jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use.
2242 2015-09-30 Matthias Klose <doko@ubuntu.com>
2244 * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,
2245 remove DEF_FUNCTION_TYPE_VAR_11.
2246 * jit-builtins.c (builtins_manager::make_type): Define and handle
2247 DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.
2249 2015-08-25 David Malcolm <dmalcolm@redhat.com>
2251 * docs/cp/topics/contexts.rst
2252 (gccjit::context::set_bool_use_external_driver): New.
2253 * docs/internals/test-hello-world.exe.log.txt: Update.
2254 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_5): New.
2255 * docs/topics/contexts.rst
2256 (gcc_jit_context_set_bool_use_external_driver): New.
2257 * jit-common.h (enum inner_bool_option): Add
2258 INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
2259 * jit-playback.c (gcc_driver_name): New global.
2260 (gcc:jit::playback::context::invoke_driver): Split out second
2262 (gcc::jit::playback::context::invoke_embedded_driver): ...this new
2264 (gcc::jit::playback::context::invoke_external_driver): ...this new
2267 (gcc::jit::playback::context::get_inner_bool_option): New.
2268 (gcc::jit::playback::context::invoke_embedded_driver): New.
2269 (gcc::jit::playback::context::invoke_external_driver): New.
2270 * jit-recording.c (inner_bool_option_reproducer_strings):
2271 Add entry for INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
2273 (gccjit::context::set_bool_use_external_driver): New.
2274 * libgccjit.c (gcc_jit_context_set_bool_use_external_driver): New.
2275 * libgccjit.h (gcc_jit_context_set_bool_use_external_driver): New.
2276 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_use_external_driver):
2278 * libgccjit.map (LIBGCCJIT_ABI_5): New.
2279 * notes.txt: Show invocation of embedded copy of driver.
2280 * docs/internals/test-hello-world.exe.log.txt: Update
2282 2015-08-13 David Malcolm <dmalcolm@redhat.com>
2284 * jit-playback.c (invoke_driver): On OS X, add
2285 "-Wl,-undefined,dynamic_lookup" to the driver arguments.
2287 2015-08-03 David Malcolm <dmalcolm@redhat.com>
2289 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
2290 * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY):
2291 We no longer show a profile.
2292 * docs/topics/index.rst (Topic Reference): Add performance.rst.
2293 * docs/topics/performance.rst: New file.
2294 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2295 * jit-playback.c (gcc::jit::playback::context::compile): Add timer
2296 param when constructing the "toplev" instance.
2297 (gcc::jit::playback::context::acquire_mutex): Add timer param when
2298 constructing auto_timevar instance.
2299 (gcc::jit::playback::context::make_fake_args): If we have a timer,
2300 add "-ftime-report".
2301 (gcc::jit::playback::context::invoke_driver): Add timer param when
2302 constructing auto_timevar instance.
2303 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
2304 * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor.
2305 * jit-recording.c: Include timevar.h.
2306 (gcc::jit::recording::context::context): Initialize field "m_timer".
2307 * jit-recording.h: Add forward declaration of class timer.
2308 (gcc::jit::recording::context::set_timer): New method.
2309 (gcc::jit::recording::context::get_timer): New method.
2310 (gcc::jit::recording::context::m_timer): New field.
2311 * libgccjit++.h (gccjit::timer): New class.
2312 (gccjit::auto_time): New class.
2313 (gccjit::context::set_timer): New method.
2314 (gccjit::context::get_timer): New.
2315 (gccjit::timer::timer): New.
2316 (gccjit::timer::push): New.
2317 (gccjit::timer::pop): New.
2318 (timer::print): New.
2319 (timer::get_inner_timer): New.
2320 (timer::release): New.
2321 (auto_time::auto_time): New.
2322 (auto_time::~auto_time): New.
2323 * libgccjit.c: Include timevar.h.
2324 (struct gcc_jit_timer): New.
2325 (gcc_jit_timer_new): New function.
2326 (gcc_jit_timer_release): New function.
2327 (gcc_jit_context_set_timer): New function.
2328 (gcc_jit_context_get_timer): New function.
2329 (gcc_jit_timer_push): New function.
2330 (gcc_jit_timer_pop): New function.
2331 (gcc_jit_timer_print): New function.
2332 * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro.
2333 (gcc_jit_timer): New typedef.
2334 (gcc_jit_timer_new): New function.
2335 (gcc_jit_timer_release): New function.
2336 (gcc_jit_context_set_timer): New function.
2337 (gcc_jit_context_get_timer): New function.
2338 (gcc_jit_timer_push): New function.
2339 (gcc_jit_timer_pop): New function.
2340 (gcc_jit_timer_print): New function.
2341 * libgccjit.map (LIBGCCJIT_ABI_4): New.
2342 (gcc_jit_timer_new): New function.
2343 (gcc_jit_timer_release): New function.
2344 (gcc_jit_context_set_timer): New function.
2345 (gcc_jit_context_get_timer): New function.
2346 (gcc_jit_timer_push): New function.
2347 (gcc_jit_timer_pop): New function.
2348 (gcc_jit_timer_print): New function.
2350 2015-07-23 David Malcolm <dmalcolm@redhat.com>
2352 * jit-playback.c (invoke_driver): Convert local "argvec"
2353 to an auto_argvec, so that it owns copies of the strings,
2354 rather than borrows them, updating ADD_ARG to use xstrdup
2355 and special-casing the NULL terminator to avoid
2356 xstrdup (NULL). Call add_multilib_driver_arguments at the front
2358 (MULTILIB_DEFAULTS): Provide a default definition.
2359 (multilib_defaults_raw): New constant array.
2360 (gcc::jit::playback::context::add_multilib_driver_arguments): New
2363 (gcc::jit::playback::context::add_multilib_driver_arguments): New
2365 * docs/internals/test-hello-world.exe.log.txt: Update.
2366 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2368 2015-07-16 David Malcolm <dmalcolm@redhat.com>
2370 * docs/internals/index.rst (Overview of code structure): Add note
2371 that the implementation is in C++, despite the .c extension.
2372 (Submitting patches): New subsection.
2373 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2375 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
2377 * dummy-frontend.c: Adjust includes for flags.h changes.
2378 * jit-common.h: Likewise.
2379 * jit-playback.c: Likewise.
2381 2015-07-08 David Malcolm <dmalcolm@redhat.com>
2384 * libgccjit.c (gcc_jit_context_new_field): Show name of field in
2385 "unknown size" error message.
2386 (gcc_jit_struct_set_fields): Show name of struct in error message.
2387 (gcc_jit_context_new_global): Show name of global in
2388 "unknown size" error message.
2389 (gcc_jit_function_new_local): Likewise for local.
2391 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
2393 * dummy-frontend.c: Adjust includes.
2394 * jit-common.h: Likewise.
2395 * jit-playback.c: Likewise.
2397 2015-07-07 David Malcolm <dmalcolm@redhat.com>
2400 * jit-recording.h: Within namespace gcc:jit::recording...
2401 (type::has_known_size): New virtual function.
2402 (struct_has_known_size): New function.
2403 * libgccjit.c (gcc_jit_context_new_field): Verify that the type
2405 (gcc_jit_context_new_global): Likewise.
2406 (gcc_jit_function_new_local): Likewise.
2408 2015-07-07 David Malcolm <dmalcolm@redhat.com>
2411 * dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we
2412 handle modes QI, HI, SI, DI, TI.
2414 2015-07-01 David Malcolm <dmalcolm@redhat.com>
2417 * jit-playback.c (jit_mark_addressable): New function.
2418 (gcc::jit::playback::lvalue::get_address): Call
2419 jit_mark_addressable on the underlying tree.
2421 2015-07-01 David Malcolm <dmalcolm@redhat.com>
2423 * docs/topics/types.rst (gcc_jit_context_new_union_type): Add
2425 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2427 2015-07-01 David Malcolm <dmalcolm@redhat.com>
2429 * docs/topics/contexts.rst (gcc_jit_context_set_bool_option):
2430 Clarify lack of lifetime requirements on (const char *) parameter.
2431 * docs/topics/expressions.rst
2432 (gcc_jit_context_new_string_literal): Likewise.
2433 (gcc_jit_context_new_global): Likewise.
2434 * docs/topics/functions.rst (gcc_jit_context_new_param): Likewise.
2435 (gcc_jit_context_new_function): Likewise.
2436 (gcc_jit_function_new_block): Likewise.
2437 (gcc_jit_block_add_comment): Likewise.
2438 * docs/topics/locations.rst (gcc_jit_context_new_location):
2440 * docs/topics/types.rst (gcc_jit_context_new_field): Likewise.
2441 (gcc_jit_context_new_struct_type): Likewise.
2442 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2444 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2446 * docs/cp/topics/functions.rst (Blocks): Add switch statements to
2447 list of ways to terminate a block.
2448 (gccjit::block::end_with_switch): Add function description.
2449 (gccjit::case_): Add class.
2450 (gccjit::context::new_case): Add function description.
2451 * docs/cp/topics/objects.rst: Add "case_" to class hierarchy.
2452 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New.
2453 * docs/topics/functions.rst (Blocks): Add switch statements to
2454 list of ways to terminate a block.
2455 (gcc_jit_block_end_with_switch): Add function description.
2456 (gcc_jit_case): Add type.
2457 (gcc_jit_context_new_case): Add function description.
2458 (gcc_jit_case_as_object): Add function description.
2459 * docs/topics/objects.rst: Add gcc_jit_case to class hierarchy.
2460 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2461 * jit-common.h (gcc::jit::recording::case_): Add forward decl.
2462 (gcc::jit::playback::case_): Add forward decl.
2463 * jit-playback.c (add_case): New function.
2464 (gcc::jit::playback::block::add_switch): New function.
2465 * jit-playback.h (gcc::jit::playback::case_): New struct.
2466 (gcc::jit::playback::block::get_function): New method.
2467 (gcc::jit::playback::block::add_switch): New method.
2468 * jit-recording.c: Within namespace gcc::jit...
2469 (recording::context::new_case): New method.
2470 (recording::function::validate): Update for change to
2471 get_successor_blocks.
2472 (recording::block::end_with_switch): New method.
2473 (recording::block::get_successor_blocks): Update to support an
2474 arbitrary number of successor blocks.
2475 (recording::block::dump_edges_to_dot): Likewise.
2476 (memento_of_new_rvalue_from_const <int>::get_wide_int): New.
2477 (memento_of_new_rvalue_from_const <long>::get_wide_int): New.
2478 (memento_of_new_rvalue_from_const <double>::get_wide_int): New.
2479 (memento_of_new_rvalue_from_const <void *>::get_wide_int): New.
2480 (recording::statement::get_successor_blocks): Update to support an
2481 arbitrary number of successor blocks.
2482 (recording::conditional::get_successor_blocks): Likewise.
2483 (recording::jump::get_successor_blocks): Likewise.
2484 (recording::return_::get_successor_blocks): Likewise.
2485 (recording::case_::write_reproducer): New.
2486 (recording::case_::make_debug_string): New.
2487 (recording::switch_::switch_): New.
2488 (recording::switch_::replay_into): New.
2489 (recording::switch_::get_successor_blocks): New.
2490 (recording::switch_::make_debug_string): New.
2491 (recording::switch_::write_reproducer): New.
2492 * jit-recording.h: Within namespace gcc::jit::recording...
2493 (context::new_case): New.
2494 (rvalue::is_constant): New.
2495 (rvalue::get_wide_int): New.
2496 (block::end_with_switch): New.
2497 (block::get_successor_blocks): Update to support an arbitrary
2498 number of successor blocks.
2499 (memento_of_new_rvalue_from_const::is_constant): New.
2500 (memento_of_new_rvalue_from_const::get_wide_int): New.
2501 (statement::get_successor_blocks): Update to support an arbitrary
2502 number of successor blocks.
2503 (conditional::get_successor_blocks): Likewise.
2504 (jump::get_successor_blocks): Likewise.
2505 (return_::get_successor_blocks): Likewise.
2506 (case_): New subclass of memento.
2507 (switch_): New subclass of statement.
2508 * libgccjit++.h (gccjit::case_): New subclass of gccjit::object.
2509 (gccjit::context::new_case): New method.
2510 (gccjit::block::end_with_switch): New method.
2511 (gccjit::case_::case): New ctors.
2512 (gccjit::case_::get_inner_case): New method.
2513 * libgccjit.c: Include "typed-splay-tree.h"
2514 (struct gcc_jit_case): New.
2515 (gcc_jit_context_new_case): New function.
2516 (gcc_jit_case_as_object): New function.
2517 (valid_dest_for_switch): New function.
2518 (valid_case_for_switch): New function.
2519 (class api_call_validator): New class.
2520 (class case_range_validator): New class.
2521 (case_range_validator::case_range_validator): New.
2522 (case_range_validator::validate): New.
2523 (case_range_validator::case_compare): New.
2524 (case_range_validator::get_wide_int): new.
2525 (gcc_jit_block_end_with_switch): New.
2526 * libgccjit.h: Add gcc_jit_case to class hierarchy comment.
2527 (gcc_jit_case): New typedef.
2528 (gcc_jit_context_new_case): New function.
2529 (gcc_jit_case_as_object): New function.
2530 (gcc_jit_block_end_with_switch): New function.
2531 (LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New.
2532 * libgccjit.map: Add gcc_jit_block_end_with_switch,
2533 gcc_jit_case_as_object and gcc_jit_context_new_case.
2535 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2538 * docs/cp/topics/contexts.rst
2539 (gccjit::context::set_bool_allow_unreachable_blocks): New.
2540 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New.
2541 * docs/topics/contexts.rst (Options): Add notes discussing the
2542 transition from enums to entrypoints for new options.
2543 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
2544 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2545 * jit-common.h (gcc::jit::inner_bool_option): New enum.
2546 * jit-recording.c: Within namespace gcc::jit...
2547 (recording::context::context): Handle m_inner_bool_options.
2548 (recording::context::set_inner_bool_option): New.
2549 (inner_bool_option_reproducer_strings): New.
2550 (recording::context::log_all_options): Log the "inner" bool
2552 (recording::context::log_inner_bool_option): New.
2553 (recording::context::dump_reproducer_to_file): Write initializers
2554 for "inner" bool options.
2555 (recording::function::validate): Don't check for block
2556 reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set.
2557 * jit-recording.h: Within namespace gcc::jit...
2558 (recording::context::set_inner_bool_option): New.
2559 (recording::context::get_inner_bool_option): New.
2560 (recording::context::log_inner_bool_option): New.
2561 (recording::context::m_inner_bool_options): New.
2563 (gccjit::context::set_bool_allow_unreachable_blocks): New.
2565 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
2566 * libgccjit.h: Add note about options present in the
2567 initial release of libgccjit.
2568 (gcc_jit_context_set_bool_allow_unreachable_blocks): New API
2570 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks):
2572 * libgccjit.map (LIBGCCJIT_ABI_2): New, containing...
2573 (gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new
2576 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2579 * docs/cp/topics/contexts.rst (Additional command-line options):
2581 * docs/topics/compatibility.rst: New file.
2582 * docs/topics/contexts.rst (Additional command-line options): New
2584 * docs/topics/index.rst: Add compatibility.rst.
2585 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2586 * jit-playback.c (make_fake_args): Add call to
2587 append_command_line_options.
2588 * jit-recording.c: Within namespace gcc::jit...
2589 (recording::context::~context): Free the optnames within
2590 m_command_line_options.
2591 (recording::context::set_bool_option): Likewise.
2592 (recording::context::add_command_line_option): New method.
2593 (recording::context::append_command_line_options): New method.
2594 (recording::context::dump_reproducer_to_file): Add command-line
2596 * jit-recording.h: Within namespace gcc::jit...
2597 (recording::context::add_command_line_option): New method.
2598 (recording::context::append_command_line_options): New method.
2599 (recording::context::m_command_line_options): New field.
2600 * libgccjit++.h (gccjit::context::add_command_line_option): New
2602 * libgccjit.c (gcc_jit_context_add_command_line_option): New API
2604 * libgccjit.h (gcc_jit_context_add_command_line_option): New API
2606 (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New
2608 * libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add
2609 LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option.
2611 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2614 (gcc::jit::recording::context::dump_reproducer_to_file):
2615 Add pragma to generated reproducers to disable -Wunused-variable.
2616 Fix handling of NULL string options.
2618 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2620 * docs/cp/topics/expressions.rst: Remove stray semicolon.
2621 * docs/cp/topics/functions.rst: Remove stray backslash.
2622 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2624 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
2626 * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
2627 * jit-playback.c: Likewise.
2629 2015-06-25 Andrew Macleod <amacleod@redhat.com>
2631 * jit-common.h: Don't include alias.h.
2633 2015-06-17 David Malcolm <dmalcolm@redhat.com>
2635 * libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field
2636 is for the correct struct.
2637 (gcc_jit_rvalue_access_field): Likewise.
2639 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2641 * dummy-frontend.c: Do not include input.h, line-map.h or is-a.h.
2642 * jit-common.h: Likewise.
2643 * jit-playback.c: Likewise.
2645 2015-06-16 David Malcolm <dmalcolm@redhat.com>
2648 * jit-recording.c: Within namespace gcc::jit::recording::
2649 (rvalue::get_debug_string_parens): New function.
2650 (binary_op::make_debug_string): Update to mimic C precedence
2652 (binary_op_precedence): New array.
2653 (binary_op::get_precedence): New function.
2654 (comparison::make_debug_string): Update to mimic C precedence
2656 (comparison_precedence): New array.
2657 (comparison::get_precedence): New function.
2658 (cast::make_debug_string): Update to mimic C precedence rules.
2659 (call::make_debug_string): Likewise.
2660 (call_through_ptr::make_debug_string): Likewise.
2661 (array_access::make_debug_string): Likewise.
2662 (access_field_of_lvalue::make_debug_string): Likewise.
2663 (access_field_rvalue::make_debug_string): Likewise.
2664 (dereference_field_rvalue::make_debug_string): Likewise.
2665 (dereference_rvalue::make_debug_string): Likewise.
2666 (get_address_of_lvalue::make_debug_string): Likewise.
2667 * jit-recording.h: Within namespace gcc::jit::recording::
2668 (precedence): New enum.
2669 (rvalue::rvalue): Initialize field "m_parenthesized_string".
2670 (rvalue::get_debug_string_parens): New method.
2671 (rvalue::get_precedence): New pure virtual function.
2672 (rvalue::m_parenthesized_string): New field.
2673 (param::get_precedence): New function.
2674 (global::get_precedence): New function.
2675 (memento_of_new_rvalue_from_const::get_precedence): New function.
2676 (memento_of_new_string_literal::get_precedence): New function.
2677 (unary_op::get_precedence): New function.
2678 (binary_op::get_precedence): New function.
2679 (comparison::get_precedence): New function.
2680 (cast::get_precedence): New function.
2681 (call::get_precedence): New function.
2682 (call_through_ptr::get_precedence): New function.
2683 (array_access::get_precedence): New function.
2684 (access_field_of_lvalue::get_precedence): New function.
2685 (access_field_rvalue::get_precedence): New function.
2686 (dereference_field_rvalue::get_precedence): New function.
2687 (dereference_rvalue::get_precedence): New function.
2688 (get_address_of_lvalue::get_precedence): New function.
2689 (local::get_precedence): New function.
2691 2015-06-09 Matthias Klose <doko@ubuntu.com>
2693 * Make-lang.in (jit.install-common): Install headers using INSTALL_DATA.
2695 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
2697 * dummy-frontend.c : Adjust include files.
2698 * jit-common.h : Likewise.
2699 * jit-playback.c : Likewise.
2701 2015-06-05 David Malcolm <dmalcolm@redhat.com>
2704 (jit_langhook_post_compilation_parsing_cleanups): Remove.
2705 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
2706 * jit-playback.c (gcc::jit::playback::context::new_global): Add
2707 call to varpool_node::finalize_decl.
2708 (gcc::jit::playback::context::finalize_global_decls): Remove.
2710 (gcc::jit::playback::context::finalize_global_decls): Remove.
2712 2015-06-05 David Malcolm <dmalcolm@redhat.com>
2714 * dummy-frontend.c (jit_langhook_write_globals): Rename to...
2715 (jit_langhook_post_compilation_parsing_cleanups): ...this, and
2716 eliminate calls to finalize_compilation_unit and
2717 write_global_decls_2.
2718 (LANG_HOOKS_WRITE_GLOBALS): Rename to...
2719 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
2720 redirect from jit_langhook_write_globals to
2721 jit_langhook_post_compilation_parsing_cleanups.
2723 (gcc::jit::playback::context::write_global_decls_1): Rename to...
2724 (gcc::jit::playback::context::finalize_global_decls): ...this.
2725 (gcc::jit::playback::context::write_global_decls_1): Delete.
2727 (gcc::jit::playback::context::write_global_decls_1): Rename to...
2728 (gcc::jit::playback::context::finalize_global_decls): ...this.
2729 (gcc::jit::playback::context::write_global_decls_1): Delete.
2731 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
2733 * dummy-frontend.c: Adjust includes for restructured coretypes.h.
2734 * jit-common.h: Likewise.
2735 * jit-playback.c: Likewise.
2737 2015-05-12 David Malcolm <dmalcolm@redhat.com>
2739 * jit-builtins.c: Include vec.h before target.h.
2741 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2743 * Make-lang.in (jit.mostlyclean): Remove shared libraries and object
2746 2015-04-09 David Malcolm <dmalcolm@redhat.com>
2749 * docs/cp/topics/expressions.rst (Simple expressions): Fix copy
2750 and paste error in description of gccjit::context::one.
2751 * docs/topics/expressions.rst (Simple expressions): Likewise in
2752 description of gcc_jit_context_one.
2753 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2755 2015-03-13 Uros Bizjak <ubizjak@gmail.com>
2757 * jit-recording.c (dump::write): Also check vasprintf return value.
2758 (recording::context::add_error_va): Ditto.
2759 (recording::string::from_printf): Ditto.
2761 2015-03-13 David Malcolm <dmalcolm@redhat.com>
2763 * docs/internals/index.rst (Packaging notes): New section.
2764 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2766 2015-03-05 David Malcolm <dmalcolm@redhat.com>
2768 * docs/cp/intro/tutorial03.rst: Add missing arguments to
2769 gccjit::block::end_with_conditional call. Add on_true/on_false
2770 comments. Tweak the wording.
2771 * docs/intro/tutorial03.rst: Add missing arguments to
2772 gcc_jit_block_end_with_conditional call. Add some clarifying
2774 * docs/topics/compilation.rst: Tweak the wording to avoid an
2775 ambiguous use of "this".
2776 * docs/topics/contexts.rst: Fix a typo.
2777 * docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
2779 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2781 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
2784 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8)
2785 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
2786 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2787 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8)
2788 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
2789 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2791 2015-02-04 David Malcolm <dmalcolm@redhat.com>
2794 * docs/conf.py (html_theme): Change from 'pyramid'
2797 2015-02-04 David Malcolm <dmalcolm@redhat.com>
2799 * docs/topics/contexts.rst (gcc_jit_context_acquire): Fix
2801 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2803 2015-02-03 David Malcolm <dmalcolm@redhat.com>
2805 * jit-logging.h (gcc::jit::log_user::log): Make const.
2806 * jit-recording.c (gcc::jit::recording::context::set_str_option):
2807 Log the new value of the option.
2808 (gcc::jit::recording::context::set_int_option): Likewise.
2809 (gcc::jit::recording::context::set_bool_option): Likewise.
2810 (gcc::jit::recording::context::compile): Log the value of all
2812 (gcc::jit::recording::context::compile_to_file): Likewise.
2813 (gcc::jit::recording::context::log_all_options): New function.
2814 (gcc::jit::recording::context::log_str_option): New function.
2815 (gcc::jit::recording::context::log_int_option): New function.
2816 (gcc::jit::recording::context::log_bool_option): New function.
2817 * jit-recording.h (gcc::jit::recording::context::log_all_options):
2819 (gcc::jit::recording::context::log_str_option): New function.
2820 (gcc::jit::recording::context::log_int_option): New function.
2821 (gcc::jit::recording::context::log_bool_option): New function.
2822 * docs/internals/test-hello-world.exe.log.txt: Update for above
2824 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2826 2015-02-03 David Malcolm <dmalcolm@redhat.com>
2829 * Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o.
2830 (LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS.
2831 * jit-playback.c: Include gcc.h.
2832 (gcc::jit::playback::context::compile): Move mutex acquisition
2833 to before the call to make_fake_args.
2834 (append_arg_from_driver): New function.
2835 (gcc::jit::playback::context::make_fake_args): On the first call,
2836 call into driver_get_configure_time_options to get configure-time
2837 default options and cache them. Add them to the args for
2839 * jit-spec.c: New source file.
2840 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
2842 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2844 2015-02-02 David Malcolm <dmalcolm@redhat.com>
2847 * dummy-frontend.c (jit_langhook_type_for_mode): Support
2848 TYPE_MODE (long_long_integer_type_node).
2850 2015-01-27 David Malcolm <dmalcolm@redhat.com>
2852 * docs/internals/test-hello-world.exe.log.txt: Add example version
2854 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2855 * jit-common.h (gcc::jit::dump::get_file): New accessor.
2856 * jit-logging.c: Include toplev.h.
2857 (gcc::jit::logger::logger): Log the GCC version.
2858 * jit-recording.c: Include toplev.h.
2859 (gcc:jit::recording::context::dump_reproducer_to_file): Log the
2862 2015-01-26 David Malcolm <dmalcolm@redhat.com>
2864 * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo.
2865 * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The
2866 error buffer is only valid until the next call to the context.
2867 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2868 * libgccjit.h (gcc_jit_context_get_first_error): Reword the
2869 comment to omit mention of compiling.
2870 (gcc_jit_context_get_last_error): The error buffer is only valid
2871 until the next call to the context.
2873 2015-01-26 David Malcolm <dmalcolm@redhat.com>
2876 * config-lang.in (compilers): Drop "libgccjit.so".
2878 2015-01-23 David Malcolm <dmalcolm@redhat.com>
2881 * jit-playback.c (gcc::jit::playback::context::compile): Construct
2882 toplev instances with init_signals=false.
2884 2015-01-19 David Malcolm <dmalcolm@redhat.com>
2886 * docs/cp/topics/results.rst: Rename to...
2887 * docs/cp/topics/compilation.rst: ...this, and add section on
2888 ahead-of-time compilation.
2889 * docs/cp/topics/index.rst: Update for renaming of results.rst
2891 * docs/examples/emit-alphabet.bf: New file, a sample "brainf"
2893 * docs/examples/tut05-bf.c: New file, implementing a compiler
2895 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
2896 changes to logger output.
2897 * docs/intro/index.rst: Add tutorial05.rst
2898 * docs/intro/tutorial05.rst: New file.
2899 * docs/topics/results.rst: Rename to...
2900 * docs/topics/compilation.rst: ...this, and add section on
2901 ahead-of-time compilation.
2902 * docs/topics/index.rst: Update for renaming of results.rst to
2904 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2905 * jit-playback.c (gcc::jit::playback::context::compile): Convert
2906 return type from result * to void. Move the code to convert to
2907 dso and dlopen the result to a new pure virtual "postprocess"
2909 (gcc::jit::playback::compile_to_memory::compile_to_memory): New
2911 (gcc::jit::playback::compile_to_memory::postprocess): New
2912 function, based on playback::context::compile.
2913 (gcc::jit::playback::compile_to_file::compile_to_file): New
2915 (gcc::jit::playback::compile_to_file::postprocess): New function.
2916 (gcc::jit::playback::compile_to_file::copy_file): New function.
2917 (gcc::jit::playback::context::convert_to_dso): Move internals
2919 (gcc::jit::playback::context::invoke_driver): New method. Add
2920 "-shared" and "-c" options to driver's argv as needed.
2921 * jit-playback.h: Include "timevar.h".
2922 (gcc::jit::playback::context::compile): Convert return type from
2924 (gcc::jit::playback::context::postprocess): New pure virtual
2925 function, making this an abstract base class.
2926 (gcc::jit::playback::context::get_tempdir): New accessor.
2927 (gcc::jit::playback::context::invoke_driver): New function.
2928 (class gcc::jit::playback::compile_to_memory): New subclass of
2930 (class gcc::jit::playback::compile_to_file): Likewise.
2931 * jit-recording.c (gcc::jit::recording::context::compile): Use a
2932 playback::compile_to_memory, and extract its result.
2933 (gcc::jit::recording::context::compile_to_file): New function.
2934 * jit-recording.h (gcc::jit::recording::context::compile_to_file):
2936 * libgccjit++.h (gccjit::context::compile_to_file): New method.
2937 * libgccjit.c (gcc_jit_context_compile): Update log message to
2938 clarify that this is an in-memory compile.
2939 (gcc_jit_context_compile_to_file): New function.
2940 * libgccjit.h (gcc_jit_context): Clarify that you can compile
2941 a context more than once, and that you can compile to a file
2942 as well as to memory.
2943 (gcc_jit_result): Clarify that this is the result of an
2944 in-memory compilation.
2945 (gcc_jit_context_compile): Clarify that you can compile, and that
2946 this is an in-memory compilation.
2947 (enum gcc_jit_output_kind): New enum.
2948 (gcc_jit_context_compile_to_file): New function.
2949 (gcc_jit_context_enable_dump): Clarify comment to cover both forms
2951 * libgccjit.map (gcc_jit_context_compile_to_file): New API
2953 * notes.txt: Update to show the playback::context::postprocess
2956 2015-01-19 David Malcolm <dmalcolm@redhat.com>
2959 (gcc::jit::recording::memento_of_new_string_literal::make_debug_string):
2960 Add missing format string.
2962 2015-01-16 David Malcolm <dmalcolm@redhat.com>
2964 * Make-lang.in (lang_checks_parallelized): Add "check-jit".
2965 (check_jit_parallelize): Set this to an arbitrary value (10).
2967 2015-01-16 Jakub Jelinek <jakub@redhat.com>
2969 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of
2971 (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and
2973 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
2976 2015-01-15 Richard Sandiford <richard.sandiford@arm.com>
2978 Update copyright years in docs/.
2980 2015-01-15 David Malcolm <dmalcolm@redhat.com>
2982 * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the
2983 lvalue and the rvalue are of compatible type.
2985 2015-01-13 David Malcolm <dmalcolm@redhat.com>
2987 * docs/cp/topics/contexts.rst (Debugging): Add
2988 gccjit::context::dump_reproducer_to_file.
2989 * docs/internals/index.rst (Design notes): New section,
2990 discussing input validation and
2991 gcc_jit_context_dump_reproducer_to_file.
2992 * docs/topics/contexts.rst (Debugging): Add
2993 gcc_jit_context_dump_reproducer_to_file.
2994 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2995 * jit-common.h (gcc::jit::dump::get_context): New accessor.
2996 * jit-recording.c: Include "hash-map.h".
2997 Within namespace ::gcc::jit...
2998 (dump::write): Flush each line.
2999 (dump::make_location): Pass false for new param "created_by_user".
3000 (class allocator): New class.
3001 (allocator::~allocator): New function.
3002 (allocator::xstrdup_printf): New function.
3003 (allocator::xstrdup_printf_va): New function.
3004 (class reproducer): New subclass of dump.
3005 (reproducer::reproducer): New function.
3006 (reproducer::write_params): New function.
3007 (reproducer::write_args): New function.
3008 (reproducer::make_identifier): New function.
3009 (reproducer::make_tmp_identifier): New function.
3010 (reproducer::get_identifier): New pair of functions.
3011 (reproducer::get_identifier_as_rvalue): New function.
3012 (reproducer::get_identifier_as_lvalue): New function.
3013 (reproducer::get_identifier_as_type): New function.
3014 (reproducer::xstrdup_printf): New function.
3015 (recording::context::context): Initialize m_toplevel_ctxt.
3016 (recording::context::new_location): Add param created_by_user.
3017 (str_option_reproducer_strings): New table of strings.
3018 (int_option_reproducer_strings): Likewise.
3019 (bool_option_reproducer_strings): Likewise.
3020 (get_type_enum_strings): Likewise.
3021 (names_of_function_kinds): Likewise.
3022 (global_kind_reproducer_strings): Likewise.
3023 (unary_op_reproducer_strings): Likewise.
3024 (binary_op_reproducer_strings): Likewise.
3025 (comparison_reproducer_strings): Likewise.
3026 Within namespace ::gcc::jit::recording::...
3027 (context::dump_reproducer_to_file): New function.
3028 (string::write_reproducer): Likewise.
3029 (location::write_reproducer): Likewise.
3030 (type::access_as_type): Likewise.
3031 (memento_of_get_type::write_reproducer): Likewise.
3032 (memento_of_get_pointer::write_reproducer): Likewise.
3033 (memento_of_get_const::write_reproducer): Likewise.
3034 (memento_of_get_volatile::write_reproducer): Likewise.
3035 (array_type::write_reproducer): Likewise.
3036 (function_type::write_reproducer): Likewise.
3037 (function_type::write_deferred_reproducer): Likewise.
3038 (field::write_reproducer): Likewise.
3039 (struct_::access_as_type): Likewise.
3040 (struct_::write_reproducer): Likewise.
3041 (union_::write_reproducer): Likewise.
3042 (fields::write_reproducer): Likewise.
3043 (rvalue::access_as_rvalue): Likewise.
3044 (lvalue::access_as_rvalue): Likewise.
3045 (lvalue::access_as_lvalue): Likewise.
3046 (param::access_as_rvalue): Likewise.
3047 (param::access_as_lvalue): Likewise.
3048 (param::write_reproducer): Likewise.
3049 (function::write_reproducer): Likewise.
3050 (block::write_reproducer): Likewise.
3051 (global::write_reproducer): Likewise.
3052 (memento_of_new_rvalue_from_const <int>::write_reproducer):
3054 (memento_of_new_rvalue_from_const <long>::write_reproducer):
3056 (memento_of_new_rvalue_from_const <double>::write_reproducer):
3058 (memento_of_new_rvalue_from_const <void *>::write_reproducer):
3060 (memento_of_new_string_literal::write_reproducer): Likewise.
3061 (unary_op::write_reproducer): Likewise.
3062 (binary_op::write_reproducer): Likewise.
3063 (comparison::write_reproducer): Likewise.
3064 (cast::write_reproducer): Likewise.
3065 (call::write_reproducer): Likewise.
3066 (call_through_ptr::write_reproducer): Likewise.
3067 (array_access::write_reproducer): Likewise.
3068 (access_field_of_lvalue::write_reproducer): Likewise.
3069 (access_field_rvalue::write_reproducer): Likewise.
3070 (dereference_field_rvalue::write_reproducer): Likewise.
3071 (dereference_rvalue::write_reproducer): Likewise.
3072 (get_address_of_lvalue::write_reproducer): Likewise.
3073 (local::write_reproducer): Likewise.
3074 (eval::write_reproducer): Likewise.
3075 (assignment::write_reproducer): Likewise.
3076 (assignment_op::write_reproducer): Likewise.
3077 (comment::write_reproducer): Likewise.
3078 (conditional::write_reproducer): Likewise.
3079 (jump::write_reproducer): Likewise.
3080 (return_::write_reproducer): Likewise.
3081 * jit-recording.h (gcc::jit::reproducer): New forward declararion.
3082 Within namespace ::gcc::jit::recording::...
3083 (context::new_location): Add "created_by_user" param.
3084 (context::dump_reproducer_to_file): New method.
3085 (context::m_toplevel_ctxt): New field.
3086 (memento::write_reproducer): New pure virtual function.
3087 (memento::dyn_cast_location): New virtual function.
3088 (string::write_reproducer):
3089 (location::location): Add "created_by_user" param.
3090 (location::dyn_cast_location): New function.
3091 (location::created_by_user): New accessor.
3092 (location::write_reproducer): New function.
3093 (location::m_created_by_user): New field.
3094 (type::access_as_type): New virtual function.
3095 (location::write_reproducer): Likewise.
3096 (type::access_as_type): Likewise.
3097 (memento_of_get_type::write_reproducer): Likewise.
3098 (memento_of_get_pointer::write_reproducer): Likewise.
3099 (memento_of_get_const::write_reproducer): Likewise.
3100 (memento_of_get_volatile::write_reproducer): Likewise.
3101 (array_type::write_reproducer): Likewise.
3102 (function_type::write_reproducer): Likewise.
3103 (function_type::write_deferred_reproducer): Likewise.
3104 (field::write_reproducer): Likewise.
3105 (struct_::access_as_type): Likewise.
3106 (struct_::write_reproducer): Likewise.
3107 (union_::write_reproducer): Likewise.
3108 (union_::m_fields): Remove stray unused field.
3109 (fields::length): New accessor.
3110 (fields::get_field): New accessor.
3111 (fields::write_reproducer): New function.
3112 (rvalue::access_as_rvalue): Likewise.
3113 (lvalue::access_as_rvalue): Likewise.
3114 (lvalue::access_as_lvalue): Likewise.
3115 (param::access_as_rvalue): Likewise.
3116 (param::access_as_lvalue): Likewise.
3117 (param::write_reproducer): Likewise.
3118 (function::write_reproducer): Likewise.
3119 (block::write_reproducer): Likewise.
3120 (global::write_reproducer): Likewise.
3121 (memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer):
3123 (memento_of_new_string_literal::write_reproducer): Likewise.
3124 (unary_op::write_reproducer): Likewise.
3125 (binary_op::write_reproducer): Likewise.
3126 (comparison::write_reproducer): Likewise.
3127 (cast::write_reproducer): Likewise.
3128 (call::write_reproducer): Likewise.
3129 (call_through_ptr::write_reproducer): Likewise.
3130 (array_access::write_reproducer): Likewise.
3131 (access_field_of_lvalue::write_reproducer): Likewise.
3132 (access_field_rvalue::write_reproducer): Likewise.
3133 (dereference_field_rvalue::write_reproducer): Likewise.
3134 (dereference_rvalue::write_reproducer): Likewise.
3135 (get_address_of_lvalue::write_reproducer): Likewise.
3136 (local::write_reproducer): Likewise.
3137 (eval::write_reproducer): Likewise.
3138 (assignment::write_reproducer): Likewise.
3139 (assignment_op::write_reproducer): Likewise.
3140 (comment::write_reproducer): Likewise.
3141 (conditional::write_reproducer): Likewise.
3142 (jump::write_reproducer): Likewise.
3143 (return_::write_reproducer): Likewise.
3144 * libgccjit++.h (gccjit::context::dump_reproducer_to_file): New.
3145 * libgccjit.c (gcc_jit_context_new_location): Pass "true" as
3146 param "created_by_user".
3147 (gcc_jit_context_dump_reproducer_to_file): New API entrypoint.
3148 * libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API
3150 * libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API
3153 2015-01-12 David Malcolm <dmalcolm@redhat.com>
3155 * jit-recording.c (class gcc::jit::rvalue_usage_validator): New.
3156 (gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New
3158 (gcc::jit::rvalue_usage_validator::visit): New function.
3159 (gcc::jit::recording::rvalue::verify_valid_within_stmt): New
3161 (gcc::jit::recording::rvalue::set_scope): New function.
3162 (gcc::jit::recording::function::function): Call set_scope on each
3163 param, issuing errors for any params that already have a function.
3164 (gcc::jit::recording::block::add_eval): Return the new statement;
3165 update the comment given that some error-checking now happens after
3167 (gcc::jit::recording::block::add_assignment): Likewise.
3168 (gcc::jit::recording::block::add_assignment_op): Likewise.
3169 (gcc::jit::recording::block::add_comment): Likewise.
3170 (gcc::jit::recording::block::end_with_conditional): Likewise.
3171 (gcc::jit::recording::block::end_with_jump): Likewise.
3172 (gcc::jit::recording::block::end_with_return): Likewise.
3173 (gcc::jit::recording::block::validate): Add a comment.
3174 (gcc::jit::recording::unary_op::visit_children): New function.
3175 (gcc::jit::recording::binary_op::visit_children): New function.
3176 (gcc::jit::recording::comparison::visit_children): New function.
3177 (gcc::jit::recording::cast::visit_children): New function.
3178 (gcc::jit::recording::call::visit_children): New function.
3179 (gcc::jit::recording::call_through_ptr::visit_children): New function.
3180 (gcc::jit::recording::array_access::visit_children): New function.
3181 (gcc::jit::recording::access_field_of_lvalue::visit_children): New
3183 (gcc::jit::recording::access_field_rvalue::visit_children): New
3185 (gcc::jit::recording::dereference_field_rvalue::visit_children):
3187 (gcc::jit::recording::dereference_rvalue::visit_children): New
3189 (gcc::jit::recording::get_address_of_lvalue::visit_children): New
3191 * jit-recording.h: Within namespace gcc::jit::recording...
3192 (class rvalue_visitor): New.
3193 (rvalue::rvalue): Initialize m_scope.
3194 (rvalue::get_loc): New accessor.
3195 (rvalue::verify_valid_within_stmt): New function.
3196 (rvalue::visit_children): New pure virtual function.
3197 (rvalue::set_scope): New function.
3198 (rvalue::get_scope): New function.
3199 (rvalue::dyn_cast_param): New function.
3200 (rvalue::m_scope): New field.
3201 (param::visit_children): New empty function.
3202 (param::dyn_cast_param): New function.
3203 (function::get_loc): New function.
3204 (block::add_eval): Return the new statement.
3205 (block::add_assignment): Likewise.
3206 (block::add_assignment_op): Likewise.
3207 (block::add_comment): Likewise.
3208 (block::end_with_conditional): Likewise.
3209 (block::end_with_jump): Likewise.
3210 (block::end_with_return): Likewise.
3211 (global::visit_children): New function.
3212 (memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children):
3214 (memento_of_new_string_literal::visit_children): New function.
3215 (unary_op::visit_children): New function.
3216 (binary_op::visit_children): New function.
3217 (comparison::visit_children): New function.
3218 (cast::visit_children): New function.
3219 (call::visit_children): New function.
3220 (call_through_ptr::visit_children): New function.
3221 (array_access::visit_children): New function.
3222 (access_field_of_lvalue::visit_children): New function.
3223 (access_field_rvalue::visit_children): New function.
3224 (dereference_field_rvalue::visit_children): New function.
3225 (dereference_rvalue::visit_children): New function.
3226 (get_address_of_lvalue::visit_children): New function.
3227 (local::local): Call set_scope.
3228 (local::visit_children): New function.
3229 (statement::get_block): Make public.
3230 * libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro.
3231 (RETURN_NULL_IF_FAIL_PRINTF5): New macro.
3232 (gcc_jit_context_new_function): Verify that each param has
3233 not yet been used for creating another function.
3234 (gcc_jit_block_add_eval): After creating the stmt, verify
3235 that the rvalue expression tree is valid to use within it.
3236 (gcc_jit_block_add_assignment): Likewise for the lvalue and
3237 rvalue expression trees.
3238 (gcc_jit_block_add_assignment_op): Likewise.
3239 (gcc_jit_block_end_with_conditional): Likewise for the boolval
3241 (gcc_jit_block_end_with_return): Likewise for the rvalue
3243 (gcc_jit_block_end_with_void_return): Remove return of "void",
3244 now that block::end_with_return is now non-void.
3246 2015-01-12 David Malcolm <dmalcolm@redhat.com>
3248 * jit-playback.c (gcc::jit::playback::context::read_dump_file):
3249 Add missing fclose on error-handling path.
3251 2015-01-12 David Malcolm <dmalcolm@redhat.com>
3253 * docs/cp/topics/expressions.rst (Global variables): Add
3254 enum gcc_jit_global_kind param to gccjit::context::new_global.
3255 * docs/topics/expressions.rst (Global variables): Likewise.
3256 Document the new enum.
3257 * docs/topics/results.rst (Compilation results): Document
3259 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3260 * dummy-frontend.c (jit_langhook_write_globals): Call into the
3261 playback context's write_global_decls_1 and write_global_decls_2
3262 before and after calling symtab->finalize_compilation_unit ().
3263 * jit-playback.c: Include "debug.h".
3264 (gcc::jit::playback::context::new_global): Add "kind" param and
3265 use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the
3266 underlying VAR_DECL. Call varpool_node::get_create on the
3267 VAR_DECL, and add it to m_globals.
3268 (gcc::jit::playback::context::write_global_decls_1): New function.
3269 (gcc::jit::playback::context::write_global_decls_2): New function.
3270 * jit-playback.h (gcc::jit::playback::context::context): Call
3271 create on m_globals.
3272 (gcc::jit::playback::context::new_global): Add "kind" param.
3273 (gcc::jit::playback::context::write_global_decls_1): New function.
3274 (gcc::jit::playback::context::write_global_decls_2): New function.
3275 (gcc::jit::playback::context::m_globals): New field.
3276 * jit-recording.c (gcc::jit::recording::context::context):
3277 Initialize m_globals.
3278 (gcc::jit::recording::context::new_global): Add param "kind".
3279 Add the new global to m_globals.
3280 (gcc::jit::recording::context::dump_to_file): Dump the globals.
3281 (gcc::jit::recording::global::replay_into): Add field m_kind.
3282 (gcc::jit::recording::global::write_to_dump): New override.
3283 * jit-recording.h (gcc::jit::recording::context::new_global): Add
3285 (gcc::jit::recording::context::m_globals): New field.
3286 (gcc::jit::recording::global::global): Add param kind.
3287 (gcc::jit::recording::global::write_to_dump): New override.
3288 (gcc::jit::recording::global::m_kind): New field.
3289 * jit-result.c (gcc::jit::result::get_global): New function.
3290 * jit-result.h (gcc::jit::result::get_global): New function.
3291 * libgccjit++.h (gccjit::context::new_global): Add "kind" param.
3292 * libgccjit.c (gcc_jit_context_new_global): Likewise.
3293 (gcc_jit_result_get_global): New API entrypoint.
3294 * libgccjit.h (gcc_jit_result_get_global): New API entrypoint.
3295 (enum gcc_jit_global_kind): New enum.
3296 (gcc_jit_context_new_global): API change: add "kind" param.
3297 * libgccjit.map (gcc_jit_result_get_global): New symbol.
3299 2015-01-09 David Malcolm <dmalcolm@redhat.com>
3301 * dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h",
3302 "symtab.h", "inchash.h". Move include of "hash-set.h" much
3304 * jit-builtins.c: Remove redundant includes of "opts.h" and
3306 * jit-common.h: Include "hash-set.h", "input.h", "vec.h",
3307 "double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h".
3308 * jit-playback.c: Include "hashtab.h", "machmode.h", "input.h",
3309 "statistics.h", "vec.h", "double-int.h", "real.h",
3310 "fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h",
3311 "inchash.h", "fold-const.h". Move include of "hash-set.h" to
3313 * jit-recording.c: Remove redundant includes of "opts.h" and
3316 2015-01-09 David Malcolm <dmalcolm@redhat.com>
3318 * docs/cp/topics/expressions.rst (Simple expressions): Use
3319 ":c:type:" for C types. Document new overload of
3320 gcc::jit::context::new_rvalue.
3321 * docs/topics/expressions.rst (Simple expressions): Use
3322 ":c:type:" for C types. Document new entrypoint
3323 gcc_jit_context_new_rvalue_from_long.
3324 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3325 * jit-playback.c: Within namespace gcc::jit::playback...
3326 (context::new_rvalue_from_int): Eliminate in favor of...
3327 (context::new_rvalue_from_const <int>): ...this.
3328 (context::new_rvalue_from_double): Eliminate in favor of...
3329 (context::new_rvalue_from_const <double>): ...this.
3330 (context::new_rvalue_from_const <long>): New.
3331 (context::new_rvalue_from_ptr): Eliminate in favor of...
3332 (context::new_rvalue_from_const <void *>): ...this.
3333 * jit-playback.h: Within namespace gcc::jit::playback...
3334 (context::new_rvalue_from_int): Eliminate in favor of...
3335 (context::new_rvalue_from_const <HOST_TYPE>): ...this.
3336 (context::new_rvalue_from_double): Likewise.
3337 (context::new_rvalue_from_ptr): Likewise.
3338 * jit-recording.c: Within namespace gcc::jit::recording...
3339 (context::new_rvalue_from_int): Eliminate.
3340 (context::new_rvalue_from_double): Likewise.
3341 (context::new_rvalue_from_ptr): Likewise.
3342 (class memento_of_new_rvalue_from_const <int>):
3343 Add explicit specialization.
3344 (class memento_of_new_rvalue_from_const <long>):
3346 (class memento_of_new_rvalue_from_const <double>):
3348 (class memento_of_new_rvalue_from_const <void *>):
3350 (memento_of_new_rvalue_from_int::replay_into):
3352 (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into):
3354 (memento_of_new_rvalue_from_double::replay_into):
3356 (memento_of_new_rvalue_from_ptr::replay_into):
3357 ...and this to be deleted.
3358 (memento_of_new_rvalue_from_int::make_debug_string):
3360 (memento_of_new_rvalue_from_const <int>::make_debug_string):
3362 (memento_of_new_rvalue_from_double::make_debug_string):
3364 (memento_of_new_rvalue_from_const <double>::make_debug_string):
3366 (memento_of_new_rvalue_from_ptr::make_debug_string)
3368 (memento_of_new_rvalue_from_const <void *>::make_debug_string):
3370 (memento_of_new_rvalue_from_const <long>::make_debug_string):
3372 * jit-recording.h: Within namespace gcc::jit::recording...
3373 (context::new_rvalue_from_int): Eliminate.
3374 (context::new_rvalue_from_double): Likewise.
3375 (context::new_rvalue_from_ptr): Likewise, all in favor of...
3376 (context::new_rvalue_from_const <HOST_TYPE>): New family of
3378 (class memento_of_new_rvalue_from_int): Eliminate.
3379 (class memento_of_new_rvalue_from_double): Likewise.
3380 (class memento_of_new_rvalue_from_ptr): Likewise.
3381 (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family
3382 of rvalue subclasses.
3383 * libgccjit++.h (gccjit::context::new_rvalue): New overload, for
3385 * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for
3386 rewriting of recording::context::new_rvalue_from_int to
3387 recording::context::new_rvalue_from_const <int>.
3388 (gcc_jit_context_new_rvalue_from_long): New API entrypoint.
3389 (gcc_jit_context_new_rvalue_from_double): Update for
3390 rewriting of recording::context::new_rvalue_from_double to
3391 recording::context::new_rvalue_from_const <double>.
3392 (gcc_jit_context_new_rvalue_from_ptr): Update for
3393 rewriting of recording::context::new_rvalue_from_ptr to
3394 recording::context::new_rvalue_from_const <void *>.
3395 * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API
3397 * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise.
3399 2015-01-09 David Malcolm <dmalcolm@redhat.com>
3402 * docs/internals/test-hello-world.exe.log.txt: Update, the log now
3403 shows tempdir creation/cleanup.
3404 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3405 * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir
3406 to the list of subclasses in the comment.
3407 * jit-playback.c (gcc::jit::playback::context::context): Add a
3408 comment clarifying when the tempdir gets cleaned up.
3409 (gcc::jit::playback::context::compile): Pass the context's logger,
3410 if any, to the tempdir.
3411 (gcc::jit::playback::context::dlopen_built_dso): When creating the
3412 gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand
3413 over ownership of the tempdir to it.
3414 * jit-result.c: Include "jit-tempdir.h".
3415 (gcc::jit::result::result): Add tempdir param, saving it as
3417 (gcc::jit::result::~result): Delete m_tempdir.
3418 * jit-result.h (gcc::jit::result::result): Add tempdir param.
3419 (gcc::jit::result::m_tempdir): New field.
3420 * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param;
3422 (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit,
3423 and log m_path_template and m_path_tempdir.
3424 (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log
3425 entry/exit, and log the unlink and rmdir calls.
3426 * jit-tempdir.h: Include "jit-logging.h".
3427 (class gcc::jit::tempdir): Make this be a subclass of log_user.
3428 (gcc::jit::tempdir::tempdir): Add logger param.
3429 * notes.txt: Update to show the two possible places where the
3430 tempdir can be cleaned up.
3432 2015-01-08 David Malcolm <dmalcolm@redhat.com>
3434 * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive
3437 2015-01-08 David Malcolm <dmalcolm@redhat.com>
3439 * docs/topics/contexts.rst (Error-handling): Document new
3440 entrypoint gcc_jit_context_get_last_error.
3441 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3442 * jit-recording.c (gcc::jit::recording::context::context):
3443 Initialize new fields "m_last_error_str" and
3444 "m_owns_last_error_str".
3445 (gcc::jit::recording::context::~context): Clean up
3446 m_last_error_str, if needed.
3447 (gcc::jit::recording::context::add_error_va): Update
3448 m_last_error_str and m_owns_last_error_str, freeing the old
3449 value if appropriate.
3450 (gcc::jit::recording::context::get_last_error): New function.
3451 * jit-recording.h (gcc::jit::recording::context::get_last_error):
3453 (gcc::jit::recording::context): New fields m_last_error_str and
3454 m_owns_last_error_str.
3455 * libgccjit.c (gcc_jit_context_get_last_error): New function.
3456 * libgccjit.h (gcc_jit_context_get_last_error): New declaration.
3457 * libgccjit.map (gcc_jit_context_get_last_error): New function.
3459 2015-01-08 David Malcolm <dmalcolm@redhat.com>
3461 * Make-lang.in (jit_OBJS): Add jit/jit-logging.o.
3462 * docs/internals/index.rst (Overview of code structure): Mention
3463 gcc_jit_context_set_logfile, and embed the example logfile.
3464 * docs/internals/test-hello-world.exe.log.txt: New file: example
3466 * docs/topics/contexts.rst (Debugging): Add documentation
3467 for gcc_jit_context_set_logfile.
3468 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3469 * dummy-frontend.c: Include "jit-logging.h".
3470 (jit_langhook_init): Assert that there is an active playback
3471 context. If it has a logger, log entry/exit to this function.
3472 (jit_langhook_write_globals): Likewise.
3473 * jit-common.h (gcc::jit::logger): New forward declaration.
3474 * jit-logging.c: New file.
3475 * jit-logging.h: New file.
3476 * jit-playback.c: Include "jit-logging.h".
3477 (gcc::jit::playback::context::context): Initialize the log_user
3478 base class from the recording context's logger (if any). Use
3479 JIT_LOG_SCOPE to log entry/exit from the function body.
3480 (gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to
3481 log entry/exit from the function body.
3482 (gcc::jit::playback::build_stmt_list): Likewise.
3483 (gcc::jit::playback::function::postprocess): Likewise.
3484 (gcc::jit::playback::context::compile): Likewise. Log the
3485 entry/exit to toplev::main and toplev::finalize. Log the
3486 fake argv passed to toplev::main.
3487 (gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to
3488 log entry/exit from the function body.
3489 (gcc::jit::playback::context::release_mutex): Likewise.
3490 (gcc::jit::playback::context::make_fake_args): Likewise.
3491 (gcc::jit::playback::context::extract_any_requested_dumps):
3493 (gcc::jit::playback::context::convert_to_dso): Likewise. Also,
3494 log the arguments that the driver is invoked with.
3495 (gcc::jit::playback::context::dlopen_built_dso): Likewise. Pass
3496 the logger to the result object.
3497 (gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to
3498 log entry/exit from the function body.
3499 (gcc::jit::playback::context::dump_generated_code): Likewise.
3500 (gcc::jit::playback::context::handle_locations): Likewise.
3501 * jit-playback.h (gcc::jit::playback::context): Make this be
3502 a subclass of gcc::jit::log_user.
3503 * jit-recording.c: Include "jit-logging.h".
3504 (gcc::jit::recording::context::context: Initialize the logger to
3505 NULL for root contexts, or to the parent's logger for child
3507 (gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to
3508 log entry/exit from the function body.
3509 (gcc::jit::recording::context::replay_into): Likewise.
3510 (gcc::jit::recording::context::disassociate_from_playback):
3512 (gcc::jit::recording::context::compile): Likewise.
3513 (recording::context::add_error_va): Likewise. Also, log the
3515 (gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to
3516 log entry/exit from the function body.
3517 * jit-recording.h: Include "jit-logging.h".
3518 (gcc::jit::recording::context): Make this be a subclass of
3520 * jit-result.c: Include "jit-common.h" and "jit-logging.h".
3521 (gcc::jit::result::result): Add logger param, recording it.
3522 Use JIT_LOG_SCOPE to log entry/exit from the function body.
3523 (gcc::jit::result::~result(): Use JIT_LOG_SCOPE to
3524 log entry/exit from the function body.
3525 (gcc::jit::result::get_code): Likewise.
3526 * jit-result.h (gcc::jit::result): Make this be a subclass of
3528 (gcc::jit::result::result): Add logger parameter.
3529 * libgccjit++.h (gccjit::context::set_logfile): New function.
3530 * libgccjit.c: Include "jit-logging.h".
3531 (gcc_jit_context_acquire): Log the context.
3532 (gcc_jit_context_release): Use JIT_LOG_FUNC to
3533 log entry/exit from the function body, and log the context.
3534 (gcc_jit_context_new_child_context): Likewise, logging both
3536 (gcc_jit_context_new_location): Use JIT_LOG_FUNC to
3537 log entry/exit from the function body.
3538 (gcc_jit_context_get_type): Likewise.
3539 (gcc_jit_context_get_int_type): Likewise.
3540 (gcc_jit_context_new_array_type): Likewise.
3541 (gcc_jit_context_new_field): Likewise.
3542 (gcc_jit_context_new_struct_type): Likewise.
3543 (gcc_jit_context_new_opaque_struct): Likewise.
3544 (gcc_jit_struct_set_fields): Likewise.
3545 (gcc_jit_context_new_union_type): Likewise.
3546 (gcc_jit_context_new_function_ptr_type): Likewise.
3547 (gcc_jit_context_new_param): Likewise.
3548 (gcc_jit_context_new_function): Likewise.
3549 (gcc_jit_context_get_builtin_function): Likewise.
3550 (gcc_jit_function_get_param): Likewise.
3551 (gcc_jit_function_dump_to_dot): Likewise.
3552 (gcc_jit_function_new_block): Likewise.
3553 (gcc_jit_context_new_global): Likewise.
3554 (gcc_jit_context_new_rvalue_from_int): Likewise.
3555 (gcc_jit_context_zero): Likewise.
3556 (gcc_jit_context_one): Likewise.
3557 (gcc_jit_context_new_rvalue_from_double): Likewise.
3558 (gcc_jit_context_new_rvalue_from_ptr): Likewise.
3559 (gcc_jit_context_null): Likewise.
3560 (gcc_jit_context_new_string_literal): Likewise.
3561 (gcc_jit_context_new_unary_op): Likewise.
3562 (gcc_jit_context_new_binary_op): Likewise.
3563 (gcc_jit_context_new_comparison): Likewise.
3564 (gcc_jit_context_new_call): Likewise.
3565 (gcc_jit_context_new_call_through_ptr): Likewise.
3566 (gcc_jit_context_new_cast): Likewise.
3567 (gcc_jit_context_new_array_access): Likewise.
3568 (gcc_jit_lvalue_access_field): Likewise.
3569 (gcc_jit_rvalue_access_field): Likewise.
3570 (gcc_jit_rvalue_dereference_field): Likewise.
3571 (gcc_jit_rvalue_dereference): Likewise.
3572 (gcc_jit_lvalue_get_address): Likewise.
3573 (gcc_jit_function_new_local): Likewise.
3574 (gcc_jit_block_add_eval): Likewise.
3575 (gcc_jit_block_add_assignment): Likewise.
3576 (gcc_jit_block_add_assignment_op): Likewise.
3577 (gcc_jit_block_end_with_conditional): Likewise.
3578 (gcc_jit_block_add_comment): Likewise.
3579 (gcc_jit_block_end_with_jump): Likewise.
3580 (gcc_jit_block_end_with_return): Likewise.
3581 (gcc_jit_block_end_with_void_return): Likewise.
3582 (gcc_jit_context_set_str_option): Likewise.
3583 (gcc_jit_context_set_int_option): Likewise.
3584 (gcc_jit_context_set_bool_option): Likewise.
3585 (gcc_jit_context_enable_dump): Likewise.
3586 (gcc_jit_context_compile): Likewise. Also log the context,
3588 (gcc_jit_context_dump_to_file): Likewise.
3589 (gcc_jit_context_set_logfile): New function.
3590 (gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to
3591 log entry/exit from the function body.
3592 (gcc_jit_result_get_code): Likewise. Also log the fnname)
3593 and the ptr to be returned.
3594 (gcc_jit_result_release): Likewise. Also log the result.
3595 * libgccjit.h: Include <stdio.h>, since we need FILE *.
3596 (gcc_jit_context_set_logfile): New declaration.
3597 * libgccjit.map (gcc_jit_context_set_logfile): New.
3599 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3601 * jit-recording.h (gcc::jit::recording::type::is_void): New
3603 (gcc::jit::recording::memento_of_get_type::is_void): New
3604 function, overriding default implementation.
3605 * libgccjit.c (gcc_jit_rvalue_dereference): Verify that
3606 the underlying type is not "void".
3608 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3610 * docs/topics/expressions.rst (Unary Operations): Add
3611 GCC_JIT_UNARY_OP_ABS.
3612 * jit-playback.c (gcc::jit::playback::context::new_unary_op):
3614 * jit-recording.c (unary_op_strings): Likewise.
3615 * libgccjit.c (gcc_jit_context_new_unary_op): Update checking
3616 of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS.
3617 * libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS.
3618 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3620 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3622 * jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix
3625 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3627 * TODO.rst (Test suite): Remove item about running C++ testcases.
3628 * docs/internals/index.rst (Working on the JIT library): Add
3629 "c++" to the enabled languages in the suggested "configure"
3630 invocation, and add a description of why this is necessary.
3631 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3633 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3635 * docs/internals/index.rst: Update to reflect that built
3636 testcases are now test-foo.c.exe, rather than test-foo.exe.
3637 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3639 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3641 Update copyright years.
3643 2014-12-19 David Malcolm <dmalcolm@redhat.com>
3645 * jit-playback.c (gcc::jit::playback::context::build_cast): In
3646 case BOOLEAN_TYPE, don't assume that the source expression is
3649 2014-12-19 David Malcolm <dmalcolm@redhat.com>
3651 * jit-recording.c (gcc::jit::recording::context::context): When
3652 copying string options from a parent context, take a copy of the
3653 underlying buffers, rather than simply copying the pointer.
3655 2014-12-19 David Malcolm <dmalcolm@redhat.com>
3657 * jit-recording.c (gcc::jit::recording::context::set_str_option):
3660 2014-12-11 David Malcolm <dmalcolm@redhat.com>
3662 * docs/cp/topics/contexts.rst (gccjit::context::set_str_option):
3663 Document new function.
3664 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3666 2014-12-10 Ulrich Drepper <drepper@gmail.com>
3668 Minor interface cleanups of libgccjit
3669 * jit-playback.c (convert_to_dso): Use auto_vec instead
3670 of automatic array to build up command line.
3671 * jit-recording.c (recording::context::set_str_option):
3672 Make copy of the string.
3673 (recording::context::~context): Free string options.
3674 * jit-recording.h (recording::context): Adjust type
3675 of m_str_options member.
3676 * libgccjit.h: Adjust comment about
3677 gcc_jit_context_set_str_option parameter being used after
3679 Update comment now that all interfaces are copy strings
3681 * libgccjit++.h (gccjit::context): Add set_str_option
3684 2014-12-10 David Malcolm <dmalcolm@redhat.com>
3686 * docs/cp/index.rst: New file.
3687 * docs/cp/intro/index.rst: New file.
3688 * docs/cp/intro/tutorial01.rst: New file.
3689 * docs/cp/intro/tutorial02.rst: New file.
3690 * docs/cp/intro/tutorial03.rst: New file.
3691 * docs/cp/intro/tutorial04.rst: New file.
3692 * docs/cp/topics/contexts.rst: New file.
3693 * docs/cp/topics/expressions.rst: New file.
3694 * docs/cp/topics/functions.rst: New file.
3695 * docs/cp/topics/index.rst: New file.
3696 * docs/cp/topics/locations.rst: New file.
3697 * docs/cp/topics/objects.rst: New file.
3698 * docs/cp/topics/results.rst: New file.
3699 * docs/cp/topics/types.rst: New file.
3700 * docs/examples/tut01-hello-world.cc: New file.
3701 * docs/examples/tut02-square.c: Fix missing newline in output.
3702 * docs/examples/tut02-square.cc: New file.
3703 * docs/examples/tut03-sum-of-squares.cc: New file.
3704 * docs/examples/tut04-toyvm/toyvm.cc: New file.
3705 * docs/index.rst: Move summary to above the table of contents.
3706 Add text about the C vs C++ APIs.
3707 * docs/topics/contexts.rst: Fix a typo.
3709 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3710 * docs/_build/texinfo/factorial1.png: New file.
3711 * docs/_build/texinfo/sum-of-squares1.png: New file.
3713 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3715 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move
3716 logic for determine "funcname" to new function...
3717 (get_function_name): ...here, adding logic to skip any leading
3718 path from the filename.
3719 (toyvm_function_parse): Use the filename for fn_filename, rather
3720 than "name", so that the debugger can locate the source .toy
3722 (toyvm_function_parse): Don't fclose a NULL FILE *.
3724 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3727 * docs/internals/index.rst (Running under valgrind): New
3729 (docs/_build/texinfo/libgccjit.texi): Regenerate.
3731 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3734 * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o.
3735 * jit-common.h (gcc::jit::tempdir): New forward decl.
3736 * jit-playback.c: Include jit-tempdir.h.
3737 (gcc::jit::playback::context::context): Initialize m_tempdir.
3738 (gcc::jit::playback::context::~context): Move tempdir
3739 cleanup to new file jit-tempdir.c
3740 (make_tempdir_path_template): Move to new file jit-tempdir.c.
3741 (gcc::jit::playback::context::compile): Move tempdir creation
3742 to new tempdir object in new file jit-tempdir.c.
3743 (gcc::jit::playback::context::make_fake_args): Get path from
3744 tempdir object rather than from member data.
3745 (gcc::jit::playback::context::convert_to_dso): Likewise.
3746 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
3747 (gcc::jit::playback::context::dump_generated_code): Likewise.
3748 (gcc::jit::playback::context::get_path_c_file): New function.
3749 (gcc::jit::playback::context::get_path_s_file): New function.
3750 (gcc::jit::playback::context::get_path_so_file): New function.
3751 * jit-playback.h (gcc::jit::playback::context::get_path_c_file):
3753 (gcc::jit::playback::context::get_path_s_file): New function.
3754 (gcc::jit::playback::context::get_path_so_file): New function.
3755 (gcc::jit::playback::context): Move fields "m_path_template",
3756 "m_path_tempdir", "m_path_c_file", "m_path_s_file",
3757 "m_path_so_file" to new jit::tempdir class; add field "m_tempdir".
3758 * jit-tempdir.c: New file.
3759 * jit-tempdir.h: New file.
3761 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3763 * jit-playback.c (gcc::jit::playback::context::compile): Acquire the
3764 mutex here, immediately before using toplev, and release it here, on
3765 each exit path after acquisition.
3766 (jit_mutex): Move this variable here, from jit-recording.c.
3767 (gcc::jit::playback::context::acquire_mutex): New function, based on
3768 code in jit-recording.c.
3769 (gcc::jit::playback::context::release_mutex): Likewise.
3770 * jit-playback.h (gcc::jit::playback::context::acquire_mutex): New
3772 (gcc::jit::playback::context::release_mutex): New function.
3773 * jit-recording.c (jit_mutex): Move this variable to jit-playback.c.
3774 (gcc::jit::recording::context::compile): Move mutex-handling from
3775 here into jit-playback.c's gcc::jit::playback::context::compile.
3776 * notes.txt: Update to show the new locations of ACQUIRE_MUTEX
3779 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3781 * jit-playback.c (gcc::jit::playback::context::compile): Move the
3783 (gcc::jit::playback::context::dlopen_built_dso): ...this new
3785 * jit-playback.h (gcc::jit::playback::context::dlopen_built_dso):
3788 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3791 * docs/topics/contexts.rst (Debugging): Add description of
3792 gcc_jit_context_enable_dump.
3793 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3794 * jit-playback.c: Include context.h.
3795 (class auto_argvec): New class.
3796 (auto_argvec::~auto_argvec): New function.
3797 (gcc::jit::playback::context::compile): Convert fake_args to be
3798 an auto_argvec, so that it can contain dynamically-allocated
3799 strings. Construct a vec of all requested dumps, and pass it to
3800 make_fake_args. Extract requested dumps between the calls to
3801 toplev::main and toplev::finalize.
3802 (gcc::jit::playback::context::make_fake_args): Convert param
3803 "argvec" to be a vec <char *>, and gain a "requested_dumps"
3804 param. Convert to dynamically-allocated arg strings by converting
3805 ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP
3806 for args that are already a copy. Add args for all requested dumps.
3807 (gcc::jit::playback::context::extract_any_requested_dumps): New
3809 (gcc::jit::playback::context::read_dump_file): New function.
3810 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
3811 Convert param "argvec" to be a vec <char *>, and gain a
3812 "requested_dumps" param.
3813 (gcc::jit::playback::context::extract_any_requested_dumps): New
3815 (gcc::jit::playback::context::read_dump_file): New function.
3816 * jit-recording.c (gcc::jit::recording::context::enable_dump): New
3818 (gcc::jit::recording::context::get_all_requested_dumps): New
3820 * jit-recording.h (gcc::jit::recording::requested_dump): New
3822 (gcc::jit::recording::context::enable_dump): New function.
3823 (gcc::jit::recording::context::get_all_requested_dumps): New
3825 (gcc::jit::recording::context::m_requested_dumps): New field.
3826 * libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint.
3827 * libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint.
3828 * libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint.
3830 2014-12-08 David Malcolm <dmalcolm@redhat.com>
3832 * libgccjit++.h: Indent the forward declarations of the classes to
3833 show the inheritance hierarchy.
3835 2014-12-08 David Malcolm <dmalcolm@redhat.com>
3837 * notes.txt: Show the beginning and ending of
3838 recording::context::compile vs playback::context::compile. Show
3839 the creation and unlinking of the tempdir. Show toplev::finalize.
3840 Move "RELEASE MUTEX" to the correct location. Show
3841 gcc_jit_result_release, and indicate where the
3842 dlopen/dlsym/dlclose occur.
3844 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3846 * docs/examples/tut02-square.c (main): Release the context
3847 earlier, to show that this is possible. Update error-handling
3848 to avoid a double-release of the context, and to avoid
3849 releasing a NULL result.
3850 * docs/intro/tutorial02.rst: Discuss gcc_jit_context_release.
3851 * docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize
3852 * docs/topics/results.rst (gcc_jit_result): Mention that this
3853 controls the lifetimes of machine code functions.
3854 (gcc_jit_result_get_code): Spell out the requirements for this
3855 to succeed, and the lifetime of the result.
3856 (gcc_jit_result_release): Mention that this invalidates any code
3857 that was obtained from the result.
3858 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3860 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3863 * docs/intro/tutorial02.rst: Spell out lifetime of generated code.
3864 Add description of error-handling, taken in part from...
3865 * docs/topics/contexts.rst (Error-handling): Expand, and move some
3866 content to tutorial02.rst.
3867 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3869 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3872 * docs/topics/types.rst (Standard types) Add new enum values to
3873 the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT,
3874 GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
3875 Widen the left-hand column so that
3876 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit.
3877 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3879 * jit-builtins.c: Include stringpool.h and jit-playback.h.
3880 Move everything out of the gcc::jit::recording namespace into
3882 (struct builtin_data): Add fields "fnclass", "attr", and
3884 (DEF_BUILTIN): Update macro so populate the new fields.
3885 (builtins_manager::builtins_manager): Update for move out of
3886 recording namespace. Initialize the m_attributes array.
3887 (builtins_manager::get_builtin_function): Likewise.
3888 (builtins_manager::get_builtin_function_by_id): New function.
3889 (builtins_manager::make_builtin_function): Update for move out of
3890 recording namespace. Add fix for PR jit/64020 by detecting
3891 specific builtin ids and having them ensure that builtins for
3892 other ids are created as necessary.
3893 (builtins_manager::get_type): Update for move out of recording
3895 (builtins_manager::make_type): Likewise. Add some missing
3897 (builtins_manager::make_primitive_type): Update for move out of
3898 recording namespace. Implement the three BT_COMPLEX_ cases and
3900 (builtins_manager::make_fn_type): Update for move out of recording
3902 (builtins_manager::make_ptr_type): Likewise.
3903 (builtins_manager::finish_playback): New function.
3904 (builtins_manager::get_class): New function.
3905 (builtins_manager::implicit_p): New function.
3906 (builtins_manager::get_attrs_tree): Two new functions.
3907 (builtins_manager::make_attrs_tree): New function.
3909 * jit-builtins.h: Move everything out of the gcc::jit::recording
3910 namespace into just gcc::jit.
3911 (enum built_in_attribute): New.
3912 (builtins_manager::builtins_manager): Update decl for namespace
3914 (builtins_manager::get_builtin_function): Likewise.
3915 (builtins_manager::get_class): New.
3916 (builtins_manager::implicit_p): New.
3917 (builtins_manager::get_attrs_tree): Two new functions.
3918 (builtins_manager::make_attrs_tree): New function.
3919 (builtins_manager::finish_playback): New.
3920 (builtins_manager::get_builtin_function_by_id): New.
3921 (builtins_manager::make_builtin_function): Update decl for
3923 (builtins_manager::get_type): Likewise.
3924 (builtins_manager::make_type): Likewise.
3925 (builtins_manager::make_primitive_type): Likewise.
3926 (builtins_manager::make_fn_type): Likewise.
3927 (builtins_manager::make_ptr_type): Likewise.
3928 (builtins_manager): Likewise for fields. Add new field
3931 * jit-common.h (NUM_GCC_JIT_TYPES): Update.
3932 (builtins_manager): Update forward decl to reflect namespace
3935 * jit-playback.c: Include attribs.h and jit-builtins.h.
3936 (gcc::jit::playback::context::get_tree_node_for_type): Add cases
3937 for the new COMPLEX_ types.
3938 (gcc::jit::playback::context::new_function): If creating a
3939 builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl,
3940 and call set_builtin_decl.
3941 (gcc::jit::playback::context::replay): If we have a
3942 builtins_manager, call its finish_playback method when we're done.
3945 (gcc::jit::playback::context::get_builtins_manager): New function.
3948 (gcc::jit::recording::context::get_builtins_manager): New function.
3949 (gcc::jit::recording::get_builtin_function): Use
3950 get_builtins_manager, in case we're a child context.
3951 (gcc::jit::recording::memento_of_get_type::dereference): Add the
3953 (gcc::jit::recording::memento_of_get_type::is_int): Likewise.
3954 (gcc::jit::recording::memento_of_get_type::is_float): Likewise.
3955 (gcc::jit::recording::memento_of_get_type::is_bool): Likewise.
3956 (get_type_strings): Likewise.
3959 (gcc::jit::recording::context::get_builtins_manager): New.
3961 * libgccjit.h (enum gcc_jit_types): Add
3962 GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE,
3963 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
3965 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3968 (gcc::jit::recording::builtins_manager::get_builtin_function):
3969 Check for NULL return from make_builtin_function.
3970 (gcc::jit::recording::builtins_manager::make_builtin_function):
3971 Check for NULL return from get_type.
3973 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3975 * jit-playback.c (gcc::jit::playback::context::compile): Move DSO
3976 creation code into...
3977 (gcc::jit::playback::context::convert_to_dso): New function.
3978 * jit-playback.h (gcc::jit::playback::context::convert_to_dso):
3981 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3983 * jit-playback.c (gcc::jit::playback::context::compile): Use an
3984 auto_vec<const char *> rather than a const char *[20] for the
3985 top-level argv, and move the logic to build it to...
3986 (gcc::jit::playback::context::make_fake_args): New function.
3987 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
3990 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3992 * Make-lang.in (jit_OBJS): Add jit/jit-result.o.
3993 * jit-playback.c: Include new header jit-result.h.
3994 (gcc::jit::result::result): Move to new file jit-result.c.
3995 (gcc::jit::result::~result): Likewise.
3996 (gcc::jit::playback::result): Likewise.
3997 * jit-recording.h (class gcc::jit::result): Move to new
3998 header jit-result.h.
3999 * jit-result.c: New file, to contain...
4000 (gcc::jit::result::result): Move here from jit-playback.c,
4001 removing erroneous "playback" namespace from comment.
4002 (gcc::jit::result::~result): Likewise.
4003 (gcc::jit::playback::result): Likewise.
4004 * jit-result.h: New file, to contain...
4005 (class gcc::jit::result): Move from jit-recording.h.
4006 * libgccjit.c: Include jit-result.h.
4007 (gcc_jit_result_get_code): Update comment to reflect move
4009 (gcc_jit_result_release): Likewise.
4011 2014-12-01 David Malcolm <dmalcolm@redhat.com>
4014 * docs/examples/tut04-toyvm/toyvm.c
4015 (toyvm_compiled_function): New typedef.
4016 (toyvm_compiled_func) Rename to...
4017 (toyvm_compiled_code) ...this.
4018 (struct toyvm_compiled_function): New struct.
4019 (toyvm_function_compile): Return a toyvm_compiled_function *
4020 rather than a toyvm_compiled_func, so that the caller can fully
4021 clean things up. Free "funcname".
4022 (test_script): Update for change to toyvm_function_compile.
4023 Clean up the toyvm_compiled_function.
4025 (docs/intro/tutorial04.rst): Update to reflect the above changes,
4026 and to better spell out the lifetime of the compiled code.
4028 2014-12-01 David Malcolm <dmalcolm@redhat.com>
4032 (gcc::jit::recording::builtins_manager::make_fn_type): Call the
4033 context's new_function_type method, rather than directly creating
4034 a function_type instance.
4036 (gcc::jit::recording::context::new_function_type): New method,
4037 adapted from part of...
4038 (gcc::jit::recording::context::new_function_ptr_type): ...this.
4039 Update to call new_function_type.
4041 (gcc::jit::recording::context::new_function_type): New method.
4043 2014-12-01 David Malcolm <dmalcolm@redhat.com>
4046 * jit-playback.c: Ensure that ctxt_progname is non-NULL.
4048 2014-11-19 David Malcolm <dmalcolm@redhat.com>
4051 * jit-playback.c (gcc::jit::playback::compound_type::set_fields):
4052 Convert param from const vec<playback::field *> & to
4053 const auto_vec<playback::field *> *.
4054 (gcc::jit::playback::context::new_function_type): Convert param
4055 "param_types" from vec<type *> * to const auto_vec<type *> *.
4056 (gcc::jit::playback::context::new_function): Convert param
4057 "params" from vec<param *> * to const auto_vec<param *> *.
4058 (gcc::jit::playback::context::build_call): Convert param "args"
4059 from vec<rvalue *> to const auto_vec<rvalue *> *.
4060 (gcc::jit::playback::context::new_call): Likewise.
4061 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
4062 (wrapper_finalizer): New function.
4063 (gcc::jit::playback::wrapper::operator new): Call the finalizer
4064 variant of ggc_internal_cleared_alloc, supplying
4066 (gcc::jit::playback::function::finalizer): New.
4067 (gcc::jit::playback::block::finalizer): New.
4068 (gcc::jit::playback::source_file::finalizer): New.
4069 (gcc::jit::playback::source_line::finalizer): New.
4072 (gcc::jit::playback::context::new_function_type): Convert param
4073 "param_types" from vec<type *> * to const auto_vec<type *> *.
4074 (gcc::jit::playback::context::new_function): Convert param
4075 "params" from vec<param *> * to const auto_vec<param *> *.
4076 (gcc::jit::playback::context::new_call): Convert param
4077 "args" from vec<rvalue *> to const auto_vec<rvalue *> *.
4078 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
4079 (gcc::jit::playback::context::build_call): Likewise.
4080 (gcc::jit::playback::context): Convert fields "m_functions",
4081 "m_source_files", "m_cached_locations" from vec to auto_vec.
4082 (gcc::jit::playback::wrapper::finalizer): New virtual function.
4083 (gcc::jit::playback::compound_type::set_fields): Convert param fro
4084 const vec<playback::field *> & to
4085 const auto_vec<playback::field *> *.
4086 (gcc::jit::playback::function::finalizer): New.
4087 (gcc::jit::playback::block::finalizer): New.
4088 (gcc::jit::playback::source_file::finalizer): New.
4089 (gcc::jit::playback::source_line::finalizer): New.
4092 (gcc::jit::recording::function_type::replay_into): Convert local
4093 from a vec into an auto_vec.
4094 (gcc::jit::recording::fields::replay_into): Likewise.
4095 (gcc::jit::recording::function::replay_into): Likewise.
4096 (gcc::jit::recording::call::replay_into): Likewise.
4097 (gcc::jit::recording::call_through_ptr::replay_into): Likewise.
4099 * jit-recording.h (gcc::jit::recording::context): Convert fields
4100 "m_mementos", "m_compound_types", "m_functions" from vec<> to
4102 (gcc::jit::recording::function_type::get_param_types): Convert
4103 return type from vec<type *> to const vec<type *> &.
4104 (gcc::jit::recording::function_type): Convert field
4105 "m_param_types" from a vec<> to an auto_vec<>.
4106 (gcc::jit::recording::fields): Likewise for field "m_fields".
4107 (gcc::jit::recording::function::get_params): Convert return type
4108 from vec <param *> to const vec<param *> &.
4109 (gcc::jit::recording::function): Convert fields "m_params",
4110 "m_locals", "m_blocks" from vec<> to auto_vec<>.
4111 (gcc::jit::recording::block): Likewise for field "m_statements".
4112 vec<> to auto_vec<>.
4113 (gcc::jit::recording::call): Likewise for field "m_args".
4114 (gcc::jit::recording::call_through_ptr): Likewise.
4116 2014-11-19 David Malcolm <dmalcolm@redhat.com>
4119 * jit-recording.c (recording::function::validate): Convert
4120 "worklist" from vec<> to autovec<> to fix a leak.
4122 2014-11-11 David Malcolm <dmalcolm@redhat.com>
4124 * ChangeLog.jit: New.
4126 * Make-lang.in: New.
4128 * config-lang.in: New.
4129 * docs/Makefile: New.
4130 * docs/_build/texinfo/Makefile: New.
4131 * docs/_build/texinfo/factorial.png: New.
4132 * docs/_build/texinfo/libgccjit.texi: New.
4133 * docs/_build/texinfo/sum-of-squares.png: New.
4134 * docs/conf.py: New.
4135 * docs/examples/tut01-hello-world.c: New.
4136 * docs/examples/tut02-square.c: New.
4137 * docs/examples/tut03-sum-of-squares.c: New.
4138 * docs/examples/tut04-toyvm/Makefile: New.
4139 * docs/examples/tut04-toyvm/factorial.toy: New.
4140 * docs/examples/tut04-toyvm/fibonacci.toy: New.
4141 * docs/examples/tut04-toyvm/toyvm.c: New.
4142 * docs/index.rst: New.
4143 * docs/internals/index.rst: New.
4144 * docs/intro/factorial.png: New.
4145 * docs/intro/index.rst: New.
4146 * docs/intro/sum-of-squares.png: New.
4147 * docs/intro/tutorial01.rst: New.
4148 * docs/intro/tutorial02.rst: New.
4149 * docs/intro/tutorial03.rst: New.
4150 * docs/intro/tutorial04.rst: New.
4151 * docs/topics/contexts.rst: New.
4152 * docs/topics/expressions.rst: New.
4153 * docs/topics/functions.rst: New.
4154 * docs/topics/index.rst: New.
4155 * docs/topics/locations.rst: New.
4156 * docs/topics/objects.rst: New.
4157 * docs/topics/results.rst: New.
4158 * docs/topics/types.rst: New.
4159 * dummy-frontend.c: New.
4160 * jit-builtins.c: New.
4161 * jit-builtins.h: New.
4162 * jit-common.h: New.
4163 * jit-playback.c: New.
4164 * jit-playback.h: New.
4165 * jit-recording.c: New.
4166 * jit-recording.h: New.
4167 * libgccjit++.h: New.
4170 * libgccjit.map: New.
4173 2013-07-26 David Malcolm <dmalcolm@redhat.com>
4177 Copyright (C) 2013-2023 Free Software Foundation, Inc.
4179 Copying and distribution of this file, with or without modification,
4180 are permitted in any medium without royalty provided the copyright
4181 notice and this notice are preserved.