1 2023-04-26 Release Manager
5 2023-02-16 Patrick Palka <ppalka@redhat.com>
7 * jit-dejagnu.h: Mechanically drop static from static inline
8 functions via s/^static inline/inline/g.
9 * jit-recording.h: Likewise.
11 2023-01-07 LIU Hao <lh_mouse@126.com>
14 * jit-w32.h: Define `WIN32_LEAN_AND_MEAN` before <windows.h>.
16 2022-12-21 Martin Liska <mliska@suse.cz>
18 * jit-playback.h: Use unused attribute.
20 2022-12-14 Antoni Boucher <bouanto@zoho.com>
21 Guillaume Gomez <guillaume1.gomez@gmail.com>
24 * jit-recording.h: Add vector_type::is_same_type_as method
26 2022-12-07 Antoni Boucher <bouanto@zoho.com>
27 Guillaume Gomez <guillaume1.gomez@gmail.com>
30 * jit-playback.cc: Fix vector float comparison
31 * jit-playback.h: Update comparison function signature
32 * jit-recording.cc: Update call for "new_comparison" function
33 * jit-recording.h: Fix vector float comparison
35 2022-11-20 Jeff Law <jlaw@ventanamicro.com>
38 * jit-playback.cc (playback::lvale::mark_addressable): Remove
41 2022-11-19 Jonathan Wakely <jwakely@redhat.com>
42 LIU Hao <lh_mouse@126.com>
44 * jit-playback.cc (playback::context::scoped_lock): Define RAII
46 (playback::context::compile): Use scoped_lock to acquire mutex
47 for the active playback context.
48 (jit_mutex): Change to std::mutex.
49 (playback::context::acquire_mutex): Rename to ...
50 (playback::context::lock): ... this.
51 (playback::context::release_mutex): Rename to ...
52 (playback::context::unlock): ... this.
53 * jit-playback.h (playback::context): Rename members and declare
55 * jit-recording.cc (INCLUDE_PTHREAD_H): Remove unused define.
56 * libgccjit.cc (version_mutex): Change to std::mutex.
57 (struct jit_version_info): Use std::lock_guard to acquire and
60 2022-11-14 Martin Liska <mliska@suse.cz>
63 2022-11-09 Martin Liska <mliska@suse.cz>
66 * docs/cp/index.rst: Moved to...
67 * doc/cp/index.rst: ...here.
68 * docs/cp/intro/index.rst: Moved to...
69 * doc/cp/intro/index.rst: ...here.
70 * docs/cp/intro/tutorial01.rst: Moved to...
71 * doc/cp/intro/tutorial01.rst: ...here.
72 * docs/cp/intro/tutorial02.rst: Moved to...
73 * doc/cp/intro/tutorial02.rst: ...here.
74 * docs/cp/intro/tutorial03.rst: Moved to...
75 * doc/cp/intro/tutorial03.rst: ...here.
76 * docs/cp/intro/tutorial04.rst: Moved to...
77 * doc/cp/intro/tutorial04.rst: ...here.
78 * docs/cp/topics/asm.rst: Moved to...
79 * doc/cp/topics/asm.rst: ...here.
80 * docs/cp/topics/compilation.rst: Moved to...
81 * doc/cp/topics/compilation.rst: ...here.
82 * docs/cp/topics/contexts.rst: Moved to...
83 * doc/cp/topics/contexts.rst: ...here.
84 * docs/cp/topics/expressions.rst: Moved to...
85 * doc/cp/topics/expressions.rst: ...here.
86 * docs/cp/topics/functions.rst: Moved to...
87 * doc/cp/topics/functions.rst: ...here.
88 * docs/cp/topics/index.rst: Moved to...
89 * doc/cp/topics/index.rst: ...here.
90 * docs/cp/topics/locations.rst: Moved to...
91 * doc/cp/topics/locations.rst: ...here.
92 * docs/cp/topics/objects.rst: Moved to...
93 * doc/cp/topics/objects.rst: ...here.
94 * docs/cp/topics/types.rst: Moved to...
95 * doc/cp/topics/types.rst: ...here.
96 * docs/examples/emit-alphabet.bf: Moved to...
97 * doc/examples/emit-alphabet.bf: ...here.
98 * docs/examples/tut01-hello-world.c: Moved to...
99 * doc/examples/tut01-hello-world.c: ...here.
100 * docs/examples/tut01-hello-world.cc: Moved to...
101 * doc/examples/tut01-hello-world.cc: ...here.
102 * docs/examples/tut02-square.c: Moved to...
103 * doc/examples/tut02-square.c: ...here.
104 * docs/examples/tut02-square.cc: Moved to...
105 * doc/examples/tut02-square.cc: ...here.
106 * docs/examples/tut03-sum-of-squares.c: Moved to...
107 * doc/examples/tut03-sum-of-squares.c: ...here.
108 * docs/examples/tut03-sum-of-squares.cc: Moved to...
109 * doc/examples/tut03-sum-of-squares.cc: ...here.
110 * docs/examples/tut04-toyvm/Makefile: Moved to...
111 * doc/examples/tut04-toyvm/Makefile: ...here.
112 * docs/examples/tut04-toyvm/factorial.toy: Moved to...
113 * doc/examples/tut04-toyvm/factorial.toy: ...here.
114 * docs/examples/tut04-toyvm/fibonacci.toy: Moved to...
115 * doc/examples/tut04-toyvm/fibonacci.toy: ...here.
116 * docs/examples/tut04-toyvm/toyvm.c: Moved to...
117 * doc/examples/tut04-toyvm/toyvm.c: ...here.
118 * docs/examples/tut04-toyvm/toyvm.cc: Moved to...
119 * doc/examples/tut04-toyvm/toyvm.cc: ...here.
120 * docs/examples/tut05-bf.c: Moved to...
121 * doc/examples/tut05-bf.c: ...here.
122 * docs/index.rst: Moved to...
123 * doc/index.rst: ...here.
124 * docs/internals/index.rst: Moved to...
125 * doc/internals/index.rst: ...here.
126 * docs/internals/test-hello-world.exe.log.txt: Moved to...
127 * doc/internals/test-hello-world.exe.log.txt: ...here.
128 * docs/_build/texinfo/libgccjit-figures/factorial.png: Moved to...
129 * doc/intro/factorial.png: ...here.
130 * docs/intro/index.rst: Moved to...
131 * doc/intro/index.rst: ...here.
132 * docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: Moved to...
133 * doc/intro/sum-of-squares.png: ...here.
134 * docs/intro/tutorial01.rst: Moved to...
135 * doc/intro/tutorial01.rst: ...here.
136 * docs/intro/tutorial02.rst: Moved to...
137 * doc/intro/tutorial02.rst: ...here.
138 * docs/intro/tutorial03.rst: Moved to...
139 * doc/intro/tutorial03.rst: ...here.
140 * docs/intro/tutorial04.rst: Moved to...
141 * doc/intro/tutorial04.rst: ...here.
142 * docs/intro/tutorial05.rst: Moved to...
143 * doc/intro/tutorial05.rst: ...here.
144 * docs/topics/asm.rst: Moved to...
145 * doc/topics/asm.rst: ...here.
146 * docs/topics/compatibility.rst: Moved to...
147 * doc/topics/compatibility.rst: ...here.
148 * docs/topics/compilation.rst: Moved to...
149 * doc/topics/compilation.rst: ...here.
150 * docs/topics/contexts.rst: Moved to...
151 * doc/topics/contexts.rst: ...here.
152 * docs/topics/expressions.rst: Moved to...
153 * doc/topics/expressions.rst: ...here.
154 * docs/topics/function-pointers.rst: Moved to...
155 * doc/topics/function-pointers.rst: ...here.
156 * docs/topics/functions.rst: Moved to...
157 * doc/topics/functions.rst: ...here.
158 * docs/topics/index.rst: Moved to...
159 * doc/topics/index.rst: ...here.
160 * docs/topics/locations.rst: Moved to...
161 * doc/topics/locations.rst: ...here.
162 * docs/topics/objects.rst: Moved to...
163 * doc/topics/objects.rst: ...here.
164 * docs/topics/performance.rst: Moved to...
165 * doc/topics/performance.rst: ...here.
166 * docs/topics/types.rst: Moved to...
167 * doc/topics/types.rst: ...here.
168 * docs/Makefile: Removed.
169 * docs/_build/texinfo/Makefile: Removed.
170 * docs/_build/texinfo/libgccjit-figures/factorial1.png: Removed.
171 * docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: Removed.
172 * docs/_build/texinfo/libgccjit.texi: Removed.
173 * docs/conf.py: Removed.
174 * docs/intro/factorial.png: Removed.
175 * docs/intro/sum-of-squares.png: Removed.
176 * doc/conf.py: New file.
178 2022-11-14 Martin Liska <mliska@suse.cz>
181 2022-11-14 Martin Liska <mliska@suse.cz>
183 * Make-lang.in: Support --with-sphinx-build.
185 2022-11-14 Martin Liska <mliska@suse.cz>
188 2022-11-14 Martin Liska <mliska@suse.cz>
190 * doc/internals/index.rst: Fix cross manual refs.
191 * doc/topics/contexts.rst: Likewise.
193 2022-11-14 Martin Liska <mliska@suse.cz>
196 2022-11-14 Martin Liska <mliska@suse.cz>
199 Support installation if sphinx-build is missing.
201 2022-11-14 Martin Liska <mliska@suse.cz>
204 2022-11-14 Martin Liska <mliska@suse.cz>
206 * doc/cp/index.rst: Remove trailing .rst in toctree.
207 * doc/cp/intro/index.rst: Likewise.
208 * doc/cp/topics/index.rst: Likewise.
209 * doc/index.rst: Likewise.
210 * doc/intro/index.rst: Likewise.
211 * doc/topics/index.rst: Likewise.
212 * doc/indices-and-tables.rst: New file.
214 2022-11-11 Martin Liska <mliska@suse.cz>
216 * doc/cp/index.rst: Remove trailing .rst in toctree.
217 * doc/cp/intro/index.rst: Likewise.
218 * doc/cp/topics/index.rst: Likewise.
219 * doc/index.rst: Likewise.
220 * doc/intro/index.rst: Likewise.
221 * doc/topics/index.rst: Likewise.
222 * doc/indices-and-tables.rst: New file.
224 2022-11-09 Martin Liska <mliska@suse.cz>
227 Support installation if sphinx-build is missing.
229 2022-11-09 Martin Liska <mliska@suse.cz>
231 * doc/internals/index.rst: Fix cross manual refs.
232 * doc/topics/contexts.rst: Likewise.
234 2022-11-09 Martin Liska <mliska@suse.cz>
236 * Make-lang.in: Support --with-sphinx-build.
238 2022-11-09 Martin Liska <mliska@suse.cz>
241 * docs/cp/index.rst: Moved to...
242 * doc/cp/index.rst: ...here.
243 * docs/cp/intro/index.rst: Moved to...
244 * doc/cp/intro/index.rst: ...here.
245 * docs/cp/intro/tutorial01.rst: Moved to...
246 * doc/cp/intro/tutorial01.rst: ...here.
247 * docs/cp/intro/tutorial02.rst: Moved to...
248 * doc/cp/intro/tutorial02.rst: ...here.
249 * docs/cp/intro/tutorial03.rst: Moved to...
250 * doc/cp/intro/tutorial03.rst: ...here.
251 * docs/cp/intro/tutorial04.rst: Moved to...
252 * doc/cp/intro/tutorial04.rst: ...here.
253 * docs/cp/topics/asm.rst: Moved to...
254 * doc/cp/topics/asm.rst: ...here.
255 * docs/cp/topics/compilation.rst: Moved to...
256 * doc/cp/topics/compilation.rst: ...here.
257 * docs/cp/topics/contexts.rst: Moved to...
258 * doc/cp/topics/contexts.rst: ...here.
259 * docs/cp/topics/expressions.rst: Moved to...
260 * doc/cp/topics/expressions.rst: ...here.
261 * docs/cp/topics/functions.rst: Moved to...
262 * doc/cp/topics/functions.rst: ...here.
263 * docs/cp/topics/index.rst: Moved to...
264 * doc/cp/topics/index.rst: ...here.
265 * docs/cp/topics/locations.rst: Moved to...
266 * doc/cp/topics/locations.rst: ...here.
267 * docs/cp/topics/objects.rst: Moved to...
268 * doc/cp/topics/objects.rst: ...here.
269 * docs/cp/topics/types.rst: Moved to...
270 * doc/cp/topics/types.rst: ...here.
271 * docs/examples/emit-alphabet.bf: Moved to...
272 * doc/examples/emit-alphabet.bf: ...here.
273 * docs/examples/tut01-hello-world.c: Moved to...
274 * doc/examples/tut01-hello-world.c: ...here.
275 * docs/examples/tut01-hello-world.cc: Moved to...
276 * doc/examples/tut01-hello-world.cc: ...here.
277 * docs/examples/tut02-square.c: Moved to...
278 * doc/examples/tut02-square.c: ...here.
279 * docs/examples/tut02-square.cc: Moved to...
280 * doc/examples/tut02-square.cc: ...here.
281 * docs/examples/tut03-sum-of-squares.c: Moved to...
282 * doc/examples/tut03-sum-of-squares.c: ...here.
283 * docs/examples/tut03-sum-of-squares.cc: Moved to...
284 * doc/examples/tut03-sum-of-squares.cc: ...here.
285 * docs/examples/tut04-toyvm/Makefile: Moved to...
286 * doc/examples/tut04-toyvm/Makefile: ...here.
287 * docs/examples/tut04-toyvm/factorial.toy: Moved to...
288 * doc/examples/tut04-toyvm/factorial.toy: ...here.
289 * docs/examples/tut04-toyvm/fibonacci.toy: Moved to...
290 * doc/examples/tut04-toyvm/fibonacci.toy: ...here.
291 * docs/examples/tut04-toyvm/toyvm.c: Moved to...
292 * doc/examples/tut04-toyvm/toyvm.c: ...here.
293 * docs/examples/tut04-toyvm/toyvm.cc: Moved to...
294 * doc/examples/tut04-toyvm/toyvm.cc: ...here.
295 * docs/examples/tut05-bf.c: Moved to...
296 * doc/examples/tut05-bf.c: ...here.
297 * docs/index.rst: Moved to...
298 * doc/index.rst: ...here.
299 * docs/internals/index.rst: Moved to...
300 * doc/internals/index.rst: ...here.
301 * docs/internals/test-hello-world.exe.log.txt: Moved to...
302 * doc/internals/test-hello-world.exe.log.txt: ...here.
303 * docs/_build/texinfo/libgccjit-figures/factorial.png: Moved to...
304 * doc/intro/factorial.png: ...here.
305 * docs/intro/index.rst: Moved to...
306 * doc/intro/index.rst: ...here.
307 * docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: Moved to...
308 * doc/intro/sum-of-squares.png: ...here.
309 * docs/intro/tutorial01.rst: Moved to...
310 * doc/intro/tutorial01.rst: ...here.
311 * docs/intro/tutorial02.rst: Moved to...
312 * doc/intro/tutorial02.rst: ...here.
313 * docs/intro/tutorial03.rst: Moved to...
314 * doc/intro/tutorial03.rst: ...here.
315 * docs/intro/tutorial04.rst: Moved to...
316 * doc/intro/tutorial04.rst: ...here.
317 * docs/intro/tutorial05.rst: Moved to...
318 * doc/intro/tutorial05.rst: ...here.
319 * docs/topics/asm.rst: Moved to...
320 * doc/topics/asm.rst: ...here.
321 * docs/topics/compatibility.rst: Moved to...
322 * doc/topics/compatibility.rst: ...here.
323 * docs/topics/compilation.rst: Moved to...
324 * doc/topics/compilation.rst: ...here.
325 * docs/topics/contexts.rst: Moved to...
326 * doc/topics/contexts.rst: ...here.
327 * docs/topics/expressions.rst: Moved to...
328 * doc/topics/expressions.rst: ...here.
329 * docs/topics/function-pointers.rst: Moved to...
330 * doc/topics/function-pointers.rst: ...here.
331 * docs/topics/functions.rst: Moved to...
332 * doc/topics/functions.rst: ...here.
333 * docs/topics/index.rst: Moved to...
334 * doc/topics/index.rst: ...here.
335 * docs/topics/locations.rst: Moved to...
336 * doc/topics/locations.rst: ...here.
337 * docs/topics/objects.rst: Moved to...
338 * doc/topics/objects.rst: ...here.
339 * docs/topics/performance.rst: Moved to...
340 * doc/topics/performance.rst: ...here.
341 * docs/topics/types.rst: Moved to...
342 * doc/topics/types.rst: ...here.
343 * docs/Makefile: Removed.
344 * docs/_build/texinfo/Makefile: Removed.
345 * docs/_build/texinfo/libgccjit-figures/factorial1.png: Removed.
346 * docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: Removed.
347 * docs/_build/texinfo/libgccjit.texi: Removed.
348 * docs/conf.py: Removed.
349 * docs/intro/factorial.png: Removed.
350 * docs/intro/sum-of-squares.png: Removed.
351 * doc/conf.py: New file.
353 2022-09-15 Richard Biener <rguenther@suse.de>
355 * dummy-frontend.cc (jit_langhook_init): Do not initialize
358 2022-08-09 Vibhav Pant <vibhavp@gmail.com>
360 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_context_new_bitcast): Move
361 definition out of comment.
363 2022-07-28 David Malcolm <dmalcolm@redhat.com>
365 * docs/internals/index.rst: Remove reference to ".c" extensions
368 2022-07-28 Martin Liška <mliska@suse.cz>
370 * docs/cp/intro/tutorial02.rst:
371 Shorten the assembly example so that there is not slider.
372 * docs/cp/intro/tutorial04.rst: Likewise.
373 * docs/intro/tutorial02.rst: Likewise.
374 * docs/intro/tutorial04.rst: Likewise.
375 * docs/topics/contexts.rst: Likewise.
377 2022-07-28 marxin <mliska@suse.cz>
379 * docs/index.rst: Remove reference to module index
380 as we don't emit any.
382 2022-07-28 marxin <mliska@suse.cz>
384 * docs/cp/intro/tutorial02.rst: Use :expr:`type *` for pointers to a type
385 * docs/cp/topics/asm.rst: Likewise.
386 * docs/cp/topics/contexts.rst: Likewise.
387 * docs/cp/topics/expressions.rst: Likewise.
388 * docs/cp/topics/functions.rst: Likewise.
389 * docs/cp/topics/objects.rst: Likewise.
390 * docs/intro/tutorial02.rst: Likewise.
391 * docs/intro/tutorial03.rst: Likewise.
392 * docs/intro/tutorial04.rst: Likewise.
393 * docs/intro/tutorial05.rst: Likewise.
394 * docs/topics/compilation.rst: Likewise.
395 * docs/topics/contexts.rst: Likewise.
396 * docs/topics/objects.rst: Likewise.
398 2022-07-28 marxin <mliska@suse.cz>
400 * docs/cp/intro/tutorial04.rst: Use list-table.
401 * docs/intro/tutorial04.rst: Likewise.
402 * docs/intro/tutorial05.rst: Likewise.
403 * docs/topics/compilation.rst: Likewise.
404 * docs/topics/expressions.rst: Likewise.
405 * docs/topics/types.rst: Likewise.
407 2022-07-28 marxin <mliska@suse.cz>
409 * docs/cp/topics/expressions.rst: Compact so that the generated
410 output is also more compact.
412 2022-07-28 marxin <mliska@suse.cz>
414 * docs/cp/intro/tutorial02.rst: Use proper reference.
415 * docs/cp/topics/contexts.rst: Likewise.
416 * docs/cp/topics/functions.rst: Put `class` directive before a
417 function as it is not allowed declaring a class in a fn.
418 * docs/cp/topics/types.rst: Add template keyword.
419 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile):
420 Add removed comment used for code snippet ending detection.
421 * docs/intro/tutorial04.rst: Fix to match the real comment.
423 2022-07-28 marxin <mliska@suse.cz>
425 * docs/cp/topics/expressions.rst: Use :expr: for basic types.
426 * docs/topics/compilation.rst: Likewise.
427 * docs/topics/expressions.rst: Likewise.
428 * docs/topics/function-pointers.rst: Likewise.
430 2022-07-28 marxin <mliska@suse.cz>
432 * docs/conf.py: Add needs_sphinx = '3.0' where c:type was added.
433 * docs/index.rst: Remove note about it.
434 * docs/topics/compilation.rst: Use enum directive and reference.
435 * docs/topics/contexts.rst: Likewise.
436 * docs/topics/expressions.rst: Likewise.
437 * docs/topics/functions.rst: Likewise.
439 2022-07-14 Jonathan Wakely <jwakely@redhat.com>
441 * jit-recording.h (recording::memento): Define copy constructor
442 and copy assignment operator as deleted.
443 (recording::string): Likewise.
444 (recording::string::c_str): Add const qualifier.
446 2022-06-29 Antoni Boucher <bouanto@zoho.com>
449 * jit-playback.cc: Use the correct return type when folding in
452 2022-06-29 Sergei Trofimovich <siarheit@google.com>
455 * jit-playback.cc: Include <pthread.h> via "system.h" to avoid calloc()
457 * jit-recording.cc: Ditto.
458 * libgccjit.cc: Ditto.
460 2022-06-10 Antoni Boucher <bouanto@zoho.com>
463 * libgccjit.cc: Add support for floating-point types in
464 gcc_jit_type_get_size.
466 2022-06-08 Yang Yujie <yangyujie@loongson.cn>
468 * Make-lang.in: only link objects from $(EXTRA_GCC_OBJS)
469 that's not in $(EXTRA_OBJS) into libgccjit.
471 2022-05-23 David Malcolm <dmalcolm@redhat.com>
473 * jit-recording.h: Add "final" and "override" to all vfunc
474 implementations that were missing them, as appropriate.
476 2022-05-20 David Malcolm <dmalcolm@redhat.com>
478 * jit-playback.h: Replace uses of "FINAL" and "OVERRIDE" with
479 "final" and "override".
480 * jit-recording.cc: Likewise.
481 * jit-recording.h: Likewise.
483 2022-05-16 Martin Liska <mliska@suse.cz>
485 * jit-builtins.cc (find_builtin_by_name): Use ARRAY_SIZE.
486 (get_string_for_type_id): Likewise.
487 * jit-recording.cc (recording::context::context): Likewise.
489 2022-04-14 Iain Sandoe <iain@sandoe.co.uk>
491 * jit-playback.cc (new_bitcast): Cast values returned by tree_to_uhwi
492 to 'long' to match the print format.
494 2022-04-12 Antoni Boucher <bouanto@zoho.com>
497 * docs/_build/texinfo/libgccjit.texi: Regenerate.
498 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_24): New ABI tag.
499 * docs/topics/expressions.rst: Add documentation for the
500 functions gcc_jit_lvalue_set_alignment and
501 gcc_jit_lvalue_get_alignment.
502 * jit-playback.h: New function (set_alignment).
503 * jit-recording.cc: New function (set_alignment).
504 * jit-recording.h: New functions (set_alignment, get_alignment)
505 and new field (m_alignment).
506 * libgccjit.cc: New functions (gcc_jit_lvalue_get_alignment,
507 gcc_jit_lvalue_set_alignment)
508 * libgccjit.h: New functions (gcc_jit_lvalue_get_alignment,
509 gcc_jit_lvalue_set_alignment)
510 * libgccjit.map (LIBGCCJIT_ABI_24): New ABI tag.
512 2022-04-12 Antoni Boucher <bouanto@zoho.com>
515 * docs/_build/texinfo/libgccjit.texi: Regenerate.
516 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_23): New ABI tag.
517 * docs/topics/contexts.rst: Add documentation for the new
518 function gcc_jit_context_set_bool_print_errors_to_stderr.
519 * jit-common.h: New enum value
520 (INNER_BOOL_OPTION_PRINT_ERRORS_TO_STDERR).
521 * jit-recording.cc: Handle the new option
522 INNER_BOOL_OPTION_PRINT_ERRORS_TO_STDERR.
523 * libgccjit.cc: New function
524 (gcc_jit_context_set_bool_print_errors_to_stderr).
525 * libgccjit.h: New function
526 (gcc_jit_context_set_bool_print_errors_to_stderr).
527 * libgccjit.map (LIBGCCJIT_ABI_23): New ABI tag.
529 2022-04-12 Antoni Boucher <bouanto@zoho.com>
532 * docs/_build/texinfo/libgccjit.texi: Regenerate.
533 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_22): New ABI tag.
534 * docs/topics/expressions.rst: Add documentation for the
535 function gcc_jit_lvalue_set_register_name.
536 * jit-playback.h: New function (set_register_name).
537 * jit-recording.cc: New function (set_register_name) and add
538 support for register variables.
539 * jit-recording.h: New field (m_reg_name) and new function
541 * libgccjit.cc: New function (gcc_jit_lvalue_set_register_name).
542 * libgccjit.h: New function (gcc_jit_lvalue_set_register_name).
543 * libgccjit.map (LIBGCCJIT_ABI_22): New ABI tag.
545 2022-04-12 Antoni Boucher <bouanto@zoho.com>
548 * docs/_build/texinfo/libgccjit.texi: Regenerate.
549 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_21): New ABI tag.
550 * docs/topics/expressions.rst: Add documentation for the
551 function gcc_jit_context_new_bitcast.
552 * jit-playback.cc: New function (new_bitcast).
553 * jit-playback.h: New function (new_bitcast).
554 * jit-recording.cc: New functions (new_bitcast,
555 bitcast::replay_into, bitcast::visit_children,
556 bitcast::make_debug_string, bitcast::write_reproducer).
557 * jit-recording.h: New class (bitcast) and new function
558 (new_bitcast, bitcast::replay_into, bitcast::visit_children,
559 bitcast::make_debug_string, bitcast::write_reproducer,
560 bitcast::get_precedence).
561 * libgccjit.cc: New function (gcc_jit_context_new_bitcast)
562 * libgccjit.h: New function (gcc_jit_context_new_bitcast)
563 * libgccjit.map (LIBGCCJIT_ABI_21): New ABI tag.
565 2022-04-12 Antoni Boucher <bouanto@zoho.com>
568 * docs/_build/texinfo/libgccjit.texi: Regenerate
569 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_20): New ABI tag.
570 * docs/topics/types.rst: Add documentation for the new types
571 GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T,
572 GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T,
573 GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T, GCC_JIT_TYPE_INT16_T,
574 GCC_JIT_TYPE_INT32_T, GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T and
575 new functions (gcc_jit_compatible_types, gcc_jit_type_get_size).
576 * jit-builtins.cc: Add support for BT_UINT128.
577 * jit-common.h: Update the value of NUM_GCC_JIT_TYPES.
578 * jit-playback.cc: Add support for the sized integer types.
579 * jit-recording.cc: Add support for the sized integer types.
580 * jit-recording.h: Add support for comparing integer types
581 and new function (is_signed).
582 * libgccjit.cc (gcc_jit_compatible_types): New.
583 (gcc_jit_type_get_size) New.
584 * libgccjit.h: New enum variants for gcc_jit_types
585 (GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T,
586 GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T,
587 GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T,
588 GCC_JIT_TYPE_INT16_T, GCC_JIT_TYPE_INT32_T,
589 GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T) and new functions
590 (gcc_jit_compatible_types, gcc_jit_type_get_size).
591 * libgccjit.map (LIBGCCJIT_ABI_20): New ABI tag.
593 2022-04-06 David Malcolm <dmalcolm@redhat.com>
596 * docs/_build/texinfo/factorial.png: Move to...
597 * docs/_build/texinfo/libgccjit-figures/factorial.png: ...here.
598 * docs/_build/texinfo/factorial1.png: Move to...
599 * docs/_build/texinfo/libgccjit-figures/factorial1.png: ...here.
600 * docs/_build/texinfo/sum-of-squares.png: Move to...
601 * docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: ...here.
602 * docs/_build/texinfo/sum-of-squares1.png: Move to...
603 * docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: ...here.
605 2022-04-01 David Malcolm <dmalcolm@redhat.com>
607 * docs/topics/expressions.rst: Fix formatting.
608 * docs/topics/types.rst: Likewise.
609 * docs/_build/texinfo/libgccjit.texi: Regenerate
611 2022-04-01 Petter Tomner <tomner@kth.se>
613 * docs/topics/compatibility.rst: Add 19 tag
614 * docs/topics/compilation.rst: Linking
615 * docs/topics/contexts.rst: Linking example
616 * docs/topics/expressions.rst: Fix formatting and dropped 's'
618 2022-03-07 Jakub Jelinek <jakub@redhat.com>
620 * libgccjit.h: Fix up duplicated word issue in a comment.
622 2022-01-17 Martin Liska <mliska@suse.cz>
624 * config-lang.in: Rename .c names to .cc.
625 * docs/_build/texinfo/libgccjit.texi: Likewise.
626 * docs/internals/index.rst: Likewise.
627 * jit-builtins.cc (builtins_manager::make_builtin_function): Likewise.
628 * jit-playback.cc (fold_const_var): Likewise.
629 (playback::context::~context): Likewise.
630 (new_field): Likewise.
631 (new_bitfield): Likewise.
632 (new_compound_type): Likewise.
633 (playback::compound_type::set_fields): Likewise.
634 (global_set_init_rvalue): Likewise.
635 (load_blob_in_ctor): Likewise.
636 (new_global_initialized): Likewise.
638 (new_string_literal): Likewise.
639 (as_truth_value): Likewise.
640 (build_call): Likewise.
641 (playback::context::build_cast): Likewise.
642 (new_array_access): Likewise.
643 (new_field_access): Likewise.
644 (dereference): Likewise.
645 (postprocess): Likewise.
646 (add_jump): Likewise.
647 (add_switch): Likewise.
648 (build_goto_operands): Likewise.
649 (playback::context::read_dump_file): Likewise.
650 (init_types): Likewise.
651 * jit-recording.cc (recording::context::get_int_type): Likewise.
652 * jit-recording.h: Likewise.
653 * libgccjit.cc (compatible_types): Likewise.
654 (gcc_jit_context_acquire): Likewise.
655 (gcc_jit_context_release): Likewise.
656 (gcc_jit_context_new_child_context): Likewise.
657 (gcc_jit_type_as_object): Likewise.
658 (gcc_jit_context_get_type): Likewise.
659 (gcc_jit_context_get_int_type): Likewise.
660 (gcc_jit_type_get_pointer): Likewise.
661 (gcc_jit_type_get_const): Likewise.
662 (gcc_jit_type_get_volatile): Likewise.
663 (gcc_jit_type_dyncast_array): Likewise.
664 (gcc_jit_type_is_bool): Likewise.
665 (gcc_jit_type_is_pointer): Likewise.
666 (gcc_jit_type_is_integral): Likewise.
667 (gcc_jit_type_dyncast_vector): Likewise.
668 (gcc_jit_type_is_struct): Likewise.
669 (gcc_jit_vector_type_get_num_units): Likewise.
670 (gcc_jit_vector_type_get_element_type): Likewise.
671 (gcc_jit_type_unqualified): Likewise.
672 (gcc_jit_type_dyncast_function_ptr_type): Likewise.
673 (gcc_jit_function_type_get_return_type): Likewise.
674 (gcc_jit_function_type_get_param_count): Likewise.
675 (gcc_jit_function_type_get_param_type): Likewise.
676 (gcc_jit_context_new_array_type): Likewise.
677 (gcc_jit_context_new_field): Likewise.
678 (gcc_jit_field_as_object): Likewise.
679 (gcc_jit_context_new_struct_type): Likewise.
680 (gcc_jit_struct_as_type): Likewise.
681 (gcc_jit_struct_set_fields): Likewise.
682 (gcc_jit_struct_get_field_count): Likewise.
683 (gcc_jit_context_new_union_type): Likewise.
684 (gcc_jit_context_new_function_ptr_type): Likewise.
685 (gcc_jit_param_as_rvalue): Likewise.
686 (gcc_jit_context_new_function): Likewise.
687 (gcc_jit_function_get_return_type): Likewise.
688 (gcc_jit_function_dump_to_dot): Likewise.
689 (gcc_jit_block_get_function): Likewise.
690 (gcc_jit_global_set_initializer_rvalue): Likewise.
691 (gcc_jit_rvalue_get_type): Likewise.
692 (gcc_jit_context_new_rvalue_from_int): Likewise.
693 (gcc_jit_context_one): Likewise.
694 (gcc_jit_context_new_rvalue_from_double): Likewise.
695 (gcc_jit_context_null): Likewise.
696 (gcc_jit_context_new_string_literal): Likewise.
697 (valid_binary_op_p): Likewise.
698 (gcc_jit_context_new_binary_op): Likewise.
699 (gcc_jit_context_new_comparison): Likewise.
700 (gcc_jit_context_new_call): Likewise.
701 (is_valid_cast): Likewise.
702 (gcc_jit_context_new_cast): Likewise.
703 (gcc_jit_object_get_context): Likewise.
704 (gcc_jit_object_get_debug_string): Likewise.
705 (gcc_jit_lvalue_access_field): Likewise.
706 (gcc_jit_rvalue_access_field): Likewise.
707 (gcc_jit_rvalue_dereference_field): Likewise.
708 (gcc_jit_rvalue_dereference): Likewise.
709 (gcc_jit_lvalue_get_address): Likewise.
710 (gcc_jit_lvalue_set_tls_model): Likewise.
711 (gcc_jit_lvalue_set_link_section): Likewise.
712 (gcc_jit_function_new_local): Likewise.
713 (gcc_jit_block_add_eval): Likewise.
714 (gcc_jit_block_add_assignment): Likewise.
716 (gcc_jit_block_end_with_conditional): Likewise.
717 (gcc_jit_block_add_comment): Likewise.
718 (gcc_jit_block_end_with_jump): Likewise.
719 (gcc_jit_block_end_with_return): Likewise.
720 (gcc_jit_block_end_with_void_return): Likewise.
721 (case_range_validator::case_range_validator): Likewise.
722 (case_range_validator::validate): Likewise.
723 (case_range_validator::get_wide_int): Likewise.
724 (gcc_jit_block_end_with_switch): Likewise.
725 (gcc_jit_context_set_str_option): Likewise.
726 (gcc_jit_context_set_int_option): Likewise.
727 (gcc_jit_context_set_bool_option): Likewise.
728 (gcc_jit_context_set_bool_allow_unreachable_blocks): Likewise.
729 (gcc_jit_context_set_bool_use_external_driver): Likewise.
730 (gcc_jit_context_add_command_line_option): Likewise.
731 (gcc_jit_context_add_driver_option): Likewise.
732 (gcc_jit_context_enable_dump): Likewise.
733 (gcc_jit_context_compile): Likewise.
734 (gcc_jit_context_compile_to_file): Likewise.
735 (gcc_jit_context_set_logfile): Likewise.
736 (gcc_jit_context_dump_reproducer_to_file): Likewise.
737 (gcc_jit_context_get_first_error): Likewise.
738 (gcc_jit_context_get_last_error): Likewise.
739 (gcc_jit_result_get_code): Likewise.
740 (gcc_jit_result_get_global): Likewise.
741 (gcc_jit_rvalue_set_bool_require_tail_call): Likewise.
742 (gcc_jit_type_get_aligned): Likewise.
743 (gcc_jit_type_get_vector): Likewise.
744 (gcc_jit_function_get_address): Likewise.
745 (gcc_jit_version_patchlevel): Likewise.
746 (gcc_jit_block_add_extended_asm): Likewise.
747 (gcc_jit_extended_asm_as_object): Likewise.
748 (gcc_jit_extended_asm_set_volatile_flag): Likewise.
749 (gcc_jit_extended_asm_set_inline_flag): Likewise.
750 (gcc_jit_extended_asm_add_output_operand): Likewise.
751 (gcc_jit_extended_asm_add_input_operand): Likewise.
752 (gcc_jit_extended_asm_add_clobber): Likewise.
753 * notes.txt: Likewise.
755 2022-01-17 Martin Liska <mliska@suse.cz>
757 * dummy-frontend.c: Moved to...
758 * dummy-frontend.cc: ...here.
759 * jit-builtins.c: Moved to...
760 * jit-builtins.cc: ...here.
761 * jit-logging.c: Moved to...
762 * jit-logging.cc: ...here.
763 * jit-playback.c: Moved to...
764 * jit-playback.cc: ...here.
765 * jit-recording.c: Moved to...
766 * jit-recording.cc: ...here.
767 * jit-result.c: Moved to...
768 * jit-result.cc: ...here.
769 * jit-spec.c: Moved to...
770 * jit-spec.cc: ...here.
771 * jit-tempdir.c: Moved to...
772 * jit-tempdir.cc: ...here.
773 * jit-w32.c: Moved to...
774 * jit-w32.cc: ...here.
775 * libgccjit.c: Moved to...
776 * libgccjit.cc: ...here.
778 2021-12-28 Martin Liska <mliska@suse.cz>
780 * docs/_build/texinfo/libgccjit.texi: Replace http:// with https.
781 * docs/cp/index.rst: Likewise.
782 * docs/cp/intro/index.rst: Likewise.
783 * docs/cp/intro/tutorial01.rst: Likewise.
784 * docs/cp/intro/tutorial02.rst: Likewise.
785 * docs/cp/intro/tutorial03.rst: Likewise.
786 * docs/cp/intro/tutorial04.rst: Likewise.
787 * docs/cp/topics/asm.rst: Likewise.
788 * docs/cp/topics/compilation.rst: Likewise.
789 * docs/cp/topics/contexts.rst: Likewise.
790 * docs/cp/topics/expressions.rst: Likewise.
791 * docs/cp/topics/functions.rst: Likewise.
792 * docs/cp/topics/index.rst: Likewise.
793 * docs/cp/topics/locations.rst: Likewise.
794 * docs/cp/topics/objects.rst: Likewise.
795 * docs/cp/topics/types.rst: Likewise.
796 * docs/index.rst: Likewise.
797 * docs/internals/index.rst: Likewise.
798 * docs/intro/index.rst: Likewise.
799 * docs/intro/tutorial01.rst: Likewise.
800 * docs/intro/tutorial02.rst: Likewise.
801 * docs/intro/tutorial03.rst: Likewise.
802 * docs/intro/tutorial04.rst: Likewise.
803 * docs/intro/tutorial05.rst: Likewise.
804 * docs/topics/asm.rst: Likewise.
805 * docs/topics/compatibility.rst: Likewise.
806 * docs/topics/compilation.rst: Likewise.
807 * docs/topics/contexts.rst: Likewise.
808 * docs/topics/expressions.rst: Likewise.
809 * docs/topics/function-pointers.rst: Likewise.
810 * docs/topics/functions.rst: Likewise.
811 * docs/topics/index.rst: Likewise.
812 * docs/topics/locations.rst: Likewise.
813 * docs/topics/objects.rst: Likewise.
814 * docs/topics/performance.rst: Likewise.
815 * docs/topics/types.rst: Likewise.
817 2021-12-20 Martin Liska <mliska@suse.cz>
819 * libgccjit.c (struct version_info): Rename to jit_version_info.
820 (struct jit_version_info): Likewise.
821 (gcc_jit_version_major): Likewise.
822 (gcc_jit_version_minor): Likewise.
823 (gcc_jit_version_patchlevel): Likewise.
825 2021-12-14 Petter Tomner <tomner@kth.se>
827 * jit-common.h: New enum
828 * jit-playback.c : Folding an setting intitial
829 (global_new_decl) : Handle const global generation
830 (new_global) : New flag
831 (global_set_init_rvalue) : New
833 (new_global_initialized) : Flag
834 (as_truth_value) : Fold
835 (new_unary_op) : Fold
836 (new_binary_op) : Fold
837 (new_comparison) : Fold
838 (new_array_access) : Fold
839 (new_dereference) : Fold
842 (global_set_init_rvalue) : New
846 (new_global_init_rvalue) : New
848 (ctor) : New, inherits rvalue
849 (global_init_rvalue) : New, inherits memento
850 (type::is_union) : New
851 * libgccjit++.h : New entrypoints, see C-header
852 * libgccjit.c : See .h
853 * libgccjit.h : New entrypoints
854 (gcc_jit_context_new_array_constructor) : New
855 (gcc_jit_context_new_struct_constructor) : New
856 (gcc_jit_context_new_union_constructor) : New
857 (gcc_jit_global_set_initializer_rvalue) : New
858 (LIBGCCJIT_HAVE_CTORS) : New feuture macro
859 * libgccjit.map : New entrypoints added to ABI 19
860 * docs/topics/expressions.rst : Updated docs
862 2021-12-12 Antoni Boucher <bouanto@zoho.com>
865 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_18): New ABI
867 * docs/topics/expressions.rst: Add documentation for the
868 function gcc_jit_lvalue_set_link_section.
869 * jit-playback.h: New function (set_link_section).
870 * jit-recording.c: New function (set_link_section) and
871 support for setting the link section.
872 * jit-recording.h: New function (set_link_section) and new
873 field m_link_section.
874 * libgccjit.c: New function (gcc_jit_lvalue_set_link_section).
875 * libgccjit.h: New function (gcc_jit_lvalue_set_link_section).
876 * libgccjit.map (LIBGCCJIT_ABI_18): New ABI tag.
878 2021-12-12 Antoni Boucher <bouanto@zoho.com>
881 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_17): New ABI
883 * docs/topics/expressions.rst: Add document for the function
884 gcc_jit_lvalue_set_tls_model.
885 * jit-playback.h: New function (set_tls_model).
886 * jit-recording.c: New function (set_tls_model), new
887 variables (tls_models and tls_model_enum_strings) and support
888 for setting the tls model.
889 * jit-recording.h: New function (set_tls_model) and new
891 * libgccjit.c: New function (gcc_jit_lvalue_set_tls_model).
892 * libgccjit.h: New function (gcc_jit_lvalue_set_tls_model)
893 and new enum (gcc_jit_tls_model).
894 * libgccjit.map (LIBGCCJIT_ABI_17): New ABI tag.
896 2021-12-11 Antoni Boucher <bouanto@zoho.com>
900 * jit-builtins.c: Implement missing types for builtins.
901 * jit-recording.c:: Allow sending a volatile const void * as
903 * jit-recording.h: New functions (is_volatile, is_const) and
904 allow comparing qualified types.
906 2021-12-10 David Malcolm <dmalcolm@redhat.com>
909 * jit-playback.c (gcc::jit::playback::context::new_function): Set
910 DECL_CONTEXT of the result_decl.
912 2021-11-27 Petter Tomner <tomner@kth.se>
914 * libgccjit.c: %ld -> %zu
916 2021-11-24 Martin Liska <mliska@suse.cz>
918 * jit-playback.c (function): Initialize m_blocks vector.
920 2021-11-20 Antoni Boucher <bouanto@zoho.com>
923 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_16): New ABI tag.
924 * docs/topics/functions.rst: Add documentation for the
925 functions gcc_jit_function_get_return_type and
926 gcc_jit_function_get_param_count
927 * docs/topics/types.rst: Add documentation for the functions
928 gcc_jit_function_type_get_return_type,
929 gcc_jit_function_type_get_param_count,
930 gcc_jit_function_type_get_param_type,
931 gcc_jit_type_unqualified, gcc_jit_type_dyncast_array,
932 gcc_jit_type_is_bool,
933 gcc_jit_type_dyncast_function_ptr_type,
934 gcc_jit_type_is_integral, gcc_jit_type_is_pointer,
935 gcc_jit_type_dyncast_vector,
936 gcc_jit_vector_type_get_element_type,
937 gcc_jit_vector_type_get_num_units,
938 gcc_jit_struct_get_field, gcc_jit_type_is_struct,
939 and gcc_jit_struct_get_field_count
941 (gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
942 gcc_jit_function_type_get_return_type,
943 gcc_jit_function_type_get_param_count,
944 gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
945 gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
946 gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
947 gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
948 gcc_jit_vector_type_get_element_type,
949 gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
950 gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
952 (struct gcc_jit_function_type, struct gcc_jit_vector_type):
955 (gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
956 gcc_jit_function_type_get_return_type,
957 gcc_jit_function_type_get_param_count,
958 gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
959 gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
960 gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
961 gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
962 gcc_jit_vector_type_get_element_type,
963 gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
964 gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
965 function declarations.
966 (struct gcc_jit_function_type, struct gcc_jit_vector_type):
968 * jit-recording.h: New functions (is_struct and is_vector)
969 * libgccjit.map (LIBGCCJIT_ABI_16): New ABI tag.
971 2021-11-12 David Malcolm <dmalcolm@redhat.com>
974 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile):
975 Increase size of buffer.
976 * docs/examples/tut04-toyvm/toyvm.cc
977 (compilation_state::create_function): Likewise.
979 2021-09-10 Petter Tomner <tomner@kth.se>
981 * jit-playback.c: Moved global var processing to after loc handling.
982 Setting TYPE_NAME for fundamental types.
983 Using common functions for finalizing globals.
984 * jit-playback.h: New method init_types().
985 Changed get_tree_node_for_type() to method.
987 2021-08-19 Iain Sandoe <iain@sandoe.co.uk>
989 * docs/examples/tut04-toyvm/toyvm.c: Include jit-dejagnu.h.
990 * docs/examples/tut04-toyvm/toyvm.cc: Likewise.
991 * jit-dejagnu.h: New file, imported from dejagnu-1.6.2 and
992 patched for this application.
994 2021-08-18 Iain Sandoe <iain@sandoe.co.uk>
997 * Make-lang.in: Provide clauses for Darwin hosts.
999 2021-07-18 Antoni Boucher <bouanto@zoho.com>
1002 * jit-playback.c (convert): Add support to handle truncation and
1003 extension in the convert function.
1005 2021-05-19 Martin Liska <mliska@suse.cz>
1008 * libgccjit.c (gcc_jit_context_new_function): Fix typos.
1010 2021-03-24 Matthias Klose <doko@ubuntu.com>
1012 * Make-lang.in (jit.sphinx.html, jit.sphinx.pdf): Use $(mkinstalldirs),
1013 (jit.install-headers): Depend on installdirs.
1015 2021-02-19 David Malcolm <dmalcolm@redhat.com>
1019 (gcc::jit::builtins_manager::get_builtin_function_by_id):
1020 Update assertion to reject BUILT_IN_NONE.
1021 (gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
1024 (gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
1026 * jit-playback.c (gcc::jit::playback::context::replay): Call it.
1027 Remove redundant conditional on bm.
1029 2021-01-14 David Malcolm <dmalcolm@redhat.com>
1031 * docs/cp/index.rst: Remove "Alpha" warning.
1032 * docs/index.rst: Likewise.
1033 * docs/_build/texinfo/libgccjit.texi: Regenerate
1035 2020-11-25 Martin Sebor <msebor@redhat.com>
1038 * jit-recording.c (recording::function::dump_to_dot): Avoid
1040 (recording::block::dump_to_dot): Same.
1042 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1045 * Make-lang.in (jit.serial): Change from goal to a
1047 (.PHONY): Drop jit.serial and jit.prev.
1048 ($(LIBGCCJIT_FILENAME)): Depend on $(jit.serial) rather than
1051 2020-11-18 Jakub Jelinek <jakub@redhat.com>
1053 * Make-lang.in (jit.serial): New goal.
1054 (.PHONY): Add jit.serial jit.prev.
1055 ($(LIBGCCJIT_FILENAME)): Depend on jit.prev. Call LINK_PROGRESS.
1057 2020-11-12 David Malcolm <dmalcolm@redhat.com>
1060 * docs/cp/topics/asm.rst: New file.
1061 * docs/cp/topics/index.rst (Topic Reference): Add it.
1062 * docs/topics/asm.rst: New file.
1063 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_15): New.
1064 * docs/topics/functions.rst (Statements): Add link to extended
1066 * docs/topics/index.rst (Topic Reference): Add asm.rst.
1067 * docs/topics/objects.rst: Add gcc_jit_extended_asm to ASCII art.
1068 * docs/_build/texinfo/Makefile: Regenerate.
1069 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1070 * jit-common.h (gcc::jit::recording::extended_asm): New forward
1072 (gcc::jit::recording::top_level_asm): Likewise.
1073 * jit-playback.c: Include "stmt.h".
1074 (build_string): New.
1075 (gcc::jit::playback::context::new_string_literal): Disambiguate
1077 (gcc::jit::playback::context::add_top_level_asm): New.
1078 (build_operand_chain): New.
1079 (build_clobbers): New.
1080 (build_goto_operands): New.
1081 (gcc::jit::playback::block::add_extended_asm): New.
1082 * jit-playback.h (gcc::jit::playback::context::add_top_level_asm):
1084 (struct gcc::jit::playback::asm_operand): New struct.
1085 (gcc::jit::playback::block::add_extended_asm): New decl.
1086 * jit-recording.c (gcc::jit::recording::context::dump_to_file):
1087 Dump top-level asms.
1088 (gcc::jit::recording::context::add_top_level_asm): New.
1089 (gcc::jit::recording::block::add_extended_asm): New.
1090 (gcc::jit::recording::block::end_with_extended_asm_goto): New.
1091 (gcc::jit::recording::asm_operand::asm_operand): New.
1092 (gcc::jit::recording::asm_operand::print): New.
1093 (gcc::jit::recording::asm_operand::make_debug_string): New.
1094 (gcc::jit::recording::output_asm_operand::write_reproducer): New.
1095 (gcc::jit::recording::output_asm_operand::print): New.
1096 (gcc::jit::recording::input_asm_operand::write_reproducer): New.
1097 (gcc::jit::recording::input_asm_operand::print): New.
1098 (gcc::jit::recording::extended_asm::add_output_operand): New.
1099 (gcc::jit::recording::extended_asm::add_input_operand): New.
1100 (gcc::jit::recording::extended_asm::add_clobber): New.
1101 (gcc::jit::recording::extended_asm::replay_into): New.
1102 (gcc::jit::recording::extended_asm::make_debug_string): New.
1103 (gcc::jit::recording::extended_asm::write_flags): New.
1104 (gcc::jit::recording::extended_asm::write_clobbers): New.
1105 (gcc::jit::recording::extended_asm_simple::write_reproducer): New.
1106 (gcc::jit::recording::extended_asm::maybe_populate_playback_blocks):
1108 (gcc::jit::recording::extended_asm_goto::extended_asm_goto): New.
1109 (gcc::jit::recording::extended_asm_goto::replay_into): New.
1110 (gcc::jit::recording::extended_asm_goto::write_reproducer): New.
1111 (gcc::jit::recording::extended_asm_goto::get_successor_blocks):
1113 (gcc::jit::recording::extended_asm_goto::maybe_print_gotos): New.
1114 (gcc::jit::recording::extended_asm_goto::maybe_populate_playback_blocks):
1116 (gcc::jit::recording::top_level_asm::top_level_asm): New.
1117 (gcc::jit::recording::top_level_asm::replay_into): New.
1118 (gcc::jit::recording::top_level_asm::make_debug_string): New.
1119 (gcc::jit::recording::top_level_asm::write_to_dump): New.
1120 (gcc::jit::recording::top_level_asm::write_reproducer): New.
1122 (gcc::jit::recording::context::add_top_level_asm): New decl.
1123 (gcc::jit::recording::context::m_top_level_asms): New field.
1124 (gcc::jit::recording::block::add_extended_asm): New decl.
1125 (gcc::jit::recording::block::end_with_extended_asm_goto): New
1127 (gcc::jit::recording::asm_operand): New class.
1128 (gcc::jit::recording::output_asm_operand): New class.
1129 (gcc::jit::recording::input_asm_operand): New class.
1130 (gcc::jit::recording::extended_asm): New class.
1131 (gcc::jit::recording::extended_asm_simple): New class.
1132 (gcc::jit::recording::extended_asm_goto): New class.
1133 (gcc::jit::recording::top_level_asm): New class.
1134 * libgccjit++.h (gccjit::extended_asm): New forward decl.
1135 (gccjit::context::add_top_level_asm): New.
1136 (gccjit::block::add_extended_asm): New.
1137 (gccjit::block::end_with_extended_asm_goto): New.
1138 (gccjit::extended_asm): New class.
1139 (gccjit::extended_asm::extended_asm): New ctors.
1140 (gccjit::extended_asm::set_volatile_flag): New.
1141 (gccjit::extended_asm::set_inline_flag): New.
1142 (gccjit::extended_asm::add_output_operand): New.
1143 (gccjit::extended_asm::add_input_operand): New.
1144 (gccjit::extended_asm::add_clobber): New.
1145 (gccjit::extended_asm::get_inner_extended_asm): New.
1146 * libgccjit.c (struct gcc_jit_extended_asm): New.
1147 (jit_error): Make "loc" param take a gcc::jit::recording::location *
1148 rather than a gcc_jit_location *.
1149 (gcc_jit_block_add_extended_asm): New entrypoint.
1150 (gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
1151 (gcc_jit_extended_asm_as_object): New entrypoint.
1152 (gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
1153 (gcc_jit_extended_asm_set_inline_flag): New entrypoint.
1154 (gcc_jit_extended_asm_add_output_operand): New entrypoint.
1155 (gcc_jit_extended_asm_add_clobber): New entrypoint.
1156 (gcc_jit_context_add_top_level_asm): New entrypoint.
1157 * libgccjit.h: Add gcc_jit_extended_asm to ASCII art.
1158 (gcc_jit_extended_asm): New typedef.
1159 (LIBGCCJIT_HAVE_ASM_STATEMENTS): New define.
1160 (gcc_jit_block_add_extended_asm): New entrypoint.
1161 (gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
1162 (gcc_jit_extended_asm_as_object): New entrypoint.
1163 (gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
1164 (gcc_jit_extended_asm_set_inline_flag): New entrypoint.
1165 (gcc_jit_extended_asm_add_output_operand): New entrypoint.
1166 (gcc_jit_extended_asm_add_input_operand): New entrypoint.
1167 (gcc_jit_extended_asm_add_clobber): New entrypoint.
1168 (gcc_jit_context_add_top_level_asm): New entrypoint.
1169 * libgccjit.map (LIBGCCJIT_ABI_15): New.
1171 2020-11-12 David Malcolm <dmalcolm@redhat.com>
1173 * jit-recording.c (recording::context::new_string): Add "escaped"
1174 param and use it when creating the new recording::string instance.
1175 (recording::string::string): Add "escaped" param and use it to
1176 initialize m_escaped.
1177 (recording::string::make_debug_string): Replace check that first
1178 char is double-quote with use of m_escaped. Fix escaping of
1179 '\t' and '\n'. Set "escaped" on the result.
1180 * jit-recording.h (recording::context::new_string): Add "escaped"
1182 (recording::string::string): Add "escaped" param.
1183 (recording::string::m_escaped): New field.
1185 2020-11-12 David Malcolm <dmalcolm@redhat.com>
1187 * libgccjit.h: Fix typo in comment.
1189 2020-09-14 Andrea Corallo <andrea.corallo@arm.com>
1191 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1193 2020-09-11 Andrea Corallo <andrea.corallo@arm.com>
1195 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_14): New ABI tag.
1196 * docs/topics/expressions.rst (gcc_jit_global_set_initializer):
1197 Document new entry point in section 'Global variables'.
1198 * jit-playback.c (global_new_decl, global_finalize_lvalue): New
1200 (playback::context::new_global): Make use of global_new_decl,
1201 global_finalize_lvalue.
1202 (load_blob_in_ctor): New template function in use by the
1204 (playback::context::new_global_initialized): New method.
1205 * jit-playback.h (class context): Decl 'new_global_initialized',
1206 'global_new_decl', 'global_finalize_lvalue'.
1207 (lvalue::set_initializer): Add implementation.
1208 * jit-recording.c (recording::memento_of_get_pointer::get_size)
1209 (recording::memento_of_get_type::get_size): Add implementation.
1210 (recording::global::write_initializer_reproducer): New function in
1211 use by 'recording::global::write_reproducer'.
1212 (recording::global::replay_into)
1213 (recording::global::write_to_dump)
1214 (recording::global::write_reproducer): Handle
1216 * jit-recording.h (class type): Decl 'get_size' and
1218 * libgccjit++.h (class lvalue): Declare new 'set_initializer'
1220 (class lvalue): Decl 'is_global' and 'set_initializer'.
1221 (class global) Decl 'write_initializer_reproducer'. Add
1222 'm_initializer', 'm_initializer_num_bytes' fields. Implement
1223 'set_initializer'. Add a destructor to free 'm_initializer'.
1224 * libgccjit.c (gcc_jit_global_set_initializer): New function.
1225 * libgccjit.h (gcc_jit_global_set_initializer): New function
1227 * libgccjit.map (LIBGCCJIT_ABI_14): New ABI tag.
1229 2020-08-28 Martin Sebor <msebor@redhat.com>
1231 * jit-recording.c (recording::switch_::make_debug_string): Add argument
1234 2020-08-22 Andrea Corallo <andrea.corallo@arm.com>
1237 (gcc_jit_context_new_rvalue_from_int)
1238 (gcc_jit_context_new_rvalue_from_long)
1239 (gcc_jit_context_new_rvalue_from_double)
1240 (gcc_jit_context_new_rvalue_from_ptr): Update function heading
1243 2020-06-16 Nicolas Bértolo <nicolasbertolo@gmail.com>
1245 * Make-lang.in: Always define version, minor and release
1246 numbers. Create the Windows shared library as
1247 libgccjit-$(LIBGCCJIT_VERSION_NUM).dll.
1249 2020-06-03 David Malcolm <dmalcolm@redhat.com>
1252 * jit-builtins.c (builtins_manager::make_primitive_type):
1253 Implement BT_CONST_VOLATILE_PTR.
1255 2020-06-02 David Malcolm <dmalcolm@redhat.com>
1258 * dummy-frontend.c: Include "options.h", "stringpool.h", and
1260 (ATTR_EXCL): New, copied from lto/lto-lang.c.
1261 (attr_noreturn_exclusions): Likewise.
1262 (attr_returns_twice_exclusions): Likewise.
1263 (attr_const_pure_exclusions): Likewise.
1264 (jit_attribute_table): Likewise, copied from lto_attribute_table.
1265 (jit_format_attribute_table): Likewise, copied from
1266 lto_format_attribute_table.
1267 (handle_noreturn_attribute): New, copied from lto/lto-lang.c.
1268 (handle_leaf_attribute): Likewise.
1269 (handle_const_attribute): Likewise.
1270 (handle_malloc_attribute): Likewise.
1271 (handle_pure_attribute): Likewise.
1272 (handle_novops_attribute): Likewise.
1273 (get_nonnull_operand): Likewise.
1274 (handle_nonnull_attribute): Likewise.
1275 (handle_nothrow_attribute): Likewise.
1276 (handle_sentinel_attribute): Likewise.
1277 (handle_type_generic_attribute): Likewise.
1278 (handle_transaction_pure_attribute): Likewise.
1279 (handle_returns_twice_attribute): Likewise.
1280 (handle_patchable_function_entry_attribute): Likewise.
1281 (ignore_attribute): Likewise.
1282 (handle_format_attribute): Likewise.
1283 (handle_format_arg_attribute): Likewise.
1284 (handle_fnspec_attribute): Likewise.
1285 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
1286 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
1288 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1290 * Make-lang.in: Remove extra slash. Build libgccjit.dll and its
1291 import library in Windows.
1292 * config-lang.in: Update comment about --enable-host-shared.
1293 * jit-w32.h: New file.
1294 * jit-w32.c: New file.
1295 (print_last_error): New function that prints the error
1296 string corresponding to GetLastError().
1297 (get_TOKEN_USER_current_user): Helper function used for getting
1298 the SID belonging to the current user.
1299 (create_directory_for_current_user): Helper function to create
1300 a directory with permissions such that only the current user can
1302 (win_mkdtemp): Create a temporary directory using Windows APIs.
1303 * jit-playback.c: Do not chmod files in Windows. Use LoadLibrary,
1304 FreeLibrary and GetProcAddress instead of libdl.
1305 * jit-result.h, jit-result.c: Introduce result::handle_t to
1306 abstract over the types used for dynamic library handles.
1307 * jit-tempdir.c: Do not use mkdtemp() in Windows, use
1310 2020-05-27 David Malcolm <dmalcolm@redhat.com>
1313 * dummy-frontend.c (LANG_HOOKS_DEEP_UNSHARING): Define to be true.
1314 * jit-playback.h (gcc::jit::playback::rvalue): Mark tree node with
1317 2020-05-27 Tom Tromey <tromey@gcc.gnu.org>
1320 * docs/conf.py (texinfo_documents): Set description.
1321 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1323 2020-05-26 David Malcolm <dmalcolm@redhat.com>
1326 * docs/topics/functions.rst
1327 (gcc_jit_context_get_builtin_function): Document.
1328 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1329 * dummy-frontend.c (jit_langhook_global_bindings_p): Remove
1331 * jit-builtins.c (type_names): New array.
1332 (get_string_for_type_id): New function.
1333 (gcc::jit::builtins_manager::make_primitive_type): Show name of
1334 type in error messages. Update cases to reflect the order in
1335 builtin-types.def. Implement cases for BT_INT8, BT_INT16,
1336 BT_UINT8, BT_CONST_PTR, BT_VOLATILE_PTR, BT_INT_PTR, BT_FLOAT_PTR,
1337 BT_CONST_DOUBLE_PTR, BT_SIZE, BT_CONST_SIZE.
1339 2020-05-26 David Malcolm <dmalcolm@redhat.com>
1341 * docs/topics/compatibility.rst: Fix underline.
1343 * docs/topics/types.rst: Fix missing blank line.
1344 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1346 2020-05-26 David Malcolm <dmalcolm@redhat.com>
1349 * docs/topics/expressions.rst (Unary Operations): Document that
1350 result_type of gcc_jit_context_new_unary_op must be a numeric type.
1351 (Binary Operations): Likewise for gcc_jit_context_new_binary_op.
1352 (Global variables): Document that "type" of
1353 gcc_jit_context_new_global must be non-`void`.
1354 * docs/topics/function-pointers.rst
1355 (gcc_jit_context_new_function_ptr_type): Document that the
1356 param_types must be non-void, but that return_type may be.
1357 * docs/topics/functions.rst (Params): Document that
1358 gcc_jit_context_new_param's type must be non-void.
1359 (Functions): Likewise for gcc_jit_function_new_local.
1360 * docs/topics/types.rst (gcc_jit_context_new_array_type): Document
1361 that the type must be non-void.
1362 (gcc_jit_context_new_field): Likewise.
1363 * docs/_build/texinfo/Makefile: Regenerate.
1364 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1365 * libgccjit.c (gcc_jit_context_new_array_type): Fail if
1366 element_type is void.
1367 (gcc_jit_context_new_field): Likewise for "type".
1368 (gcc_jit_context_new_function_ptr_type): Likewise for each
1369 element of param_types.
1370 (gcc_jit_context_new_param): Likewise for "type".
1371 (gcc_jit_context_new_global): Likewise.
1372 (gcc_jit_function_new_local): Likewise.
1373 (gcc_jit_type_get_aligned): Likewise.
1375 2020-03-31 Andrea Corallo <andrea.corallo@arm.com>
1376 David Malcolm <dmalcolm@redhat.com>
1378 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_13): New ABI tag
1379 plus add version paragraph.
1380 * libgccjit++.h (namespace gccjit::version): Add new namespace.
1381 * libgccjit.c (gcc_jit_version_major, gcc_jit_version_minor)
1382 (gcc_jit_version_patchlevel): New functions.
1383 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_version): New macro.
1384 (gcc_jit_version_major, gcc_jit_version_minor)
1385 (gcc_jit_version_patchlevel): New functions.
1386 * libgccjit.map (LIBGCCJIT_ABI_13) New ABI tag.
1388 2020-03-23 Andrea Corallo <andrea.corallo@arm.com>
1391 (gcc::jit::playback::context m_recording_ctxt): Remove
1392 m_char_array_type_node field.
1394 (playback::context::context) Remove m_char_array_type_node from member
1396 (playback::context::new_string_literal) Fix logic to handle string
1399 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1401 Update copyright years.
1403 2019-11-29 Julian Brown <julian@codesourcery.com>
1405 * jit-builtins.c (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR):
1406 Remove commented-out cases.
1408 2019-11-20 David Malcolm <dmalcolm@redhat.com>
1411 * jit-playback.c (gcc::jit::playback::context::make_fake_args):
1412 Update GCC_JIT_BOOL_OPTION_SELFCHECK_GC for new --param syntax.
1414 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1417 * jit-playback.c (new_function): Use set_decl_built_in_function.
1419 2019-07-22 Andrea Corallo <andrea.corallo@arm.com>
1421 * jit-recording.c (unary_op_reproducer_strings): Make it extern.
1422 (binary_op_reproducer_strings): Likewise.
1423 * jit-recording.h (unary_op_reproducer_strings): Likewise.
1424 (binary_op_reproducer_strings): Likewise.
1425 * libgccjit.c (gcc_jit_context_new_unary_op): Check result_type to be a
1427 * libgccjit.c (gcc_jit_context_new_binary_op): Improve error message.
1429 2019-07-04 Andrea Corallo <andrea.corallo@arm.com>
1431 * libgccjit.c (gcc_jit_context_new_binary_op): Check result_type to be a
1434 2019-07-04 Andrea Corallo <andrea.corallo@arm.com>
1436 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_12): New ABI tag.
1437 * docs/topics/types.rst: Add gcc_jit_context_new_bitfield.
1438 * jit-common.h (namespace recording): Add class bitfield.
1440 (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): Add macros.
1441 (playback::context::new_bitfield): New method.
1442 (playback::compound_type::set_fields): Add bitfield support.
1443 (playback::lvalue::mark_addressable): Was jit_mark_addressable make this
1444 a method of lvalue plus return a bool to communicate success.
1445 (playback::lvalue::get_address): Check for jit_mark_addressable return
1447 * jit-playback.h (new_bitfield): New method.
1448 (class bitfield): New class.
1449 (class lvalue): Add jit_mark_addressable method.
1450 * jit-recording.c (recording::context::new_bitfield): New method.
1451 (recording::bitfield::replay_into): New method.
1452 (recording::bitfield::write_to_dump): Likewise.
1453 (recording::bitfield::make_debug_string): Likewise.
1454 (recording::bitfield::write_reproducer): Likewise.
1455 * jit-recording.h (class context): Add new_bitfield method.
1456 (class field): Make it derivable by class bitfield.
1457 (class bitfield): Add new class.
1458 * libgccjit++.h (class context): Add new_bitfield method.
1459 * libgccjit.c (struct gcc_jit_bitfield): New structure.
1460 (gcc_jit_context_new_bitfield): New function.
1462 (LIBGCCJIT_HAVE_gcc_jit_context_new_bitfield) New macro.
1463 (gcc_jit_context_new_bitfield): New function.
1464 * libgccjit.map (LIBGCCJIT_ABI_12) New ABI tag.
1466 2019-03-21 Jakub Jelinek <jakub@redhat.com>
1468 * jit-recording.c (reproducer::m_set_identifiers): Use false as Lazy
1469 in hash_set template param.
1471 2019-02-05 Andrea Corallo <andrea.corallo@arm.com>
1473 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_11): New ABI tag.
1474 * docs/topics/contexts.rst (Additional driver options): New
1476 * jit-playback.c (invoke_driver): Add call to append_driver_options.
1477 * jit-recording.c: Within namespace gcc::jit...
1478 (recording::context::~context): Free the optnames within
1480 (recording::context::add_driver_option): New method.
1481 (recording::context::append_driver_options): New method.
1482 (recording::context::dump_reproducer_to_file): Add driver
1484 * jit-recording.h: Within namespace gcc::jit...
1485 (recording::context::add_driver_option): New method.
1486 (recording::context::append_driver_options): New method.
1487 (recording::context::m_driver_options): New field.
1488 * libgccjit++.h (gccjit::context::add_driver_option): New
1490 * libgccjit.c (gcc_jit_context_add_driver_option): New API
1492 * libgccjit.h (gcc_jit_context_add_driver_option): New API
1494 (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option): New
1496 * libgccjit.map (LIBGCCJIT_ABI_11): New ABI tag.
1498 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1500 Update copyright years.
1502 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1505 * dummy-frontend.c (jit_begin_diagnostic): Add diagnostic_t param.
1507 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1509 * jit-playback.c: Replace "source_location" with "location_t".
1511 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1513 * Make-lang.in (selftest-jit): New.
1515 2018-06-28 Martin Liska <mliska@suse.cz>
1517 * jit-playback.c: Include opt-suggestions.h.
1519 2018-06-28 Martin Liska <mliska@suse.cz>
1521 * jit-playback.c (class auto_argvec): Moved to vec.h.
1522 (auto_argvec::~auto_argvec): Likewise.
1523 (compile): Use the renamed name.
1524 (invoke_driver): Likewise.
1526 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1529 * Make-lang.in ($(LIBGCCJIT_FILENAME)): Add $(EXTRA_GCC_LIBS).
1531 2018-03-09 David Malcolm <dmalcolm@redhat.com>
1532 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1536 * Make-lang.in (COMMA): New.
1537 (LIBGCCJIT_VERSION_SCRIPT_OPTION): New.
1538 (LIBGCCJIT_SONAME_OPTION): New.
1539 (jit): Move --version-script and -soname linker options to the
1542 2018-01-25 David Malcolm <dmalcolm@redhat.com>
1545 * jit-recording.h (gcc::jit::recording::union_): Remove fields
1546 "m_loc" and "m_name".
1548 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1550 Update copyright years.
1552 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1554 * jit-playback.c (get_type, playback::compile_to_file::copy_file,
1555 playback::context::acquire_mutex): Replace Yoda conditions with
1556 typical order conditions.
1557 * libgccjit.c (gcc_jit_context_new_struct_type,
1558 gcc_jit_struct_set_fields, gcc_jit_context_new_union_type,
1559 gcc_jit_context_new_function, gcc_jit_timer_pop): Likewise.
1560 * jit-builtins.c (matches_builtin): Likewise.
1561 * jit-recording.c (recording::compound_type::set_fields,
1562 recording::fields::write_reproducer, recording::rvalue::set_scope,
1563 recording::function::validate): Likewise.
1564 * jit-logging.c (logger::decref): Likewise.
1566 2017-11-30 Jakub Jelinek <jakub@redhat.com>
1569 (recording::memento_of_new_rvalue_from_const <long>::write_reproducer):
1570 Use ; instead of ;;.
1572 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1574 * jit-playback.c (add_switch): Build SWITCH_EXPR using build2 instead
1575 of build3. Formatting fixes. Adjust funciton comment.
1577 2017-11-23 Tom de Vries <tom@codesourcery.com>
1579 * libgccjit.c (RETURN_NULL_IF_FAIL_NONNULL_NUMERIC_TYPE): Wrap in
1580 JIT_{BEGIN,END}_STMT.
1582 2017-10-31 David Malcolm <dmalcolm@redhat.com>
1584 * docs/internals/index.rst (Running the test suite): Document
1585 PRESERVE_EXECUTABLES.
1586 (Running under valgrind): Add markup to RUN_UNDER_VALGRIND.
1587 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1589 2017-10-04 David Malcolm <dmalcolm@redhat.com>
1591 * docs/cp/topics/expressions.rst (Vector expressions): New
1593 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_10): New ABI tag.
1594 * docs/topics/expressions.rst (Vector expressions): New section.
1595 * docs/topics/types.rst (gcc_jit_type_get_vector): Add link to
1596 gcc_jit_context_new_rvalue_from_vector.
1597 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1598 * jit-common.h (gcc::jit:recording::vector_type): New forward
1601 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
1603 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
1604 * jit-recording.c: In namespace gcc::jit::
1605 (class comma_separated_string): New class.
1606 (comma_separated_string::comma_separated_string): New ctor,
1607 adapted from recording::call::make_debug_string.
1608 (comma_separated_string::~comma_separated_string): New dtor.
1609 In namespace gcc::jit::recording::
1610 (context::new_rvalue_from_vector): New method.
1611 (type::get_vector): Update for renaming of memento_of_get_vector.
1612 (class memento_of_get_vector): Rename to...
1613 (class vector_type): ..this.
1614 (memento_of_new_rvalue_from_vector::memento_of_new_rvalue_from_vector):
1616 (memento_of_new_rvalue_from_vector::replay_into): New method.
1617 (memento_of_new_rvalue_from_vector::visit_children): New method.
1618 (memento_of_new_rvalue_from_vector::make_debug_string): New
1620 (memento_of_new_rvalue_from_vector::write_reproducer): New method.
1621 (call::make_debug_string): Split out arg-printing code into ctor
1622 for comma_separated_string.
1623 * jit-recording.h: In namespace gcc::jit::recording::
1624 (context::new_rvalue_from_vector): New method.
1625 (type::dyn_cast_vector_type): New virtual function.
1626 (class memento_of_get_vector): Rename to...
1627 (class vector_type): ...this.
1628 (vector_type::unqualified): Remove this vfunc override in favor
1630 (vector_type::get_element_type): ...this new method.
1631 (vector_type::get_num_units): New method.
1632 (vector_type::dyn_cast_vector_type): New vfunc override.
1633 (class memento_of_new_rvalue_from_vector): New class.
1634 * libgccjit++.h (gccjit::context::new_rvalue): Add overload for
1636 * libgccjit.c (gcc_jit_context_new_binary_op): Strip off type
1637 qualifications when checking that both operands have same type.
1638 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
1640 (LIBGCCJIT_HAVE_gcc_jit_context_new_rvalue_from_vector): New
1642 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
1643 * libgccjit.map (LIBGCCJIT_ABI_10): New ABI tag.
1645 2017-09-28 David Malcolm <dmalcolm@redhat.com>
1647 * docs/topics/expressions.rst (Function calls): Add link to
1648 gcc_jit_context_new_function_ptr_type.
1649 (Function pointers): Convert to cross-references to
1650 function-pointers.rst, moving material there.
1651 * docs/topics/function-pointers.rst: New page.
1652 * docs/topics/index.rst: Add function-pointers.rst.
1653 * docs/topics/types.rst (Function pointer types): New section.
1654 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1656 2017-09-28 David Malcolm <dmalcolm@redhat.com>
1659 (gcc::jit::recording::function_type::is_same_type_as): New function.
1660 * jit-recording.h: In namespace gcc::jit::recording::
1661 (type::accepts_writes_from): Use is_same_type_as rather than pointer
1663 (type::is_same_type_as): New virtual function.
1664 (function_type::is_same_type_as): New override.
1666 2017-09-27 David Malcolm <dmalcolm@redhat.com>
1668 * docs/cp/topics/expressions.rst (Function pointers): New section.
1669 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_9): New tag.
1670 * docs/topics/expressions.rst (Function pointers): New section.
1671 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1672 * jit-common.h (class gcc::jit::recording::function_pointer): New
1674 * jit-playback.c (gcc::jit::playback::function::get_address): New
1676 * jit-playback.h (gcc::jit::playback::function::get_address): New
1678 * jit-recording.c: Within namespace gcc::jit::recording...
1679 (function::function): Initialize new field "m_fn_ptr_type".
1680 (function::get_address): New method.
1681 (function_pointer::replay_into): New method.
1682 (function_pointer::visit_children): New method.
1683 (function_pointer::make_debug_string): New method.
1684 (function_pointer::write_reproducer): New method.
1685 * jit-recording.h: Within namespace gcc::jit::recording...
1686 (function::get_address): New method.
1687 (function): Add field "m_fn_ptr_type".
1688 (class function_pointer): New subclass of rvalue.
1689 * libgccjit++.h (gccjit::function::get_address): New method.
1690 * libgccjit.c (gcc_jit_function_get_address): New function.
1691 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_function_get_address): New
1693 (gcc_jit_function_get_address): New API entrypoint.
1694 * libgccjit.map (LIBGCCJIT_ABI_9): New tag.
1696 2017-09-14 David Malcolm <dmalcolm@redhat.com>
1699 * jit-builtins.c (matches_builtin): Ignore entries with a NULL
1702 2017-08-18 David Malcolm <dmalcolm@redhat.com>
1704 PR tree-optimization/46805
1705 * dummy-frontend.c (jit_langhook_parse_file): Handle vector types.
1707 2017-08-18 David Malcolm <dmalcolm@redhat.com>
1709 * jit-recording.c (class gcc::jit::reproducer): Rename field
1710 "m_identifiers" to "m_map_memento_to_identifier". Add field
1711 "m_set_identifiers" and struct hash_traits for it.
1712 (gcc::jit::reproducer::reproducer): Update for above.
1713 (convert_to_identifier): New function.
1714 (gcc::jit::reproducer::ensure_identifier_is_unique): New method.
1715 (gcc::jit::reproducer::make_identifier): Avoid appending the %p
1716 unless necessary for uniqueness. Update for field renaming.
1717 (gcc::jit::reproducer::get_identifier): Update for field renaming.
1719 2017-08-09 David Malcolm <dmalcolm@redhat.com>
1721 * docs/cp/topics/types.rst (Vector types): New section.
1722 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_8): New tag.
1723 * docs/topics/types.rst (gcc_jit_context_get_type): Fix typo in
1725 (Vector types): New section.
1726 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1727 * jit-playback.c (gcc::jit::playback::type::get_vector): New
1729 * jit-playback.h (gcc::jit::playback::type::get_vector): New
1731 * jit-recording.c: In namespace gcc::jit::recording::
1732 (type::get_vector): New method.
1733 (memento_of_get_aligned::write_reproducer): Fix typo
1735 (memento_of_get_vector::replay_into): New method.
1736 (memento_of_get_vector::make_debug_string): New method.
1737 (memento_of_get_vector::write_reproducer): New method.
1738 * jit-recording.h: In namespace gcc::jit::recording::
1739 (type::get_vector): New
1741 (class memento_of_get_vector): New class.
1742 * libgccjit++.h (gccjit::type::get_vector): New method.
1743 * libgccjit.c (gcc_jit_type_get_vector): New public entrypoint.
1744 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_type_get_vector): New
1746 (gcc_jit_type_get_vector): New decl.
1747 * libgccjit.map (LIBGCCJIT_ABI_8): New ABI tag.
1749 2017-07-05 Richard Sandiford <richard.sandiford@linaro.org>
1750 Alan Hayward <alan.hayward@arm.com>
1751 David Sherwood <david.sherwood@arm.com>
1753 * dummy-frontend.c (jit_langhook_type_for_mode): Remove "enum" before
1756 2017-04-24 David Malcolm <dmalcolm@redhat.com>
1758 * docs/cp/topics/types.rst (gccjit::type::get_const): Remove
1760 (gccjit::type::get_aligned): Add.
1761 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_7.
1762 * docs/topics/types.rst: Add gcc_jit_type_get_aligned.
1763 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1764 * jit-playback.c (gcc::jit::playback::type::get_aligned): New
1766 * jit-playback.h (gcc::jit::playback::type::get_aligned): New
1768 * jit-recording.c: Within namespace gcc::jit::recording...
1769 (type::get_aligned): New method.
1770 (memento_of_get_aligned::replay_into): New method.
1771 (memento_of_get_aligned::make_debug_string): New method.
1772 (memento_of_get_aligned::write_reproducer): New method.
1773 * jit-recording.h: Within namespace gcc::jit::recording...
1774 (type::get_aligned): New method.
1775 (type::accepts_writes_from): Strip off qualifications from
1776 this when comparing pointer equality.
1777 (decorated_type): New subclass of type, subsuming the
1778 commonality between memento_of_get_const and
1779 memento_of_get_volatile.
1780 (memento_of_get_const): Make a subclass of decorated_type,
1782 (memento_of_get_volatile): Likewise.
1783 (memento_of_get_aligned): Likewise.
1784 * libgccjit++.h: Within namespace gccjit...
1785 (type::get_const): New method.
1786 (type::get_aligned): New method.
1787 * libgccjit.c (gcc_jit_type_get_aligned): New function.
1788 * libgccjit.h (gcc_jit_type_get_aligned): New decl.
1789 * libgccjit.map (LIBGCCJIT_ABI_7): New
1790 (gcc_jit_type_get_aligned): Add.
1792 2017-01-19 David Malcolm <dmalcolm@redhat.com>
1794 * dummy-frontend.c (jit_langhook_type_for_size): Delete.
1795 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
1797 2017-01-18 David Malcolm <dmalcolm@redhat.com>
1799 * dummy-frontend.c (jit_langhook_type_for_size): Implement, using
1800 lto's lto_type_for_size.
1802 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1804 Update copyright years.
1806 2016-05-20 David Malcolm <dmalcolm@redhat.com>
1808 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_6.
1809 * docs/topics/expressions.rst (Function calls): Add documentation
1810 of gcc_jit_rvalue_set_bool_require_tail_call.
1811 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1812 * jit-common.h (gcc::jit::recording::base_call): Add forward decl.
1813 * jit-playback.c: Within namespace gcc::jit::playback...
1814 (context::build_call) Add "require_tail_call" param and use it
1815 to set CALL_EXPR_MUST_TAIL_CALL.
1816 (context::new_call): Add "require_tail_call" param.
1817 (context::new_call_through_ptr): Likewise.
1818 * jit-playback.h: Within namespace gcc::jit::playback...
1819 (context::new_call: Add "require_tail_call" param.
1820 (context::new_call_through_ptr): Likewise.
1821 (context::build_call): Likewise.
1822 * jit-recording.c: Within namespace gcc::jit::recording...
1823 (base_call::base_call): New constructor.
1824 (base_call::write_reproducer_tail_call): New method.
1825 (call::call): Update for inheritance from base_call.
1826 (call::replay_into): Provide m_require_tail_call to call
1828 (call::write_reproducer): Call write_reproducer_tail_call.
1829 (call_through_ptr::call_through_ptr): Update for inheritance from
1831 (call_through_ptr::replay_into): Provide m_require_tail_call to call
1832 to new_call_through_ptr.
1833 (recording::call_through_ptr::write_reproducer): Call
1834 write_reproducer_tail_call.
1835 * jit-recording.h: Within namespace gcc::jit::recording...
1836 (rvalue::dyn_cast_base_call): New virtual function.
1837 (class base_call): New subclass of class rvalue.
1838 (class call): Inherit from base_call rather than directly from
1839 rvalue, moving get_precedence and m_args to base_call.
1840 (class call_through_ptr): Likewise.
1841 * libgccjit.c (gcc_jit_rvalue_set_bool_require_tail_call): New
1844 (LIBGCCJIT_HAVE_gcc_jit_rvalue_set_bool_require_tail_call): New
1846 (gcc_jit_rvalue_set_bool_require_tail_call): New function.
1847 * libgccjit.map (LIBGCCJIT_ABI_6): New.
1848 (gcc_jit_rvalue_set_bool_require_tail_call): Add.
1850 2016-05-17 David Malcolm <dmalcolm@redhat.com>
1852 * dummy-frontend.c: Include diagnostic.h.
1853 (jit_begin_diagnostic): New function.
1854 (jit_end_diagnostic): New function.
1855 (jit_langhook_init): Register jit_begin_diagnostic
1856 and jit_end_diagnostic with the global_dc.
1857 * jit-playback.c: Include diagnostic.h.
1858 (gcc::jit::playback::context::add_diagnostic): New method.
1859 * jit-playback.h (struct diagnostic_context): Add forward
1861 (gcc::jit::playback::context::add_diagnostic): New method.
1863 2016-05-17 David Malcolm <dmalcolm@redhat.com>
1865 * docs/topics/expressions.rst (Function calls): Document
1866 gcc_jit_context_new_call_through_ptr.
1867 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1869 2016-05-13 David Malcolm <dmalcolm@redhat.com>
1871 * jit-playback.h: Within namespace gcc:jit::playback...
1872 (compile_to_memory::postprocess): Mark with FINAL OVERRIDE.
1873 (compile_to_file::postprocess): Likewise.
1874 (function::finalizer): Likewise.
1875 (block::finalizer): Likewise.
1876 (source_file::finalizer): Likewise.
1877 (source_line::finalizer): Likewise.
1878 * jit-recording.c (gcc::jit::rvalue_usage_validator):: Likewise.
1879 * jit-recording.h: Within namespace gcc::jit::recording...
1880 (string::replay_into): Mark with FINAL OVERRIDE.
1881 (string::make_debug_string): Likewise.
1882 (string::write_reproducer): Likewise.
1883 (location::replay_into): Likewise.
1884 (location::dyn_cast_location): Likewise.
1885 (location::make_debug_string): Likewise.
1886 (location::write_reproducer): Likewise.
1887 (memento_of_get_type::dereference): Likewise.
1888 (memento_of_get_type::accepts_writes_from): Likewise.
1889 (memento_of_get_type::is_int): Likewise.
1890 (memento_of_get_type::is_float): Likewise.
1891 (memento_of_get_type::is_bool): Likewise.
1892 (memento_of_get_type::is_pointer): Likewise.
1893 (memento_of_get_type::is_array): Likewise.
1894 (memento_of_get_type::is_void): Likewise.
1895 (memento_of_get_type::replay_into): Likewise.
1896 (memento_of_get_type::make_debug_string): Likewise.
1897 (memento_of_get_type::write_reproducer): Likewise.
1898 (memento_of_get_pointer::dereference): Likewise.
1899 (memento_of_get_pointer::accepts_writes_from): Likewise.
1900 (memento_of_get_pointer::replay_into): Likewise.
1901 (memento_of_get_pointer::is_int): Likewise.
1902 (memento_of_get_pointer::is_float): Likewise.
1903 (memento_of_get_pointer::is_bool): Likewise.
1904 (memento_of_get_pointer::is_pointer): Likewise.
1905 (memento_of_get_pointer::is_array): Likewise.
1906 (memento_of_get_pointer::make_debug_string): Likewise.
1907 (memento_of_get_pointer::write_reproducer): Likewise.
1908 (memento_of_get_const::dereference): Likewise.
1909 (memento_of_get_const::accepts_writes_from): Likewise.
1910 (memento_of_get_const::unqualified): Likewise.
1911 (memento_of_get_const::is_int): Likewise.
1912 (memento_of_get_const::is_float): Likewise.
1913 (memento_of_get_const::is_bool): Likewise.
1914 (memento_of_get_const::is_pointer): Likewise.
1915 (memento_of_get_const::is_array): Likewise.
1916 (memento_of_get_const::void replay_into): Likewise;
1917 (memento_of_get_const::make_debug_string): Likewise.
1918 (memento_of_get_const::write_reproducer): Likewise.
1919 (memento_of_get_volatile::dereference): Likewise.
1920 (memento_of_get_volatile::unqualified): Likewise.
1921 (memento_of_get_volatile::is_int): Likewise.
1922 (memento_of_get_volatile::is_float): Likewise.
1923 (memento_of_get_volatile::is_bool): Likewise.
1924 (memento_of_get_volatile::is_pointer): Likewise.
1925 (memento_of_get_volatile::is_array): Likewise.
1926 (memento_of_get_volatile::replay_into): Likewise;
1927 (memento_of_get_volatile::make_debug_string): Likewise.
1928 (memento_of_get_volatile::write_reproducer): Likewise.
1929 (array_type::dereference): Likewise.
1930 (array_type::is_int): Likewise.
1931 (array_type::is_float): Likewise.
1932 (array_type::is_bool): Likewise.
1933 (array_type::is_pointer): Likewise.
1934 (array_type::is_array): Likewise.
1935 (array_type::replay_into): Likewise;
1936 (array_type::make_debug_string): Likewise.
1937 (array_type::write_reproducer): Likewise.
1938 (function_type::dereference): Likewise.
1939 (function_type::function_dyn_cast_function_type): Likewise.
1940 (function_type::function_as_a_function_type): Likewise.
1941 (function_type::is_int): Likewise.
1942 (function_type::is_float): Likewise.
1943 (function_type::is_bool): Likewise.
1944 (function_type::is_pointer): Likewise.
1945 (function_type::is_array): Likewise.
1946 (function_type::replay_into): Likewise;
1947 (function_type::make_debug_string): Likewise.
1948 (function_type::write_reproducer): Likewise.
1949 (field::replay_into): Likewise;
1950 (field::write_to_dump): Likewise.
1951 (field::make_debug_string): Likewise.
1952 (field::write_reproducer): Likewise.
1953 (compound_type::dereference): Likewise.
1954 (compound_type::is_int): Likewise.
1955 (compound_type::is_float): Likewise.
1956 (compound_type::is_bool): Likewise.
1957 (compound_type::is_pointer): Likewise.
1958 (compound_type::is_array): Likewise.
1959 (compound_type::has_known_size): Likewise.
1960 (struct_::dyn_cast_struct): Likewise.
1961 (struct_::replay_into): Likewise.
1962 (struct_::access_as_type): Likewise.
1963 (struct_::make_debug_string): Likewise.
1964 (struct_::write_reproducer): Likewise.
1965 (fields::replay_into): Likewise.
1966 (fields::write_to_dump): Likewise.
1967 (fields::make_debug_string): Likewise.
1968 (fields::write_reproducer): Likewise.
1969 (union_::replay_into): Likewise.
1970 (union_::make_debug_string): Likewise.
1971 (union_::write_reproducer): Likewise.
1972 (lvalue::access_as_rvalue): Mark with OVERRIDE.
1973 (param::replay_into): Mark with FINAL OVERRIDE.
1974 (param::visit_children): Likewise.
1975 (param::dyn_cast_param): Likewise.
1976 (param::access_as_rvalue): Likewise.
1977 (param::access_as_lvalue): Likewise.
1978 (param::make_debug_string): Likewise.
1979 (param::write_reproducer): Likewise.
1980 (param::get_precedence): Likewise.
1981 (function::replay_into): Likewise.
1982 (function::write_to_dump): Likewise.
1983 (function::make_debug_string): Likewise.
1984 (function::write_reproducer): Likewise.
1985 (block::write_to_dump): Likewise.
1986 (block::make_debug_string): Likewise.
1987 (block::write_reproducer): Likewise.
1988 (block::replay_into): Likewise.
1989 (global::replay_into): Likewise;
1990 (global::visit_children): Likewise.
1991 (global::write_to_dump): Likewise.
1992 (global::make_debug_string): Likewise.
1993 (global::write_reproducer): Likewise.
1994 (global::get_precedence): Likewise.
1995 (memento_of_new_rvalue_from_const::replay_into): Likewise.
1996 (memento_of_new_rvalue_from_const::visit_children): Likewise.
1997 (memento_of_new_rvalue_from_const::is_constant): Likewise.
1998 (memento_of_new_rvalue_from_const::get_wide_int): Likewise.
1999 (memento_of_new_rvalue_from_const::make_debug_string): Likewise.
2000 (memento_of_new_rvalue_from_const::write_reproducer): Likewise.
2001 (memento_of_new_rvalue_from_const::get_precedence): Likewise.
2002 (memento_of_new_string_literal::replay_into): Likewise.
2003 (memento_of_new_string_literal::visit_children): Likewise.
2004 (memento_of_new_string_literal::make_debug_string): Likewise.
2005 (memento_of_new_string_literal::write_reproducer): Likewise.
2006 (memento_of_new_string_literal::get_precedence): Likewise.
2007 (unary_op::replay_into): Likewise.
2008 (unary_op::visit_children): Likewise.
2009 (unary_op::make_debug_string): Likewise.
2010 (unary_op::write_reproducer): Likewise.
2011 (unary_op::get_precedence): Likewise.
2012 (binary_op::replay_into): Likewise.
2013 (binary_op::visit_children): Likewise.
2014 (binary_op::make_debug_string): Likewise.
2015 (binary_op::write_reproducer): Likewise.
2016 (binary_op::get_precedence): Likewise.
2017 (comparison::replay_into): Likewise.
2018 (comparison::visit_children): Likewise.
2019 (comparison::make_debug_string): Likewise.
2020 (comparison::write_reproducer): Likewise.
2021 (comparison::get_precedence): Likewise.
2022 (cast::replay_into): Likewise.
2023 (cast::visit_children): Likewise.
2024 (cast::make_debug_string): Likewise.
2025 (cast::write_reproducer): Likewise.
2026 (cast::get_precedence): Likewise.
2027 (call::replay_into): Likewise.
2028 (call::visit_children): Likewise.
2029 (call::make_debug_string): Likewise.
2030 (call::write_reproducer): Likewise.
2031 (call::get_precedence): Likewise.
2032 (call_through_ptr::replay_into): Likewise.
2033 (call_through_ptr::visit_children): Likewise.
2034 (call_through_ptr::make_debug_string): Likewise.
2035 (call_through_ptr::write_reproducer): Likewise.
2036 (call_through_ptr::get_precedence): Likewise.
2037 (array_access::replay_into): Likewise.
2038 (array_access::visit_children): Likewise.
2039 (array_access::make_debug_string): Likewise.
2040 (array_access::write_reproducer): Likewise.
2041 (array_access::get_precedence): Likewise.
2042 (access_field_of_lvalue::replay_into): Likewise.
2043 (access_field_of_lvalue::visit_children): Likewise.
2044 (access_field_of_lvalue::make_debug_string): Likewise.
2045 (access_field_of_lvalue::write_reproducer): Likewise.
2046 (access_field_of_lvalue::get_precedence): Likewise.
2047 (access_field_rvalue::replay_into): Likewise.
2048 (access_field_rvalue::visit_children): Likewise.
2049 (access_field_rvalue::make_debug_string): Likewise.
2050 (access_field_rvalue::write_reproducer): Likewise.
2051 (access_field_rvalue::get_precedence): Likewise.
2052 (dereference_field_rvalue::replay_into): Likewise.
2053 (dereference_field_rvalue::visit_children): Likewise.
2054 (dereference_field_rvalue::make_debug_string): Likewise.
2055 (dereference_field_rvalue::write_reproducer): Likewise.
2056 (dereference_field_rvalue::get_precedence): Likewise.
2057 (dereference_rvalue::replay_into): Likewise.
2058 (dereference_rvalue::visit_children): Likewise.
2059 (dereference_rvalue::make_debug_string): Likewise.
2060 (dereference_rvalue::write_reproducer): Likewise.
2061 (dereference_rvalue::get_precedence): Likewise.
2062 (get_address_of_lvalue::replay_into): Likewise.
2063 (get_address_of_lvalue::visit_children): Likewise.
2064 (get_address_of_lvalue::make_debug_string): Likewise.
2065 (get_address_of_lvalue::write_reproducer): Likewise.
2066 (get_address_of_lvalue::get_precedence): Likewise.
2067 (local::replay_into): Likewise.
2068 (local::visit_children): Likewise.
2069 (local::write_to_dump): Likewise.
2070 (local::make_debug_string): Likewise.
2071 (local::write_reproducer): Likewise.
2072 (local::get_precedence): Likewise.
2073 (statement::write_to_dump): Likewise.
2074 (eval::replay_into): Likewise.
2075 (eval::make_debug_string): Likewise.
2076 (eval::write_reproducer): Likewise.
2077 (assignment::replay_into): Likewise.
2078 (assignment::make_debug_string): Likewise.
2079 (assignment::write_reproducer): Likewise.
2080 (assignment_op::replay_into): Likewise.
2081 (assignment_op::make_debug_string): Likewise.
2082 (assignment_op::write_reproducer): Likewise.
2083 (comment::replay_into): Likewise.
2084 (comment::make_debug_string): Likewise.
2085 (comment::write_reproducer): Likewise.
2086 (conditional::replay_into): Likewise.
2087 (conditional::get_successor_blocks): Likewise.
2088 (conditional::make_debug_string): Likewise.
2089 (conditional::write_reproducer): Likewise.
2090 (jump::replay_into): Likewise.
2091 (jump::get_successor_blocks): Likewise.
2092 (jump::make_debug_string): Likewise.
2093 (jump::write_reproducer): Likewise.
2094 (return_::replay_into): Likewise.
2095 (return_::get_successor_blocks): Likewise.
2096 (return_::make_debug_string): Likewise.
2097 (return_::write_reproducer): Likewise.
2098 (case_::replay_into): Likewise.
2099 (case_::write_reproducer): Likewise.
2100 (case_::make_debug_string): Likewise.
2101 (switch_::replay_into): Likewise.
2102 (switch_::get_successor_blocks): Likewise.
2103 (switch_::make_debug_string): Likewise.
2104 (switch_::write_reproducer): Likewise.
2106 2016-02-08 David Malcolm <dmalcolm@redhat.com>
2108 * dummy-frontend.c (jit_langhook_init): Remove
2109 second argument to build_common_tree_nodes to
2112 2016-01-23 Iain Buclaw <ibuclaw@gdcproject.org>
2114 * jit-playback.c: Include pthread.h.
2116 2016-01-19 David Malcolm <dmalcolm@redhat.com>
2119 * jit-playback.c (gcc::jit::playback::compile_to_file::postprocess):
2120 Potentially add the temporary artifact to the tempdir's list of
2121 tempfiles needing additional cleanup.
2122 (gcc::jit::playback::context::extract_any_requested_dumps): Likewise
2124 * jit-tempdir.c (gcc::jit::tempdir::~tempdir): Clean up additional
2126 * jit-tempdir.h (gcc::jit::tempdir::add_temp_file): New method.
2127 (gcc::jit::tempdir::m_tempfiles): New field.
2128 * docs/cp/intro/tutorial04.rst: Update for changes to toyvm.cc.
2129 * docs/examples/tut04-toyvm/toyvm.cc (class compilation_result):
2131 (toyvm_function::compile): Change return type from function ptr
2132 to a compilation_result.
2133 (toyvm_function::get_function_name): New accessor.
2134 (toyvm_function::m_funcname): New field.
2135 (get_function_name): Convert to...
2136 (toyvm_function::make_function_name): ...this new method.
2137 (toyvm_function::parse): Call make_function_name.
2138 (toyvm_function::compile): Convert return type from function ptr
2139 to a compilation_result. Use get_function_name.
2140 (compilation_state::compile): Convert return type from
2141 gcc_jit_result * to a compilation_result.
2142 (test_script): Update for above changes, extracting the code from
2143 the compilation_result.
2145 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2147 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2149 Update copyright years.
2151 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2153 * dummy-frontend.c: Remove unused header files.
2154 * jit-builtins.c: Likewise.
2155 * jit-playback.c: Likewise.
2156 * jit-recording.c: Likewise.
2157 * jit-spec.c: Likewise.
2158 * libgccjit.c: Likewise.
2160 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
2162 * jit-builtins.c: Don't undef DEF_BUILTIN.
2164 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2166 * dummy-frontend.c: Reorder #include's and remove duplicates.
2167 * jit-builtins.c: Likewise.
2168 * jit-playback.c: Likewise.
2169 * jit-recording.c: Likewise.
2170 * libgccjit.c: Likewise.
2172 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2174 * jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
2175 DEF_FUNCTION_TYPE_11): Define.
2176 * jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
2177 DEF_FUNCTION_TYPE_11): Define.
2179 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
2180 Ulrich Drepper <drepper@gmail.com>
2182 * jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use.
2184 2015-09-30 Matthias Klose <doko@ubuntu.com>
2186 * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,
2187 remove DEF_FUNCTION_TYPE_VAR_11.
2188 * jit-builtins.c (builtins_manager::make_type): Define and handle
2189 DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.
2191 2015-08-25 David Malcolm <dmalcolm@redhat.com>
2193 * docs/cp/topics/contexts.rst
2194 (gccjit::context::set_bool_use_external_driver): New.
2195 * docs/internals/test-hello-world.exe.log.txt: Update.
2196 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_5): New.
2197 * docs/topics/contexts.rst
2198 (gcc_jit_context_set_bool_use_external_driver): New.
2199 * jit-common.h (enum inner_bool_option): Add
2200 INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
2201 * jit-playback.c (gcc_driver_name): New global.
2202 (gcc:jit::playback::context::invoke_driver): Split out second
2204 (gcc::jit::playback::context::invoke_embedded_driver): ...this new
2206 (gcc::jit::playback::context::invoke_external_driver): ...this new
2209 (gcc::jit::playback::context::get_inner_bool_option): New.
2210 (gcc::jit::playback::context::invoke_embedded_driver): New.
2211 (gcc::jit::playback::context::invoke_external_driver): New.
2212 * jit-recording.c (inner_bool_option_reproducer_strings):
2213 Add entry for INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
2215 (gccjit::context::set_bool_use_external_driver): New.
2216 * libgccjit.c (gcc_jit_context_set_bool_use_external_driver): New.
2217 * libgccjit.h (gcc_jit_context_set_bool_use_external_driver): New.
2218 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_use_external_driver):
2220 * libgccjit.map (LIBGCCJIT_ABI_5): New.
2221 * notes.txt: Show invocation of embedded copy of driver.
2222 * docs/internals/test-hello-world.exe.log.txt: Update
2224 2015-08-13 David Malcolm <dmalcolm@redhat.com>
2226 * jit-playback.c (invoke_driver): On OS X, add
2227 "-Wl,-undefined,dynamic_lookup" to the driver arguments.
2229 2015-08-03 David Malcolm <dmalcolm@redhat.com>
2231 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
2232 * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY):
2233 We no longer show a profile.
2234 * docs/topics/index.rst (Topic Reference): Add performance.rst.
2235 * docs/topics/performance.rst: New file.
2236 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2237 * jit-playback.c (gcc::jit::playback::context::compile): Add timer
2238 param when constructing the "toplev" instance.
2239 (gcc::jit::playback::context::acquire_mutex): Add timer param when
2240 constructing auto_timevar instance.
2241 (gcc::jit::playback::context::make_fake_args): If we have a timer,
2242 add "-ftime-report".
2243 (gcc::jit::playback::context::invoke_driver): Add timer param when
2244 constructing auto_timevar instance.
2245 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
2246 * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor.
2247 * jit-recording.c: Include timevar.h.
2248 (gcc::jit::recording::context::context): Initialize field "m_timer".
2249 * jit-recording.h: Add forward declaration of class timer.
2250 (gcc::jit::recording::context::set_timer): New method.
2251 (gcc::jit::recording::context::get_timer): New method.
2252 (gcc::jit::recording::context::m_timer): New field.
2253 * libgccjit++.h (gccjit::timer): New class.
2254 (gccjit::auto_time): New class.
2255 (gccjit::context::set_timer): New method.
2256 (gccjit::context::get_timer): New.
2257 (gccjit::timer::timer): New.
2258 (gccjit::timer::push): New.
2259 (gccjit::timer::pop): New.
2260 (timer::print): New.
2261 (timer::get_inner_timer): New.
2262 (timer::release): New.
2263 (auto_time::auto_time): New.
2264 (auto_time::~auto_time): New.
2265 * libgccjit.c: Include timevar.h.
2266 (struct gcc_jit_timer): New.
2267 (gcc_jit_timer_new): New function.
2268 (gcc_jit_timer_release): New function.
2269 (gcc_jit_context_set_timer): New function.
2270 (gcc_jit_context_get_timer): New function.
2271 (gcc_jit_timer_push): New function.
2272 (gcc_jit_timer_pop): New function.
2273 (gcc_jit_timer_print): New function.
2274 * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro.
2275 (gcc_jit_timer): New typedef.
2276 (gcc_jit_timer_new): New function.
2277 (gcc_jit_timer_release): New function.
2278 (gcc_jit_context_set_timer): New function.
2279 (gcc_jit_context_get_timer): New function.
2280 (gcc_jit_timer_push): New function.
2281 (gcc_jit_timer_pop): New function.
2282 (gcc_jit_timer_print): New function.
2283 * libgccjit.map (LIBGCCJIT_ABI_4): New.
2284 (gcc_jit_timer_new): New function.
2285 (gcc_jit_timer_release): New function.
2286 (gcc_jit_context_set_timer): New function.
2287 (gcc_jit_context_get_timer): New function.
2288 (gcc_jit_timer_push): New function.
2289 (gcc_jit_timer_pop): New function.
2290 (gcc_jit_timer_print): New function.
2292 2015-07-23 David Malcolm <dmalcolm@redhat.com>
2294 * jit-playback.c (invoke_driver): Convert local "argvec"
2295 to an auto_argvec, so that it owns copies of the strings,
2296 rather than borrows them, updating ADD_ARG to use xstrdup
2297 and special-casing the NULL terminator to avoid
2298 xstrdup (NULL). Call add_multilib_driver_arguments at the front
2300 (MULTILIB_DEFAULTS): Provide a default definition.
2301 (multilib_defaults_raw): New constant array.
2302 (gcc::jit::playback::context::add_multilib_driver_arguments): New
2305 (gcc::jit::playback::context::add_multilib_driver_arguments): New
2307 * docs/internals/test-hello-world.exe.log.txt: Update.
2308 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2310 2015-07-16 David Malcolm <dmalcolm@redhat.com>
2312 * docs/internals/index.rst (Overview of code structure): Add note
2313 that the implementation is in C++, despite the .c extension.
2314 (Submitting patches): New subsection.
2315 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2317 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
2319 * dummy-frontend.c: Adjust includes for flags.h changes.
2320 * jit-common.h: Likewise.
2321 * jit-playback.c: Likewise.
2323 2015-07-08 David Malcolm <dmalcolm@redhat.com>
2326 * libgccjit.c (gcc_jit_context_new_field): Show name of field in
2327 "unknown size" error message.
2328 (gcc_jit_struct_set_fields): Show name of struct in error message.
2329 (gcc_jit_context_new_global): Show name of global in
2330 "unknown size" error message.
2331 (gcc_jit_function_new_local): Likewise for local.
2333 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
2335 * dummy-frontend.c: Adjust includes.
2336 * jit-common.h: Likewise.
2337 * jit-playback.c: Likewise.
2339 2015-07-07 David Malcolm <dmalcolm@redhat.com>
2342 * jit-recording.h: Within namespace gcc:jit::recording...
2343 (type::has_known_size): New virtual function.
2344 (struct_has_known_size): New function.
2345 * libgccjit.c (gcc_jit_context_new_field): Verify that the type
2347 (gcc_jit_context_new_global): Likewise.
2348 (gcc_jit_function_new_local): Likewise.
2350 2015-07-07 David Malcolm <dmalcolm@redhat.com>
2353 * dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we
2354 handle modes QI, HI, SI, DI, TI.
2356 2015-07-01 David Malcolm <dmalcolm@redhat.com>
2359 * jit-playback.c (jit_mark_addressable): New function.
2360 (gcc::jit::playback::lvalue::get_address): Call
2361 jit_mark_addressable on the underlying tree.
2363 2015-07-01 David Malcolm <dmalcolm@redhat.com>
2365 * docs/topics/types.rst (gcc_jit_context_new_union_type): Add
2367 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2369 2015-07-01 David Malcolm <dmalcolm@redhat.com>
2371 * docs/topics/contexts.rst (gcc_jit_context_set_bool_option):
2372 Clarify lack of lifetime requirements on (const char *) parameter.
2373 * docs/topics/expressions.rst
2374 (gcc_jit_context_new_string_literal): Likewise.
2375 (gcc_jit_context_new_global): Likewise.
2376 * docs/topics/functions.rst (gcc_jit_context_new_param): Likewise.
2377 (gcc_jit_context_new_function): Likewise.
2378 (gcc_jit_function_new_block): Likewise.
2379 (gcc_jit_block_add_comment): Likewise.
2380 * docs/topics/locations.rst (gcc_jit_context_new_location):
2382 * docs/topics/types.rst (gcc_jit_context_new_field): Likewise.
2383 (gcc_jit_context_new_struct_type): Likewise.
2384 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2386 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2388 * docs/cp/topics/functions.rst (Blocks): Add switch statements to
2389 list of ways to terminate a block.
2390 (gccjit::block::end_with_switch): Add function description.
2391 (gccjit::case_): Add class.
2392 (gccjit::context::new_case): Add function description.
2393 * docs/cp/topics/objects.rst: Add "case_" to class hierarchy.
2394 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New.
2395 * docs/topics/functions.rst (Blocks): Add switch statements to
2396 list of ways to terminate a block.
2397 (gcc_jit_block_end_with_switch): Add function description.
2398 (gcc_jit_case): Add type.
2399 (gcc_jit_context_new_case): Add function description.
2400 (gcc_jit_case_as_object): Add function description.
2401 * docs/topics/objects.rst: Add gcc_jit_case to class hierarchy.
2402 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2403 * jit-common.h (gcc::jit::recording::case_): Add forward decl.
2404 (gcc::jit::playback::case_): Add forward decl.
2405 * jit-playback.c (add_case): New function.
2406 (gcc::jit::playback::block::add_switch): New function.
2407 * jit-playback.h (gcc::jit::playback::case_): New struct.
2408 (gcc::jit::playback::block::get_function): New method.
2409 (gcc::jit::playback::block::add_switch): New method.
2410 * jit-recording.c: Within namespace gcc::jit...
2411 (recording::context::new_case): New method.
2412 (recording::function::validate): Update for change to
2413 get_successor_blocks.
2414 (recording::block::end_with_switch): New method.
2415 (recording::block::get_successor_blocks): Update to support an
2416 arbitrary number of successor blocks.
2417 (recording::block::dump_edges_to_dot): Likewise.
2418 (memento_of_new_rvalue_from_const <int>::get_wide_int): New.
2419 (memento_of_new_rvalue_from_const <long>::get_wide_int): New.
2420 (memento_of_new_rvalue_from_const <double>::get_wide_int): New.
2421 (memento_of_new_rvalue_from_const <void *>::get_wide_int): New.
2422 (recording::statement::get_successor_blocks): Update to support an
2423 arbitrary number of successor blocks.
2424 (recording::conditional::get_successor_blocks): Likewise.
2425 (recording::jump::get_successor_blocks): Likewise.
2426 (recording::return_::get_successor_blocks): Likewise.
2427 (recording::case_::write_reproducer): New.
2428 (recording::case_::make_debug_string): New.
2429 (recording::switch_::switch_): New.
2430 (recording::switch_::replay_into): New.
2431 (recording::switch_::get_successor_blocks): New.
2432 (recording::switch_::make_debug_string): New.
2433 (recording::switch_::write_reproducer): New.
2434 * jit-recording.h: Within namespace gcc::jit::recording...
2435 (context::new_case): New.
2436 (rvalue::is_constant): New.
2437 (rvalue::get_wide_int): New.
2438 (block::end_with_switch): New.
2439 (block::get_successor_blocks): Update to support an arbitrary
2440 number of successor blocks.
2441 (memento_of_new_rvalue_from_const::is_constant): New.
2442 (memento_of_new_rvalue_from_const::get_wide_int): New.
2443 (statement::get_successor_blocks): Update to support an arbitrary
2444 number of successor blocks.
2445 (conditional::get_successor_blocks): Likewise.
2446 (jump::get_successor_blocks): Likewise.
2447 (return_::get_successor_blocks): Likewise.
2448 (case_): New subclass of memento.
2449 (switch_): New subclass of statement.
2450 * libgccjit++.h (gccjit::case_): New subclass of gccjit::object.
2451 (gccjit::context::new_case): New method.
2452 (gccjit::block::end_with_switch): New method.
2453 (gccjit::case_::case): New ctors.
2454 (gccjit::case_::get_inner_case): New method.
2455 * libgccjit.c: Include "typed-splay-tree.h"
2456 (struct gcc_jit_case): New.
2457 (gcc_jit_context_new_case): New function.
2458 (gcc_jit_case_as_object): New function.
2459 (valid_dest_for_switch): New function.
2460 (valid_case_for_switch): New function.
2461 (class api_call_validator): New class.
2462 (class case_range_validator): New class.
2463 (case_range_validator::case_range_validator): New.
2464 (case_range_validator::validate): New.
2465 (case_range_validator::case_compare): New.
2466 (case_range_validator::get_wide_int): new.
2467 (gcc_jit_block_end_with_switch): New.
2468 * libgccjit.h: Add gcc_jit_case to class hierarchy comment.
2469 (gcc_jit_case): New typedef.
2470 (gcc_jit_context_new_case): New function.
2471 (gcc_jit_case_as_object): New function.
2472 (gcc_jit_block_end_with_switch): New function.
2473 (LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New.
2474 * libgccjit.map: Add gcc_jit_block_end_with_switch,
2475 gcc_jit_case_as_object and gcc_jit_context_new_case.
2477 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2480 * docs/cp/topics/contexts.rst
2481 (gccjit::context::set_bool_allow_unreachable_blocks): New.
2482 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New.
2483 * docs/topics/contexts.rst (Options): Add notes discussing the
2484 transition from enums to entrypoints for new options.
2485 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
2486 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2487 * jit-common.h (gcc::jit::inner_bool_option): New enum.
2488 * jit-recording.c: Within namespace gcc::jit...
2489 (recording::context::context): Handle m_inner_bool_options.
2490 (recording::context::set_inner_bool_option): New.
2491 (inner_bool_option_reproducer_strings): New.
2492 (recording::context::log_all_options): Log the "inner" bool
2494 (recording::context::log_inner_bool_option): New.
2495 (recording::context::dump_reproducer_to_file): Write initializers
2496 for "inner" bool options.
2497 (recording::function::validate): Don't check for block
2498 reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set.
2499 * jit-recording.h: Within namespace gcc::jit...
2500 (recording::context::set_inner_bool_option): New.
2501 (recording::context::get_inner_bool_option): New.
2502 (recording::context::log_inner_bool_option): New.
2503 (recording::context::m_inner_bool_options): New.
2505 (gccjit::context::set_bool_allow_unreachable_blocks): New.
2507 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
2508 * libgccjit.h: Add note about options present in the
2509 initial release of libgccjit.
2510 (gcc_jit_context_set_bool_allow_unreachable_blocks): New API
2512 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks):
2514 * libgccjit.map (LIBGCCJIT_ABI_2): New, containing...
2515 (gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new
2518 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2521 * docs/cp/topics/contexts.rst (Additional command-line options):
2523 * docs/topics/compatibility.rst: New file.
2524 * docs/topics/contexts.rst (Additional command-line options): New
2526 * docs/topics/index.rst: Add compatibility.rst.
2527 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2528 * jit-playback.c (make_fake_args): Add call to
2529 append_command_line_options.
2530 * jit-recording.c: Within namespace gcc::jit...
2531 (recording::context::~context): Free the optnames within
2532 m_command_line_options.
2533 (recording::context::set_bool_option): Likewise.
2534 (recording::context::add_command_line_option): New method.
2535 (recording::context::append_command_line_options): New method.
2536 (recording::context::dump_reproducer_to_file): Add command-line
2538 * jit-recording.h: Within namespace gcc::jit...
2539 (recording::context::add_command_line_option): New method.
2540 (recording::context::append_command_line_options): New method.
2541 (recording::context::m_command_line_options): New field.
2542 * libgccjit++.h (gccjit::context::add_command_line_option): New
2544 * libgccjit.c (gcc_jit_context_add_command_line_option): New API
2546 * libgccjit.h (gcc_jit_context_add_command_line_option): New API
2548 (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New
2550 * libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add
2551 LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option.
2553 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2556 (gcc::jit::recording::context::dump_reproducer_to_file):
2557 Add pragma to generated reproducers to disable -Wunused-variable.
2558 Fix handling of NULL string options.
2560 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2562 * docs/cp/topics/expressions.rst: Remove stray semicolon.
2563 * docs/cp/topics/functions.rst: Remove stray backslash.
2564 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2566 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
2568 * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
2569 * jit-playback.c: Likewise.
2571 2015-06-25 Andrew Macleod <amacleod@redhat.com>
2573 * jit-common.h: Don't include alias.h.
2575 2015-06-17 David Malcolm <dmalcolm@redhat.com>
2577 * libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field
2578 is for the correct struct.
2579 (gcc_jit_rvalue_access_field): Likewise.
2581 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2583 * dummy-frontend.c: Do not include input.h, line-map.h or is-a.h.
2584 * jit-common.h: Likewise.
2585 * jit-playback.c: Likewise.
2587 2015-06-16 David Malcolm <dmalcolm@redhat.com>
2590 * jit-recording.c: Within namespace gcc::jit::recording::
2591 (rvalue::get_debug_string_parens): New function.
2592 (binary_op::make_debug_string): Update to mimic C precedence
2594 (binary_op_precedence): New array.
2595 (binary_op::get_precedence): New function.
2596 (comparison::make_debug_string): Update to mimic C precedence
2598 (comparison_precedence): New array.
2599 (comparison::get_precedence): New function.
2600 (cast::make_debug_string): Update to mimic C precedence rules.
2601 (call::make_debug_string): Likewise.
2602 (call_through_ptr::make_debug_string): Likewise.
2603 (array_access::make_debug_string): Likewise.
2604 (access_field_of_lvalue::make_debug_string): Likewise.
2605 (access_field_rvalue::make_debug_string): Likewise.
2606 (dereference_field_rvalue::make_debug_string): Likewise.
2607 (dereference_rvalue::make_debug_string): Likewise.
2608 (get_address_of_lvalue::make_debug_string): Likewise.
2609 * jit-recording.h: Within namespace gcc::jit::recording::
2610 (precedence): New enum.
2611 (rvalue::rvalue): Initialize field "m_parenthesized_string".
2612 (rvalue::get_debug_string_parens): New method.
2613 (rvalue::get_precedence): New pure virtual function.
2614 (rvalue::m_parenthesized_string): New field.
2615 (param::get_precedence): New function.
2616 (global::get_precedence): New function.
2617 (memento_of_new_rvalue_from_const::get_precedence): New function.
2618 (memento_of_new_string_literal::get_precedence): New function.
2619 (unary_op::get_precedence): New function.
2620 (binary_op::get_precedence): New function.
2621 (comparison::get_precedence): New function.
2622 (cast::get_precedence): New function.
2623 (call::get_precedence): New function.
2624 (call_through_ptr::get_precedence): New function.
2625 (array_access::get_precedence): New function.
2626 (access_field_of_lvalue::get_precedence): New function.
2627 (access_field_rvalue::get_precedence): New function.
2628 (dereference_field_rvalue::get_precedence): New function.
2629 (dereference_rvalue::get_precedence): New function.
2630 (get_address_of_lvalue::get_precedence): New function.
2631 (local::get_precedence): New function.
2633 2015-06-09 Matthias Klose <doko@ubuntu.com>
2635 * Make-lang.in (jit.install-common): Install headers using INSTALL_DATA.
2637 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
2639 * dummy-frontend.c : Adjust include files.
2640 * jit-common.h : Likewise.
2641 * jit-playback.c : Likewise.
2643 2015-06-05 David Malcolm <dmalcolm@redhat.com>
2646 (jit_langhook_post_compilation_parsing_cleanups): Remove.
2647 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
2648 * jit-playback.c (gcc::jit::playback::context::new_global): Add
2649 call to varpool_node::finalize_decl.
2650 (gcc::jit::playback::context::finalize_global_decls): Remove.
2652 (gcc::jit::playback::context::finalize_global_decls): Remove.
2654 2015-06-05 David Malcolm <dmalcolm@redhat.com>
2656 * dummy-frontend.c (jit_langhook_write_globals): Rename to...
2657 (jit_langhook_post_compilation_parsing_cleanups): ...this, and
2658 eliminate calls to finalize_compilation_unit and
2659 write_global_decls_2.
2660 (LANG_HOOKS_WRITE_GLOBALS): Rename to...
2661 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
2662 redirect from jit_langhook_write_globals to
2663 jit_langhook_post_compilation_parsing_cleanups.
2665 (gcc::jit::playback::context::write_global_decls_1): Rename to...
2666 (gcc::jit::playback::context::finalize_global_decls): ...this.
2667 (gcc::jit::playback::context::write_global_decls_1): Delete.
2669 (gcc::jit::playback::context::write_global_decls_1): Rename to...
2670 (gcc::jit::playback::context::finalize_global_decls): ...this.
2671 (gcc::jit::playback::context::write_global_decls_1): Delete.
2673 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
2675 * dummy-frontend.c: Adjust includes for restructured coretypes.h.
2676 * jit-common.h: Likewise.
2677 * jit-playback.c: Likewise.
2679 2015-05-12 David Malcolm <dmalcolm@redhat.com>
2681 * jit-builtins.c: Include vec.h before target.h.
2683 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2685 * Make-lang.in (jit.mostlyclean): Remove shared libraries and object
2688 2015-04-09 David Malcolm <dmalcolm@redhat.com>
2691 * docs/cp/topics/expressions.rst (Simple expressions): Fix copy
2692 and paste error in description of gccjit::context::one.
2693 * docs/topics/expressions.rst (Simple expressions): Likewise in
2694 description of gcc_jit_context_one.
2695 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2697 2015-03-13 Uros Bizjak <ubizjak@gmail.com>
2699 * jit-recording.c (dump::write): Also check vasprintf return value.
2700 (recording::context::add_error_va): Ditto.
2701 (recording::string::from_printf): Ditto.
2703 2015-03-13 David Malcolm <dmalcolm@redhat.com>
2705 * docs/internals/index.rst (Packaging notes): New section.
2706 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2708 2015-03-05 David Malcolm <dmalcolm@redhat.com>
2710 * docs/cp/intro/tutorial03.rst: Add missing arguments to
2711 gccjit::block::end_with_conditional call. Add on_true/on_false
2712 comments. Tweak the wording.
2713 * docs/intro/tutorial03.rst: Add missing arguments to
2714 gcc_jit_block_end_with_conditional call. Add some clarifying
2716 * docs/topics/compilation.rst: Tweak the wording to avoid an
2717 ambiguous use of "this".
2718 * docs/topics/contexts.rst: Fix a typo.
2719 * docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
2721 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2723 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
2726 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8)
2727 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
2728 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2729 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8)
2730 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
2731 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2733 2015-02-04 David Malcolm <dmalcolm@redhat.com>
2736 * docs/conf.py (html_theme): Change from 'pyramid'
2739 2015-02-04 David Malcolm <dmalcolm@redhat.com>
2741 * docs/topics/contexts.rst (gcc_jit_context_acquire): Fix
2743 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2745 2015-02-03 David Malcolm <dmalcolm@redhat.com>
2747 * jit-logging.h (gcc::jit::log_user::log): Make const.
2748 * jit-recording.c (gcc::jit::recording::context::set_str_option):
2749 Log the new value of the option.
2750 (gcc::jit::recording::context::set_int_option): Likewise.
2751 (gcc::jit::recording::context::set_bool_option): Likewise.
2752 (gcc::jit::recording::context::compile): Log the value of all
2754 (gcc::jit::recording::context::compile_to_file): Likewise.
2755 (gcc::jit::recording::context::log_all_options): New function.
2756 (gcc::jit::recording::context::log_str_option): New function.
2757 (gcc::jit::recording::context::log_int_option): New function.
2758 (gcc::jit::recording::context::log_bool_option): New function.
2759 * jit-recording.h (gcc::jit::recording::context::log_all_options):
2761 (gcc::jit::recording::context::log_str_option): New function.
2762 (gcc::jit::recording::context::log_int_option): New function.
2763 (gcc::jit::recording::context::log_bool_option): New function.
2764 * docs/internals/test-hello-world.exe.log.txt: Update for above
2766 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2768 2015-02-03 David Malcolm <dmalcolm@redhat.com>
2771 * Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o.
2772 (LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS.
2773 * jit-playback.c: Include gcc.h.
2774 (gcc::jit::playback::context::compile): Move mutex acquisition
2775 to before the call to make_fake_args.
2776 (append_arg_from_driver): New function.
2777 (gcc::jit::playback::context::make_fake_args): On the first call,
2778 call into driver_get_configure_time_options to get configure-time
2779 default options and cache them. Add them to the args for
2781 * jit-spec.c: New source file.
2782 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
2784 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2786 2015-02-02 David Malcolm <dmalcolm@redhat.com>
2789 * dummy-frontend.c (jit_langhook_type_for_mode): Support
2790 TYPE_MODE (long_long_integer_type_node).
2792 2015-01-27 David Malcolm <dmalcolm@redhat.com>
2794 * docs/internals/test-hello-world.exe.log.txt: Add example version
2796 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2797 * jit-common.h (gcc::jit::dump::get_file): New accessor.
2798 * jit-logging.c: Include toplev.h.
2799 (gcc::jit::logger::logger): Log the GCC version.
2800 * jit-recording.c: Include toplev.h.
2801 (gcc:jit::recording::context::dump_reproducer_to_file): Log the
2804 2015-01-26 David Malcolm <dmalcolm@redhat.com>
2806 * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo.
2807 * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The
2808 error buffer is only valid until the next call to the context.
2809 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2810 * libgccjit.h (gcc_jit_context_get_first_error): Reword the
2811 comment to omit mention of compiling.
2812 (gcc_jit_context_get_last_error): The error buffer is only valid
2813 until the next call to the context.
2815 2015-01-26 David Malcolm <dmalcolm@redhat.com>
2818 * config-lang.in (compilers): Drop "libgccjit.so".
2820 2015-01-23 David Malcolm <dmalcolm@redhat.com>
2823 * jit-playback.c (gcc::jit::playback::context::compile): Construct
2824 toplev instances with init_signals=false.
2826 2015-01-19 David Malcolm <dmalcolm@redhat.com>
2828 * docs/cp/topics/results.rst: Rename to...
2829 * docs/cp/topics/compilation.rst: ...this, and add section on
2830 ahead-of-time compilation.
2831 * docs/cp/topics/index.rst: Update for renaming of results.rst
2833 * docs/examples/emit-alphabet.bf: New file, a sample "brainf"
2835 * docs/examples/tut05-bf.c: New file, implementing a compiler
2837 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
2838 changes to logger output.
2839 * docs/intro/index.rst: Add tutorial05.rst
2840 * docs/intro/tutorial05.rst: New file.
2841 * docs/topics/results.rst: Rename to...
2842 * docs/topics/compilation.rst: ...this, and add section on
2843 ahead-of-time compilation.
2844 * docs/topics/index.rst: Update for renaming of results.rst to
2846 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2847 * jit-playback.c (gcc::jit::playback::context::compile): Convert
2848 return type from result * to void. Move the code to convert to
2849 dso and dlopen the result to a new pure virtual "postprocess"
2851 (gcc::jit::playback::compile_to_memory::compile_to_memory): New
2853 (gcc::jit::playback::compile_to_memory::postprocess): New
2854 function, based on playback::context::compile.
2855 (gcc::jit::playback::compile_to_file::compile_to_file): New
2857 (gcc::jit::playback::compile_to_file::postprocess): New function.
2858 (gcc::jit::playback::compile_to_file::copy_file): New function.
2859 (gcc::jit::playback::context::convert_to_dso): Move internals
2861 (gcc::jit::playback::context::invoke_driver): New method. Add
2862 "-shared" and "-c" options to driver's argv as needed.
2863 * jit-playback.h: Include "timevar.h".
2864 (gcc::jit::playback::context::compile): Convert return type from
2866 (gcc::jit::playback::context::postprocess): New pure virtual
2867 function, making this an abstract base class.
2868 (gcc::jit::playback::context::get_tempdir): New accessor.
2869 (gcc::jit::playback::context::invoke_driver): New function.
2870 (class gcc::jit::playback::compile_to_memory): New subclass of
2872 (class gcc::jit::playback::compile_to_file): Likewise.
2873 * jit-recording.c (gcc::jit::recording::context::compile): Use a
2874 playback::compile_to_memory, and extract its result.
2875 (gcc::jit::recording::context::compile_to_file): New function.
2876 * jit-recording.h (gcc::jit::recording::context::compile_to_file):
2878 * libgccjit++.h (gccjit::context::compile_to_file): New method.
2879 * libgccjit.c (gcc_jit_context_compile): Update log message to
2880 clarify that this is an in-memory compile.
2881 (gcc_jit_context_compile_to_file): New function.
2882 * libgccjit.h (gcc_jit_context): Clarify that you can compile
2883 a context more than once, and that you can compile to a file
2884 as well as to memory.
2885 (gcc_jit_result): Clarify that this is the result of an
2886 in-memory compilation.
2887 (gcc_jit_context_compile): Clarify that you can compile, and that
2888 this is an in-memory compilation.
2889 (enum gcc_jit_output_kind): New enum.
2890 (gcc_jit_context_compile_to_file): New function.
2891 (gcc_jit_context_enable_dump): Clarify comment to cover both forms
2893 * libgccjit.map (gcc_jit_context_compile_to_file): New API
2895 * notes.txt: Update to show the playback::context::postprocess
2898 2015-01-19 David Malcolm <dmalcolm@redhat.com>
2901 (gcc::jit::recording::memento_of_new_string_literal::make_debug_string):
2902 Add missing format string.
2904 2015-01-16 David Malcolm <dmalcolm@redhat.com>
2906 * Make-lang.in (lang_checks_parallelized): Add "check-jit".
2907 (check_jit_parallelize): Set this to an arbitrary value (10).
2909 2015-01-16 Jakub Jelinek <jakub@redhat.com>
2911 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of
2913 (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and
2915 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
2918 2015-01-15 Richard Sandiford <richard.sandiford@arm.com>
2920 Update copyright years in docs/.
2922 2015-01-15 David Malcolm <dmalcolm@redhat.com>
2924 * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the
2925 lvalue and the rvalue are of compatible type.
2927 2015-01-13 David Malcolm <dmalcolm@redhat.com>
2929 * docs/cp/topics/contexts.rst (Debugging): Add
2930 gccjit::context::dump_reproducer_to_file.
2931 * docs/internals/index.rst (Design notes): New section,
2932 discussing input validation and
2933 gcc_jit_context_dump_reproducer_to_file.
2934 * docs/topics/contexts.rst (Debugging): Add
2935 gcc_jit_context_dump_reproducer_to_file.
2936 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2937 * jit-common.h (gcc::jit::dump::get_context): New accessor.
2938 * jit-recording.c: Include "hash-map.h".
2939 Within namespace ::gcc::jit...
2940 (dump::write): Flush each line.
2941 (dump::make_location): Pass false for new param "created_by_user".
2942 (class allocator): New class.
2943 (allocator::~allocator): New function.
2944 (allocator::xstrdup_printf): New function.
2945 (allocator::xstrdup_printf_va): New function.
2946 (class reproducer): New subclass of dump.
2947 (reproducer::reproducer): New function.
2948 (reproducer::write_params): New function.
2949 (reproducer::write_args): New function.
2950 (reproducer::make_identifier): New function.
2951 (reproducer::make_tmp_identifier): New function.
2952 (reproducer::get_identifier): New pair of functions.
2953 (reproducer::get_identifier_as_rvalue): New function.
2954 (reproducer::get_identifier_as_lvalue): New function.
2955 (reproducer::get_identifier_as_type): New function.
2956 (reproducer::xstrdup_printf): New function.
2957 (recording::context::context): Initialize m_toplevel_ctxt.
2958 (recording::context::new_location): Add param created_by_user.
2959 (str_option_reproducer_strings): New table of strings.
2960 (int_option_reproducer_strings): Likewise.
2961 (bool_option_reproducer_strings): Likewise.
2962 (get_type_enum_strings): Likewise.
2963 (names_of_function_kinds): Likewise.
2964 (global_kind_reproducer_strings): Likewise.
2965 (unary_op_reproducer_strings): Likewise.
2966 (binary_op_reproducer_strings): Likewise.
2967 (comparison_reproducer_strings): Likewise.
2968 Within namespace ::gcc::jit::recording::...
2969 (context::dump_reproducer_to_file): New function.
2970 (string::write_reproducer): Likewise.
2971 (location::write_reproducer): Likewise.
2972 (type::access_as_type): Likewise.
2973 (memento_of_get_type::write_reproducer): Likewise.
2974 (memento_of_get_pointer::write_reproducer): Likewise.
2975 (memento_of_get_const::write_reproducer): Likewise.
2976 (memento_of_get_volatile::write_reproducer): Likewise.
2977 (array_type::write_reproducer): Likewise.
2978 (function_type::write_reproducer): Likewise.
2979 (function_type::write_deferred_reproducer): Likewise.
2980 (field::write_reproducer): Likewise.
2981 (struct_::access_as_type): Likewise.
2982 (struct_::write_reproducer): Likewise.
2983 (union_::write_reproducer): Likewise.
2984 (fields::write_reproducer): Likewise.
2985 (rvalue::access_as_rvalue): Likewise.
2986 (lvalue::access_as_rvalue): Likewise.
2987 (lvalue::access_as_lvalue): Likewise.
2988 (param::access_as_rvalue): Likewise.
2989 (param::access_as_lvalue): Likewise.
2990 (param::write_reproducer): Likewise.
2991 (function::write_reproducer): Likewise.
2992 (block::write_reproducer): Likewise.
2993 (global::write_reproducer): Likewise.
2994 (memento_of_new_rvalue_from_const <int>::write_reproducer):
2996 (memento_of_new_rvalue_from_const <long>::write_reproducer):
2998 (memento_of_new_rvalue_from_const <double>::write_reproducer):
3000 (memento_of_new_rvalue_from_const <void *>::write_reproducer):
3002 (memento_of_new_string_literal::write_reproducer): Likewise.
3003 (unary_op::write_reproducer): Likewise.
3004 (binary_op::write_reproducer): Likewise.
3005 (comparison::write_reproducer): Likewise.
3006 (cast::write_reproducer): Likewise.
3007 (call::write_reproducer): Likewise.
3008 (call_through_ptr::write_reproducer): Likewise.
3009 (array_access::write_reproducer): Likewise.
3010 (access_field_of_lvalue::write_reproducer): Likewise.
3011 (access_field_rvalue::write_reproducer): Likewise.
3012 (dereference_field_rvalue::write_reproducer): Likewise.
3013 (dereference_rvalue::write_reproducer): Likewise.
3014 (get_address_of_lvalue::write_reproducer): Likewise.
3015 (local::write_reproducer): Likewise.
3016 (eval::write_reproducer): Likewise.
3017 (assignment::write_reproducer): Likewise.
3018 (assignment_op::write_reproducer): Likewise.
3019 (comment::write_reproducer): Likewise.
3020 (conditional::write_reproducer): Likewise.
3021 (jump::write_reproducer): Likewise.
3022 (return_::write_reproducer): Likewise.
3023 * jit-recording.h (gcc::jit::reproducer): New forward declararion.
3024 Within namespace ::gcc::jit::recording::...
3025 (context::new_location): Add "created_by_user" param.
3026 (context::dump_reproducer_to_file): New method.
3027 (context::m_toplevel_ctxt): New field.
3028 (memento::write_reproducer): New pure virtual function.
3029 (memento::dyn_cast_location): New virtual function.
3030 (string::write_reproducer):
3031 (location::location): Add "created_by_user" param.
3032 (location::dyn_cast_location): New function.
3033 (location::created_by_user): New accessor.
3034 (location::write_reproducer): New function.
3035 (location::m_created_by_user): New field.
3036 (type::access_as_type): New virtual function.
3037 (location::write_reproducer): Likewise.
3038 (type::access_as_type): Likewise.
3039 (memento_of_get_type::write_reproducer): Likewise.
3040 (memento_of_get_pointer::write_reproducer): Likewise.
3041 (memento_of_get_const::write_reproducer): Likewise.
3042 (memento_of_get_volatile::write_reproducer): Likewise.
3043 (array_type::write_reproducer): Likewise.
3044 (function_type::write_reproducer): Likewise.
3045 (function_type::write_deferred_reproducer): Likewise.
3046 (field::write_reproducer): Likewise.
3047 (struct_::access_as_type): Likewise.
3048 (struct_::write_reproducer): Likewise.
3049 (union_::write_reproducer): Likewise.
3050 (union_::m_fields): Remove stray unused field.
3051 (fields::length): New accessor.
3052 (fields::get_field): New accessor.
3053 (fields::write_reproducer): New function.
3054 (rvalue::access_as_rvalue): Likewise.
3055 (lvalue::access_as_rvalue): Likewise.
3056 (lvalue::access_as_lvalue): Likewise.
3057 (param::access_as_rvalue): Likewise.
3058 (param::access_as_lvalue): Likewise.
3059 (param::write_reproducer): Likewise.
3060 (function::write_reproducer): Likewise.
3061 (block::write_reproducer): Likewise.
3062 (global::write_reproducer): Likewise.
3063 (memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer):
3065 (memento_of_new_string_literal::write_reproducer): Likewise.
3066 (unary_op::write_reproducer): Likewise.
3067 (binary_op::write_reproducer): Likewise.
3068 (comparison::write_reproducer): Likewise.
3069 (cast::write_reproducer): Likewise.
3070 (call::write_reproducer): Likewise.
3071 (call_through_ptr::write_reproducer): Likewise.
3072 (array_access::write_reproducer): Likewise.
3073 (access_field_of_lvalue::write_reproducer): Likewise.
3074 (access_field_rvalue::write_reproducer): Likewise.
3075 (dereference_field_rvalue::write_reproducer): Likewise.
3076 (dereference_rvalue::write_reproducer): Likewise.
3077 (get_address_of_lvalue::write_reproducer): Likewise.
3078 (local::write_reproducer): Likewise.
3079 (eval::write_reproducer): Likewise.
3080 (assignment::write_reproducer): Likewise.
3081 (assignment_op::write_reproducer): Likewise.
3082 (comment::write_reproducer): Likewise.
3083 (conditional::write_reproducer): Likewise.
3084 (jump::write_reproducer): Likewise.
3085 (return_::write_reproducer): Likewise.
3086 * libgccjit++.h (gccjit::context::dump_reproducer_to_file): New.
3087 * libgccjit.c (gcc_jit_context_new_location): Pass "true" as
3088 param "created_by_user".
3089 (gcc_jit_context_dump_reproducer_to_file): New API entrypoint.
3090 * libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API
3092 * libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API
3095 2015-01-12 David Malcolm <dmalcolm@redhat.com>
3097 * jit-recording.c (class gcc::jit::rvalue_usage_validator): New.
3098 (gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New
3100 (gcc::jit::rvalue_usage_validator::visit): New function.
3101 (gcc::jit::recording::rvalue::verify_valid_within_stmt): New
3103 (gcc::jit::recording::rvalue::set_scope): New function.
3104 (gcc::jit::recording::function::function): Call set_scope on each
3105 param, issuing errors for any params that already have a function.
3106 (gcc::jit::recording::block::add_eval): Return the new statement;
3107 update the comment given that some error-checking now happens after
3109 (gcc::jit::recording::block::add_assignment): Likewise.
3110 (gcc::jit::recording::block::add_assignment_op): Likewise.
3111 (gcc::jit::recording::block::add_comment): Likewise.
3112 (gcc::jit::recording::block::end_with_conditional): Likewise.
3113 (gcc::jit::recording::block::end_with_jump): Likewise.
3114 (gcc::jit::recording::block::end_with_return): Likewise.
3115 (gcc::jit::recording::block::validate): Add a comment.
3116 (gcc::jit::recording::unary_op::visit_children): New function.
3117 (gcc::jit::recording::binary_op::visit_children): New function.
3118 (gcc::jit::recording::comparison::visit_children): New function.
3119 (gcc::jit::recording::cast::visit_children): New function.
3120 (gcc::jit::recording::call::visit_children): New function.
3121 (gcc::jit::recording::call_through_ptr::visit_children): New function.
3122 (gcc::jit::recording::array_access::visit_children): New function.
3123 (gcc::jit::recording::access_field_of_lvalue::visit_children): New
3125 (gcc::jit::recording::access_field_rvalue::visit_children): New
3127 (gcc::jit::recording::dereference_field_rvalue::visit_children):
3129 (gcc::jit::recording::dereference_rvalue::visit_children): New
3131 (gcc::jit::recording::get_address_of_lvalue::visit_children): New
3133 * jit-recording.h: Within namespace gcc::jit::recording...
3134 (class rvalue_visitor): New.
3135 (rvalue::rvalue): Initialize m_scope.
3136 (rvalue::get_loc): New accessor.
3137 (rvalue::verify_valid_within_stmt): New function.
3138 (rvalue::visit_children): New pure virtual function.
3139 (rvalue::set_scope): New function.
3140 (rvalue::get_scope): New function.
3141 (rvalue::dyn_cast_param): New function.
3142 (rvalue::m_scope): New field.
3143 (param::visit_children): New empty function.
3144 (param::dyn_cast_param): New function.
3145 (function::get_loc): New function.
3146 (block::add_eval): Return the new statement.
3147 (block::add_assignment): Likewise.
3148 (block::add_assignment_op): Likewise.
3149 (block::add_comment): Likewise.
3150 (block::end_with_conditional): Likewise.
3151 (block::end_with_jump): Likewise.
3152 (block::end_with_return): Likewise.
3153 (global::visit_children): New function.
3154 (memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children):
3156 (memento_of_new_string_literal::visit_children): New function.
3157 (unary_op::visit_children): New function.
3158 (binary_op::visit_children): New function.
3159 (comparison::visit_children): New function.
3160 (cast::visit_children): New function.
3161 (call::visit_children): New function.
3162 (call_through_ptr::visit_children): New function.
3163 (array_access::visit_children): New function.
3164 (access_field_of_lvalue::visit_children): New function.
3165 (access_field_rvalue::visit_children): New function.
3166 (dereference_field_rvalue::visit_children): New function.
3167 (dereference_rvalue::visit_children): New function.
3168 (get_address_of_lvalue::visit_children): New function.
3169 (local::local): Call set_scope.
3170 (local::visit_children): New function.
3171 (statement::get_block): Make public.
3172 * libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro.
3173 (RETURN_NULL_IF_FAIL_PRINTF5): New macro.
3174 (gcc_jit_context_new_function): Verify that each param has
3175 not yet been used for creating another function.
3176 (gcc_jit_block_add_eval): After creating the stmt, verify
3177 that the rvalue expression tree is valid to use within it.
3178 (gcc_jit_block_add_assignment): Likewise for the lvalue and
3179 rvalue expression trees.
3180 (gcc_jit_block_add_assignment_op): Likewise.
3181 (gcc_jit_block_end_with_conditional): Likewise for the boolval
3183 (gcc_jit_block_end_with_return): Likewise for the rvalue
3185 (gcc_jit_block_end_with_void_return): Remove return of "void",
3186 now that block::end_with_return is now non-void.
3188 2015-01-12 David Malcolm <dmalcolm@redhat.com>
3190 * jit-playback.c (gcc::jit::playback::context::read_dump_file):
3191 Add missing fclose on error-handling path.
3193 2015-01-12 David Malcolm <dmalcolm@redhat.com>
3195 * docs/cp/topics/expressions.rst (Global variables): Add
3196 enum gcc_jit_global_kind param to gccjit::context::new_global.
3197 * docs/topics/expressions.rst (Global variables): Likewise.
3198 Document the new enum.
3199 * docs/topics/results.rst (Compilation results): Document
3201 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3202 * dummy-frontend.c (jit_langhook_write_globals): Call into the
3203 playback context's write_global_decls_1 and write_global_decls_2
3204 before and after calling symtab->finalize_compilation_unit ().
3205 * jit-playback.c: Include "debug.h".
3206 (gcc::jit::playback::context::new_global): Add "kind" param and
3207 use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the
3208 underlying VAR_DECL. Call varpool_node::get_create on the
3209 VAR_DECL, and add it to m_globals.
3210 (gcc::jit::playback::context::write_global_decls_1): New function.
3211 (gcc::jit::playback::context::write_global_decls_2): New function.
3212 * jit-playback.h (gcc::jit::playback::context::context): Call
3213 create on m_globals.
3214 (gcc::jit::playback::context::new_global): Add "kind" param.
3215 (gcc::jit::playback::context::write_global_decls_1): New function.
3216 (gcc::jit::playback::context::write_global_decls_2): New function.
3217 (gcc::jit::playback::context::m_globals): New field.
3218 * jit-recording.c (gcc::jit::recording::context::context):
3219 Initialize m_globals.
3220 (gcc::jit::recording::context::new_global): Add param "kind".
3221 Add the new global to m_globals.
3222 (gcc::jit::recording::context::dump_to_file): Dump the globals.
3223 (gcc::jit::recording::global::replay_into): Add field m_kind.
3224 (gcc::jit::recording::global::write_to_dump): New override.
3225 * jit-recording.h (gcc::jit::recording::context::new_global): Add
3227 (gcc::jit::recording::context::m_globals): New field.
3228 (gcc::jit::recording::global::global): Add param kind.
3229 (gcc::jit::recording::global::write_to_dump): New override.
3230 (gcc::jit::recording::global::m_kind): New field.
3231 * jit-result.c (gcc::jit::result::get_global): New function.
3232 * jit-result.h (gcc::jit::result::get_global): New function.
3233 * libgccjit++.h (gccjit::context::new_global): Add "kind" param.
3234 * libgccjit.c (gcc_jit_context_new_global): Likewise.
3235 (gcc_jit_result_get_global): New API entrypoint.
3236 * libgccjit.h (gcc_jit_result_get_global): New API entrypoint.
3237 (enum gcc_jit_global_kind): New enum.
3238 (gcc_jit_context_new_global): API change: add "kind" param.
3239 * libgccjit.map (gcc_jit_result_get_global): New symbol.
3241 2015-01-09 David Malcolm <dmalcolm@redhat.com>
3243 * dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h",
3244 "symtab.h", "inchash.h". Move include of "hash-set.h" much
3246 * jit-builtins.c: Remove redundant includes of "opts.h" and
3248 * jit-common.h: Include "hash-set.h", "input.h", "vec.h",
3249 "double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h".
3250 * jit-playback.c: Include "hashtab.h", "machmode.h", "input.h",
3251 "statistics.h", "vec.h", "double-int.h", "real.h",
3252 "fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h",
3253 "inchash.h", "fold-const.h". Move include of "hash-set.h" to
3255 * jit-recording.c: Remove redundant includes of "opts.h" and
3258 2015-01-09 David Malcolm <dmalcolm@redhat.com>
3260 * docs/cp/topics/expressions.rst (Simple expressions): Use
3261 ":c:type:" for C types. Document new overload of
3262 gcc::jit::context::new_rvalue.
3263 * docs/topics/expressions.rst (Simple expressions): Use
3264 ":c:type:" for C types. Document new entrypoint
3265 gcc_jit_context_new_rvalue_from_long.
3266 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3267 * jit-playback.c: Within namespace gcc::jit::playback...
3268 (context::new_rvalue_from_int): Eliminate in favor of...
3269 (context::new_rvalue_from_const <int>): ...this.
3270 (context::new_rvalue_from_double): Eliminate in favor of...
3271 (context::new_rvalue_from_const <double>): ...this.
3272 (context::new_rvalue_from_const <long>): New.
3273 (context::new_rvalue_from_ptr): Eliminate in favor of...
3274 (context::new_rvalue_from_const <void *>): ...this.
3275 * jit-playback.h: Within namespace gcc::jit::playback...
3276 (context::new_rvalue_from_int): Eliminate in favor of...
3277 (context::new_rvalue_from_const <HOST_TYPE>): ...this.
3278 (context::new_rvalue_from_double): Likewise.
3279 (context::new_rvalue_from_ptr): Likewise.
3280 * jit-recording.c: Within namespace gcc::jit::recording...
3281 (context::new_rvalue_from_int): Eliminate.
3282 (context::new_rvalue_from_double): Likewise.
3283 (context::new_rvalue_from_ptr): Likewise.
3284 (class memento_of_new_rvalue_from_const <int>):
3285 Add explicit specialization.
3286 (class memento_of_new_rvalue_from_const <long>):
3288 (class memento_of_new_rvalue_from_const <double>):
3290 (class memento_of_new_rvalue_from_const <void *>):
3292 (memento_of_new_rvalue_from_int::replay_into):
3294 (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into):
3296 (memento_of_new_rvalue_from_double::replay_into):
3298 (memento_of_new_rvalue_from_ptr::replay_into):
3299 ...and this to be deleted.
3300 (memento_of_new_rvalue_from_int::make_debug_string):
3302 (memento_of_new_rvalue_from_const <int>::make_debug_string):
3304 (memento_of_new_rvalue_from_double::make_debug_string):
3306 (memento_of_new_rvalue_from_const <double>::make_debug_string):
3308 (memento_of_new_rvalue_from_ptr::make_debug_string)
3310 (memento_of_new_rvalue_from_const <void *>::make_debug_string):
3312 (memento_of_new_rvalue_from_const <long>::make_debug_string):
3314 * jit-recording.h: Within namespace gcc::jit::recording...
3315 (context::new_rvalue_from_int): Eliminate.
3316 (context::new_rvalue_from_double): Likewise.
3317 (context::new_rvalue_from_ptr): Likewise, all in favor of...
3318 (context::new_rvalue_from_const <HOST_TYPE>): New family of
3320 (class memento_of_new_rvalue_from_int): Eliminate.
3321 (class memento_of_new_rvalue_from_double): Likewise.
3322 (class memento_of_new_rvalue_from_ptr): Likewise.
3323 (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family
3324 of rvalue subclasses.
3325 * libgccjit++.h (gccjit::context::new_rvalue): New overload, for
3327 * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for
3328 rewriting of recording::context::new_rvalue_from_int to
3329 recording::context::new_rvalue_from_const <int>.
3330 (gcc_jit_context_new_rvalue_from_long): New API entrypoint.
3331 (gcc_jit_context_new_rvalue_from_double): Update for
3332 rewriting of recording::context::new_rvalue_from_double to
3333 recording::context::new_rvalue_from_const <double>.
3334 (gcc_jit_context_new_rvalue_from_ptr): Update for
3335 rewriting of recording::context::new_rvalue_from_ptr to
3336 recording::context::new_rvalue_from_const <void *>.
3337 * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API
3339 * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise.
3341 2015-01-09 David Malcolm <dmalcolm@redhat.com>
3344 * docs/internals/test-hello-world.exe.log.txt: Update, the log now
3345 shows tempdir creation/cleanup.
3346 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3347 * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir
3348 to the list of subclasses in the comment.
3349 * jit-playback.c (gcc::jit::playback::context::context): Add a
3350 comment clarifying when the tempdir gets cleaned up.
3351 (gcc::jit::playback::context::compile): Pass the context's logger,
3352 if any, to the tempdir.
3353 (gcc::jit::playback::context::dlopen_built_dso): When creating the
3354 gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand
3355 over ownership of the tempdir to it.
3356 * jit-result.c: Include "jit-tempdir.h".
3357 (gcc::jit::result::result): Add tempdir param, saving it as
3359 (gcc::jit::result::~result): Delete m_tempdir.
3360 * jit-result.h (gcc::jit::result::result): Add tempdir param.
3361 (gcc::jit::result::m_tempdir): New field.
3362 * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param;
3364 (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit,
3365 and log m_path_template and m_path_tempdir.
3366 (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log
3367 entry/exit, and log the unlink and rmdir calls.
3368 * jit-tempdir.h: Include "jit-logging.h".
3369 (class gcc::jit::tempdir): Make this be a subclass of log_user.
3370 (gcc::jit::tempdir::tempdir): Add logger param.
3371 * notes.txt: Update to show the two possible places where the
3372 tempdir can be cleaned up.
3374 2015-01-08 David Malcolm <dmalcolm@redhat.com>
3376 * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive
3379 2015-01-08 David Malcolm <dmalcolm@redhat.com>
3381 * docs/topics/contexts.rst (Error-handling): Document new
3382 entrypoint gcc_jit_context_get_last_error.
3383 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3384 * jit-recording.c (gcc::jit::recording::context::context):
3385 Initialize new fields "m_last_error_str" and
3386 "m_owns_last_error_str".
3387 (gcc::jit::recording::context::~context): Clean up
3388 m_last_error_str, if needed.
3389 (gcc::jit::recording::context::add_error_va): Update
3390 m_last_error_str and m_owns_last_error_str, freeing the old
3391 value if appropriate.
3392 (gcc::jit::recording::context::get_last_error): New function.
3393 * jit-recording.h (gcc::jit::recording::context::get_last_error):
3395 (gcc::jit::recording::context): New fields m_last_error_str and
3396 m_owns_last_error_str.
3397 * libgccjit.c (gcc_jit_context_get_last_error): New function.
3398 * libgccjit.h (gcc_jit_context_get_last_error): New declaration.
3399 * libgccjit.map (gcc_jit_context_get_last_error): New function.
3401 2015-01-08 David Malcolm <dmalcolm@redhat.com>
3403 * Make-lang.in (jit_OBJS): Add jit/jit-logging.o.
3404 * docs/internals/index.rst (Overview of code structure): Mention
3405 gcc_jit_context_set_logfile, and embed the example logfile.
3406 * docs/internals/test-hello-world.exe.log.txt: New file: example
3408 * docs/topics/contexts.rst (Debugging): Add documentation
3409 for gcc_jit_context_set_logfile.
3410 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3411 * dummy-frontend.c: Include "jit-logging.h".
3412 (jit_langhook_init): Assert that there is an active playback
3413 context. If it has a logger, log entry/exit to this function.
3414 (jit_langhook_write_globals): Likewise.
3415 * jit-common.h (gcc::jit::logger): New forward declaration.
3416 * jit-logging.c: New file.
3417 * jit-logging.h: New file.
3418 * jit-playback.c: Include "jit-logging.h".
3419 (gcc::jit::playback::context::context): Initialize the log_user
3420 base class from the recording context's logger (if any). Use
3421 JIT_LOG_SCOPE to log entry/exit from the function body.
3422 (gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to
3423 log entry/exit from the function body.
3424 (gcc::jit::playback::build_stmt_list): Likewise.
3425 (gcc::jit::playback::function::postprocess): Likewise.
3426 (gcc::jit::playback::context::compile): Likewise. Log the
3427 entry/exit to toplev::main and toplev::finalize. Log the
3428 fake argv passed to toplev::main.
3429 (gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to
3430 log entry/exit from the function body.
3431 (gcc::jit::playback::context::release_mutex): Likewise.
3432 (gcc::jit::playback::context::make_fake_args): Likewise.
3433 (gcc::jit::playback::context::extract_any_requested_dumps):
3435 (gcc::jit::playback::context::convert_to_dso): Likewise. Also,
3436 log the arguments that the driver is invoked with.
3437 (gcc::jit::playback::context::dlopen_built_dso): Likewise. Pass
3438 the logger to the result object.
3439 (gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to
3440 log entry/exit from the function body.
3441 (gcc::jit::playback::context::dump_generated_code): Likewise.
3442 (gcc::jit::playback::context::handle_locations): Likewise.
3443 * jit-playback.h (gcc::jit::playback::context): Make this be
3444 a subclass of gcc::jit::log_user.
3445 * jit-recording.c: Include "jit-logging.h".
3446 (gcc::jit::recording::context::context: Initialize the logger to
3447 NULL for root contexts, or to the parent's logger for child
3449 (gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to
3450 log entry/exit from the function body.
3451 (gcc::jit::recording::context::replay_into): Likewise.
3452 (gcc::jit::recording::context::disassociate_from_playback):
3454 (gcc::jit::recording::context::compile): Likewise.
3455 (recording::context::add_error_va): Likewise. Also, log the
3457 (gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to
3458 log entry/exit from the function body.
3459 * jit-recording.h: Include "jit-logging.h".
3460 (gcc::jit::recording::context): Make this be a subclass of
3462 * jit-result.c: Include "jit-common.h" and "jit-logging.h".
3463 (gcc::jit::result::result): Add logger param, recording it.
3464 Use JIT_LOG_SCOPE to log entry/exit from the function body.
3465 (gcc::jit::result::~result(): Use JIT_LOG_SCOPE to
3466 log entry/exit from the function body.
3467 (gcc::jit::result::get_code): Likewise.
3468 * jit-result.h (gcc::jit::result): Make this be a subclass of
3470 (gcc::jit::result::result): Add logger parameter.
3471 * libgccjit++.h (gccjit::context::set_logfile): New function.
3472 * libgccjit.c: Include "jit-logging.h".
3473 (gcc_jit_context_acquire): Log the context.
3474 (gcc_jit_context_release): Use JIT_LOG_FUNC to
3475 log entry/exit from the function body, and log the context.
3476 (gcc_jit_context_new_child_context): Likewise, logging both
3478 (gcc_jit_context_new_location): Use JIT_LOG_FUNC to
3479 log entry/exit from the function body.
3480 (gcc_jit_context_get_type): Likewise.
3481 (gcc_jit_context_get_int_type): Likewise.
3482 (gcc_jit_context_new_array_type): Likewise.
3483 (gcc_jit_context_new_field): Likewise.
3484 (gcc_jit_context_new_struct_type): Likewise.
3485 (gcc_jit_context_new_opaque_struct): Likewise.
3486 (gcc_jit_struct_set_fields): Likewise.
3487 (gcc_jit_context_new_union_type): Likewise.
3488 (gcc_jit_context_new_function_ptr_type): Likewise.
3489 (gcc_jit_context_new_param): Likewise.
3490 (gcc_jit_context_new_function): Likewise.
3491 (gcc_jit_context_get_builtin_function): Likewise.
3492 (gcc_jit_function_get_param): Likewise.
3493 (gcc_jit_function_dump_to_dot): Likewise.
3494 (gcc_jit_function_new_block): Likewise.
3495 (gcc_jit_context_new_global): Likewise.
3496 (gcc_jit_context_new_rvalue_from_int): Likewise.
3497 (gcc_jit_context_zero): Likewise.
3498 (gcc_jit_context_one): Likewise.
3499 (gcc_jit_context_new_rvalue_from_double): Likewise.
3500 (gcc_jit_context_new_rvalue_from_ptr): Likewise.
3501 (gcc_jit_context_null): Likewise.
3502 (gcc_jit_context_new_string_literal): Likewise.
3503 (gcc_jit_context_new_unary_op): Likewise.
3504 (gcc_jit_context_new_binary_op): Likewise.
3505 (gcc_jit_context_new_comparison): Likewise.
3506 (gcc_jit_context_new_call): Likewise.
3507 (gcc_jit_context_new_call_through_ptr): Likewise.
3508 (gcc_jit_context_new_cast): Likewise.
3509 (gcc_jit_context_new_array_access): Likewise.
3510 (gcc_jit_lvalue_access_field): Likewise.
3511 (gcc_jit_rvalue_access_field): Likewise.
3512 (gcc_jit_rvalue_dereference_field): Likewise.
3513 (gcc_jit_rvalue_dereference): Likewise.
3514 (gcc_jit_lvalue_get_address): Likewise.
3515 (gcc_jit_function_new_local): Likewise.
3516 (gcc_jit_block_add_eval): Likewise.
3517 (gcc_jit_block_add_assignment): Likewise.
3518 (gcc_jit_block_add_assignment_op): Likewise.
3519 (gcc_jit_block_end_with_conditional): Likewise.
3520 (gcc_jit_block_add_comment): Likewise.
3521 (gcc_jit_block_end_with_jump): Likewise.
3522 (gcc_jit_block_end_with_return): Likewise.
3523 (gcc_jit_block_end_with_void_return): Likewise.
3524 (gcc_jit_context_set_str_option): Likewise.
3525 (gcc_jit_context_set_int_option): Likewise.
3526 (gcc_jit_context_set_bool_option): Likewise.
3527 (gcc_jit_context_enable_dump): Likewise.
3528 (gcc_jit_context_compile): Likewise. Also log the context,
3530 (gcc_jit_context_dump_to_file): Likewise.
3531 (gcc_jit_context_set_logfile): New function.
3532 (gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to
3533 log entry/exit from the function body.
3534 (gcc_jit_result_get_code): Likewise. Also log the fnname)
3535 and the ptr to be returned.
3536 (gcc_jit_result_release): Likewise. Also log the result.
3537 * libgccjit.h: Include <stdio.h>, since we need FILE *.
3538 (gcc_jit_context_set_logfile): New declaration.
3539 * libgccjit.map (gcc_jit_context_set_logfile): New.
3541 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3543 * jit-recording.h (gcc::jit::recording::type::is_void): New
3545 (gcc::jit::recording::memento_of_get_type::is_void): New
3546 function, overriding default implementation.
3547 * libgccjit.c (gcc_jit_rvalue_dereference): Verify that
3548 the underlying type is not "void".
3550 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3552 * docs/topics/expressions.rst (Unary Operations): Add
3553 GCC_JIT_UNARY_OP_ABS.
3554 * jit-playback.c (gcc::jit::playback::context::new_unary_op):
3556 * jit-recording.c (unary_op_strings): Likewise.
3557 * libgccjit.c (gcc_jit_context_new_unary_op): Update checking
3558 of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS.
3559 * libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS.
3560 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3562 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3564 * jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix
3567 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3569 * TODO.rst (Test suite): Remove item about running C++ testcases.
3570 * docs/internals/index.rst (Working on the JIT library): Add
3571 "c++" to the enabled languages in the suggested "configure"
3572 invocation, and add a description of why this is necessary.
3573 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3575 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3577 * docs/internals/index.rst: Update to reflect that built
3578 testcases are now test-foo.c.exe, rather than test-foo.exe.
3579 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3581 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3583 Update copyright years.
3585 2014-12-19 David Malcolm <dmalcolm@redhat.com>
3587 * jit-playback.c (gcc::jit::playback::context::build_cast): In
3588 case BOOLEAN_TYPE, don't assume that the source expression is
3591 2014-12-19 David Malcolm <dmalcolm@redhat.com>
3593 * jit-recording.c (gcc::jit::recording::context::context): When
3594 copying string options from a parent context, take a copy of the
3595 underlying buffers, rather than simply copying the pointer.
3597 2014-12-19 David Malcolm <dmalcolm@redhat.com>
3599 * jit-recording.c (gcc::jit::recording::context::set_str_option):
3602 2014-12-11 David Malcolm <dmalcolm@redhat.com>
3604 * docs/cp/topics/contexts.rst (gccjit::context::set_str_option):
3605 Document new function.
3606 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3608 2014-12-10 Ulrich Drepper <drepper@gmail.com>
3610 Minor interface cleanups of libgccjit
3611 * jit-playback.c (convert_to_dso): Use auto_vec instead
3612 of automatic array to build up command line.
3613 * jit-recording.c (recording::context::set_str_option):
3614 Make copy of the string.
3615 (recording::context::~context): Free string options.
3616 * jit-recording.h (recording::context): Adjust type
3617 of m_str_options member.
3618 * libgccjit.h: Adjust comment about
3619 gcc_jit_context_set_str_option parameter being used after
3621 Update comment now that all interfaces are copy strings
3623 * libgccjit++.h (gccjit::context): Add set_str_option
3626 2014-12-10 David Malcolm <dmalcolm@redhat.com>
3628 * docs/cp/index.rst: New file.
3629 * docs/cp/intro/index.rst: New file.
3630 * docs/cp/intro/tutorial01.rst: New file.
3631 * docs/cp/intro/tutorial02.rst: New file.
3632 * docs/cp/intro/tutorial03.rst: New file.
3633 * docs/cp/intro/tutorial04.rst: New file.
3634 * docs/cp/topics/contexts.rst: New file.
3635 * docs/cp/topics/expressions.rst: New file.
3636 * docs/cp/topics/functions.rst: New file.
3637 * docs/cp/topics/index.rst: New file.
3638 * docs/cp/topics/locations.rst: New file.
3639 * docs/cp/topics/objects.rst: New file.
3640 * docs/cp/topics/results.rst: New file.
3641 * docs/cp/topics/types.rst: New file.
3642 * docs/examples/tut01-hello-world.cc: New file.
3643 * docs/examples/tut02-square.c: Fix missing newline in output.
3644 * docs/examples/tut02-square.cc: New file.
3645 * docs/examples/tut03-sum-of-squares.cc: New file.
3646 * docs/examples/tut04-toyvm/toyvm.cc: New file.
3647 * docs/index.rst: Move summary to above the table of contents.
3648 Add text about the C vs C++ APIs.
3649 * docs/topics/contexts.rst: Fix a typo.
3651 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3652 * docs/_build/texinfo/factorial1.png: New file.
3653 * docs/_build/texinfo/sum-of-squares1.png: New file.
3655 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3657 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move
3658 logic for determine "funcname" to new function...
3659 (get_function_name): ...here, adding logic to skip any leading
3660 path from the filename.
3661 (toyvm_function_parse): Use the filename for fn_filename, rather
3662 than "name", so that the debugger can locate the source .toy
3664 (toyvm_function_parse): Don't fclose a NULL FILE *.
3666 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3669 * docs/internals/index.rst (Running under valgrind): New
3671 (docs/_build/texinfo/libgccjit.texi): Regenerate.
3673 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3676 * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o.
3677 * jit-common.h (gcc::jit::tempdir): New forward decl.
3678 * jit-playback.c: Include jit-tempdir.h.
3679 (gcc::jit::playback::context::context): Initialize m_tempdir.
3680 (gcc::jit::playback::context::~context): Move tempdir
3681 cleanup to new file jit-tempdir.c
3682 (make_tempdir_path_template): Move to new file jit-tempdir.c.
3683 (gcc::jit::playback::context::compile): Move tempdir creation
3684 to new tempdir object in new file jit-tempdir.c.
3685 (gcc::jit::playback::context::make_fake_args): Get path from
3686 tempdir object rather than from member data.
3687 (gcc::jit::playback::context::convert_to_dso): Likewise.
3688 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
3689 (gcc::jit::playback::context::dump_generated_code): Likewise.
3690 (gcc::jit::playback::context::get_path_c_file): New function.
3691 (gcc::jit::playback::context::get_path_s_file): New function.
3692 (gcc::jit::playback::context::get_path_so_file): New function.
3693 * jit-playback.h (gcc::jit::playback::context::get_path_c_file):
3695 (gcc::jit::playback::context::get_path_s_file): New function.
3696 (gcc::jit::playback::context::get_path_so_file): New function.
3697 (gcc::jit::playback::context): Move fields "m_path_template",
3698 "m_path_tempdir", "m_path_c_file", "m_path_s_file",
3699 "m_path_so_file" to new jit::tempdir class; add field "m_tempdir".
3700 * jit-tempdir.c: New file.
3701 * jit-tempdir.h: New file.
3703 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3705 * jit-playback.c (gcc::jit::playback::context::compile): Acquire the
3706 mutex here, immediately before using toplev, and release it here, on
3707 each exit path after acquisition.
3708 (jit_mutex): Move this variable here, from jit-recording.c.
3709 (gcc::jit::playback::context::acquire_mutex): New function, based on
3710 code in jit-recording.c.
3711 (gcc::jit::playback::context::release_mutex): Likewise.
3712 * jit-playback.h (gcc::jit::playback::context::acquire_mutex): New
3714 (gcc::jit::playback::context::release_mutex): New function.
3715 * jit-recording.c (jit_mutex): Move this variable to jit-playback.c.
3716 (gcc::jit::recording::context::compile): Move mutex-handling from
3717 here into jit-playback.c's gcc::jit::playback::context::compile.
3718 * notes.txt: Update to show the new locations of ACQUIRE_MUTEX
3721 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3723 * jit-playback.c (gcc::jit::playback::context::compile): Move the
3725 (gcc::jit::playback::context::dlopen_built_dso): ...this new
3727 * jit-playback.h (gcc::jit::playback::context::dlopen_built_dso):
3730 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3733 * docs/topics/contexts.rst (Debugging): Add description of
3734 gcc_jit_context_enable_dump.
3735 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3736 * jit-playback.c: Include context.h.
3737 (class auto_argvec): New class.
3738 (auto_argvec::~auto_argvec): New function.
3739 (gcc::jit::playback::context::compile): Convert fake_args to be
3740 an auto_argvec, so that it can contain dynamically-allocated
3741 strings. Construct a vec of all requested dumps, and pass it to
3742 make_fake_args. Extract requested dumps between the calls to
3743 toplev::main and toplev::finalize.
3744 (gcc::jit::playback::context::make_fake_args): Convert param
3745 "argvec" to be a vec <char *>, and gain a "requested_dumps"
3746 param. Convert to dynamically-allocated arg strings by converting
3747 ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP
3748 for args that are already a copy. Add args for all requested dumps.
3749 (gcc::jit::playback::context::extract_any_requested_dumps): New
3751 (gcc::jit::playback::context::read_dump_file): New function.
3752 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
3753 Convert param "argvec" to be a vec <char *>, and gain a
3754 "requested_dumps" param.
3755 (gcc::jit::playback::context::extract_any_requested_dumps): New
3757 (gcc::jit::playback::context::read_dump_file): New function.
3758 * jit-recording.c (gcc::jit::recording::context::enable_dump): New
3760 (gcc::jit::recording::context::get_all_requested_dumps): New
3762 * jit-recording.h (gcc::jit::recording::requested_dump): New
3764 (gcc::jit::recording::context::enable_dump): New function.
3765 (gcc::jit::recording::context::get_all_requested_dumps): New
3767 (gcc::jit::recording::context::m_requested_dumps): New field.
3768 * libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint.
3769 * libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint.
3770 * libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint.
3772 2014-12-08 David Malcolm <dmalcolm@redhat.com>
3774 * libgccjit++.h: Indent the forward declarations of the classes to
3775 show the inheritance hierarchy.
3777 2014-12-08 David Malcolm <dmalcolm@redhat.com>
3779 * notes.txt: Show the beginning and ending of
3780 recording::context::compile vs playback::context::compile. Show
3781 the creation and unlinking of the tempdir. Show toplev::finalize.
3782 Move "RELEASE MUTEX" to the correct location. Show
3783 gcc_jit_result_release, and indicate where the
3784 dlopen/dlsym/dlclose occur.
3786 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3788 * docs/examples/tut02-square.c (main): Release the context
3789 earlier, to show that this is possible. Update error-handling
3790 to avoid a double-release of the context, and to avoid
3791 releasing a NULL result.
3792 * docs/intro/tutorial02.rst: Discuss gcc_jit_context_release.
3793 * docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize
3794 * docs/topics/results.rst (gcc_jit_result): Mention that this
3795 controls the lifetimes of machine code functions.
3796 (gcc_jit_result_get_code): Spell out the requirements for this
3797 to succeed, and the lifetime of the result.
3798 (gcc_jit_result_release): Mention that this invalidates any code
3799 that was obtained from the result.
3800 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3802 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3805 * docs/intro/tutorial02.rst: Spell out lifetime of generated code.
3806 Add description of error-handling, taken in part from...
3807 * docs/topics/contexts.rst (Error-handling): Expand, and move some
3808 content to tutorial02.rst.
3809 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3811 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3814 * docs/topics/types.rst (Standard types) Add new enum values to
3815 the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT,
3816 GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
3817 Widen the left-hand column so that
3818 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit.
3819 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3821 * jit-builtins.c: Include stringpool.h and jit-playback.h.
3822 Move everything out of the gcc::jit::recording namespace into
3824 (struct builtin_data): Add fields "fnclass", "attr", and
3826 (DEF_BUILTIN): Update macro so populate the new fields.
3827 (builtins_manager::builtins_manager): Update for move out of
3828 recording namespace. Initialize the m_attributes array.
3829 (builtins_manager::get_builtin_function): Likewise.
3830 (builtins_manager::get_builtin_function_by_id): New function.
3831 (builtins_manager::make_builtin_function): Update for move out of
3832 recording namespace. Add fix for PR jit/64020 by detecting
3833 specific builtin ids and having them ensure that builtins for
3834 other ids are created as necessary.
3835 (builtins_manager::get_type): Update for move out of recording
3837 (builtins_manager::make_type): Likewise. Add some missing
3839 (builtins_manager::make_primitive_type): Update for move out of
3840 recording namespace. Implement the three BT_COMPLEX_ cases and
3842 (builtins_manager::make_fn_type): Update for move out of recording
3844 (builtins_manager::make_ptr_type): Likewise.
3845 (builtins_manager::finish_playback): New function.
3846 (builtins_manager::get_class): New function.
3847 (builtins_manager::implicit_p): New function.
3848 (builtins_manager::get_attrs_tree): Two new functions.
3849 (builtins_manager::make_attrs_tree): New function.
3851 * jit-builtins.h: Move everything out of the gcc::jit::recording
3852 namespace into just gcc::jit.
3853 (enum built_in_attribute): New.
3854 (builtins_manager::builtins_manager): Update decl for namespace
3856 (builtins_manager::get_builtin_function): Likewise.
3857 (builtins_manager::get_class): New.
3858 (builtins_manager::implicit_p): New.
3859 (builtins_manager::get_attrs_tree): Two new functions.
3860 (builtins_manager::make_attrs_tree): New function.
3861 (builtins_manager::finish_playback): New.
3862 (builtins_manager::get_builtin_function_by_id): New.
3863 (builtins_manager::make_builtin_function): Update decl for
3865 (builtins_manager::get_type): Likewise.
3866 (builtins_manager::make_type): Likewise.
3867 (builtins_manager::make_primitive_type): Likewise.
3868 (builtins_manager::make_fn_type): Likewise.
3869 (builtins_manager::make_ptr_type): Likewise.
3870 (builtins_manager): Likewise for fields. Add new field
3873 * jit-common.h (NUM_GCC_JIT_TYPES): Update.
3874 (builtins_manager): Update forward decl to reflect namespace
3877 * jit-playback.c: Include attribs.h and jit-builtins.h.
3878 (gcc::jit::playback::context::get_tree_node_for_type): Add cases
3879 for the new COMPLEX_ types.
3880 (gcc::jit::playback::context::new_function): If creating a
3881 builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl,
3882 and call set_builtin_decl.
3883 (gcc::jit::playback::context::replay): If we have a
3884 builtins_manager, call its finish_playback method when we're done.
3887 (gcc::jit::playback::context::get_builtins_manager): New function.
3890 (gcc::jit::recording::context::get_builtins_manager): New function.
3891 (gcc::jit::recording::get_builtin_function): Use
3892 get_builtins_manager, in case we're a child context.
3893 (gcc::jit::recording::memento_of_get_type::dereference): Add the
3895 (gcc::jit::recording::memento_of_get_type::is_int): Likewise.
3896 (gcc::jit::recording::memento_of_get_type::is_float): Likewise.
3897 (gcc::jit::recording::memento_of_get_type::is_bool): Likewise.
3898 (get_type_strings): Likewise.
3901 (gcc::jit::recording::context::get_builtins_manager): New.
3903 * libgccjit.h (enum gcc_jit_types): Add
3904 GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE,
3905 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
3907 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3910 (gcc::jit::recording::builtins_manager::get_builtin_function):
3911 Check for NULL return from make_builtin_function.
3912 (gcc::jit::recording::builtins_manager::make_builtin_function):
3913 Check for NULL return from get_type.
3915 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3917 * jit-playback.c (gcc::jit::playback::context::compile): Move DSO
3918 creation code into...
3919 (gcc::jit::playback::context::convert_to_dso): New function.
3920 * jit-playback.h (gcc::jit::playback::context::convert_to_dso):
3923 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3925 * jit-playback.c (gcc::jit::playback::context::compile): Use an
3926 auto_vec<const char *> rather than a const char *[20] for the
3927 top-level argv, and move the logic to build it to...
3928 (gcc::jit::playback::context::make_fake_args): New function.
3929 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
3932 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3934 * Make-lang.in (jit_OBJS): Add jit/jit-result.o.
3935 * jit-playback.c: Include new header jit-result.h.
3936 (gcc::jit::result::result): Move to new file jit-result.c.
3937 (gcc::jit::result::~result): Likewise.
3938 (gcc::jit::playback::result): Likewise.
3939 * jit-recording.h (class gcc::jit::result): Move to new
3940 header jit-result.h.
3941 * jit-result.c: New file, to contain...
3942 (gcc::jit::result::result): Move here from jit-playback.c,
3943 removing erroneous "playback" namespace from comment.
3944 (gcc::jit::result::~result): Likewise.
3945 (gcc::jit::playback::result): Likewise.
3946 * jit-result.h: New file, to contain...
3947 (class gcc::jit::result): Move from jit-recording.h.
3948 * libgccjit.c: Include jit-result.h.
3949 (gcc_jit_result_get_code): Update comment to reflect move
3951 (gcc_jit_result_release): Likewise.
3953 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3956 * docs/examples/tut04-toyvm/toyvm.c
3957 (toyvm_compiled_function): New typedef.
3958 (toyvm_compiled_func) Rename to...
3959 (toyvm_compiled_code) ...this.
3960 (struct toyvm_compiled_function): New struct.
3961 (toyvm_function_compile): Return a toyvm_compiled_function *
3962 rather than a toyvm_compiled_func, so that the caller can fully
3963 clean things up. Free "funcname".
3964 (test_script): Update for change to toyvm_function_compile.
3965 Clean up the toyvm_compiled_function.
3967 (docs/intro/tutorial04.rst): Update to reflect the above changes,
3968 and to better spell out the lifetime of the compiled code.
3970 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3974 (gcc::jit::recording::builtins_manager::make_fn_type): Call the
3975 context's new_function_type method, rather than directly creating
3976 a function_type instance.
3978 (gcc::jit::recording::context::new_function_type): New method,
3979 adapted from part of...
3980 (gcc::jit::recording::context::new_function_ptr_type): ...this.
3981 Update to call new_function_type.
3983 (gcc::jit::recording::context::new_function_type): New method.
3985 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3988 * jit-playback.c: Ensure that ctxt_progname is non-NULL.
3990 2014-11-19 David Malcolm <dmalcolm@redhat.com>
3993 * jit-playback.c (gcc::jit::playback::compound_type::set_fields):
3994 Convert param from const vec<playback::field *> & to
3995 const auto_vec<playback::field *> *.
3996 (gcc::jit::playback::context::new_function_type): Convert param
3997 "param_types" from vec<type *> * to const auto_vec<type *> *.
3998 (gcc::jit::playback::context::new_function): Convert param
3999 "params" from vec<param *> * to const auto_vec<param *> *.
4000 (gcc::jit::playback::context::build_call): Convert param "args"
4001 from vec<rvalue *> to const auto_vec<rvalue *> *.
4002 (gcc::jit::playback::context::new_call): Likewise.
4003 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
4004 (wrapper_finalizer): New function.
4005 (gcc::jit::playback::wrapper::operator new): Call the finalizer
4006 variant of ggc_internal_cleared_alloc, supplying
4008 (gcc::jit::playback::function::finalizer): New.
4009 (gcc::jit::playback::block::finalizer): New.
4010 (gcc::jit::playback::source_file::finalizer): New.
4011 (gcc::jit::playback::source_line::finalizer): New.
4014 (gcc::jit::playback::context::new_function_type): Convert param
4015 "param_types" from vec<type *> * to const auto_vec<type *> *.
4016 (gcc::jit::playback::context::new_function): Convert param
4017 "params" from vec<param *> * to const auto_vec<param *> *.
4018 (gcc::jit::playback::context::new_call): Convert param
4019 "args" from vec<rvalue *> to const auto_vec<rvalue *> *.
4020 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
4021 (gcc::jit::playback::context::build_call): Likewise.
4022 (gcc::jit::playback::context): Convert fields "m_functions",
4023 "m_source_files", "m_cached_locations" from vec to auto_vec.
4024 (gcc::jit::playback::wrapper::finalizer): New virtual function.
4025 (gcc::jit::playback::compound_type::set_fields): Convert param fro
4026 const vec<playback::field *> & to
4027 const auto_vec<playback::field *> *.
4028 (gcc::jit::playback::function::finalizer): New.
4029 (gcc::jit::playback::block::finalizer): New.
4030 (gcc::jit::playback::source_file::finalizer): New.
4031 (gcc::jit::playback::source_line::finalizer): New.
4034 (gcc::jit::recording::function_type::replay_into): Convert local
4035 from a vec into an auto_vec.
4036 (gcc::jit::recording::fields::replay_into): Likewise.
4037 (gcc::jit::recording::function::replay_into): Likewise.
4038 (gcc::jit::recording::call::replay_into): Likewise.
4039 (gcc::jit::recording::call_through_ptr::replay_into): Likewise.
4041 * jit-recording.h (gcc::jit::recording::context): Convert fields
4042 "m_mementos", "m_compound_types", "m_functions" from vec<> to
4044 (gcc::jit::recording::function_type::get_param_types): Convert
4045 return type from vec<type *> to const vec<type *> &.
4046 (gcc::jit::recording::function_type): Convert field
4047 "m_param_types" from a vec<> to an auto_vec<>.
4048 (gcc::jit::recording::fields): Likewise for field "m_fields".
4049 (gcc::jit::recording::function::get_params): Convert return type
4050 from vec <param *> to const vec<param *> &.
4051 (gcc::jit::recording::function): Convert fields "m_params",
4052 "m_locals", "m_blocks" from vec<> to auto_vec<>.
4053 (gcc::jit::recording::block): Likewise for field "m_statements".
4054 vec<> to auto_vec<>.
4055 (gcc::jit::recording::call): Likewise for field "m_args".
4056 (gcc::jit::recording::call_through_ptr): Likewise.
4058 2014-11-19 David Malcolm <dmalcolm@redhat.com>
4061 * jit-recording.c (recording::function::validate): Convert
4062 "worklist" from vec<> to autovec<> to fix a leak.
4064 2014-11-11 David Malcolm <dmalcolm@redhat.com>
4066 * ChangeLog.jit: New.
4068 * Make-lang.in: New.
4070 * config-lang.in: New.
4071 * docs/Makefile: New.
4072 * docs/_build/texinfo/Makefile: New.
4073 * docs/_build/texinfo/factorial.png: New.
4074 * docs/_build/texinfo/libgccjit.texi: New.
4075 * docs/_build/texinfo/sum-of-squares.png: New.
4076 * docs/conf.py: New.
4077 * docs/examples/tut01-hello-world.c: New.
4078 * docs/examples/tut02-square.c: New.
4079 * docs/examples/tut03-sum-of-squares.c: New.
4080 * docs/examples/tut04-toyvm/Makefile: New.
4081 * docs/examples/tut04-toyvm/factorial.toy: New.
4082 * docs/examples/tut04-toyvm/fibonacci.toy: New.
4083 * docs/examples/tut04-toyvm/toyvm.c: New.
4084 * docs/index.rst: New.
4085 * docs/internals/index.rst: New.
4086 * docs/intro/factorial.png: New.
4087 * docs/intro/index.rst: New.
4088 * docs/intro/sum-of-squares.png: New.
4089 * docs/intro/tutorial01.rst: New.
4090 * docs/intro/tutorial02.rst: New.
4091 * docs/intro/tutorial03.rst: New.
4092 * docs/intro/tutorial04.rst: New.
4093 * docs/topics/contexts.rst: New.
4094 * docs/topics/expressions.rst: New.
4095 * docs/topics/functions.rst: New.
4096 * docs/topics/index.rst: New.
4097 * docs/topics/locations.rst: New.
4098 * docs/topics/objects.rst: New.
4099 * docs/topics/results.rst: New.
4100 * docs/topics/types.rst: New.
4101 * dummy-frontend.c: New.
4102 * jit-builtins.c: New.
4103 * jit-builtins.h: New.
4104 * jit-common.h: New.
4105 * jit-playback.c: New.
4106 * jit-playback.h: New.
4107 * jit-recording.c: New.
4108 * jit-recording.h: New.
4109 * libgccjit++.h: New.
4112 * libgccjit.map: New.
4115 2013-07-26 David Malcolm <dmalcolm@redhat.com>
4119 Copyright (C) 2013-2023 Free Software Foundation, Inc.
4121 Copying and distribution of this file, with or without modification,
4122 are permitted in any medium without royalty provided the copyright
4123 notice and this notice are preserved.