1 2023-10-02 David Malcolm <dmalcolm@redhat.com>
3 * dummy-frontend.cc (jit_langhook_init): Update for change to
4 diagnostic_context callbacks.
6 2023-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8 * jit-playback.cc: Change spelling to macOS.
10 2023-08-29 Guillaume Gomez <guillaume1.gomez@gmail.com>
12 * docs/topics/compatibility.rst: Add documentation for LIBGCCJIT_ABI_25.
13 * docs/topics/types.rst: Add documentation for gcc_jit_type_get_restrict.
15 2023-08-29 Guillaume Gomez <guillaume1.gomez@gmail.com>
17 * jit-playback.cc: Remove trailing whitespace characters.
18 * jit-playback.h: Add get_restrict method.
19 * jit-recording.cc: Add get_restrict methods.
20 * jit-recording.h: Add get_restrict methods.
21 * libgccjit++.h: Add get_restrict methods.
22 * libgccjit.cc: Add gcc_jit_type_get_restrict.
23 * libgccjit.h: Declare gcc_jit_type_get_restrict.
24 * libgccjit.map: Declare gcc_jit_type_get_restrict.
26 2023-02-16 Patrick Palka <ppalka@redhat.com>
28 * jit-dejagnu.h: Mechanically drop static from static inline
29 functions via s/^static inline/inline/g.
30 * jit-recording.h: Likewise.
32 2023-01-07 LIU Hao <lh_mouse@126.com>
35 * jit-w32.h: Define `WIN32_LEAN_AND_MEAN` before <windows.h>.
37 2022-12-21 Martin Liska <mliska@suse.cz>
39 * jit-playback.h: Use unused attribute.
41 2022-12-14 Antoni Boucher <bouanto@zoho.com>
42 Guillaume Gomez <guillaume1.gomez@gmail.com>
45 * jit-recording.h: Add vector_type::is_same_type_as method
47 2022-12-07 Antoni Boucher <bouanto@zoho.com>
48 Guillaume Gomez <guillaume1.gomez@gmail.com>
51 * jit-playback.cc: Fix vector float comparison
52 * jit-playback.h: Update comparison function signature
53 * jit-recording.cc: Update call for "new_comparison" function
54 * jit-recording.h: Fix vector float comparison
56 2022-11-20 Jeff Law <jlaw@ventanamicro.com>
59 * jit-playback.cc (playback::lvale::mark_addressable): Remove
62 2022-11-19 Jonathan Wakely <jwakely@redhat.com>
63 LIU Hao <lh_mouse@126.com>
65 * jit-playback.cc (playback::context::scoped_lock): Define RAII
67 (playback::context::compile): Use scoped_lock to acquire mutex
68 for the active playback context.
69 (jit_mutex): Change to std::mutex.
70 (playback::context::acquire_mutex): Rename to ...
71 (playback::context::lock): ... this.
72 (playback::context::release_mutex): Rename to ...
73 (playback::context::unlock): ... this.
74 * jit-playback.h (playback::context): Rename members and declare
76 * jit-recording.cc (INCLUDE_PTHREAD_H): Remove unused define.
77 * libgccjit.cc (version_mutex): Change to std::mutex.
78 (struct jit_version_info): Use std::lock_guard to acquire and
81 2022-11-14 Martin Liska <mliska@suse.cz>
84 2022-11-09 Martin Liska <mliska@suse.cz>
87 * docs/cp/index.rst: Moved to...
88 * doc/cp/index.rst: ...here.
89 * docs/cp/intro/index.rst: Moved to...
90 * doc/cp/intro/index.rst: ...here.
91 * docs/cp/intro/tutorial01.rst: Moved to...
92 * doc/cp/intro/tutorial01.rst: ...here.
93 * docs/cp/intro/tutorial02.rst: Moved to...
94 * doc/cp/intro/tutorial02.rst: ...here.
95 * docs/cp/intro/tutorial03.rst: Moved to...
96 * doc/cp/intro/tutorial03.rst: ...here.
97 * docs/cp/intro/tutorial04.rst: Moved to...
98 * doc/cp/intro/tutorial04.rst: ...here.
99 * docs/cp/topics/asm.rst: Moved to...
100 * doc/cp/topics/asm.rst: ...here.
101 * docs/cp/topics/compilation.rst: Moved to...
102 * doc/cp/topics/compilation.rst: ...here.
103 * docs/cp/topics/contexts.rst: Moved to...
104 * doc/cp/topics/contexts.rst: ...here.
105 * docs/cp/topics/expressions.rst: Moved to...
106 * doc/cp/topics/expressions.rst: ...here.
107 * docs/cp/topics/functions.rst: Moved to...
108 * doc/cp/topics/functions.rst: ...here.
109 * docs/cp/topics/index.rst: Moved to...
110 * doc/cp/topics/index.rst: ...here.
111 * docs/cp/topics/locations.rst: Moved to...
112 * doc/cp/topics/locations.rst: ...here.
113 * docs/cp/topics/objects.rst: Moved to...
114 * doc/cp/topics/objects.rst: ...here.
115 * docs/cp/topics/types.rst: Moved to...
116 * doc/cp/topics/types.rst: ...here.
117 * docs/examples/emit-alphabet.bf: Moved to...
118 * doc/examples/emit-alphabet.bf: ...here.
119 * docs/examples/tut01-hello-world.c: Moved to...
120 * doc/examples/tut01-hello-world.c: ...here.
121 * docs/examples/tut01-hello-world.cc: Moved to...
122 * doc/examples/tut01-hello-world.cc: ...here.
123 * docs/examples/tut02-square.c: Moved to...
124 * doc/examples/tut02-square.c: ...here.
125 * docs/examples/tut02-square.cc: Moved to...
126 * doc/examples/tut02-square.cc: ...here.
127 * docs/examples/tut03-sum-of-squares.c: Moved to...
128 * doc/examples/tut03-sum-of-squares.c: ...here.
129 * docs/examples/tut03-sum-of-squares.cc: Moved to...
130 * doc/examples/tut03-sum-of-squares.cc: ...here.
131 * docs/examples/tut04-toyvm/Makefile: Moved to...
132 * doc/examples/tut04-toyvm/Makefile: ...here.
133 * docs/examples/tut04-toyvm/factorial.toy: Moved to...
134 * doc/examples/tut04-toyvm/factorial.toy: ...here.
135 * docs/examples/tut04-toyvm/fibonacci.toy: Moved to...
136 * doc/examples/tut04-toyvm/fibonacci.toy: ...here.
137 * docs/examples/tut04-toyvm/toyvm.c: Moved to...
138 * doc/examples/tut04-toyvm/toyvm.c: ...here.
139 * docs/examples/tut04-toyvm/toyvm.cc: Moved to...
140 * doc/examples/tut04-toyvm/toyvm.cc: ...here.
141 * docs/examples/tut05-bf.c: Moved to...
142 * doc/examples/tut05-bf.c: ...here.
143 * docs/index.rst: Moved to...
144 * doc/index.rst: ...here.
145 * docs/internals/index.rst: Moved to...
146 * doc/internals/index.rst: ...here.
147 * docs/internals/test-hello-world.exe.log.txt: Moved to...
148 * doc/internals/test-hello-world.exe.log.txt: ...here.
149 * docs/_build/texinfo/libgccjit-figures/factorial.png: Moved to...
150 * doc/intro/factorial.png: ...here.
151 * docs/intro/index.rst: Moved to...
152 * doc/intro/index.rst: ...here.
153 * docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: Moved to...
154 * doc/intro/sum-of-squares.png: ...here.
155 * docs/intro/tutorial01.rst: Moved to...
156 * doc/intro/tutorial01.rst: ...here.
157 * docs/intro/tutorial02.rst: Moved to...
158 * doc/intro/tutorial02.rst: ...here.
159 * docs/intro/tutorial03.rst: Moved to...
160 * doc/intro/tutorial03.rst: ...here.
161 * docs/intro/tutorial04.rst: Moved to...
162 * doc/intro/tutorial04.rst: ...here.
163 * docs/intro/tutorial05.rst: Moved to...
164 * doc/intro/tutorial05.rst: ...here.
165 * docs/topics/asm.rst: Moved to...
166 * doc/topics/asm.rst: ...here.
167 * docs/topics/compatibility.rst: Moved to...
168 * doc/topics/compatibility.rst: ...here.
169 * docs/topics/compilation.rst: Moved to...
170 * doc/topics/compilation.rst: ...here.
171 * docs/topics/contexts.rst: Moved to...
172 * doc/topics/contexts.rst: ...here.
173 * docs/topics/expressions.rst: Moved to...
174 * doc/topics/expressions.rst: ...here.
175 * docs/topics/function-pointers.rst: Moved to...
176 * doc/topics/function-pointers.rst: ...here.
177 * docs/topics/functions.rst: Moved to...
178 * doc/topics/functions.rst: ...here.
179 * docs/topics/index.rst: Moved to...
180 * doc/topics/index.rst: ...here.
181 * docs/topics/locations.rst: Moved to...
182 * doc/topics/locations.rst: ...here.
183 * docs/topics/objects.rst: Moved to...
184 * doc/topics/objects.rst: ...here.
185 * docs/topics/performance.rst: Moved to...
186 * doc/topics/performance.rst: ...here.
187 * docs/topics/types.rst: Moved to...
188 * doc/topics/types.rst: ...here.
189 * docs/Makefile: Removed.
190 * docs/_build/texinfo/Makefile: Removed.
191 * docs/_build/texinfo/libgccjit-figures/factorial1.png: Removed.
192 * docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: Removed.
193 * docs/_build/texinfo/libgccjit.texi: Removed.
194 * docs/conf.py: Removed.
195 * docs/intro/factorial.png: Removed.
196 * docs/intro/sum-of-squares.png: Removed.
197 * doc/conf.py: New file.
199 2022-11-14 Martin Liska <mliska@suse.cz>
202 2022-11-14 Martin Liska <mliska@suse.cz>
204 * Make-lang.in: Support --with-sphinx-build.
206 2022-11-14 Martin Liska <mliska@suse.cz>
209 2022-11-14 Martin Liska <mliska@suse.cz>
211 * doc/internals/index.rst: Fix cross manual refs.
212 * doc/topics/contexts.rst: Likewise.
214 2022-11-14 Martin Liska <mliska@suse.cz>
217 2022-11-14 Martin Liska <mliska@suse.cz>
220 Support installation if sphinx-build is missing.
222 2022-11-14 Martin Liska <mliska@suse.cz>
225 2022-11-14 Martin Liska <mliska@suse.cz>
227 * doc/cp/index.rst: Remove trailing .rst in toctree.
228 * doc/cp/intro/index.rst: Likewise.
229 * doc/cp/topics/index.rst: Likewise.
230 * doc/index.rst: Likewise.
231 * doc/intro/index.rst: Likewise.
232 * doc/topics/index.rst: Likewise.
233 * doc/indices-and-tables.rst: New file.
235 2022-11-11 Martin Liska <mliska@suse.cz>
237 * doc/cp/index.rst: Remove trailing .rst in toctree.
238 * doc/cp/intro/index.rst: Likewise.
239 * doc/cp/topics/index.rst: Likewise.
240 * doc/index.rst: Likewise.
241 * doc/intro/index.rst: Likewise.
242 * doc/topics/index.rst: Likewise.
243 * doc/indices-and-tables.rst: New file.
245 2022-11-09 Martin Liska <mliska@suse.cz>
248 Support installation if sphinx-build is missing.
250 2022-11-09 Martin Liska <mliska@suse.cz>
252 * doc/internals/index.rst: Fix cross manual refs.
253 * doc/topics/contexts.rst: Likewise.
255 2022-11-09 Martin Liska <mliska@suse.cz>
257 * Make-lang.in: Support --with-sphinx-build.
259 2022-11-09 Martin Liska <mliska@suse.cz>
262 * docs/cp/index.rst: Moved to...
263 * doc/cp/index.rst: ...here.
264 * docs/cp/intro/index.rst: Moved to...
265 * doc/cp/intro/index.rst: ...here.
266 * docs/cp/intro/tutorial01.rst: Moved to...
267 * doc/cp/intro/tutorial01.rst: ...here.
268 * docs/cp/intro/tutorial02.rst: Moved to...
269 * doc/cp/intro/tutorial02.rst: ...here.
270 * docs/cp/intro/tutorial03.rst: Moved to...
271 * doc/cp/intro/tutorial03.rst: ...here.
272 * docs/cp/intro/tutorial04.rst: Moved to...
273 * doc/cp/intro/tutorial04.rst: ...here.
274 * docs/cp/topics/asm.rst: Moved to...
275 * doc/cp/topics/asm.rst: ...here.
276 * docs/cp/topics/compilation.rst: Moved to...
277 * doc/cp/topics/compilation.rst: ...here.
278 * docs/cp/topics/contexts.rst: Moved to...
279 * doc/cp/topics/contexts.rst: ...here.
280 * docs/cp/topics/expressions.rst: Moved to...
281 * doc/cp/topics/expressions.rst: ...here.
282 * docs/cp/topics/functions.rst: Moved to...
283 * doc/cp/topics/functions.rst: ...here.
284 * docs/cp/topics/index.rst: Moved to...
285 * doc/cp/topics/index.rst: ...here.
286 * docs/cp/topics/locations.rst: Moved to...
287 * doc/cp/topics/locations.rst: ...here.
288 * docs/cp/topics/objects.rst: Moved to...
289 * doc/cp/topics/objects.rst: ...here.
290 * docs/cp/topics/types.rst: Moved to...
291 * doc/cp/topics/types.rst: ...here.
292 * docs/examples/emit-alphabet.bf: Moved to...
293 * doc/examples/emit-alphabet.bf: ...here.
294 * docs/examples/tut01-hello-world.c: Moved to...
295 * doc/examples/tut01-hello-world.c: ...here.
296 * docs/examples/tut01-hello-world.cc: Moved to...
297 * doc/examples/tut01-hello-world.cc: ...here.
298 * docs/examples/tut02-square.c: Moved to...
299 * doc/examples/tut02-square.c: ...here.
300 * docs/examples/tut02-square.cc: Moved to...
301 * doc/examples/tut02-square.cc: ...here.
302 * docs/examples/tut03-sum-of-squares.c: Moved to...
303 * doc/examples/tut03-sum-of-squares.c: ...here.
304 * docs/examples/tut03-sum-of-squares.cc: Moved to...
305 * doc/examples/tut03-sum-of-squares.cc: ...here.
306 * docs/examples/tut04-toyvm/Makefile: Moved to...
307 * doc/examples/tut04-toyvm/Makefile: ...here.
308 * docs/examples/tut04-toyvm/factorial.toy: Moved to...
309 * doc/examples/tut04-toyvm/factorial.toy: ...here.
310 * docs/examples/tut04-toyvm/fibonacci.toy: Moved to...
311 * doc/examples/tut04-toyvm/fibonacci.toy: ...here.
312 * docs/examples/tut04-toyvm/toyvm.c: Moved to...
313 * doc/examples/tut04-toyvm/toyvm.c: ...here.
314 * docs/examples/tut04-toyvm/toyvm.cc: Moved to...
315 * doc/examples/tut04-toyvm/toyvm.cc: ...here.
316 * docs/examples/tut05-bf.c: Moved to...
317 * doc/examples/tut05-bf.c: ...here.
318 * docs/index.rst: Moved to...
319 * doc/index.rst: ...here.
320 * docs/internals/index.rst: Moved to...
321 * doc/internals/index.rst: ...here.
322 * docs/internals/test-hello-world.exe.log.txt: Moved to...
323 * doc/internals/test-hello-world.exe.log.txt: ...here.
324 * docs/_build/texinfo/libgccjit-figures/factorial.png: Moved to...
325 * doc/intro/factorial.png: ...here.
326 * docs/intro/index.rst: Moved to...
327 * doc/intro/index.rst: ...here.
328 * docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: Moved to...
329 * doc/intro/sum-of-squares.png: ...here.
330 * docs/intro/tutorial01.rst: Moved to...
331 * doc/intro/tutorial01.rst: ...here.
332 * docs/intro/tutorial02.rst: Moved to...
333 * doc/intro/tutorial02.rst: ...here.
334 * docs/intro/tutorial03.rst: Moved to...
335 * doc/intro/tutorial03.rst: ...here.
336 * docs/intro/tutorial04.rst: Moved to...
337 * doc/intro/tutorial04.rst: ...here.
338 * docs/intro/tutorial05.rst: Moved to...
339 * doc/intro/tutorial05.rst: ...here.
340 * docs/topics/asm.rst: Moved to...
341 * doc/topics/asm.rst: ...here.
342 * docs/topics/compatibility.rst: Moved to...
343 * doc/topics/compatibility.rst: ...here.
344 * docs/topics/compilation.rst: Moved to...
345 * doc/topics/compilation.rst: ...here.
346 * docs/topics/contexts.rst: Moved to...
347 * doc/topics/contexts.rst: ...here.
348 * docs/topics/expressions.rst: Moved to...
349 * doc/topics/expressions.rst: ...here.
350 * docs/topics/function-pointers.rst: Moved to...
351 * doc/topics/function-pointers.rst: ...here.
352 * docs/topics/functions.rst: Moved to...
353 * doc/topics/functions.rst: ...here.
354 * docs/topics/index.rst: Moved to...
355 * doc/topics/index.rst: ...here.
356 * docs/topics/locations.rst: Moved to...
357 * doc/topics/locations.rst: ...here.
358 * docs/topics/objects.rst: Moved to...
359 * doc/topics/objects.rst: ...here.
360 * docs/topics/performance.rst: Moved to...
361 * doc/topics/performance.rst: ...here.
362 * docs/topics/types.rst: Moved to...
363 * doc/topics/types.rst: ...here.
364 * docs/Makefile: Removed.
365 * docs/_build/texinfo/Makefile: Removed.
366 * docs/_build/texinfo/libgccjit-figures/factorial1.png: Removed.
367 * docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: Removed.
368 * docs/_build/texinfo/libgccjit.texi: Removed.
369 * docs/conf.py: Removed.
370 * docs/intro/factorial.png: Removed.
371 * docs/intro/sum-of-squares.png: Removed.
372 * doc/conf.py: New file.
374 2022-09-15 Richard Biener <rguenther@suse.de>
376 * dummy-frontend.cc (jit_langhook_init): Do not initialize
379 2022-08-09 Vibhav Pant <vibhavp@gmail.com>
381 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_context_new_bitcast): Move
382 definition out of comment.
384 2022-07-28 David Malcolm <dmalcolm@redhat.com>
386 * docs/internals/index.rst: Remove reference to ".c" extensions
389 2022-07-28 Martin Liška <mliska@suse.cz>
391 * docs/cp/intro/tutorial02.rst:
392 Shorten the assembly example so that there is not slider.
393 * docs/cp/intro/tutorial04.rst: Likewise.
394 * docs/intro/tutorial02.rst: Likewise.
395 * docs/intro/tutorial04.rst: Likewise.
396 * docs/topics/contexts.rst: Likewise.
398 2022-07-28 marxin <mliska@suse.cz>
400 * docs/index.rst: Remove reference to module index
401 as we don't emit any.
403 2022-07-28 marxin <mliska@suse.cz>
405 * docs/cp/intro/tutorial02.rst: Use :expr:`type *` for pointers to a type
406 * docs/cp/topics/asm.rst: Likewise.
407 * docs/cp/topics/contexts.rst: Likewise.
408 * docs/cp/topics/expressions.rst: Likewise.
409 * docs/cp/topics/functions.rst: Likewise.
410 * docs/cp/topics/objects.rst: Likewise.
411 * docs/intro/tutorial02.rst: Likewise.
412 * docs/intro/tutorial03.rst: Likewise.
413 * docs/intro/tutorial04.rst: Likewise.
414 * docs/intro/tutorial05.rst: Likewise.
415 * docs/topics/compilation.rst: Likewise.
416 * docs/topics/contexts.rst: Likewise.
417 * docs/topics/objects.rst: Likewise.
419 2022-07-28 marxin <mliska@suse.cz>
421 * docs/cp/intro/tutorial04.rst: Use list-table.
422 * docs/intro/tutorial04.rst: Likewise.
423 * docs/intro/tutorial05.rst: Likewise.
424 * docs/topics/compilation.rst: Likewise.
425 * docs/topics/expressions.rst: Likewise.
426 * docs/topics/types.rst: Likewise.
428 2022-07-28 marxin <mliska@suse.cz>
430 * docs/cp/topics/expressions.rst: Compact so that the generated
431 output is also more compact.
433 2022-07-28 marxin <mliska@suse.cz>
435 * docs/cp/intro/tutorial02.rst: Use proper reference.
436 * docs/cp/topics/contexts.rst: Likewise.
437 * docs/cp/topics/functions.rst: Put `class` directive before a
438 function as it is not allowed declaring a class in a fn.
439 * docs/cp/topics/types.rst: Add template keyword.
440 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile):
441 Add removed comment used for code snippet ending detection.
442 * docs/intro/tutorial04.rst: Fix to match the real comment.
444 2022-07-28 marxin <mliska@suse.cz>
446 * docs/cp/topics/expressions.rst: Use :expr: for basic types.
447 * docs/topics/compilation.rst: Likewise.
448 * docs/topics/expressions.rst: Likewise.
449 * docs/topics/function-pointers.rst: Likewise.
451 2022-07-28 marxin <mliska@suse.cz>
453 * docs/conf.py: Add needs_sphinx = '3.0' where c:type was added.
454 * docs/index.rst: Remove note about it.
455 * docs/topics/compilation.rst: Use enum directive and reference.
456 * docs/topics/contexts.rst: Likewise.
457 * docs/topics/expressions.rst: Likewise.
458 * docs/topics/functions.rst: Likewise.
460 2022-07-14 Jonathan Wakely <jwakely@redhat.com>
462 * jit-recording.h (recording::memento): Define copy constructor
463 and copy assignment operator as deleted.
464 (recording::string): Likewise.
465 (recording::string::c_str): Add const qualifier.
467 2022-06-29 Antoni Boucher <bouanto@zoho.com>
470 * jit-playback.cc: Use the correct return type when folding in
473 2022-06-29 Sergei Trofimovich <siarheit@google.com>
476 * jit-playback.cc: Include <pthread.h> via "system.h" to avoid calloc()
478 * jit-recording.cc: Ditto.
479 * libgccjit.cc: Ditto.
481 2022-06-10 Antoni Boucher <bouanto@zoho.com>
484 * libgccjit.cc: Add support for floating-point types in
485 gcc_jit_type_get_size.
487 2022-06-08 Yang Yujie <yangyujie@loongson.cn>
489 * Make-lang.in: only link objects from $(EXTRA_GCC_OBJS)
490 that's not in $(EXTRA_OBJS) into libgccjit.
492 2022-05-23 David Malcolm <dmalcolm@redhat.com>
494 * jit-recording.h: Add "final" and "override" to all vfunc
495 implementations that were missing them, as appropriate.
497 2022-05-20 David Malcolm <dmalcolm@redhat.com>
499 * jit-playback.h: Replace uses of "FINAL" and "OVERRIDE" with
500 "final" and "override".
501 * jit-recording.cc: Likewise.
502 * jit-recording.h: Likewise.
504 2022-05-16 Martin Liska <mliska@suse.cz>
506 * jit-builtins.cc (find_builtin_by_name): Use ARRAY_SIZE.
507 (get_string_for_type_id): Likewise.
508 * jit-recording.cc (recording::context::context): Likewise.
510 2022-04-14 Iain Sandoe <iain@sandoe.co.uk>
512 * jit-playback.cc (new_bitcast): Cast values returned by tree_to_uhwi
513 to 'long' to match the print format.
515 2022-04-12 Antoni Boucher <bouanto@zoho.com>
518 * docs/_build/texinfo/libgccjit.texi: Regenerate.
519 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_24): New ABI tag.
520 * docs/topics/expressions.rst: Add documentation for the
521 functions gcc_jit_lvalue_set_alignment and
522 gcc_jit_lvalue_get_alignment.
523 * jit-playback.h: New function (set_alignment).
524 * jit-recording.cc: New function (set_alignment).
525 * jit-recording.h: New functions (set_alignment, get_alignment)
526 and new field (m_alignment).
527 * libgccjit.cc: New functions (gcc_jit_lvalue_get_alignment,
528 gcc_jit_lvalue_set_alignment)
529 * libgccjit.h: New functions (gcc_jit_lvalue_get_alignment,
530 gcc_jit_lvalue_set_alignment)
531 * libgccjit.map (LIBGCCJIT_ABI_24): New ABI tag.
533 2022-04-12 Antoni Boucher <bouanto@zoho.com>
536 * docs/_build/texinfo/libgccjit.texi: Regenerate.
537 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_23): New ABI tag.
538 * docs/topics/contexts.rst: Add documentation for the new
539 function gcc_jit_context_set_bool_print_errors_to_stderr.
540 * jit-common.h: New enum value
541 (INNER_BOOL_OPTION_PRINT_ERRORS_TO_STDERR).
542 * jit-recording.cc: Handle the new option
543 INNER_BOOL_OPTION_PRINT_ERRORS_TO_STDERR.
544 * libgccjit.cc: New function
545 (gcc_jit_context_set_bool_print_errors_to_stderr).
546 * libgccjit.h: New function
547 (gcc_jit_context_set_bool_print_errors_to_stderr).
548 * libgccjit.map (LIBGCCJIT_ABI_23): New ABI tag.
550 2022-04-12 Antoni Boucher <bouanto@zoho.com>
553 * docs/_build/texinfo/libgccjit.texi: Regenerate.
554 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_22): New ABI tag.
555 * docs/topics/expressions.rst: Add documentation for the
556 function gcc_jit_lvalue_set_register_name.
557 * jit-playback.h: New function (set_register_name).
558 * jit-recording.cc: New function (set_register_name) and add
559 support for register variables.
560 * jit-recording.h: New field (m_reg_name) and new function
562 * libgccjit.cc: New function (gcc_jit_lvalue_set_register_name).
563 * libgccjit.h: New function (gcc_jit_lvalue_set_register_name).
564 * libgccjit.map (LIBGCCJIT_ABI_22): New ABI tag.
566 2022-04-12 Antoni Boucher <bouanto@zoho.com>
569 * docs/_build/texinfo/libgccjit.texi: Regenerate.
570 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_21): New ABI tag.
571 * docs/topics/expressions.rst: Add documentation for the
572 function gcc_jit_context_new_bitcast.
573 * jit-playback.cc: New function (new_bitcast).
574 * jit-playback.h: New function (new_bitcast).
575 * jit-recording.cc: New functions (new_bitcast,
576 bitcast::replay_into, bitcast::visit_children,
577 bitcast::make_debug_string, bitcast::write_reproducer).
578 * jit-recording.h: New class (bitcast) and new function
579 (new_bitcast, bitcast::replay_into, bitcast::visit_children,
580 bitcast::make_debug_string, bitcast::write_reproducer,
581 bitcast::get_precedence).
582 * libgccjit.cc: New function (gcc_jit_context_new_bitcast)
583 * libgccjit.h: New function (gcc_jit_context_new_bitcast)
584 * libgccjit.map (LIBGCCJIT_ABI_21): New ABI tag.
586 2022-04-12 Antoni Boucher <bouanto@zoho.com>
589 * docs/_build/texinfo/libgccjit.texi: Regenerate
590 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_20): New ABI tag.
591 * docs/topics/types.rst: Add documentation for the new types
592 GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T,
593 GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T,
594 GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T, GCC_JIT_TYPE_INT16_T,
595 GCC_JIT_TYPE_INT32_T, GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T and
596 new functions (gcc_jit_compatible_types, gcc_jit_type_get_size).
597 * jit-builtins.cc: Add support for BT_UINT128.
598 * jit-common.h: Update the value of NUM_GCC_JIT_TYPES.
599 * jit-playback.cc: Add support for the sized integer types.
600 * jit-recording.cc: Add support for the sized integer types.
601 * jit-recording.h: Add support for comparing integer types
602 and new function (is_signed).
603 * libgccjit.cc (gcc_jit_compatible_types): New.
604 (gcc_jit_type_get_size) New.
605 * libgccjit.h: New enum variants for gcc_jit_types
606 (GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T,
607 GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T,
608 GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T,
609 GCC_JIT_TYPE_INT16_T, GCC_JIT_TYPE_INT32_T,
610 GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T) and new functions
611 (gcc_jit_compatible_types, gcc_jit_type_get_size).
612 * libgccjit.map (LIBGCCJIT_ABI_20): New ABI tag.
614 2022-04-06 David Malcolm <dmalcolm@redhat.com>
617 * docs/_build/texinfo/factorial.png: Move to...
618 * docs/_build/texinfo/libgccjit-figures/factorial.png: ...here.
619 * docs/_build/texinfo/factorial1.png: Move to...
620 * docs/_build/texinfo/libgccjit-figures/factorial1.png: ...here.
621 * docs/_build/texinfo/sum-of-squares.png: Move to...
622 * docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: ...here.
623 * docs/_build/texinfo/sum-of-squares1.png: Move to...
624 * docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: ...here.
626 2022-04-01 David Malcolm <dmalcolm@redhat.com>
628 * docs/topics/expressions.rst: Fix formatting.
629 * docs/topics/types.rst: Likewise.
630 * docs/_build/texinfo/libgccjit.texi: Regenerate
632 2022-04-01 Petter Tomner <tomner@kth.se>
634 * docs/topics/compatibility.rst: Add 19 tag
635 * docs/topics/compilation.rst: Linking
636 * docs/topics/contexts.rst: Linking example
637 * docs/topics/expressions.rst: Fix formatting and dropped 's'
639 2022-03-07 Jakub Jelinek <jakub@redhat.com>
641 * libgccjit.h: Fix up duplicated word issue in a comment.
643 2022-01-17 Martin Liska <mliska@suse.cz>
645 * config-lang.in: Rename .c names to .cc.
646 * docs/_build/texinfo/libgccjit.texi: Likewise.
647 * docs/internals/index.rst: Likewise.
648 * jit-builtins.cc (builtins_manager::make_builtin_function): Likewise.
649 * jit-playback.cc (fold_const_var): Likewise.
650 (playback::context::~context): Likewise.
651 (new_field): Likewise.
652 (new_bitfield): Likewise.
653 (new_compound_type): Likewise.
654 (playback::compound_type::set_fields): Likewise.
655 (global_set_init_rvalue): Likewise.
656 (load_blob_in_ctor): Likewise.
657 (new_global_initialized): Likewise.
659 (new_string_literal): Likewise.
660 (as_truth_value): Likewise.
661 (build_call): Likewise.
662 (playback::context::build_cast): Likewise.
663 (new_array_access): Likewise.
664 (new_field_access): Likewise.
665 (dereference): Likewise.
666 (postprocess): Likewise.
667 (add_jump): Likewise.
668 (add_switch): Likewise.
669 (build_goto_operands): Likewise.
670 (playback::context::read_dump_file): Likewise.
671 (init_types): Likewise.
672 * jit-recording.cc (recording::context::get_int_type): Likewise.
673 * jit-recording.h: Likewise.
674 * libgccjit.cc (compatible_types): Likewise.
675 (gcc_jit_context_acquire): Likewise.
676 (gcc_jit_context_release): Likewise.
677 (gcc_jit_context_new_child_context): Likewise.
678 (gcc_jit_type_as_object): Likewise.
679 (gcc_jit_context_get_type): Likewise.
680 (gcc_jit_context_get_int_type): Likewise.
681 (gcc_jit_type_get_pointer): Likewise.
682 (gcc_jit_type_get_const): Likewise.
683 (gcc_jit_type_get_volatile): Likewise.
684 (gcc_jit_type_dyncast_array): Likewise.
685 (gcc_jit_type_is_bool): Likewise.
686 (gcc_jit_type_is_pointer): Likewise.
687 (gcc_jit_type_is_integral): Likewise.
688 (gcc_jit_type_dyncast_vector): Likewise.
689 (gcc_jit_type_is_struct): Likewise.
690 (gcc_jit_vector_type_get_num_units): Likewise.
691 (gcc_jit_vector_type_get_element_type): Likewise.
692 (gcc_jit_type_unqualified): Likewise.
693 (gcc_jit_type_dyncast_function_ptr_type): Likewise.
694 (gcc_jit_function_type_get_return_type): Likewise.
695 (gcc_jit_function_type_get_param_count): Likewise.
696 (gcc_jit_function_type_get_param_type): Likewise.
697 (gcc_jit_context_new_array_type): Likewise.
698 (gcc_jit_context_new_field): Likewise.
699 (gcc_jit_field_as_object): Likewise.
700 (gcc_jit_context_new_struct_type): Likewise.
701 (gcc_jit_struct_as_type): Likewise.
702 (gcc_jit_struct_set_fields): Likewise.
703 (gcc_jit_struct_get_field_count): Likewise.
704 (gcc_jit_context_new_union_type): Likewise.
705 (gcc_jit_context_new_function_ptr_type): Likewise.
706 (gcc_jit_param_as_rvalue): Likewise.
707 (gcc_jit_context_new_function): Likewise.
708 (gcc_jit_function_get_return_type): Likewise.
709 (gcc_jit_function_dump_to_dot): Likewise.
710 (gcc_jit_block_get_function): Likewise.
711 (gcc_jit_global_set_initializer_rvalue): Likewise.
712 (gcc_jit_rvalue_get_type): Likewise.
713 (gcc_jit_context_new_rvalue_from_int): Likewise.
714 (gcc_jit_context_one): Likewise.
715 (gcc_jit_context_new_rvalue_from_double): Likewise.
716 (gcc_jit_context_null): Likewise.
717 (gcc_jit_context_new_string_literal): Likewise.
718 (valid_binary_op_p): Likewise.
719 (gcc_jit_context_new_binary_op): Likewise.
720 (gcc_jit_context_new_comparison): Likewise.
721 (gcc_jit_context_new_call): Likewise.
722 (is_valid_cast): Likewise.
723 (gcc_jit_context_new_cast): Likewise.
724 (gcc_jit_object_get_context): Likewise.
725 (gcc_jit_object_get_debug_string): Likewise.
726 (gcc_jit_lvalue_access_field): Likewise.
727 (gcc_jit_rvalue_access_field): Likewise.
728 (gcc_jit_rvalue_dereference_field): Likewise.
729 (gcc_jit_rvalue_dereference): Likewise.
730 (gcc_jit_lvalue_get_address): Likewise.
731 (gcc_jit_lvalue_set_tls_model): Likewise.
732 (gcc_jit_lvalue_set_link_section): Likewise.
733 (gcc_jit_function_new_local): Likewise.
734 (gcc_jit_block_add_eval): Likewise.
735 (gcc_jit_block_add_assignment): Likewise.
737 (gcc_jit_block_end_with_conditional): Likewise.
738 (gcc_jit_block_add_comment): Likewise.
739 (gcc_jit_block_end_with_jump): Likewise.
740 (gcc_jit_block_end_with_return): Likewise.
741 (gcc_jit_block_end_with_void_return): Likewise.
742 (case_range_validator::case_range_validator): Likewise.
743 (case_range_validator::validate): Likewise.
744 (case_range_validator::get_wide_int): Likewise.
745 (gcc_jit_block_end_with_switch): Likewise.
746 (gcc_jit_context_set_str_option): Likewise.
747 (gcc_jit_context_set_int_option): Likewise.
748 (gcc_jit_context_set_bool_option): Likewise.
749 (gcc_jit_context_set_bool_allow_unreachable_blocks): Likewise.
750 (gcc_jit_context_set_bool_use_external_driver): Likewise.
751 (gcc_jit_context_add_command_line_option): Likewise.
752 (gcc_jit_context_add_driver_option): Likewise.
753 (gcc_jit_context_enable_dump): Likewise.
754 (gcc_jit_context_compile): Likewise.
755 (gcc_jit_context_compile_to_file): Likewise.
756 (gcc_jit_context_set_logfile): Likewise.
757 (gcc_jit_context_dump_reproducer_to_file): Likewise.
758 (gcc_jit_context_get_first_error): Likewise.
759 (gcc_jit_context_get_last_error): Likewise.
760 (gcc_jit_result_get_code): Likewise.
761 (gcc_jit_result_get_global): Likewise.
762 (gcc_jit_rvalue_set_bool_require_tail_call): Likewise.
763 (gcc_jit_type_get_aligned): Likewise.
764 (gcc_jit_type_get_vector): Likewise.
765 (gcc_jit_function_get_address): Likewise.
766 (gcc_jit_version_patchlevel): Likewise.
767 (gcc_jit_block_add_extended_asm): Likewise.
768 (gcc_jit_extended_asm_as_object): Likewise.
769 (gcc_jit_extended_asm_set_volatile_flag): Likewise.
770 (gcc_jit_extended_asm_set_inline_flag): Likewise.
771 (gcc_jit_extended_asm_add_output_operand): Likewise.
772 (gcc_jit_extended_asm_add_input_operand): Likewise.
773 (gcc_jit_extended_asm_add_clobber): Likewise.
774 * notes.txt: Likewise.
776 2022-01-17 Martin Liska <mliska@suse.cz>
778 * dummy-frontend.c: Moved to...
779 * dummy-frontend.cc: ...here.
780 * jit-builtins.c: Moved to...
781 * jit-builtins.cc: ...here.
782 * jit-logging.c: Moved to...
783 * jit-logging.cc: ...here.
784 * jit-playback.c: Moved to...
785 * jit-playback.cc: ...here.
786 * jit-recording.c: Moved to...
787 * jit-recording.cc: ...here.
788 * jit-result.c: Moved to...
789 * jit-result.cc: ...here.
790 * jit-spec.c: Moved to...
791 * jit-spec.cc: ...here.
792 * jit-tempdir.c: Moved to...
793 * jit-tempdir.cc: ...here.
794 * jit-w32.c: Moved to...
795 * jit-w32.cc: ...here.
796 * libgccjit.c: Moved to...
797 * libgccjit.cc: ...here.
799 2021-12-28 Martin Liska <mliska@suse.cz>
801 * docs/_build/texinfo/libgccjit.texi: Replace http:// with https.
802 * docs/cp/index.rst: Likewise.
803 * docs/cp/intro/index.rst: Likewise.
804 * docs/cp/intro/tutorial01.rst: Likewise.
805 * docs/cp/intro/tutorial02.rst: Likewise.
806 * docs/cp/intro/tutorial03.rst: Likewise.
807 * docs/cp/intro/tutorial04.rst: Likewise.
808 * docs/cp/topics/asm.rst: Likewise.
809 * docs/cp/topics/compilation.rst: Likewise.
810 * docs/cp/topics/contexts.rst: Likewise.
811 * docs/cp/topics/expressions.rst: Likewise.
812 * docs/cp/topics/functions.rst: Likewise.
813 * docs/cp/topics/index.rst: Likewise.
814 * docs/cp/topics/locations.rst: Likewise.
815 * docs/cp/topics/objects.rst: Likewise.
816 * docs/cp/topics/types.rst: Likewise.
817 * docs/index.rst: Likewise.
818 * docs/internals/index.rst: Likewise.
819 * docs/intro/index.rst: Likewise.
820 * docs/intro/tutorial01.rst: Likewise.
821 * docs/intro/tutorial02.rst: Likewise.
822 * docs/intro/tutorial03.rst: Likewise.
823 * docs/intro/tutorial04.rst: Likewise.
824 * docs/intro/tutorial05.rst: Likewise.
825 * docs/topics/asm.rst: Likewise.
826 * docs/topics/compatibility.rst: Likewise.
827 * docs/topics/compilation.rst: Likewise.
828 * docs/topics/contexts.rst: Likewise.
829 * docs/topics/expressions.rst: Likewise.
830 * docs/topics/function-pointers.rst: Likewise.
831 * docs/topics/functions.rst: Likewise.
832 * docs/topics/index.rst: Likewise.
833 * docs/topics/locations.rst: Likewise.
834 * docs/topics/objects.rst: Likewise.
835 * docs/topics/performance.rst: Likewise.
836 * docs/topics/types.rst: Likewise.
838 2021-12-20 Martin Liska <mliska@suse.cz>
840 * libgccjit.c (struct version_info): Rename to jit_version_info.
841 (struct jit_version_info): Likewise.
842 (gcc_jit_version_major): Likewise.
843 (gcc_jit_version_minor): Likewise.
844 (gcc_jit_version_patchlevel): Likewise.
846 2021-12-14 Petter Tomner <tomner@kth.se>
848 * jit-common.h: New enum
849 * jit-playback.c : Folding an setting intitial
850 (global_new_decl) : Handle const global generation
851 (new_global) : New flag
852 (global_set_init_rvalue) : New
854 (new_global_initialized) : Flag
855 (as_truth_value) : Fold
856 (new_unary_op) : Fold
857 (new_binary_op) : Fold
858 (new_comparison) : Fold
859 (new_array_access) : Fold
860 (new_dereference) : Fold
863 (global_set_init_rvalue) : New
867 (new_global_init_rvalue) : New
869 (ctor) : New, inherits rvalue
870 (global_init_rvalue) : New, inherits memento
871 (type::is_union) : New
872 * libgccjit++.h : New entrypoints, see C-header
873 * libgccjit.c : See .h
874 * libgccjit.h : New entrypoints
875 (gcc_jit_context_new_array_constructor) : New
876 (gcc_jit_context_new_struct_constructor) : New
877 (gcc_jit_context_new_union_constructor) : New
878 (gcc_jit_global_set_initializer_rvalue) : New
879 (LIBGCCJIT_HAVE_CTORS) : New feuture macro
880 * libgccjit.map : New entrypoints added to ABI 19
881 * docs/topics/expressions.rst : Updated docs
883 2021-12-12 Antoni Boucher <bouanto@zoho.com>
886 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_18): New ABI
888 * docs/topics/expressions.rst: Add documentation for the
889 function gcc_jit_lvalue_set_link_section.
890 * jit-playback.h: New function (set_link_section).
891 * jit-recording.c: New function (set_link_section) and
892 support for setting the link section.
893 * jit-recording.h: New function (set_link_section) and new
894 field m_link_section.
895 * libgccjit.c: New function (gcc_jit_lvalue_set_link_section).
896 * libgccjit.h: New function (gcc_jit_lvalue_set_link_section).
897 * libgccjit.map (LIBGCCJIT_ABI_18): New ABI tag.
899 2021-12-12 Antoni Boucher <bouanto@zoho.com>
902 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_17): New ABI
904 * docs/topics/expressions.rst: Add document for the function
905 gcc_jit_lvalue_set_tls_model.
906 * jit-playback.h: New function (set_tls_model).
907 * jit-recording.c: New function (set_tls_model), new
908 variables (tls_models and tls_model_enum_strings) and support
909 for setting the tls model.
910 * jit-recording.h: New function (set_tls_model) and new
912 * libgccjit.c: New function (gcc_jit_lvalue_set_tls_model).
913 * libgccjit.h: New function (gcc_jit_lvalue_set_tls_model)
914 and new enum (gcc_jit_tls_model).
915 * libgccjit.map (LIBGCCJIT_ABI_17): New ABI tag.
917 2021-12-11 Antoni Boucher <bouanto@zoho.com>
921 * jit-builtins.c: Implement missing types for builtins.
922 * jit-recording.c:: Allow sending a volatile const void * as
924 * jit-recording.h: New functions (is_volatile, is_const) and
925 allow comparing qualified types.
927 2021-12-10 David Malcolm <dmalcolm@redhat.com>
930 * jit-playback.c (gcc::jit::playback::context::new_function): Set
931 DECL_CONTEXT of the result_decl.
933 2021-11-27 Petter Tomner <tomner@kth.se>
935 * libgccjit.c: %ld -> %zu
937 2021-11-24 Martin Liska <mliska@suse.cz>
939 * jit-playback.c (function): Initialize m_blocks vector.
941 2021-11-20 Antoni Boucher <bouanto@zoho.com>
944 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_16): New ABI tag.
945 * docs/topics/functions.rst: Add documentation for the
946 functions gcc_jit_function_get_return_type and
947 gcc_jit_function_get_param_count
948 * docs/topics/types.rst: Add documentation for the functions
949 gcc_jit_function_type_get_return_type,
950 gcc_jit_function_type_get_param_count,
951 gcc_jit_function_type_get_param_type,
952 gcc_jit_type_unqualified, gcc_jit_type_dyncast_array,
953 gcc_jit_type_is_bool,
954 gcc_jit_type_dyncast_function_ptr_type,
955 gcc_jit_type_is_integral, gcc_jit_type_is_pointer,
956 gcc_jit_type_dyncast_vector,
957 gcc_jit_vector_type_get_element_type,
958 gcc_jit_vector_type_get_num_units,
959 gcc_jit_struct_get_field, gcc_jit_type_is_struct,
960 and gcc_jit_struct_get_field_count
962 (gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
963 gcc_jit_function_type_get_return_type,
964 gcc_jit_function_type_get_param_count,
965 gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
966 gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
967 gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
968 gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
969 gcc_jit_vector_type_get_element_type,
970 gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
971 gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
973 (struct gcc_jit_function_type, struct gcc_jit_vector_type):
976 (gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
977 gcc_jit_function_type_get_return_type,
978 gcc_jit_function_type_get_param_count,
979 gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
980 gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
981 gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
982 gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
983 gcc_jit_vector_type_get_element_type,
984 gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
985 gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
986 function declarations.
987 (struct gcc_jit_function_type, struct gcc_jit_vector_type):
989 * jit-recording.h: New functions (is_struct and is_vector)
990 * libgccjit.map (LIBGCCJIT_ABI_16): New ABI tag.
992 2021-11-12 David Malcolm <dmalcolm@redhat.com>
995 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile):
996 Increase size of buffer.
997 * docs/examples/tut04-toyvm/toyvm.cc
998 (compilation_state::create_function): Likewise.
1000 2021-09-10 Petter Tomner <tomner@kth.se>
1002 * jit-playback.c: Moved global var processing to after loc handling.
1003 Setting TYPE_NAME for fundamental types.
1004 Using common functions for finalizing globals.
1005 * jit-playback.h: New method init_types().
1006 Changed get_tree_node_for_type() to method.
1008 2021-08-19 Iain Sandoe <iain@sandoe.co.uk>
1010 * docs/examples/tut04-toyvm/toyvm.c: Include jit-dejagnu.h.
1011 * docs/examples/tut04-toyvm/toyvm.cc: Likewise.
1012 * jit-dejagnu.h: New file, imported from dejagnu-1.6.2 and
1013 patched for this application.
1015 2021-08-18 Iain Sandoe <iain@sandoe.co.uk>
1018 * Make-lang.in: Provide clauses for Darwin hosts.
1020 2021-07-18 Antoni Boucher <bouanto@zoho.com>
1023 * jit-playback.c (convert): Add support to handle truncation and
1024 extension in the convert function.
1026 2021-05-19 Martin Liska <mliska@suse.cz>
1029 * libgccjit.c (gcc_jit_context_new_function): Fix typos.
1031 2021-03-24 Matthias Klose <doko@ubuntu.com>
1033 * Make-lang.in (jit.sphinx.html, jit.sphinx.pdf): Use $(mkinstalldirs),
1034 (jit.install-headers): Depend on installdirs.
1036 2021-02-19 David Malcolm <dmalcolm@redhat.com>
1040 (gcc::jit::builtins_manager::get_builtin_function_by_id):
1041 Update assertion to reject BUILT_IN_NONE.
1042 (gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
1045 (gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
1047 * jit-playback.c (gcc::jit::playback::context::replay): Call it.
1048 Remove redundant conditional on bm.
1050 2021-01-14 David Malcolm <dmalcolm@redhat.com>
1052 * docs/cp/index.rst: Remove "Alpha" warning.
1053 * docs/index.rst: Likewise.
1054 * docs/_build/texinfo/libgccjit.texi: Regenerate
1056 2020-11-25 Martin Sebor <msebor@redhat.com>
1059 * jit-recording.c (recording::function::dump_to_dot): Avoid
1061 (recording::block::dump_to_dot): Same.
1063 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1066 * Make-lang.in (jit.serial): Change from goal to a
1068 (.PHONY): Drop jit.serial and jit.prev.
1069 ($(LIBGCCJIT_FILENAME)): Depend on $(jit.serial) rather than
1072 2020-11-18 Jakub Jelinek <jakub@redhat.com>
1074 * Make-lang.in (jit.serial): New goal.
1075 (.PHONY): Add jit.serial jit.prev.
1076 ($(LIBGCCJIT_FILENAME)): Depend on jit.prev. Call LINK_PROGRESS.
1078 2020-11-12 David Malcolm <dmalcolm@redhat.com>
1081 * docs/cp/topics/asm.rst: New file.
1082 * docs/cp/topics/index.rst (Topic Reference): Add it.
1083 * docs/topics/asm.rst: New file.
1084 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_15): New.
1085 * docs/topics/functions.rst (Statements): Add link to extended
1087 * docs/topics/index.rst (Topic Reference): Add asm.rst.
1088 * docs/topics/objects.rst: Add gcc_jit_extended_asm to ASCII art.
1089 * docs/_build/texinfo/Makefile: Regenerate.
1090 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1091 * jit-common.h (gcc::jit::recording::extended_asm): New forward
1093 (gcc::jit::recording::top_level_asm): Likewise.
1094 * jit-playback.c: Include "stmt.h".
1095 (build_string): New.
1096 (gcc::jit::playback::context::new_string_literal): Disambiguate
1098 (gcc::jit::playback::context::add_top_level_asm): New.
1099 (build_operand_chain): New.
1100 (build_clobbers): New.
1101 (build_goto_operands): New.
1102 (gcc::jit::playback::block::add_extended_asm): New.
1103 * jit-playback.h (gcc::jit::playback::context::add_top_level_asm):
1105 (struct gcc::jit::playback::asm_operand): New struct.
1106 (gcc::jit::playback::block::add_extended_asm): New decl.
1107 * jit-recording.c (gcc::jit::recording::context::dump_to_file):
1108 Dump top-level asms.
1109 (gcc::jit::recording::context::add_top_level_asm): New.
1110 (gcc::jit::recording::block::add_extended_asm): New.
1111 (gcc::jit::recording::block::end_with_extended_asm_goto): New.
1112 (gcc::jit::recording::asm_operand::asm_operand): New.
1113 (gcc::jit::recording::asm_operand::print): New.
1114 (gcc::jit::recording::asm_operand::make_debug_string): New.
1115 (gcc::jit::recording::output_asm_operand::write_reproducer): New.
1116 (gcc::jit::recording::output_asm_operand::print): New.
1117 (gcc::jit::recording::input_asm_operand::write_reproducer): New.
1118 (gcc::jit::recording::input_asm_operand::print): New.
1119 (gcc::jit::recording::extended_asm::add_output_operand): New.
1120 (gcc::jit::recording::extended_asm::add_input_operand): New.
1121 (gcc::jit::recording::extended_asm::add_clobber): New.
1122 (gcc::jit::recording::extended_asm::replay_into): New.
1123 (gcc::jit::recording::extended_asm::make_debug_string): New.
1124 (gcc::jit::recording::extended_asm::write_flags): New.
1125 (gcc::jit::recording::extended_asm::write_clobbers): New.
1126 (gcc::jit::recording::extended_asm_simple::write_reproducer): New.
1127 (gcc::jit::recording::extended_asm::maybe_populate_playback_blocks):
1129 (gcc::jit::recording::extended_asm_goto::extended_asm_goto): New.
1130 (gcc::jit::recording::extended_asm_goto::replay_into): New.
1131 (gcc::jit::recording::extended_asm_goto::write_reproducer): New.
1132 (gcc::jit::recording::extended_asm_goto::get_successor_blocks):
1134 (gcc::jit::recording::extended_asm_goto::maybe_print_gotos): New.
1135 (gcc::jit::recording::extended_asm_goto::maybe_populate_playback_blocks):
1137 (gcc::jit::recording::top_level_asm::top_level_asm): New.
1138 (gcc::jit::recording::top_level_asm::replay_into): New.
1139 (gcc::jit::recording::top_level_asm::make_debug_string): New.
1140 (gcc::jit::recording::top_level_asm::write_to_dump): New.
1141 (gcc::jit::recording::top_level_asm::write_reproducer): New.
1143 (gcc::jit::recording::context::add_top_level_asm): New decl.
1144 (gcc::jit::recording::context::m_top_level_asms): New field.
1145 (gcc::jit::recording::block::add_extended_asm): New decl.
1146 (gcc::jit::recording::block::end_with_extended_asm_goto): New
1148 (gcc::jit::recording::asm_operand): New class.
1149 (gcc::jit::recording::output_asm_operand): New class.
1150 (gcc::jit::recording::input_asm_operand): New class.
1151 (gcc::jit::recording::extended_asm): New class.
1152 (gcc::jit::recording::extended_asm_simple): New class.
1153 (gcc::jit::recording::extended_asm_goto): New class.
1154 (gcc::jit::recording::top_level_asm): New class.
1155 * libgccjit++.h (gccjit::extended_asm): New forward decl.
1156 (gccjit::context::add_top_level_asm): New.
1157 (gccjit::block::add_extended_asm): New.
1158 (gccjit::block::end_with_extended_asm_goto): New.
1159 (gccjit::extended_asm): New class.
1160 (gccjit::extended_asm::extended_asm): New ctors.
1161 (gccjit::extended_asm::set_volatile_flag): New.
1162 (gccjit::extended_asm::set_inline_flag): New.
1163 (gccjit::extended_asm::add_output_operand): New.
1164 (gccjit::extended_asm::add_input_operand): New.
1165 (gccjit::extended_asm::add_clobber): New.
1166 (gccjit::extended_asm::get_inner_extended_asm): New.
1167 * libgccjit.c (struct gcc_jit_extended_asm): New.
1168 (jit_error): Make "loc" param take a gcc::jit::recording::location *
1169 rather than a gcc_jit_location *.
1170 (gcc_jit_block_add_extended_asm): New entrypoint.
1171 (gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
1172 (gcc_jit_extended_asm_as_object): New entrypoint.
1173 (gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
1174 (gcc_jit_extended_asm_set_inline_flag): New entrypoint.
1175 (gcc_jit_extended_asm_add_output_operand): New entrypoint.
1176 (gcc_jit_extended_asm_add_clobber): New entrypoint.
1177 (gcc_jit_context_add_top_level_asm): New entrypoint.
1178 * libgccjit.h: Add gcc_jit_extended_asm to ASCII art.
1179 (gcc_jit_extended_asm): New typedef.
1180 (LIBGCCJIT_HAVE_ASM_STATEMENTS): New define.
1181 (gcc_jit_block_add_extended_asm): New entrypoint.
1182 (gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
1183 (gcc_jit_extended_asm_as_object): New entrypoint.
1184 (gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
1185 (gcc_jit_extended_asm_set_inline_flag): New entrypoint.
1186 (gcc_jit_extended_asm_add_output_operand): New entrypoint.
1187 (gcc_jit_extended_asm_add_input_operand): New entrypoint.
1188 (gcc_jit_extended_asm_add_clobber): New entrypoint.
1189 (gcc_jit_context_add_top_level_asm): New entrypoint.
1190 * libgccjit.map (LIBGCCJIT_ABI_15): New.
1192 2020-11-12 David Malcolm <dmalcolm@redhat.com>
1194 * jit-recording.c (recording::context::new_string): Add "escaped"
1195 param and use it when creating the new recording::string instance.
1196 (recording::string::string): Add "escaped" param and use it to
1197 initialize m_escaped.
1198 (recording::string::make_debug_string): Replace check that first
1199 char is double-quote with use of m_escaped. Fix escaping of
1200 '\t' and '\n'. Set "escaped" on the result.
1201 * jit-recording.h (recording::context::new_string): Add "escaped"
1203 (recording::string::string): Add "escaped" param.
1204 (recording::string::m_escaped): New field.
1206 2020-11-12 David Malcolm <dmalcolm@redhat.com>
1208 * libgccjit.h: Fix typo in comment.
1210 2020-09-14 Andrea Corallo <andrea.corallo@arm.com>
1212 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1214 2020-09-11 Andrea Corallo <andrea.corallo@arm.com>
1216 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_14): New ABI tag.
1217 * docs/topics/expressions.rst (gcc_jit_global_set_initializer):
1218 Document new entry point in section 'Global variables'.
1219 * jit-playback.c (global_new_decl, global_finalize_lvalue): New
1221 (playback::context::new_global): Make use of global_new_decl,
1222 global_finalize_lvalue.
1223 (load_blob_in_ctor): New template function in use by the
1225 (playback::context::new_global_initialized): New method.
1226 * jit-playback.h (class context): Decl 'new_global_initialized',
1227 'global_new_decl', 'global_finalize_lvalue'.
1228 (lvalue::set_initializer): Add implementation.
1229 * jit-recording.c (recording::memento_of_get_pointer::get_size)
1230 (recording::memento_of_get_type::get_size): Add implementation.
1231 (recording::global::write_initializer_reproducer): New function in
1232 use by 'recording::global::write_reproducer'.
1233 (recording::global::replay_into)
1234 (recording::global::write_to_dump)
1235 (recording::global::write_reproducer): Handle
1237 * jit-recording.h (class type): Decl 'get_size' and
1239 * libgccjit++.h (class lvalue): Declare new 'set_initializer'
1241 (class lvalue): Decl 'is_global' and 'set_initializer'.
1242 (class global) Decl 'write_initializer_reproducer'. Add
1243 'm_initializer', 'm_initializer_num_bytes' fields. Implement
1244 'set_initializer'. Add a destructor to free 'm_initializer'.
1245 * libgccjit.c (gcc_jit_global_set_initializer): New function.
1246 * libgccjit.h (gcc_jit_global_set_initializer): New function
1248 * libgccjit.map (LIBGCCJIT_ABI_14): New ABI tag.
1250 2020-08-28 Martin Sebor <msebor@redhat.com>
1252 * jit-recording.c (recording::switch_::make_debug_string): Add argument
1255 2020-08-22 Andrea Corallo <andrea.corallo@arm.com>
1258 (gcc_jit_context_new_rvalue_from_int)
1259 (gcc_jit_context_new_rvalue_from_long)
1260 (gcc_jit_context_new_rvalue_from_double)
1261 (gcc_jit_context_new_rvalue_from_ptr): Update function heading
1264 2020-06-16 Nicolas Bértolo <nicolasbertolo@gmail.com>
1266 * Make-lang.in: Always define version, minor and release
1267 numbers. Create the Windows shared library as
1268 libgccjit-$(LIBGCCJIT_VERSION_NUM).dll.
1270 2020-06-03 David Malcolm <dmalcolm@redhat.com>
1273 * jit-builtins.c (builtins_manager::make_primitive_type):
1274 Implement BT_CONST_VOLATILE_PTR.
1276 2020-06-02 David Malcolm <dmalcolm@redhat.com>
1279 * dummy-frontend.c: Include "options.h", "stringpool.h", and
1281 (ATTR_EXCL): New, copied from lto/lto-lang.c.
1282 (attr_noreturn_exclusions): Likewise.
1283 (attr_returns_twice_exclusions): Likewise.
1284 (attr_const_pure_exclusions): Likewise.
1285 (jit_attribute_table): Likewise, copied from lto_attribute_table.
1286 (jit_format_attribute_table): Likewise, copied from
1287 lto_format_attribute_table.
1288 (handle_noreturn_attribute): New, copied from lto/lto-lang.c.
1289 (handle_leaf_attribute): Likewise.
1290 (handle_const_attribute): Likewise.
1291 (handle_malloc_attribute): Likewise.
1292 (handle_pure_attribute): Likewise.
1293 (handle_novops_attribute): Likewise.
1294 (get_nonnull_operand): Likewise.
1295 (handle_nonnull_attribute): Likewise.
1296 (handle_nothrow_attribute): Likewise.
1297 (handle_sentinel_attribute): Likewise.
1298 (handle_type_generic_attribute): Likewise.
1299 (handle_transaction_pure_attribute): Likewise.
1300 (handle_returns_twice_attribute): Likewise.
1301 (handle_patchable_function_entry_attribute): Likewise.
1302 (ignore_attribute): Likewise.
1303 (handle_format_attribute): Likewise.
1304 (handle_format_arg_attribute): Likewise.
1305 (handle_fnspec_attribute): Likewise.
1306 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
1307 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
1309 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1311 * Make-lang.in: Remove extra slash. Build libgccjit.dll and its
1312 import library in Windows.
1313 * config-lang.in: Update comment about --enable-host-shared.
1314 * jit-w32.h: New file.
1315 * jit-w32.c: New file.
1316 (print_last_error): New function that prints the error
1317 string corresponding to GetLastError().
1318 (get_TOKEN_USER_current_user): Helper function used for getting
1319 the SID belonging to the current user.
1320 (create_directory_for_current_user): Helper function to create
1321 a directory with permissions such that only the current user can
1323 (win_mkdtemp): Create a temporary directory using Windows APIs.
1324 * jit-playback.c: Do not chmod files in Windows. Use LoadLibrary,
1325 FreeLibrary and GetProcAddress instead of libdl.
1326 * jit-result.h, jit-result.c: Introduce result::handle_t to
1327 abstract over the types used for dynamic library handles.
1328 * jit-tempdir.c: Do not use mkdtemp() in Windows, use
1331 2020-05-27 David Malcolm <dmalcolm@redhat.com>
1334 * dummy-frontend.c (LANG_HOOKS_DEEP_UNSHARING): Define to be true.
1335 * jit-playback.h (gcc::jit::playback::rvalue): Mark tree node with
1338 2020-05-27 Tom Tromey <tromey@gcc.gnu.org>
1341 * docs/conf.py (texinfo_documents): Set description.
1342 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1344 2020-05-26 David Malcolm <dmalcolm@redhat.com>
1347 * docs/topics/functions.rst
1348 (gcc_jit_context_get_builtin_function): Document.
1349 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1350 * dummy-frontend.c (jit_langhook_global_bindings_p): Remove
1352 * jit-builtins.c (type_names): New array.
1353 (get_string_for_type_id): New function.
1354 (gcc::jit::builtins_manager::make_primitive_type): Show name of
1355 type in error messages. Update cases to reflect the order in
1356 builtin-types.def. Implement cases for BT_INT8, BT_INT16,
1357 BT_UINT8, BT_CONST_PTR, BT_VOLATILE_PTR, BT_INT_PTR, BT_FLOAT_PTR,
1358 BT_CONST_DOUBLE_PTR, BT_SIZE, BT_CONST_SIZE.
1360 2020-05-26 David Malcolm <dmalcolm@redhat.com>
1362 * docs/topics/compatibility.rst: Fix underline.
1364 * docs/topics/types.rst: Fix missing blank line.
1365 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1367 2020-05-26 David Malcolm <dmalcolm@redhat.com>
1370 * docs/topics/expressions.rst (Unary Operations): Document that
1371 result_type of gcc_jit_context_new_unary_op must be a numeric type.
1372 (Binary Operations): Likewise for gcc_jit_context_new_binary_op.
1373 (Global variables): Document that "type" of
1374 gcc_jit_context_new_global must be non-`void`.
1375 * docs/topics/function-pointers.rst
1376 (gcc_jit_context_new_function_ptr_type): Document that the
1377 param_types must be non-void, but that return_type may be.
1378 * docs/topics/functions.rst (Params): Document that
1379 gcc_jit_context_new_param's type must be non-void.
1380 (Functions): Likewise for gcc_jit_function_new_local.
1381 * docs/topics/types.rst (gcc_jit_context_new_array_type): Document
1382 that the type must be non-void.
1383 (gcc_jit_context_new_field): Likewise.
1384 * docs/_build/texinfo/Makefile: Regenerate.
1385 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1386 * libgccjit.c (gcc_jit_context_new_array_type): Fail if
1387 element_type is void.
1388 (gcc_jit_context_new_field): Likewise for "type".
1389 (gcc_jit_context_new_function_ptr_type): Likewise for each
1390 element of param_types.
1391 (gcc_jit_context_new_param): Likewise for "type".
1392 (gcc_jit_context_new_global): Likewise.
1393 (gcc_jit_function_new_local): Likewise.
1394 (gcc_jit_type_get_aligned): Likewise.
1396 2020-03-31 Andrea Corallo <andrea.corallo@arm.com>
1397 David Malcolm <dmalcolm@redhat.com>
1399 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_13): New ABI tag
1400 plus add version paragraph.
1401 * libgccjit++.h (namespace gccjit::version): Add new namespace.
1402 * libgccjit.c (gcc_jit_version_major, gcc_jit_version_minor)
1403 (gcc_jit_version_patchlevel): New functions.
1404 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_version): New macro.
1405 (gcc_jit_version_major, gcc_jit_version_minor)
1406 (gcc_jit_version_patchlevel): New functions.
1407 * libgccjit.map (LIBGCCJIT_ABI_13) New ABI tag.
1409 2020-03-23 Andrea Corallo <andrea.corallo@arm.com>
1412 (gcc::jit::playback::context m_recording_ctxt): Remove
1413 m_char_array_type_node field.
1415 (playback::context::context) Remove m_char_array_type_node from member
1417 (playback::context::new_string_literal) Fix logic to handle string
1420 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1422 Update copyright years.
1424 2019-11-29 Julian Brown <julian@codesourcery.com>
1426 * jit-builtins.c (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR):
1427 Remove commented-out cases.
1429 2019-11-20 David Malcolm <dmalcolm@redhat.com>
1432 * jit-playback.c (gcc::jit::playback::context::make_fake_args):
1433 Update GCC_JIT_BOOL_OPTION_SELFCHECK_GC for new --param syntax.
1435 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1438 * jit-playback.c (new_function): Use set_decl_built_in_function.
1440 2019-07-22 Andrea Corallo <andrea.corallo@arm.com>
1442 * jit-recording.c (unary_op_reproducer_strings): Make it extern.
1443 (binary_op_reproducer_strings): Likewise.
1444 * jit-recording.h (unary_op_reproducer_strings): Likewise.
1445 (binary_op_reproducer_strings): Likewise.
1446 * libgccjit.c (gcc_jit_context_new_unary_op): Check result_type to be a
1448 * libgccjit.c (gcc_jit_context_new_binary_op): Improve error message.
1450 2019-07-04 Andrea Corallo <andrea.corallo@arm.com>
1452 * libgccjit.c (gcc_jit_context_new_binary_op): Check result_type to be a
1455 2019-07-04 Andrea Corallo <andrea.corallo@arm.com>
1457 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_12): New ABI tag.
1458 * docs/topics/types.rst: Add gcc_jit_context_new_bitfield.
1459 * jit-common.h (namespace recording): Add class bitfield.
1461 (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): Add macros.
1462 (playback::context::new_bitfield): New method.
1463 (playback::compound_type::set_fields): Add bitfield support.
1464 (playback::lvalue::mark_addressable): Was jit_mark_addressable make this
1465 a method of lvalue plus return a bool to communicate success.
1466 (playback::lvalue::get_address): Check for jit_mark_addressable return
1468 * jit-playback.h (new_bitfield): New method.
1469 (class bitfield): New class.
1470 (class lvalue): Add jit_mark_addressable method.
1471 * jit-recording.c (recording::context::new_bitfield): New method.
1472 (recording::bitfield::replay_into): New method.
1473 (recording::bitfield::write_to_dump): Likewise.
1474 (recording::bitfield::make_debug_string): Likewise.
1475 (recording::bitfield::write_reproducer): Likewise.
1476 * jit-recording.h (class context): Add new_bitfield method.
1477 (class field): Make it derivable by class bitfield.
1478 (class bitfield): Add new class.
1479 * libgccjit++.h (class context): Add new_bitfield method.
1480 * libgccjit.c (struct gcc_jit_bitfield): New structure.
1481 (gcc_jit_context_new_bitfield): New function.
1483 (LIBGCCJIT_HAVE_gcc_jit_context_new_bitfield) New macro.
1484 (gcc_jit_context_new_bitfield): New function.
1485 * libgccjit.map (LIBGCCJIT_ABI_12) New ABI tag.
1487 2019-03-21 Jakub Jelinek <jakub@redhat.com>
1489 * jit-recording.c (reproducer::m_set_identifiers): Use false as Lazy
1490 in hash_set template param.
1492 2019-02-05 Andrea Corallo <andrea.corallo@arm.com>
1494 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_11): New ABI tag.
1495 * docs/topics/contexts.rst (Additional driver options): New
1497 * jit-playback.c (invoke_driver): Add call to append_driver_options.
1498 * jit-recording.c: Within namespace gcc::jit...
1499 (recording::context::~context): Free the optnames within
1501 (recording::context::add_driver_option): New method.
1502 (recording::context::append_driver_options): New method.
1503 (recording::context::dump_reproducer_to_file): Add driver
1505 * jit-recording.h: Within namespace gcc::jit...
1506 (recording::context::add_driver_option): New method.
1507 (recording::context::append_driver_options): New method.
1508 (recording::context::m_driver_options): New field.
1509 * libgccjit++.h (gccjit::context::add_driver_option): New
1511 * libgccjit.c (gcc_jit_context_add_driver_option): New API
1513 * libgccjit.h (gcc_jit_context_add_driver_option): New API
1515 (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option): New
1517 * libgccjit.map (LIBGCCJIT_ABI_11): New ABI tag.
1519 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1521 Update copyright years.
1523 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1526 * dummy-frontend.c (jit_begin_diagnostic): Add diagnostic_t param.
1528 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1530 * jit-playback.c: Replace "source_location" with "location_t".
1532 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1534 * Make-lang.in (selftest-jit): New.
1536 2018-06-28 Martin Liska <mliska@suse.cz>
1538 * jit-playback.c: Include opt-suggestions.h.
1540 2018-06-28 Martin Liska <mliska@suse.cz>
1542 * jit-playback.c (class auto_argvec): Moved to vec.h.
1543 (auto_argvec::~auto_argvec): Likewise.
1544 (compile): Use the renamed name.
1545 (invoke_driver): Likewise.
1547 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1550 * Make-lang.in ($(LIBGCCJIT_FILENAME)): Add $(EXTRA_GCC_LIBS).
1552 2018-03-09 David Malcolm <dmalcolm@redhat.com>
1553 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1557 * Make-lang.in (COMMA): New.
1558 (LIBGCCJIT_VERSION_SCRIPT_OPTION): New.
1559 (LIBGCCJIT_SONAME_OPTION): New.
1560 (jit): Move --version-script and -soname linker options to the
1563 2018-01-25 David Malcolm <dmalcolm@redhat.com>
1566 * jit-recording.h (gcc::jit::recording::union_): Remove fields
1567 "m_loc" and "m_name".
1569 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1571 Update copyright years.
1573 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1575 * jit-playback.c (get_type, playback::compile_to_file::copy_file,
1576 playback::context::acquire_mutex): Replace Yoda conditions with
1577 typical order conditions.
1578 * libgccjit.c (gcc_jit_context_new_struct_type,
1579 gcc_jit_struct_set_fields, gcc_jit_context_new_union_type,
1580 gcc_jit_context_new_function, gcc_jit_timer_pop): Likewise.
1581 * jit-builtins.c (matches_builtin): Likewise.
1582 * jit-recording.c (recording::compound_type::set_fields,
1583 recording::fields::write_reproducer, recording::rvalue::set_scope,
1584 recording::function::validate): Likewise.
1585 * jit-logging.c (logger::decref): Likewise.
1587 2017-11-30 Jakub Jelinek <jakub@redhat.com>
1590 (recording::memento_of_new_rvalue_from_const <long>::write_reproducer):
1591 Use ; instead of ;;.
1593 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1595 * jit-playback.c (add_switch): Build SWITCH_EXPR using build2 instead
1596 of build3. Formatting fixes. Adjust funciton comment.
1598 2017-11-23 Tom de Vries <tom@codesourcery.com>
1600 * libgccjit.c (RETURN_NULL_IF_FAIL_NONNULL_NUMERIC_TYPE): Wrap in
1601 JIT_{BEGIN,END}_STMT.
1603 2017-10-31 David Malcolm <dmalcolm@redhat.com>
1605 * docs/internals/index.rst (Running the test suite): Document
1606 PRESERVE_EXECUTABLES.
1607 (Running under valgrind): Add markup to RUN_UNDER_VALGRIND.
1608 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1610 2017-10-04 David Malcolm <dmalcolm@redhat.com>
1612 * docs/cp/topics/expressions.rst (Vector expressions): New
1614 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_10): New ABI tag.
1615 * docs/topics/expressions.rst (Vector expressions): New section.
1616 * docs/topics/types.rst (gcc_jit_type_get_vector): Add link to
1617 gcc_jit_context_new_rvalue_from_vector.
1618 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1619 * jit-common.h (gcc::jit:recording::vector_type): New forward
1622 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
1624 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
1625 * jit-recording.c: In namespace gcc::jit::
1626 (class comma_separated_string): New class.
1627 (comma_separated_string::comma_separated_string): New ctor,
1628 adapted from recording::call::make_debug_string.
1629 (comma_separated_string::~comma_separated_string): New dtor.
1630 In namespace gcc::jit::recording::
1631 (context::new_rvalue_from_vector): New method.
1632 (type::get_vector): Update for renaming of memento_of_get_vector.
1633 (class memento_of_get_vector): Rename to...
1634 (class vector_type): ..this.
1635 (memento_of_new_rvalue_from_vector::memento_of_new_rvalue_from_vector):
1637 (memento_of_new_rvalue_from_vector::replay_into): New method.
1638 (memento_of_new_rvalue_from_vector::visit_children): New method.
1639 (memento_of_new_rvalue_from_vector::make_debug_string): New
1641 (memento_of_new_rvalue_from_vector::write_reproducer): New method.
1642 (call::make_debug_string): Split out arg-printing code into ctor
1643 for comma_separated_string.
1644 * jit-recording.h: In namespace gcc::jit::recording::
1645 (context::new_rvalue_from_vector): New method.
1646 (type::dyn_cast_vector_type): New virtual function.
1647 (class memento_of_get_vector): Rename to...
1648 (class vector_type): ...this.
1649 (vector_type::unqualified): Remove this vfunc override in favor
1651 (vector_type::get_element_type): ...this new method.
1652 (vector_type::get_num_units): New method.
1653 (vector_type::dyn_cast_vector_type): New vfunc override.
1654 (class memento_of_new_rvalue_from_vector): New class.
1655 * libgccjit++.h (gccjit::context::new_rvalue): Add overload for
1657 * libgccjit.c (gcc_jit_context_new_binary_op): Strip off type
1658 qualifications when checking that both operands have same type.
1659 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
1661 (LIBGCCJIT_HAVE_gcc_jit_context_new_rvalue_from_vector): New
1663 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
1664 * libgccjit.map (LIBGCCJIT_ABI_10): New ABI tag.
1666 2017-09-28 David Malcolm <dmalcolm@redhat.com>
1668 * docs/topics/expressions.rst (Function calls): Add link to
1669 gcc_jit_context_new_function_ptr_type.
1670 (Function pointers): Convert to cross-references to
1671 function-pointers.rst, moving material there.
1672 * docs/topics/function-pointers.rst: New page.
1673 * docs/topics/index.rst: Add function-pointers.rst.
1674 * docs/topics/types.rst (Function pointer types): New section.
1675 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1677 2017-09-28 David Malcolm <dmalcolm@redhat.com>
1680 (gcc::jit::recording::function_type::is_same_type_as): New function.
1681 * jit-recording.h: In namespace gcc::jit::recording::
1682 (type::accepts_writes_from): Use is_same_type_as rather than pointer
1684 (type::is_same_type_as): New virtual function.
1685 (function_type::is_same_type_as): New override.
1687 2017-09-27 David Malcolm <dmalcolm@redhat.com>
1689 * docs/cp/topics/expressions.rst (Function pointers): New section.
1690 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_9): New tag.
1691 * docs/topics/expressions.rst (Function pointers): New section.
1692 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1693 * jit-common.h (class gcc::jit::recording::function_pointer): New
1695 * jit-playback.c (gcc::jit::playback::function::get_address): New
1697 * jit-playback.h (gcc::jit::playback::function::get_address): New
1699 * jit-recording.c: Within namespace gcc::jit::recording...
1700 (function::function): Initialize new field "m_fn_ptr_type".
1701 (function::get_address): New method.
1702 (function_pointer::replay_into): New method.
1703 (function_pointer::visit_children): New method.
1704 (function_pointer::make_debug_string): New method.
1705 (function_pointer::write_reproducer): New method.
1706 * jit-recording.h: Within namespace gcc::jit::recording...
1707 (function::get_address): New method.
1708 (function): Add field "m_fn_ptr_type".
1709 (class function_pointer): New subclass of rvalue.
1710 * libgccjit++.h (gccjit::function::get_address): New method.
1711 * libgccjit.c (gcc_jit_function_get_address): New function.
1712 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_function_get_address): New
1714 (gcc_jit_function_get_address): New API entrypoint.
1715 * libgccjit.map (LIBGCCJIT_ABI_9): New tag.
1717 2017-09-14 David Malcolm <dmalcolm@redhat.com>
1720 * jit-builtins.c (matches_builtin): Ignore entries with a NULL
1723 2017-08-18 David Malcolm <dmalcolm@redhat.com>
1725 PR tree-optimization/46805
1726 * dummy-frontend.c (jit_langhook_parse_file): Handle vector types.
1728 2017-08-18 David Malcolm <dmalcolm@redhat.com>
1730 * jit-recording.c (class gcc::jit::reproducer): Rename field
1731 "m_identifiers" to "m_map_memento_to_identifier". Add field
1732 "m_set_identifiers" and struct hash_traits for it.
1733 (gcc::jit::reproducer::reproducer): Update for above.
1734 (convert_to_identifier): New function.
1735 (gcc::jit::reproducer::ensure_identifier_is_unique): New method.
1736 (gcc::jit::reproducer::make_identifier): Avoid appending the %p
1737 unless necessary for uniqueness. Update for field renaming.
1738 (gcc::jit::reproducer::get_identifier): Update for field renaming.
1740 2017-08-09 David Malcolm <dmalcolm@redhat.com>
1742 * docs/cp/topics/types.rst (Vector types): New section.
1743 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_8): New tag.
1744 * docs/topics/types.rst (gcc_jit_context_get_type): Fix typo in
1746 (Vector types): New section.
1747 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1748 * jit-playback.c (gcc::jit::playback::type::get_vector): New
1750 * jit-playback.h (gcc::jit::playback::type::get_vector): New
1752 * jit-recording.c: In namespace gcc::jit::recording::
1753 (type::get_vector): New method.
1754 (memento_of_get_aligned::write_reproducer): Fix typo
1756 (memento_of_get_vector::replay_into): New method.
1757 (memento_of_get_vector::make_debug_string): New method.
1758 (memento_of_get_vector::write_reproducer): New method.
1759 * jit-recording.h: In namespace gcc::jit::recording::
1760 (type::get_vector): New
1762 (class memento_of_get_vector): New class.
1763 * libgccjit++.h (gccjit::type::get_vector): New method.
1764 * libgccjit.c (gcc_jit_type_get_vector): New public entrypoint.
1765 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_type_get_vector): New
1767 (gcc_jit_type_get_vector): New decl.
1768 * libgccjit.map (LIBGCCJIT_ABI_8): New ABI tag.
1770 2017-07-05 Richard Sandiford <richard.sandiford@linaro.org>
1771 Alan Hayward <alan.hayward@arm.com>
1772 David Sherwood <david.sherwood@arm.com>
1774 * dummy-frontend.c (jit_langhook_type_for_mode): Remove "enum" before
1777 2017-04-24 David Malcolm <dmalcolm@redhat.com>
1779 * docs/cp/topics/types.rst (gccjit::type::get_const): Remove
1781 (gccjit::type::get_aligned): Add.
1782 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_7.
1783 * docs/topics/types.rst: Add gcc_jit_type_get_aligned.
1784 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1785 * jit-playback.c (gcc::jit::playback::type::get_aligned): New
1787 * jit-playback.h (gcc::jit::playback::type::get_aligned): New
1789 * jit-recording.c: Within namespace gcc::jit::recording...
1790 (type::get_aligned): New method.
1791 (memento_of_get_aligned::replay_into): New method.
1792 (memento_of_get_aligned::make_debug_string): New method.
1793 (memento_of_get_aligned::write_reproducer): New method.
1794 * jit-recording.h: Within namespace gcc::jit::recording...
1795 (type::get_aligned): New method.
1796 (type::accepts_writes_from): Strip off qualifications from
1797 this when comparing pointer equality.
1798 (decorated_type): New subclass of type, subsuming the
1799 commonality between memento_of_get_const and
1800 memento_of_get_volatile.
1801 (memento_of_get_const): Make a subclass of decorated_type,
1803 (memento_of_get_volatile): Likewise.
1804 (memento_of_get_aligned): Likewise.
1805 * libgccjit++.h: Within namespace gccjit...
1806 (type::get_const): New method.
1807 (type::get_aligned): New method.
1808 * libgccjit.c (gcc_jit_type_get_aligned): New function.
1809 * libgccjit.h (gcc_jit_type_get_aligned): New decl.
1810 * libgccjit.map (LIBGCCJIT_ABI_7): New
1811 (gcc_jit_type_get_aligned): Add.
1813 2017-01-19 David Malcolm <dmalcolm@redhat.com>
1815 * dummy-frontend.c (jit_langhook_type_for_size): Delete.
1816 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
1818 2017-01-18 David Malcolm <dmalcolm@redhat.com>
1820 * dummy-frontend.c (jit_langhook_type_for_size): Implement, using
1821 lto's lto_type_for_size.
1823 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1825 Update copyright years.
1827 2016-05-20 David Malcolm <dmalcolm@redhat.com>
1829 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_6.
1830 * docs/topics/expressions.rst (Function calls): Add documentation
1831 of gcc_jit_rvalue_set_bool_require_tail_call.
1832 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1833 * jit-common.h (gcc::jit::recording::base_call): Add forward decl.
1834 * jit-playback.c: Within namespace gcc::jit::playback...
1835 (context::build_call) Add "require_tail_call" param and use it
1836 to set CALL_EXPR_MUST_TAIL_CALL.
1837 (context::new_call): Add "require_tail_call" param.
1838 (context::new_call_through_ptr): Likewise.
1839 * jit-playback.h: Within namespace gcc::jit::playback...
1840 (context::new_call: Add "require_tail_call" param.
1841 (context::new_call_through_ptr): Likewise.
1842 (context::build_call): Likewise.
1843 * jit-recording.c: Within namespace gcc::jit::recording...
1844 (base_call::base_call): New constructor.
1845 (base_call::write_reproducer_tail_call): New method.
1846 (call::call): Update for inheritance from base_call.
1847 (call::replay_into): Provide m_require_tail_call to call
1849 (call::write_reproducer): Call write_reproducer_tail_call.
1850 (call_through_ptr::call_through_ptr): Update for inheritance from
1852 (call_through_ptr::replay_into): Provide m_require_tail_call to call
1853 to new_call_through_ptr.
1854 (recording::call_through_ptr::write_reproducer): Call
1855 write_reproducer_tail_call.
1856 * jit-recording.h: Within namespace gcc::jit::recording...
1857 (rvalue::dyn_cast_base_call): New virtual function.
1858 (class base_call): New subclass of class rvalue.
1859 (class call): Inherit from base_call rather than directly from
1860 rvalue, moving get_precedence and m_args to base_call.
1861 (class call_through_ptr): Likewise.
1862 * libgccjit.c (gcc_jit_rvalue_set_bool_require_tail_call): New
1865 (LIBGCCJIT_HAVE_gcc_jit_rvalue_set_bool_require_tail_call): New
1867 (gcc_jit_rvalue_set_bool_require_tail_call): New function.
1868 * libgccjit.map (LIBGCCJIT_ABI_6): New.
1869 (gcc_jit_rvalue_set_bool_require_tail_call): Add.
1871 2016-05-17 David Malcolm <dmalcolm@redhat.com>
1873 * dummy-frontend.c: Include diagnostic.h.
1874 (jit_begin_diagnostic): New function.
1875 (jit_end_diagnostic): New function.
1876 (jit_langhook_init): Register jit_begin_diagnostic
1877 and jit_end_diagnostic with the global_dc.
1878 * jit-playback.c: Include diagnostic.h.
1879 (gcc::jit::playback::context::add_diagnostic): New method.
1880 * jit-playback.h (struct diagnostic_context): Add forward
1882 (gcc::jit::playback::context::add_diagnostic): New method.
1884 2016-05-17 David Malcolm <dmalcolm@redhat.com>
1886 * docs/topics/expressions.rst (Function calls): Document
1887 gcc_jit_context_new_call_through_ptr.
1888 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1890 2016-05-13 David Malcolm <dmalcolm@redhat.com>
1892 * jit-playback.h: Within namespace gcc:jit::playback...
1893 (compile_to_memory::postprocess): Mark with FINAL OVERRIDE.
1894 (compile_to_file::postprocess): Likewise.
1895 (function::finalizer): Likewise.
1896 (block::finalizer): Likewise.
1897 (source_file::finalizer): Likewise.
1898 (source_line::finalizer): Likewise.
1899 * jit-recording.c (gcc::jit::rvalue_usage_validator):: Likewise.
1900 * jit-recording.h: Within namespace gcc::jit::recording...
1901 (string::replay_into): Mark with FINAL OVERRIDE.
1902 (string::make_debug_string): Likewise.
1903 (string::write_reproducer): Likewise.
1904 (location::replay_into): Likewise.
1905 (location::dyn_cast_location): Likewise.
1906 (location::make_debug_string): Likewise.
1907 (location::write_reproducer): Likewise.
1908 (memento_of_get_type::dereference): Likewise.
1909 (memento_of_get_type::accepts_writes_from): Likewise.
1910 (memento_of_get_type::is_int): Likewise.
1911 (memento_of_get_type::is_float): Likewise.
1912 (memento_of_get_type::is_bool): Likewise.
1913 (memento_of_get_type::is_pointer): Likewise.
1914 (memento_of_get_type::is_array): Likewise.
1915 (memento_of_get_type::is_void): Likewise.
1916 (memento_of_get_type::replay_into): Likewise.
1917 (memento_of_get_type::make_debug_string): Likewise.
1918 (memento_of_get_type::write_reproducer): Likewise.
1919 (memento_of_get_pointer::dereference): Likewise.
1920 (memento_of_get_pointer::accepts_writes_from): Likewise.
1921 (memento_of_get_pointer::replay_into): Likewise.
1922 (memento_of_get_pointer::is_int): Likewise.
1923 (memento_of_get_pointer::is_float): Likewise.
1924 (memento_of_get_pointer::is_bool): Likewise.
1925 (memento_of_get_pointer::is_pointer): Likewise.
1926 (memento_of_get_pointer::is_array): Likewise.
1927 (memento_of_get_pointer::make_debug_string): Likewise.
1928 (memento_of_get_pointer::write_reproducer): Likewise.
1929 (memento_of_get_const::dereference): Likewise.
1930 (memento_of_get_const::accepts_writes_from): Likewise.
1931 (memento_of_get_const::unqualified): Likewise.
1932 (memento_of_get_const::is_int): Likewise.
1933 (memento_of_get_const::is_float): Likewise.
1934 (memento_of_get_const::is_bool): Likewise.
1935 (memento_of_get_const::is_pointer): Likewise.
1936 (memento_of_get_const::is_array): Likewise.
1937 (memento_of_get_const::void replay_into): Likewise;
1938 (memento_of_get_const::make_debug_string): Likewise.
1939 (memento_of_get_const::write_reproducer): Likewise.
1940 (memento_of_get_volatile::dereference): Likewise.
1941 (memento_of_get_volatile::unqualified): Likewise.
1942 (memento_of_get_volatile::is_int): Likewise.
1943 (memento_of_get_volatile::is_float): Likewise.
1944 (memento_of_get_volatile::is_bool): Likewise.
1945 (memento_of_get_volatile::is_pointer): Likewise.
1946 (memento_of_get_volatile::is_array): Likewise.
1947 (memento_of_get_volatile::replay_into): Likewise;
1948 (memento_of_get_volatile::make_debug_string): Likewise.
1949 (memento_of_get_volatile::write_reproducer): Likewise.
1950 (array_type::dereference): Likewise.
1951 (array_type::is_int): Likewise.
1952 (array_type::is_float): Likewise.
1953 (array_type::is_bool): Likewise.
1954 (array_type::is_pointer): Likewise.
1955 (array_type::is_array): Likewise.
1956 (array_type::replay_into): Likewise;
1957 (array_type::make_debug_string): Likewise.
1958 (array_type::write_reproducer): Likewise.
1959 (function_type::dereference): Likewise.
1960 (function_type::function_dyn_cast_function_type): Likewise.
1961 (function_type::function_as_a_function_type): Likewise.
1962 (function_type::is_int): Likewise.
1963 (function_type::is_float): Likewise.
1964 (function_type::is_bool): Likewise.
1965 (function_type::is_pointer): Likewise.
1966 (function_type::is_array): Likewise.
1967 (function_type::replay_into): Likewise;
1968 (function_type::make_debug_string): Likewise.
1969 (function_type::write_reproducer): Likewise.
1970 (field::replay_into): Likewise;
1971 (field::write_to_dump): Likewise.
1972 (field::make_debug_string): Likewise.
1973 (field::write_reproducer): Likewise.
1974 (compound_type::dereference): Likewise.
1975 (compound_type::is_int): Likewise.
1976 (compound_type::is_float): Likewise.
1977 (compound_type::is_bool): Likewise.
1978 (compound_type::is_pointer): Likewise.
1979 (compound_type::is_array): Likewise.
1980 (compound_type::has_known_size): Likewise.
1981 (struct_::dyn_cast_struct): Likewise.
1982 (struct_::replay_into): Likewise.
1983 (struct_::access_as_type): Likewise.
1984 (struct_::make_debug_string): Likewise.
1985 (struct_::write_reproducer): Likewise.
1986 (fields::replay_into): Likewise.
1987 (fields::write_to_dump): Likewise.
1988 (fields::make_debug_string): Likewise.
1989 (fields::write_reproducer): Likewise.
1990 (union_::replay_into): Likewise.
1991 (union_::make_debug_string): Likewise.
1992 (union_::write_reproducer): Likewise.
1993 (lvalue::access_as_rvalue): Mark with OVERRIDE.
1994 (param::replay_into): Mark with FINAL OVERRIDE.
1995 (param::visit_children): Likewise.
1996 (param::dyn_cast_param): Likewise.
1997 (param::access_as_rvalue): Likewise.
1998 (param::access_as_lvalue): Likewise.
1999 (param::make_debug_string): Likewise.
2000 (param::write_reproducer): Likewise.
2001 (param::get_precedence): Likewise.
2002 (function::replay_into): Likewise.
2003 (function::write_to_dump): Likewise.
2004 (function::make_debug_string): Likewise.
2005 (function::write_reproducer): Likewise.
2006 (block::write_to_dump): Likewise.
2007 (block::make_debug_string): Likewise.
2008 (block::write_reproducer): Likewise.
2009 (block::replay_into): Likewise.
2010 (global::replay_into): Likewise;
2011 (global::visit_children): Likewise.
2012 (global::write_to_dump): Likewise.
2013 (global::make_debug_string): Likewise.
2014 (global::write_reproducer): Likewise.
2015 (global::get_precedence): Likewise.
2016 (memento_of_new_rvalue_from_const::replay_into): Likewise.
2017 (memento_of_new_rvalue_from_const::visit_children): Likewise.
2018 (memento_of_new_rvalue_from_const::is_constant): Likewise.
2019 (memento_of_new_rvalue_from_const::get_wide_int): Likewise.
2020 (memento_of_new_rvalue_from_const::make_debug_string): Likewise.
2021 (memento_of_new_rvalue_from_const::write_reproducer): Likewise.
2022 (memento_of_new_rvalue_from_const::get_precedence): Likewise.
2023 (memento_of_new_string_literal::replay_into): Likewise.
2024 (memento_of_new_string_literal::visit_children): Likewise.
2025 (memento_of_new_string_literal::make_debug_string): Likewise.
2026 (memento_of_new_string_literal::write_reproducer): Likewise.
2027 (memento_of_new_string_literal::get_precedence): Likewise.
2028 (unary_op::replay_into): Likewise.
2029 (unary_op::visit_children): Likewise.
2030 (unary_op::make_debug_string): Likewise.
2031 (unary_op::write_reproducer): Likewise.
2032 (unary_op::get_precedence): Likewise.
2033 (binary_op::replay_into): Likewise.
2034 (binary_op::visit_children): Likewise.
2035 (binary_op::make_debug_string): Likewise.
2036 (binary_op::write_reproducer): Likewise.
2037 (binary_op::get_precedence): Likewise.
2038 (comparison::replay_into): Likewise.
2039 (comparison::visit_children): Likewise.
2040 (comparison::make_debug_string): Likewise.
2041 (comparison::write_reproducer): Likewise.
2042 (comparison::get_precedence): Likewise.
2043 (cast::replay_into): Likewise.
2044 (cast::visit_children): Likewise.
2045 (cast::make_debug_string): Likewise.
2046 (cast::write_reproducer): Likewise.
2047 (cast::get_precedence): Likewise.
2048 (call::replay_into): Likewise.
2049 (call::visit_children): Likewise.
2050 (call::make_debug_string): Likewise.
2051 (call::write_reproducer): Likewise.
2052 (call::get_precedence): Likewise.
2053 (call_through_ptr::replay_into): Likewise.
2054 (call_through_ptr::visit_children): Likewise.
2055 (call_through_ptr::make_debug_string): Likewise.
2056 (call_through_ptr::write_reproducer): Likewise.
2057 (call_through_ptr::get_precedence): Likewise.
2058 (array_access::replay_into): Likewise.
2059 (array_access::visit_children): Likewise.
2060 (array_access::make_debug_string): Likewise.
2061 (array_access::write_reproducer): Likewise.
2062 (array_access::get_precedence): Likewise.
2063 (access_field_of_lvalue::replay_into): Likewise.
2064 (access_field_of_lvalue::visit_children): Likewise.
2065 (access_field_of_lvalue::make_debug_string): Likewise.
2066 (access_field_of_lvalue::write_reproducer): Likewise.
2067 (access_field_of_lvalue::get_precedence): Likewise.
2068 (access_field_rvalue::replay_into): Likewise.
2069 (access_field_rvalue::visit_children): Likewise.
2070 (access_field_rvalue::make_debug_string): Likewise.
2071 (access_field_rvalue::write_reproducer): Likewise.
2072 (access_field_rvalue::get_precedence): Likewise.
2073 (dereference_field_rvalue::replay_into): Likewise.
2074 (dereference_field_rvalue::visit_children): Likewise.
2075 (dereference_field_rvalue::make_debug_string): Likewise.
2076 (dereference_field_rvalue::write_reproducer): Likewise.
2077 (dereference_field_rvalue::get_precedence): Likewise.
2078 (dereference_rvalue::replay_into): Likewise.
2079 (dereference_rvalue::visit_children): Likewise.
2080 (dereference_rvalue::make_debug_string): Likewise.
2081 (dereference_rvalue::write_reproducer): Likewise.
2082 (dereference_rvalue::get_precedence): Likewise.
2083 (get_address_of_lvalue::replay_into): Likewise.
2084 (get_address_of_lvalue::visit_children): Likewise.
2085 (get_address_of_lvalue::make_debug_string): Likewise.
2086 (get_address_of_lvalue::write_reproducer): Likewise.
2087 (get_address_of_lvalue::get_precedence): Likewise.
2088 (local::replay_into): Likewise.
2089 (local::visit_children): Likewise.
2090 (local::write_to_dump): Likewise.
2091 (local::make_debug_string): Likewise.
2092 (local::write_reproducer): Likewise.
2093 (local::get_precedence): Likewise.
2094 (statement::write_to_dump): Likewise.
2095 (eval::replay_into): Likewise.
2096 (eval::make_debug_string): Likewise.
2097 (eval::write_reproducer): Likewise.
2098 (assignment::replay_into): Likewise.
2099 (assignment::make_debug_string): Likewise.
2100 (assignment::write_reproducer): Likewise.
2101 (assignment_op::replay_into): Likewise.
2102 (assignment_op::make_debug_string): Likewise.
2103 (assignment_op::write_reproducer): Likewise.
2104 (comment::replay_into): Likewise.
2105 (comment::make_debug_string): Likewise.
2106 (comment::write_reproducer): Likewise.
2107 (conditional::replay_into): Likewise.
2108 (conditional::get_successor_blocks): Likewise.
2109 (conditional::make_debug_string): Likewise.
2110 (conditional::write_reproducer): Likewise.
2111 (jump::replay_into): Likewise.
2112 (jump::get_successor_blocks): Likewise.
2113 (jump::make_debug_string): Likewise.
2114 (jump::write_reproducer): Likewise.
2115 (return_::replay_into): Likewise.
2116 (return_::get_successor_blocks): Likewise.
2117 (return_::make_debug_string): Likewise.
2118 (return_::write_reproducer): Likewise.
2119 (case_::replay_into): Likewise.
2120 (case_::write_reproducer): Likewise.
2121 (case_::make_debug_string): Likewise.
2122 (switch_::replay_into): Likewise.
2123 (switch_::get_successor_blocks): Likewise.
2124 (switch_::make_debug_string): Likewise.
2125 (switch_::write_reproducer): Likewise.
2127 2016-02-08 David Malcolm <dmalcolm@redhat.com>
2129 * dummy-frontend.c (jit_langhook_init): Remove
2130 second argument to build_common_tree_nodes to
2133 2016-01-23 Iain Buclaw <ibuclaw@gdcproject.org>
2135 * jit-playback.c: Include pthread.h.
2137 2016-01-19 David Malcolm <dmalcolm@redhat.com>
2140 * jit-playback.c (gcc::jit::playback::compile_to_file::postprocess):
2141 Potentially add the temporary artifact to the tempdir's list of
2142 tempfiles needing additional cleanup.
2143 (gcc::jit::playback::context::extract_any_requested_dumps): Likewise
2145 * jit-tempdir.c (gcc::jit::tempdir::~tempdir): Clean up additional
2147 * jit-tempdir.h (gcc::jit::tempdir::add_temp_file): New method.
2148 (gcc::jit::tempdir::m_tempfiles): New field.
2149 * docs/cp/intro/tutorial04.rst: Update for changes to toyvm.cc.
2150 * docs/examples/tut04-toyvm/toyvm.cc (class compilation_result):
2152 (toyvm_function::compile): Change return type from function ptr
2153 to a compilation_result.
2154 (toyvm_function::get_function_name): New accessor.
2155 (toyvm_function::m_funcname): New field.
2156 (get_function_name): Convert to...
2157 (toyvm_function::make_function_name): ...this new method.
2158 (toyvm_function::parse): Call make_function_name.
2159 (toyvm_function::compile): Convert return type from function ptr
2160 to a compilation_result. Use get_function_name.
2161 (compilation_state::compile): Convert return type from
2162 gcc_jit_result * to a compilation_result.
2163 (test_script): Update for above changes, extracting the code from
2164 the compilation_result.
2166 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2168 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2170 Update copyright years.
2172 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2174 * dummy-frontend.c: Remove unused header files.
2175 * jit-builtins.c: Likewise.
2176 * jit-playback.c: Likewise.
2177 * jit-recording.c: Likewise.
2178 * jit-spec.c: Likewise.
2179 * libgccjit.c: Likewise.
2181 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
2183 * jit-builtins.c: Don't undef DEF_BUILTIN.
2185 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2187 * dummy-frontend.c: Reorder #include's and remove duplicates.
2188 * jit-builtins.c: Likewise.
2189 * jit-playback.c: Likewise.
2190 * jit-recording.c: Likewise.
2191 * libgccjit.c: Likewise.
2193 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2195 * jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
2196 DEF_FUNCTION_TYPE_11): Define.
2197 * jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
2198 DEF_FUNCTION_TYPE_11): Define.
2200 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
2201 Ulrich Drepper <drepper@gmail.com>
2203 * jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use.
2205 2015-09-30 Matthias Klose <doko@ubuntu.com>
2207 * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,
2208 remove DEF_FUNCTION_TYPE_VAR_11.
2209 * jit-builtins.c (builtins_manager::make_type): Define and handle
2210 DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.
2212 2015-08-25 David Malcolm <dmalcolm@redhat.com>
2214 * docs/cp/topics/contexts.rst
2215 (gccjit::context::set_bool_use_external_driver): New.
2216 * docs/internals/test-hello-world.exe.log.txt: Update.
2217 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_5): New.
2218 * docs/topics/contexts.rst
2219 (gcc_jit_context_set_bool_use_external_driver): New.
2220 * jit-common.h (enum inner_bool_option): Add
2221 INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
2222 * jit-playback.c (gcc_driver_name): New global.
2223 (gcc:jit::playback::context::invoke_driver): Split out second
2225 (gcc::jit::playback::context::invoke_embedded_driver): ...this new
2227 (gcc::jit::playback::context::invoke_external_driver): ...this new
2230 (gcc::jit::playback::context::get_inner_bool_option): New.
2231 (gcc::jit::playback::context::invoke_embedded_driver): New.
2232 (gcc::jit::playback::context::invoke_external_driver): New.
2233 * jit-recording.c (inner_bool_option_reproducer_strings):
2234 Add entry for INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
2236 (gccjit::context::set_bool_use_external_driver): New.
2237 * libgccjit.c (gcc_jit_context_set_bool_use_external_driver): New.
2238 * libgccjit.h (gcc_jit_context_set_bool_use_external_driver): New.
2239 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_use_external_driver):
2241 * libgccjit.map (LIBGCCJIT_ABI_5): New.
2242 * notes.txt: Show invocation of embedded copy of driver.
2243 * docs/internals/test-hello-world.exe.log.txt: Update
2245 2015-08-13 David Malcolm <dmalcolm@redhat.com>
2247 * jit-playback.c (invoke_driver): On OS X, add
2248 "-Wl,-undefined,dynamic_lookup" to the driver arguments.
2250 2015-08-03 David Malcolm <dmalcolm@redhat.com>
2252 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
2253 * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY):
2254 We no longer show a profile.
2255 * docs/topics/index.rst (Topic Reference): Add performance.rst.
2256 * docs/topics/performance.rst: New file.
2257 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2258 * jit-playback.c (gcc::jit::playback::context::compile): Add timer
2259 param when constructing the "toplev" instance.
2260 (gcc::jit::playback::context::acquire_mutex): Add timer param when
2261 constructing auto_timevar instance.
2262 (gcc::jit::playback::context::make_fake_args): If we have a timer,
2263 add "-ftime-report".
2264 (gcc::jit::playback::context::invoke_driver): Add timer param when
2265 constructing auto_timevar instance.
2266 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
2267 * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor.
2268 * jit-recording.c: Include timevar.h.
2269 (gcc::jit::recording::context::context): Initialize field "m_timer".
2270 * jit-recording.h: Add forward declaration of class timer.
2271 (gcc::jit::recording::context::set_timer): New method.
2272 (gcc::jit::recording::context::get_timer): New method.
2273 (gcc::jit::recording::context::m_timer): New field.
2274 * libgccjit++.h (gccjit::timer): New class.
2275 (gccjit::auto_time): New class.
2276 (gccjit::context::set_timer): New method.
2277 (gccjit::context::get_timer): New.
2278 (gccjit::timer::timer): New.
2279 (gccjit::timer::push): New.
2280 (gccjit::timer::pop): New.
2281 (timer::print): New.
2282 (timer::get_inner_timer): New.
2283 (timer::release): New.
2284 (auto_time::auto_time): New.
2285 (auto_time::~auto_time): New.
2286 * libgccjit.c: Include timevar.h.
2287 (struct gcc_jit_timer): New.
2288 (gcc_jit_timer_new): New function.
2289 (gcc_jit_timer_release): New function.
2290 (gcc_jit_context_set_timer): New function.
2291 (gcc_jit_context_get_timer): New function.
2292 (gcc_jit_timer_push): New function.
2293 (gcc_jit_timer_pop): New function.
2294 (gcc_jit_timer_print): New function.
2295 * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro.
2296 (gcc_jit_timer): New typedef.
2297 (gcc_jit_timer_new): New function.
2298 (gcc_jit_timer_release): New function.
2299 (gcc_jit_context_set_timer): New function.
2300 (gcc_jit_context_get_timer): New function.
2301 (gcc_jit_timer_push): New function.
2302 (gcc_jit_timer_pop): New function.
2303 (gcc_jit_timer_print): New function.
2304 * libgccjit.map (LIBGCCJIT_ABI_4): New.
2305 (gcc_jit_timer_new): New function.
2306 (gcc_jit_timer_release): New function.
2307 (gcc_jit_context_set_timer): New function.
2308 (gcc_jit_context_get_timer): New function.
2309 (gcc_jit_timer_push): New function.
2310 (gcc_jit_timer_pop): New function.
2311 (gcc_jit_timer_print): New function.
2313 2015-07-23 David Malcolm <dmalcolm@redhat.com>
2315 * jit-playback.c (invoke_driver): Convert local "argvec"
2316 to an auto_argvec, so that it owns copies of the strings,
2317 rather than borrows them, updating ADD_ARG to use xstrdup
2318 and special-casing the NULL terminator to avoid
2319 xstrdup (NULL). Call add_multilib_driver_arguments at the front
2321 (MULTILIB_DEFAULTS): Provide a default definition.
2322 (multilib_defaults_raw): New constant array.
2323 (gcc::jit::playback::context::add_multilib_driver_arguments): New
2326 (gcc::jit::playback::context::add_multilib_driver_arguments): New
2328 * docs/internals/test-hello-world.exe.log.txt: Update.
2329 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2331 2015-07-16 David Malcolm <dmalcolm@redhat.com>
2333 * docs/internals/index.rst (Overview of code structure): Add note
2334 that the implementation is in C++, despite the .c extension.
2335 (Submitting patches): New subsection.
2336 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2338 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
2340 * dummy-frontend.c: Adjust includes for flags.h changes.
2341 * jit-common.h: Likewise.
2342 * jit-playback.c: Likewise.
2344 2015-07-08 David Malcolm <dmalcolm@redhat.com>
2347 * libgccjit.c (gcc_jit_context_new_field): Show name of field in
2348 "unknown size" error message.
2349 (gcc_jit_struct_set_fields): Show name of struct in error message.
2350 (gcc_jit_context_new_global): Show name of global in
2351 "unknown size" error message.
2352 (gcc_jit_function_new_local): Likewise for local.
2354 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
2356 * dummy-frontend.c: Adjust includes.
2357 * jit-common.h: Likewise.
2358 * jit-playback.c: Likewise.
2360 2015-07-07 David Malcolm <dmalcolm@redhat.com>
2363 * jit-recording.h: Within namespace gcc:jit::recording...
2364 (type::has_known_size): New virtual function.
2365 (struct_has_known_size): New function.
2366 * libgccjit.c (gcc_jit_context_new_field): Verify that the type
2368 (gcc_jit_context_new_global): Likewise.
2369 (gcc_jit_function_new_local): Likewise.
2371 2015-07-07 David Malcolm <dmalcolm@redhat.com>
2374 * dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we
2375 handle modes QI, HI, SI, DI, TI.
2377 2015-07-01 David Malcolm <dmalcolm@redhat.com>
2380 * jit-playback.c (jit_mark_addressable): New function.
2381 (gcc::jit::playback::lvalue::get_address): Call
2382 jit_mark_addressable on the underlying tree.
2384 2015-07-01 David Malcolm <dmalcolm@redhat.com>
2386 * docs/topics/types.rst (gcc_jit_context_new_union_type): Add
2388 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2390 2015-07-01 David Malcolm <dmalcolm@redhat.com>
2392 * docs/topics/contexts.rst (gcc_jit_context_set_bool_option):
2393 Clarify lack of lifetime requirements on (const char *) parameter.
2394 * docs/topics/expressions.rst
2395 (gcc_jit_context_new_string_literal): Likewise.
2396 (gcc_jit_context_new_global): Likewise.
2397 * docs/topics/functions.rst (gcc_jit_context_new_param): Likewise.
2398 (gcc_jit_context_new_function): Likewise.
2399 (gcc_jit_function_new_block): Likewise.
2400 (gcc_jit_block_add_comment): Likewise.
2401 * docs/topics/locations.rst (gcc_jit_context_new_location):
2403 * docs/topics/types.rst (gcc_jit_context_new_field): Likewise.
2404 (gcc_jit_context_new_struct_type): Likewise.
2405 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2407 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2409 * docs/cp/topics/functions.rst (Blocks): Add switch statements to
2410 list of ways to terminate a block.
2411 (gccjit::block::end_with_switch): Add function description.
2412 (gccjit::case_): Add class.
2413 (gccjit::context::new_case): Add function description.
2414 * docs/cp/topics/objects.rst: Add "case_" to class hierarchy.
2415 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New.
2416 * docs/topics/functions.rst (Blocks): Add switch statements to
2417 list of ways to terminate a block.
2418 (gcc_jit_block_end_with_switch): Add function description.
2419 (gcc_jit_case): Add type.
2420 (gcc_jit_context_new_case): Add function description.
2421 (gcc_jit_case_as_object): Add function description.
2422 * docs/topics/objects.rst: Add gcc_jit_case to class hierarchy.
2423 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2424 * jit-common.h (gcc::jit::recording::case_): Add forward decl.
2425 (gcc::jit::playback::case_): Add forward decl.
2426 * jit-playback.c (add_case): New function.
2427 (gcc::jit::playback::block::add_switch): New function.
2428 * jit-playback.h (gcc::jit::playback::case_): New struct.
2429 (gcc::jit::playback::block::get_function): New method.
2430 (gcc::jit::playback::block::add_switch): New method.
2431 * jit-recording.c: Within namespace gcc::jit...
2432 (recording::context::new_case): New method.
2433 (recording::function::validate): Update for change to
2434 get_successor_blocks.
2435 (recording::block::end_with_switch): New method.
2436 (recording::block::get_successor_blocks): Update to support an
2437 arbitrary number of successor blocks.
2438 (recording::block::dump_edges_to_dot): Likewise.
2439 (memento_of_new_rvalue_from_const <int>::get_wide_int): New.
2440 (memento_of_new_rvalue_from_const <long>::get_wide_int): New.
2441 (memento_of_new_rvalue_from_const <double>::get_wide_int): New.
2442 (memento_of_new_rvalue_from_const <void *>::get_wide_int): New.
2443 (recording::statement::get_successor_blocks): Update to support an
2444 arbitrary number of successor blocks.
2445 (recording::conditional::get_successor_blocks): Likewise.
2446 (recording::jump::get_successor_blocks): Likewise.
2447 (recording::return_::get_successor_blocks): Likewise.
2448 (recording::case_::write_reproducer): New.
2449 (recording::case_::make_debug_string): New.
2450 (recording::switch_::switch_): New.
2451 (recording::switch_::replay_into): New.
2452 (recording::switch_::get_successor_blocks): New.
2453 (recording::switch_::make_debug_string): New.
2454 (recording::switch_::write_reproducer): New.
2455 * jit-recording.h: Within namespace gcc::jit::recording...
2456 (context::new_case): New.
2457 (rvalue::is_constant): New.
2458 (rvalue::get_wide_int): New.
2459 (block::end_with_switch): New.
2460 (block::get_successor_blocks): Update to support an arbitrary
2461 number of successor blocks.
2462 (memento_of_new_rvalue_from_const::is_constant): New.
2463 (memento_of_new_rvalue_from_const::get_wide_int): New.
2464 (statement::get_successor_blocks): Update to support an arbitrary
2465 number of successor blocks.
2466 (conditional::get_successor_blocks): Likewise.
2467 (jump::get_successor_blocks): Likewise.
2468 (return_::get_successor_blocks): Likewise.
2469 (case_): New subclass of memento.
2470 (switch_): New subclass of statement.
2471 * libgccjit++.h (gccjit::case_): New subclass of gccjit::object.
2472 (gccjit::context::new_case): New method.
2473 (gccjit::block::end_with_switch): New method.
2474 (gccjit::case_::case): New ctors.
2475 (gccjit::case_::get_inner_case): New method.
2476 * libgccjit.c: Include "typed-splay-tree.h"
2477 (struct gcc_jit_case): New.
2478 (gcc_jit_context_new_case): New function.
2479 (gcc_jit_case_as_object): New function.
2480 (valid_dest_for_switch): New function.
2481 (valid_case_for_switch): New function.
2482 (class api_call_validator): New class.
2483 (class case_range_validator): New class.
2484 (case_range_validator::case_range_validator): New.
2485 (case_range_validator::validate): New.
2486 (case_range_validator::case_compare): New.
2487 (case_range_validator::get_wide_int): new.
2488 (gcc_jit_block_end_with_switch): New.
2489 * libgccjit.h: Add gcc_jit_case to class hierarchy comment.
2490 (gcc_jit_case): New typedef.
2491 (gcc_jit_context_new_case): New function.
2492 (gcc_jit_case_as_object): New function.
2493 (gcc_jit_block_end_with_switch): New function.
2494 (LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New.
2495 * libgccjit.map: Add gcc_jit_block_end_with_switch,
2496 gcc_jit_case_as_object and gcc_jit_context_new_case.
2498 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2501 * docs/cp/topics/contexts.rst
2502 (gccjit::context::set_bool_allow_unreachable_blocks): New.
2503 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New.
2504 * docs/topics/contexts.rst (Options): Add notes discussing the
2505 transition from enums to entrypoints for new options.
2506 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
2507 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2508 * jit-common.h (gcc::jit::inner_bool_option): New enum.
2509 * jit-recording.c: Within namespace gcc::jit...
2510 (recording::context::context): Handle m_inner_bool_options.
2511 (recording::context::set_inner_bool_option): New.
2512 (inner_bool_option_reproducer_strings): New.
2513 (recording::context::log_all_options): Log the "inner" bool
2515 (recording::context::log_inner_bool_option): New.
2516 (recording::context::dump_reproducer_to_file): Write initializers
2517 for "inner" bool options.
2518 (recording::function::validate): Don't check for block
2519 reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set.
2520 * jit-recording.h: Within namespace gcc::jit...
2521 (recording::context::set_inner_bool_option): New.
2522 (recording::context::get_inner_bool_option): New.
2523 (recording::context::log_inner_bool_option): New.
2524 (recording::context::m_inner_bool_options): New.
2526 (gccjit::context::set_bool_allow_unreachable_blocks): New.
2528 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
2529 * libgccjit.h: Add note about options present in the
2530 initial release of libgccjit.
2531 (gcc_jit_context_set_bool_allow_unreachable_blocks): New API
2533 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks):
2535 * libgccjit.map (LIBGCCJIT_ABI_2): New, containing...
2536 (gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new
2539 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2542 * docs/cp/topics/contexts.rst (Additional command-line options):
2544 * docs/topics/compatibility.rst: New file.
2545 * docs/topics/contexts.rst (Additional command-line options): New
2547 * docs/topics/index.rst: Add compatibility.rst.
2548 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2549 * jit-playback.c (make_fake_args): Add call to
2550 append_command_line_options.
2551 * jit-recording.c: Within namespace gcc::jit...
2552 (recording::context::~context): Free the optnames within
2553 m_command_line_options.
2554 (recording::context::set_bool_option): Likewise.
2555 (recording::context::add_command_line_option): New method.
2556 (recording::context::append_command_line_options): New method.
2557 (recording::context::dump_reproducer_to_file): Add command-line
2559 * jit-recording.h: Within namespace gcc::jit...
2560 (recording::context::add_command_line_option): New method.
2561 (recording::context::append_command_line_options): New method.
2562 (recording::context::m_command_line_options): New field.
2563 * libgccjit++.h (gccjit::context::add_command_line_option): New
2565 * libgccjit.c (gcc_jit_context_add_command_line_option): New API
2567 * libgccjit.h (gcc_jit_context_add_command_line_option): New API
2569 (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New
2571 * libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add
2572 LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option.
2574 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2577 (gcc::jit::recording::context::dump_reproducer_to_file):
2578 Add pragma to generated reproducers to disable -Wunused-variable.
2579 Fix handling of NULL string options.
2581 2015-06-30 David Malcolm <dmalcolm@redhat.com>
2583 * docs/cp/topics/expressions.rst: Remove stray semicolon.
2584 * docs/cp/topics/functions.rst: Remove stray backslash.
2585 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2587 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
2589 * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
2590 * jit-playback.c: Likewise.
2592 2015-06-25 Andrew Macleod <amacleod@redhat.com>
2594 * jit-common.h: Don't include alias.h.
2596 2015-06-17 David Malcolm <dmalcolm@redhat.com>
2598 * libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field
2599 is for the correct struct.
2600 (gcc_jit_rvalue_access_field): Likewise.
2602 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2604 * dummy-frontend.c: Do not include input.h, line-map.h or is-a.h.
2605 * jit-common.h: Likewise.
2606 * jit-playback.c: Likewise.
2608 2015-06-16 David Malcolm <dmalcolm@redhat.com>
2611 * jit-recording.c: Within namespace gcc::jit::recording::
2612 (rvalue::get_debug_string_parens): New function.
2613 (binary_op::make_debug_string): Update to mimic C precedence
2615 (binary_op_precedence): New array.
2616 (binary_op::get_precedence): New function.
2617 (comparison::make_debug_string): Update to mimic C precedence
2619 (comparison_precedence): New array.
2620 (comparison::get_precedence): New function.
2621 (cast::make_debug_string): Update to mimic C precedence rules.
2622 (call::make_debug_string): Likewise.
2623 (call_through_ptr::make_debug_string): Likewise.
2624 (array_access::make_debug_string): Likewise.
2625 (access_field_of_lvalue::make_debug_string): Likewise.
2626 (access_field_rvalue::make_debug_string): Likewise.
2627 (dereference_field_rvalue::make_debug_string): Likewise.
2628 (dereference_rvalue::make_debug_string): Likewise.
2629 (get_address_of_lvalue::make_debug_string): Likewise.
2630 * jit-recording.h: Within namespace gcc::jit::recording::
2631 (precedence): New enum.
2632 (rvalue::rvalue): Initialize field "m_parenthesized_string".
2633 (rvalue::get_debug_string_parens): New method.
2634 (rvalue::get_precedence): New pure virtual function.
2635 (rvalue::m_parenthesized_string): New field.
2636 (param::get_precedence): New function.
2637 (global::get_precedence): New function.
2638 (memento_of_new_rvalue_from_const::get_precedence): New function.
2639 (memento_of_new_string_literal::get_precedence): New function.
2640 (unary_op::get_precedence): New function.
2641 (binary_op::get_precedence): New function.
2642 (comparison::get_precedence): New function.
2643 (cast::get_precedence): New function.
2644 (call::get_precedence): New function.
2645 (call_through_ptr::get_precedence): New function.
2646 (array_access::get_precedence): New function.
2647 (access_field_of_lvalue::get_precedence): New function.
2648 (access_field_rvalue::get_precedence): New function.
2649 (dereference_field_rvalue::get_precedence): New function.
2650 (dereference_rvalue::get_precedence): New function.
2651 (get_address_of_lvalue::get_precedence): New function.
2652 (local::get_precedence): New function.
2654 2015-06-09 Matthias Klose <doko@ubuntu.com>
2656 * Make-lang.in (jit.install-common): Install headers using INSTALL_DATA.
2658 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
2660 * dummy-frontend.c : Adjust include files.
2661 * jit-common.h : Likewise.
2662 * jit-playback.c : Likewise.
2664 2015-06-05 David Malcolm <dmalcolm@redhat.com>
2667 (jit_langhook_post_compilation_parsing_cleanups): Remove.
2668 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
2669 * jit-playback.c (gcc::jit::playback::context::new_global): Add
2670 call to varpool_node::finalize_decl.
2671 (gcc::jit::playback::context::finalize_global_decls): Remove.
2673 (gcc::jit::playback::context::finalize_global_decls): Remove.
2675 2015-06-05 David Malcolm <dmalcolm@redhat.com>
2677 * dummy-frontend.c (jit_langhook_write_globals): Rename to...
2678 (jit_langhook_post_compilation_parsing_cleanups): ...this, and
2679 eliminate calls to finalize_compilation_unit and
2680 write_global_decls_2.
2681 (LANG_HOOKS_WRITE_GLOBALS): Rename to...
2682 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
2683 redirect from jit_langhook_write_globals to
2684 jit_langhook_post_compilation_parsing_cleanups.
2686 (gcc::jit::playback::context::write_global_decls_1): Rename to...
2687 (gcc::jit::playback::context::finalize_global_decls): ...this.
2688 (gcc::jit::playback::context::write_global_decls_1): Delete.
2690 (gcc::jit::playback::context::write_global_decls_1): Rename to...
2691 (gcc::jit::playback::context::finalize_global_decls): ...this.
2692 (gcc::jit::playback::context::write_global_decls_1): Delete.
2694 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
2696 * dummy-frontend.c: Adjust includes for restructured coretypes.h.
2697 * jit-common.h: Likewise.
2698 * jit-playback.c: Likewise.
2700 2015-05-12 David Malcolm <dmalcolm@redhat.com>
2702 * jit-builtins.c: Include vec.h before target.h.
2704 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2706 * Make-lang.in (jit.mostlyclean): Remove shared libraries and object
2709 2015-04-09 David Malcolm <dmalcolm@redhat.com>
2712 * docs/cp/topics/expressions.rst (Simple expressions): Fix copy
2713 and paste error in description of gccjit::context::one.
2714 * docs/topics/expressions.rst (Simple expressions): Likewise in
2715 description of gcc_jit_context_one.
2716 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2718 2015-03-13 Uros Bizjak <ubizjak@gmail.com>
2720 * jit-recording.c (dump::write): Also check vasprintf return value.
2721 (recording::context::add_error_va): Ditto.
2722 (recording::string::from_printf): Ditto.
2724 2015-03-13 David Malcolm <dmalcolm@redhat.com>
2726 * docs/internals/index.rst (Packaging notes): New section.
2727 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2729 2015-03-05 David Malcolm <dmalcolm@redhat.com>
2731 * docs/cp/intro/tutorial03.rst: Add missing arguments to
2732 gccjit::block::end_with_conditional call. Add on_true/on_false
2733 comments. Tweak the wording.
2734 * docs/intro/tutorial03.rst: Add missing arguments to
2735 gcc_jit_block_end_with_conditional call. Add some clarifying
2737 * docs/topics/compilation.rst: Tweak the wording to avoid an
2738 ambiguous use of "this".
2739 * docs/topics/contexts.rst: Fix a typo.
2740 * docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
2742 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2744 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
2747 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8)
2748 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
2749 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2750 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8)
2751 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
2752 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2754 2015-02-04 David Malcolm <dmalcolm@redhat.com>
2757 * docs/conf.py (html_theme): Change from 'pyramid'
2760 2015-02-04 David Malcolm <dmalcolm@redhat.com>
2762 * docs/topics/contexts.rst (gcc_jit_context_acquire): Fix
2764 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2766 2015-02-03 David Malcolm <dmalcolm@redhat.com>
2768 * jit-logging.h (gcc::jit::log_user::log): Make const.
2769 * jit-recording.c (gcc::jit::recording::context::set_str_option):
2770 Log the new value of the option.
2771 (gcc::jit::recording::context::set_int_option): Likewise.
2772 (gcc::jit::recording::context::set_bool_option): Likewise.
2773 (gcc::jit::recording::context::compile): Log the value of all
2775 (gcc::jit::recording::context::compile_to_file): Likewise.
2776 (gcc::jit::recording::context::log_all_options): New function.
2777 (gcc::jit::recording::context::log_str_option): New function.
2778 (gcc::jit::recording::context::log_int_option): New function.
2779 (gcc::jit::recording::context::log_bool_option): New function.
2780 * jit-recording.h (gcc::jit::recording::context::log_all_options):
2782 (gcc::jit::recording::context::log_str_option): New function.
2783 (gcc::jit::recording::context::log_int_option): New function.
2784 (gcc::jit::recording::context::log_bool_option): New function.
2785 * docs/internals/test-hello-world.exe.log.txt: Update for above
2787 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2789 2015-02-03 David Malcolm <dmalcolm@redhat.com>
2792 * Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o.
2793 (LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS.
2794 * jit-playback.c: Include gcc.h.
2795 (gcc::jit::playback::context::compile): Move mutex acquisition
2796 to before the call to make_fake_args.
2797 (append_arg_from_driver): New function.
2798 (gcc::jit::playback::context::make_fake_args): On the first call,
2799 call into driver_get_configure_time_options to get configure-time
2800 default options and cache them. Add them to the args for
2802 * jit-spec.c: New source file.
2803 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
2805 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2807 2015-02-02 David Malcolm <dmalcolm@redhat.com>
2810 * dummy-frontend.c (jit_langhook_type_for_mode): Support
2811 TYPE_MODE (long_long_integer_type_node).
2813 2015-01-27 David Malcolm <dmalcolm@redhat.com>
2815 * docs/internals/test-hello-world.exe.log.txt: Add example version
2817 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2818 * jit-common.h (gcc::jit::dump::get_file): New accessor.
2819 * jit-logging.c: Include toplev.h.
2820 (gcc::jit::logger::logger): Log the GCC version.
2821 * jit-recording.c: Include toplev.h.
2822 (gcc:jit::recording::context::dump_reproducer_to_file): Log the
2825 2015-01-26 David Malcolm <dmalcolm@redhat.com>
2827 * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo.
2828 * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The
2829 error buffer is only valid until the next call to the context.
2830 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2831 * libgccjit.h (gcc_jit_context_get_first_error): Reword the
2832 comment to omit mention of compiling.
2833 (gcc_jit_context_get_last_error): The error buffer is only valid
2834 until the next call to the context.
2836 2015-01-26 David Malcolm <dmalcolm@redhat.com>
2839 * config-lang.in (compilers): Drop "libgccjit.so".
2841 2015-01-23 David Malcolm <dmalcolm@redhat.com>
2844 * jit-playback.c (gcc::jit::playback::context::compile): Construct
2845 toplev instances with init_signals=false.
2847 2015-01-19 David Malcolm <dmalcolm@redhat.com>
2849 * docs/cp/topics/results.rst: Rename to...
2850 * docs/cp/topics/compilation.rst: ...this, and add section on
2851 ahead-of-time compilation.
2852 * docs/cp/topics/index.rst: Update for renaming of results.rst
2854 * docs/examples/emit-alphabet.bf: New file, a sample "brainf"
2856 * docs/examples/tut05-bf.c: New file, implementing a compiler
2858 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
2859 changes to logger output.
2860 * docs/intro/index.rst: Add tutorial05.rst
2861 * docs/intro/tutorial05.rst: New file.
2862 * docs/topics/results.rst: Rename to...
2863 * docs/topics/compilation.rst: ...this, and add section on
2864 ahead-of-time compilation.
2865 * docs/topics/index.rst: Update for renaming of results.rst to
2867 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2868 * jit-playback.c (gcc::jit::playback::context::compile): Convert
2869 return type from result * to void. Move the code to convert to
2870 dso and dlopen the result to a new pure virtual "postprocess"
2872 (gcc::jit::playback::compile_to_memory::compile_to_memory): New
2874 (gcc::jit::playback::compile_to_memory::postprocess): New
2875 function, based on playback::context::compile.
2876 (gcc::jit::playback::compile_to_file::compile_to_file): New
2878 (gcc::jit::playback::compile_to_file::postprocess): New function.
2879 (gcc::jit::playback::compile_to_file::copy_file): New function.
2880 (gcc::jit::playback::context::convert_to_dso): Move internals
2882 (gcc::jit::playback::context::invoke_driver): New method. Add
2883 "-shared" and "-c" options to driver's argv as needed.
2884 * jit-playback.h: Include "timevar.h".
2885 (gcc::jit::playback::context::compile): Convert return type from
2887 (gcc::jit::playback::context::postprocess): New pure virtual
2888 function, making this an abstract base class.
2889 (gcc::jit::playback::context::get_tempdir): New accessor.
2890 (gcc::jit::playback::context::invoke_driver): New function.
2891 (class gcc::jit::playback::compile_to_memory): New subclass of
2893 (class gcc::jit::playback::compile_to_file): Likewise.
2894 * jit-recording.c (gcc::jit::recording::context::compile): Use a
2895 playback::compile_to_memory, and extract its result.
2896 (gcc::jit::recording::context::compile_to_file): New function.
2897 * jit-recording.h (gcc::jit::recording::context::compile_to_file):
2899 * libgccjit++.h (gccjit::context::compile_to_file): New method.
2900 * libgccjit.c (gcc_jit_context_compile): Update log message to
2901 clarify that this is an in-memory compile.
2902 (gcc_jit_context_compile_to_file): New function.
2903 * libgccjit.h (gcc_jit_context): Clarify that you can compile
2904 a context more than once, and that you can compile to a file
2905 as well as to memory.
2906 (gcc_jit_result): Clarify that this is the result of an
2907 in-memory compilation.
2908 (gcc_jit_context_compile): Clarify that you can compile, and that
2909 this is an in-memory compilation.
2910 (enum gcc_jit_output_kind): New enum.
2911 (gcc_jit_context_compile_to_file): New function.
2912 (gcc_jit_context_enable_dump): Clarify comment to cover both forms
2914 * libgccjit.map (gcc_jit_context_compile_to_file): New API
2916 * notes.txt: Update to show the playback::context::postprocess
2919 2015-01-19 David Malcolm <dmalcolm@redhat.com>
2922 (gcc::jit::recording::memento_of_new_string_literal::make_debug_string):
2923 Add missing format string.
2925 2015-01-16 David Malcolm <dmalcolm@redhat.com>
2927 * Make-lang.in (lang_checks_parallelized): Add "check-jit".
2928 (check_jit_parallelize): Set this to an arbitrary value (10).
2930 2015-01-16 Jakub Jelinek <jakub@redhat.com>
2932 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of
2934 (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and
2936 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
2939 2015-01-15 Richard Sandiford <richard.sandiford@arm.com>
2941 Update copyright years in docs/.
2943 2015-01-15 David Malcolm <dmalcolm@redhat.com>
2945 * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the
2946 lvalue and the rvalue are of compatible type.
2948 2015-01-13 David Malcolm <dmalcolm@redhat.com>
2950 * docs/cp/topics/contexts.rst (Debugging): Add
2951 gccjit::context::dump_reproducer_to_file.
2952 * docs/internals/index.rst (Design notes): New section,
2953 discussing input validation and
2954 gcc_jit_context_dump_reproducer_to_file.
2955 * docs/topics/contexts.rst (Debugging): Add
2956 gcc_jit_context_dump_reproducer_to_file.
2957 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2958 * jit-common.h (gcc::jit::dump::get_context): New accessor.
2959 * jit-recording.c: Include "hash-map.h".
2960 Within namespace ::gcc::jit...
2961 (dump::write): Flush each line.
2962 (dump::make_location): Pass false for new param "created_by_user".
2963 (class allocator): New class.
2964 (allocator::~allocator): New function.
2965 (allocator::xstrdup_printf): New function.
2966 (allocator::xstrdup_printf_va): New function.
2967 (class reproducer): New subclass of dump.
2968 (reproducer::reproducer): New function.
2969 (reproducer::write_params): New function.
2970 (reproducer::write_args): New function.
2971 (reproducer::make_identifier): New function.
2972 (reproducer::make_tmp_identifier): New function.
2973 (reproducer::get_identifier): New pair of functions.
2974 (reproducer::get_identifier_as_rvalue): New function.
2975 (reproducer::get_identifier_as_lvalue): New function.
2976 (reproducer::get_identifier_as_type): New function.
2977 (reproducer::xstrdup_printf): New function.
2978 (recording::context::context): Initialize m_toplevel_ctxt.
2979 (recording::context::new_location): Add param created_by_user.
2980 (str_option_reproducer_strings): New table of strings.
2981 (int_option_reproducer_strings): Likewise.
2982 (bool_option_reproducer_strings): Likewise.
2983 (get_type_enum_strings): Likewise.
2984 (names_of_function_kinds): Likewise.
2985 (global_kind_reproducer_strings): Likewise.
2986 (unary_op_reproducer_strings): Likewise.
2987 (binary_op_reproducer_strings): Likewise.
2988 (comparison_reproducer_strings): Likewise.
2989 Within namespace ::gcc::jit::recording::...
2990 (context::dump_reproducer_to_file): New function.
2991 (string::write_reproducer): Likewise.
2992 (location::write_reproducer): Likewise.
2993 (type::access_as_type): Likewise.
2994 (memento_of_get_type::write_reproducer): Likewise.
2995 (memento_of_get_pointer::write_reproducer): Likewise.
2996 (memento_of_get_const::write_reproducer): Likewise.
2997 (memento_of_get_volatile::write_reproducer): Likewise.
2998 (array_type::write_reproducer): Likewise.
2999 (function_type::write_reproducer): Likewise.
3000 (function_type::write_deferred_reproducer): Likewise.
3001 (field::write_reproducer): Likewise.
3002 (struct_::access_as_type): Likewise.
3003 (struct_::write_reproducer): Likewise.
3004 (union_::write_reproducer): Likewise.
3005 (fields::write_reproducer): Likewise.
3006 (rvalue::access_as_rvalue): Likewise.
3007 (lvalue::access_as_rvalue): Likewise.
3008 (lvalue::access_as_lvalue): Likewise.
3009 (param::access_as_rvalue): Likewise.
3010 (param::access_as_lvalue): Likewise.
3011 (param::write_reproducer): Likewise.
3012 (function::write_reproducer): Likewise.
3013 (block::write_reproducer): Likewise.
3014 (global::write_reproducer): Likewise.
3015 (memento_of_new_rvalue_from_const <int>::write_reproducer):
3017 (memento_of_new_rvalue_from_const <long>::write_reproducer):
3019 (memento_of_new_rvalue_from_const <double>::write_reproducer):
3021 (memento_of_new_rvalue_from_const <void *>::write_reproducer):
3023 (memento_of_new_string_literal::write_reproducer): Likewise.
3024 (unary_op::write_reproducer): Likewise.
3025 (binary_op::write_reproducer): Likewise.
3026 (comparison::write_reproducer): Likewise.
3027 (cast::write_reproducer): Likewise.
3028 (call::write_reproducer): Likewise.
3029 (call_through_ptr::write_reproducer): Likewise.
3030 (array_access::write_reproducer): Likewise.
3031 (access_field_of_lvalue::write_reproducer): Likewise.
3032 (access_field_rvalue::write_reproducer): Likewise.
3033 (dereference_field_rvalue::write_reproducer): Likewise.
3034 (dereference_rvalue::write_reproducer): Likewise.
3035 (get_address_of_lvalue::write_reproducer): Likewise.
3036 (local::write_reproducer): Likewise.
3037 (eval::write_reproducer): Likewise.
3038 (assignment::write_reproducer): Likewise.
3039 (assignment_op::write_reproducer): Likewise.
3040 (comment::write_reproducer): Likewise.
3041 (conditional::write_reproducer): Likewise.
3042 (jump::write_reproducer): Likewise.
3043 (return_::write_reproducer): Likewise.
3044 * jit-recording.h (gcc::jit::reproducer): New forward declararion.
3045 Within namespace ::gcc::jit::recording::...
3046 (context::new_location): Add "created_by_user" param.
3047 (context::dump_reproducer_to_file): New method.
3048 (context::m_toplevel_ctxt): New field.
3049 (memento::write_reproducer): New pure virtual function.
3050 (memento::dyn_cast_location): New virtual function.
3051 (string::write_reproducer):
3052 (location::location): Add "created_by_user" param.
3053 (location::dyn_cast_location): New function.
3054 (location::created_by_user): New accessor.
3055 (location::write_reproducer): New function.
3056 (location::m_created_by_user): New field.
3057 (type::access_as_type): New virtual function.
3058 (location::write_reproducer): Likewise.
3059 (type::access_as_type): Likewise.
3060 (memento_of_get_type::write_reproducer): Likewise.
3061 (memento_of_get_pointer::write_reproducer): Likewise.
3062 (memento_of_get_const::write_reproducer): Likewise.
3063 (memento_of_get_volatile::write_reproducer): Likewise.
3064 (array_type::write_reproducer): Likewise.
3065 (function_type::write_reproducer): Likewise.
3066 (function_type::write_deferred_reproducer): Likewise.
3067 (field::write_reproducer): Likewise.
3068 (struct_::access_as_type): Likewise.
3069 (struct_::write_reproducer): Likewise.
3070 (union_::write_reproducer): Likewise.
3071 (union_::m_fields): Remove stray unused field.
3072 (fields::length): New accessor.
3073 (fields::get_field): New accessor.
3074 (fields::write_reproducer): New function.
3075 (rvalue::access_as_rvalue): Likewise.
3076 (lvalue::access_as_rvalue): Likewise.
3077 (lvalue::access_as_lvalue): Likewise.
3078 (param::access_as_rvalue): Likewise.
3079 (param::access_as_lvalue): Likewise.
3080 (param::write_reproducer): Likewise.
3081 (function::write_reproducer): Likewise.
3082 (block::write_reproducer): Likewise.
3083 (global::write_reproducer): Likewise.
3084 (memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer):
3086 (memento_of_new_string_literal::write_reproducer): Likewise.
3087 (unary_op::write_reproducer): Likewise.
3088 (binary_op::write_reproducer): Likewise.
3089 (comparison::write_reproducer): Likewise.
3090 (cast::write_reproducer): Likewise.
3091 (call::write_reproducer): Likewise.
3092 (call_through_ptr::write_reproducer): Likewise.
3093 (array_access::write_reproducer): Likewise.
3094 (access_field_of_lvalue::write_reproducer): Likewise.
3095 (access_field_rvalue::write_reproducer): Likewise.
3096 (dereference_field_rvalue::write_reproducer): Likewise.
3097 (dereference_rvalue::write_reproducer): Likewise.
3098 (get_address_of_lvalue::write_reproducer): Likewise.
3099 (local::write_reproducer): Likewise.
3100 (eval::write_reproducer): Likewise.
3101 (assignment::write_reproducer): Likewise.
3102 (assignment_op::write_reproducer): Likewise.
3103 (comment::write_reproducer): Likewise.
3104 (conditional::write_reproducer): Likewise.
3105 (jump::write_reproducer): Likewise.
3106 (return_::write_reproducer): Likewise.
3107 * libgccjit++.h (gccjit::context::dump_reproducer_to_file): New.
3108 * libgccjit.c (gcc_jit_context_new_location): Pass "true" as
3109 param "created_by_user".
3110 (gcc_jit_context_dump_reproducer_to_file): New API entrypoint.
3111 * libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API
3113 * libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API
3116 2015-01-12 David Malcolm <dmalcolm@redhat.com>
3118 * jit-recording.c (class gcc::jit::rvalue_usage_validator): New.
3119 (gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New
3121 (gcc::jit::rvalue_usage_validator::visit): New function.
3122 (gcc::jit::recording::rvalue::verify_valid_within_stmt): New
3124 (gcc::jit::recording::rvalue::set_scope): New function.
3125 (gcc::jit::recording::function::function): Call set_scope on each
3126 param, issuing errors for any params that already have a function.
3127 (gcc::jit::recording::block::add_eval): Return the new statement;
3128 update the comment given that some error-checking now happens after
3130 (gcc::jit::recording::block::add_assignment): Likewise.
3131 (gcc::jit::recording::block::add_assignment_op): Likewise.
3132 (gcc::jit::recording::block::add_comment): Likewise.
3133 (gcc::jit::recording::block::end_with_conditional): Likewise.
3134 (gcc::jit::recording::block::end_with_jump): Likewise.
3135 (gcc::jit::recording::block::end_with_return): Likewise.
3136 (gcc::jit::recording::block::validate): Add a comment.
3137 (gcc::jit::recording::unary_op::visit_children): New function.
3138 (gcc::jit::recording::binary_op::visit_children): New function.
3139 (gcc::jit::recording::comparison::visit_children): New function.
3140 (gcc::jit::recording::cast::visit_children): New function.
3141 (gcc::jit::recording::call::visit_children): New function.
3142 (gcc::jit::recording::call_through_ptr::visit_children): New function.
3143 (gcc::jit::recording::array_access::visit_children): New function.
3144 (gcc::jit::recording::access_field_of_lvalue::visit_children): New
3146 (gcc::jit::recording::access_field_rvalue::visit_children): New
3148 (gcc::jit::recording::dereference_field_rvalue::visit_children):
3150 (gcc::jit::recording::dereference_rvalue::visit_children): New
3152 (gcc::jit::recording::get_address_of_lvalue::visit_children): New
3154 * jit-recording.h: Within namespace gcc::jit::recording...
3155 (class rvalue_visitor): New.
3156 (rvalue::rvalue): Initialize m_scope.
3157 (rvalue::get_loc): New accessor.
3158 (rvalue::verify_valid_within_stmt): New function.
3159 (rvalue::visit_children): New pure virtual function.
3160 (rvalue::set_scope): New function.
3161 (rvalue::get_scope): New function.
3162 (rvalue::dyn_cast_param): New function.
3163 (rvalue::m_scope): New field.
3164 (param::visit_children): New empty function.
3165 (param::dyn_cast_param): New function.
3166 (function::get_loc): New function.
3167 (block::add_eval): Return the new statement.
3168 (block::add_assignment): Likewise.
3169 (block::add_assignment_op): Likewise.
3170 (block::add_comment): Likewise.
3171 (block::end_with_conditional): Likewise.
3172 (block::end_with_jump): Likewise.
3173 (block::end_with_return): Likewise.
3174 (global::visit_children): New function.
3175 (memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children):
3177 (memento_of_new_string_literal::visit_children): New function.
3178 (unary_op::visit_children): New function.
3179 (binary_op::visit_children): New function.
3180 (comparison::visit_children): New function.
3181 (cast::visit_children): New function.
3182 (call::visit_children): New function.
3183 (call_through_ptr::visit_children): New function.
3184 (array_access::visit_children): New function.
3185 (access_field_of_lvalue::visit_children): New function.
3186 (access_field_rvalue::visit_children): New function.
3187 (dereference_field_rvalue::visit_children): New function.
3188 (dereference_rvalue::visit_children): New function.
3189 (get_address_of_lvalue::visit_children): New function.
3190 (local::local): Call set_scope.
3191 (local::visit_children): New function.
3192 (statement::get_block): Make public.
3193 * libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro.
3194 (RETURN_NULL_IF_FAIL_PRINTF5): New macro.
3195 (gcc_jit_context_new_function): Verify that each param has
3196 not yet been used for creating another function.
3197 (gcc_jit_block_add_eval): After creating the stmt, verify
3198 that the rvalue expression tree is valid to use within it.
3199 (gcc_jit_block_add_assignment): Likewise for the lvalue and
3200 rvalue expression trees.
3201 (gcc_jit_block_add_assignment_op): Likewise.
3202 (gcc_jit_block_end_with_conditional): Likewise for the boolval
3204 (gcc_jit_block_end_with_return): Likewise for the rvalue
3206 (gcc_jit_block_end_with_void_return): Remove return of "void",
3207 now that block::end_with_return is now non-void.
3209 2015-01-12 David Malcolm <dmalcolm@redhat.com>
3211 * jit-playback.c (gcc::jit::playback::context::read_dump_file):
3212 Add missing fclose on error-handling path.
3214 2015-01-12 David Malcolm <dmalcolm@redhat.com>
3216 * docs/cp/topics/expressions.rst (Global variables): Add
3217 enum gcc_jit_global_kind param to gccjit::context::new_global.
3218 * docs/topics/expressions.rst (Global variables): Likewise.
3219 Document the new enum.
3220 * docs/topics/results.rst (Compilation results): Document
3222 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3223 * dummy-frontend.c (jit_langhook_write_globals): Call into the
3224 playback context's write_global_decls_1 and write_global_decls_2
3225 before and after calling symtab->finalize_compilation_unit ().
3226 * jit-playback.c: Include "debug.h".
3227 (gcc::jit::playback::context::new_global): Add "kind" param and
3228 use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the
3229 underlying VAR_DECL. Call varpool_node::get_create on the
3230 VAR_DECL, and add it to m_globals.
3231 (gcc::jit::playback::context::write_global_decls_1): New function.
3232 (gcc::jit::playback::context::write_global_decls_2): New function.
3233 * jit-playback.h (gcc::jit::playback::context::context): Call
3234 create on m_globals.
3235 (gcc::jit::playback::context::new_global): Add "kind" param.
3236 (gcc::jit::playback::context::write_global_decls_1): New function.
3237 (gcc::jit::playback::context::write_global_decls_2): New function.
3238 (gcc::jit::playback::context::m_globals): New field.
3239 * jit-recording.c (gcc::jit::recording::context::context):
3240 Initialize m_globals.
3241 (gcc::jit::recording::context::new_global): Add param "kind".
3242 Add the new global to m_globals.
3243 (gcc::jit::recording::context::dump_to_file): Dump the globals.
3244 (gcc::jit::recording::global::replay_into): Add field m_kind.
3245 (gcc::jit::recording::global::write_to_dump): New override.
3246 * jit-recording.h (gcc::jit::recording::context::new_global): Add
3248 (gcc::jit::recording::context::m_globals): New field.
3249 (gcc::jit::recording::global::global): Add param kind.
3250 (gcc::jit::recording::global::write_to_dump): New override.
3251 (gcc::jit::recording::global::m_kind): New field.
3252 * jit-result.c (gcc::jit::result::get_global): New function.
3253 * jit-result.h (gcc::jit::result::get_global): New function.
3254 * libgccjit++.h (gccjit::context::new_global): Add "kind" param.
3255 * libgccjit.c (gcc_jit_context_new_global): Likewise.
3256 (gcc_jit_result_get_global): New API entrypoint.
3257 * libgccjit.h (gcc_jit_result_get_global): New API entrypoint.
3258 (enum gcc_jit_global_kind): New enum.
3259 (gcc_jit_context_new_global): API change: add "kind" param.
3260 * libgccjit.map (gcc_jit_result_get_global): New symbol.
3262 2015-01-09 David Malcolm <dmalcolm@redhat.com>
3264 * dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h",
3265 "symtab.h", "inchash.h". Move include of "hash-set.h" much
3267 * jit-builtins.c: Remove redundant includes of "opts.h" and
3269 * jit-common.h: Include "hash-set.h", "input.h", "vec.h",
3270 "double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h".
3271 * jit-playback.c: Include "hashtab.h", "machmode.h", "input.h",
3272 "statistics.h", "vec.h", "double-int.h", "real.h",
3273 "fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h",
3274 "inchash.h", "fold-const.h". Move include of "hash-set.h" to
3276 * jit-recording.c: Remove redundant includes of "opts.h" and
3279 2015-01-09 David Malcolm <dmalcolm@redhat.com>
3281 * docs/cp/topics/expressions.rst (Simple expressions): Use
3282 ":c:type:" for C types. Document new overload of
3283 gcc::jit::context::new_rvalue.
3284 * docs/topics/expressions.rst (Simple expressions): Use
3285 ":c:type:" for C types. Document new entrypoint
3286 gcc_jit_context_new_rvalue_from_long.
3287 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3288 * jit-playback.c: Within namespace gcc::jit::playback...
3289 (context::new_rvalue_from_int): Eliminate in favor of...
3290 (context::new_rvalue_from_const <int>): ...this.
3291 (context::new_rvalue_from_double): Eliminate in favor of...
3292 (context::new_rvalue_from_const <double>): ...this.
3293 (context::new_rvalue_from_const <long>): New.
3294 (context::new_rvalue_from_ptr): Eliminate in favor of...
3295 (context::new_rvalue_from_const <void *>): ...this.
3296 * jit-playback.h: Within namespace gcc::jit::playback...
3297 (context::new_rvalue_from_int): Eliminate in favor of...
3298 (context::new_rvalue_from_const <HOST_TYPE>): ...this.
3299 (context::new_rvalue_from_double): Likewise.
3300 (context::new_rvalue_from_ptr): Likewise.
3301 * jit-recording.c: Within namespace gcc::jit::recording...
3302 (context::new_rvalue_from_int): Eliminate.
3303 (context::new_rvalue_from_double): Likewise.
3304 (context::new_rvalue_from_ptr): Likewise.
3305 (class memento_of_new_rvalue_from_const <int>):
3306 Add explicit specialization.
3307 (class memento_of_new_rvalue_from_const <long>):
3309 (class memento_of_new_rvalue_from_const <double>):
3311 (class memento_of_new_rvalue_from_const <void *>):
3313 (memento_of_new_rvalue_from_int::replay_into):
3315 (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into):
3317 (memento_of_new_rvalue_from_double::replay_into):
3319 (memento_of_new_rvalue_from_ptr::replay_into):
3320 ...and this to be deleted.
3321 (memento_of_new_rvalue_from_int::make_debug_string):
3323 (memento_of_new_rvalue_from_const <int>::make_debug_string):
3325 (memento_of_new_rvalue_from_double::make_debug_string):
3327 (memento_of_new_rvalue_from_const <double>::make_debug_string):
3329 (memento_of_new_rvalue_from_ptr::make_debug_string)
3331 (memento_of_new_rvalue_from_const <void *>::make_debug_string):
3333 (memento_of_new_rvalue_from_const <long>::make_debug_string):
3335 * jit-recording.h: Within namespace gcc::jit::recording...
3336 (context::new_rvalue_from_int): Eliminate.
3337 (context::new_rvalue_from_double): Likewise.
3338 (context::new_rvalue_from_ptr): Likewise, all in favor of...
3339 (context::new_rvalue_from_const <HOST_TYPE>): New family of
3341 (class memento_of_new_rvalue_from_int): Eliminate.
3342 (class memento_of_new_rvalue_from_double): Likewise.
3343 (class memento_of_new_rvalue_from_ptr): Likewise.
3344 (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family
3345 of rvalue subclasses.
3346 * libgccjit++.h (gccjit::context::new_rvalue): New overload, for
3348 * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for
3349 rewriting of recording::context::new_rvalue_from_int to
3350 recording::context::new_rvalue_from_const <int>.
3351 (gcc_jit_context_new_rvalue_from_long): New API entrypoint.
3352 (gcc_jit_context_new_rvalue_from_double): Update for
3353 rewriting of recording::context::new_rvalue_from_double to
3354 recording::context::new_rvalue_from_const <double>.
3355 (gcc_jit_context_new_rvalue_from_ptr): Update for
3356 rewriting of recording::context::new_rvalue_from_ptr to
3357 recording::context::new_rvalue_from_const <void *>.
3358 * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API
3360 * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise.
3362 2015-01-09 David Malcolm <dmalcolm@redhat.com>
3365 * docs/internals/test-hello-world.exe.log.txt: Update, the log now
3366 shows tempdir creation/cleanup.
3367 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3368 * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir
3369 to the list of subclasses in the comment.
3370 * jit-playback.c (gcc::jit::playback::context::context): Add a
3371 comment clarifying when the tempdir gets cleaned up.
3372 (gcc::jit::playback::context::compile): Pass the context's logger,
3373 if any, to the tempdir.
3374 (gcc::jit::playback::context::dlopen_built_dso): When creating the
3375 gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand
3376 over ownership of the tempdir to it.
3377 * jit-result.c: Include "jit-tempdir.h".
3378 (gcc::jit::result::result): Add tempdir param, saving it as
3380 (gcc::jit::result::~result): Delete m_tempdir.
3381 * jit-result.h (gcc::jit::result::result): Add tempdir param.
3382 (gcc::jit::result::m_tempdir): New field.
3383 * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param;
3385 (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit,
3386 and log m_path_template and m_path_tempdir.
3387 (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log
3388 entry/exit, and log the unlink and rmdir calls.
3389 * jit-tempdir.h: Include "jit-logging.h".
3390 (class gcc::jit::tempdir): Make this be a subclass of log_user.
3391 (gcc::jit::tempdir::tempdir): Add logger param.
3392 * notes.txt: Update to show the two possible places where the
3393 tempdir can be cleaned up.
3395 2015-01-08 David Malcolm <dmalcolm@redhat.com>
3397 * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive
3400 2015-01-08 David Malcolm <dmalcolm@redhat.com>
3402 * docs/topics/contexts.rst (Error-handling): Document new
3403 entrypoint gcc_jit_context_get_last_error.
3404 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3405 * jit-recording.c (gcc::jit::recording::context::context):
3406 Initialize new fields "m_last_error_str" and
3407 "m_owns_last_error_str".
3408 (gcc::jit::recording::context::~context): Clean up
3409 m_last_error_str, if needed.
3410 (gcc::jit::recording::context::add_error_va): Update
3411 m_last_error_str and m_owns_last_error_str, freeing the old
3412 value if appropriate.
3413 (gcc::jit::recording::context::get_last_error): New function.
3414 * jit-recording.h (gcc::jit::recording::context::get_last_error):
3416 (gcc::jit::recording::context): New fields m_last_error_str and
3417 m_owns_last_error_str.
3418 * libgccjit.c (gcc_jit_context_get_last_error): New function.
3419 * libgccjit.h (gcc_jit_context_get_last_error): New declaration.
3420 * libgccjit.map (gcc_jit_context_get_last_error): New function.
3422 2015-01-08 David Malcolm <dmalcolm@redhat.com>
3424 * Make-lang.in (jit_OBJS): Add jit/jit-logging.o.
3425 * docs/internals/index.rst (Overview of code structure): Mention
3426 gcc_jit_context_set_logfile, and embed the example logfile.
3427 * docs/internals/test-hello-world.exe.log.txt: New file: example
3429 * docs/topics/contexts.rst (Debugging): Add documentation
3430 for gcc_jit_context_set_logfile.
3431 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3432 * dummy-frontend.c: Include "jit-logging.h".
3433 (jit_langhook_init): Assert that there is an active playback
3434 context. If it has a logger, log entry/exit to this function.
3435 (jit_langhook_write_globals): Likewise.
3436 * jit-common.h (gcc::jit::logger): New forward declaration.
3437 * jit-logging.c: New file.
3438 * jit-logging.h: New file.
3439 * jit-playback.c: Include "jit-logging.h".
3440 (gcc::jit::playback::context::context): Initialize the log_user
3441 base class from the recording context's logger (if any). Use
3442 JIT_LOG_SCOPE to log entry/exit from the function body.
3443 (gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to
3444 log entry/exit from the function body.
3445 (gcc::jit::playback::build_stmt_list): Likewise.
3446 (gcc::jit::playback::function::postprocess): Likewise.
3447 (gcc::jit::playback::context::compile): Likewise. Log the
3448 entry/exit to toplev::main and toplev::finalize. Log the
3449 fake argv passed to toplev::main.
3450 (gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to
3451 log entry/exit from the function body.
3452 (gcc::jit::playback::context::release_mutex): Likewise.
3453 (gcc::jit::playback::context::make_fake_args): Likewise.
3454 (gcc::jit::playback::context::extract_any_requested_dumps):
3456 (gcc::jit::playback::context::convert_to_dso): Likewise. Also,
3457 log the arguments that the driver is invoked with.
3458 (gcc::jit::playback::context::dlopen_built_dso): Likewise. Pass
3459 the logger to the result object.
3460 (gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to
3461 log entry/exit from the function body.
3462 (gcc::jit::playback::context::dump_generated_code): Likewise.
3463 (gcc::jit::playback::context::handle_locations): Likewise.
3464 * jit-playback.h (gcc::jit::playback::context): Make this be
3465 a subclass of gcc::jit::log_user.
3466 * jit-recording.c: Include "jit-logging.h".
3467 (gcc::jit::recording::context::context: Initialize the logger to
3468 NULL for root contexts, or to the parent's logger for child
3470 (gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to
3471 log entry/exit from the function body.
3472 (gcc::jit::recording::context::replay_into): Likewise.
3473 (gcc::jit::recording::context::disassociate_from_playback):
3475 (gcc::jit::recording::context::compile): Likewise.
3476 (recording::context::add_error_va): Likewise. Also, log the
3478 (gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to
3479 log entry/exit from the function body.
3480 * jit-recording.h: Include "jit-logging.h".
3481 (gcc::jit::recording::context): Make this be a subclass of
3483 * jit-result.c: Include "jit-common.h" and "jit-logging.h".
3484 (gcc::jit::result::result): Add logger param, recording it.
3485 Use JIT_LOG_SCOPE to log entry/exit from the function body.
3486 (gcc::jit::result::~result(): Use JIT_LOG_SCOPE to
3487 log entry/exit from the function body.
3488 (gcc::jit::result::get_code): Likewise.
3489 * jit-result.h (gcc::jit::result): Make this be a subclass of
3491 (gcc::jit::result::result): Add logger parameter.
3492 * libgccjit++.h (gccjit::context::set_logfile): New function.
3493 * libgccjit.c: Include "jit-logging.h".
3494 (gcc_jit_context_acquire): Log the context.
3495 (gcc_jit_context_release): Use JIT_LOG_FUNC to
3496 log entry/exit from the function body, and log the context.
3497 (gcc_jit_context_new_child_context): Likewise, logging both
3499 (gcc_jit_context_new_location): Use JIT_LOG_FUNC to
3500 log entry/exit from the function body.
3501 (gcc_jit_context_get_type): Likewise.
3502 (gcc_jit_context_get_int_type): Likewise.
3503 (gcc_jit_context_new_array_type): Likewise.
3504 (gcc_jit_context_new_field): Likewise.
3505 (gcc_jit_context_new_struct_type): Likewise.
3506 (gcc_jit_context_new_opaque_struct): Likewise.
3507 (gcc_jit_struct_set_fields): Likewise.
3508 (gcc_jit_context_new_union_type): Likewise.
3509 (gcc_jit_context_new_function_ptr_type): Likewise.
3510 (gcc_jit_context_new_param): Likewise.
3511 (gcc_jit_context_new_function): Likewise.
3512 (gcc_jit_context_get_builtin_function): Likewise.
3513 (gcc_jit_function_get_param): Likewise.
3514 (gcc_jit_function_dump_to_dot): Likewise.
3515 (gcc_jit_function_new_block): Likewise.
3516 (gcc_jit_context_new_global): Likewise.
3517 (gcc_jit_context_new_rvalue_from_int): Likewise.
3518 (gcc_jit_context_zero): Likewise.
3519 (gcc_jit_context_one): Likewise.
3520 (gcc_jit_context_new_rvalue_from_double): Likewise.
3521 (gcc_jit_context_new_rvalue_from_ptr): Likewise.
3522 (gcc_jit_context_null): Likewise.
3523 (gcc_jit_context_new_string_literal): Likewise.
3524 (gcc_jit_context_new_unary_op): Likewise.
3525 (gcc_jit_context_new_binary_op): Likewise.
3526 (gcc_jit_context_new_comparison): Likewise.
3527 (gcc_jit_context_new_call): Likewise.
3528 (gcc_jit_context_new_call_through_ptr): Likewise.
3529 (gcc_jit_context_new_cast): Likewise.
3530 (gcc_jit_context_new_array_access): Likewise.
3531 (gcc_jit_lvalue_access_field): Likewise.
3532 (gcc_jit_rvalue_access_field): Likewise.
3533 (gcc_jit_rvalue_dereference_field): Likewise.
3534 (gcc_jit_rvalue_dereference): Likewise.
3535 (gcc_jit_lvalue_get_address): Likewise.
3536 (gcc_jit_function_new_local): Likewise.
3537 (gcc_jit_block_add_eval): Likewise.
3538 (gcc_jit_block_add_assignment): Likewise.
3539 (gcc_jit_block_add_assignment_op): Likewise.
3540 (gcc_jit_block_end_with_conditional): Likewise.
3541 (gcc_jit_block_add_comment): Likewise.
3542 (gcc_jit_block_end_with_jump): Likewise.
3543 (gcc_jit_block_end_with_return): Likewise.
3544 (gcc_jit_block_end_with_void_return): Likewise.
3545 (gcc_jit_context_set_str_option): Likewise.
3546 (gcc_jit_context_set_int_option): Likewise.
3547 (gcc_jit_context_set_bool_option): Likewise.
3548 (gcc_jit_context_enable_dump): Likewise.
3549 (gcc_jit_context_compile): Likewise. Also log the context,
3551 (gcc_jit_context_dump_to_file): Likewise.
3552 (gcc_jit_context_set_logfile): New function.
3553 (gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to
3554 log entry/exit from the function body.
3555 (gcc_jit_result_get_code): Likewise. Also log the fnname)
3556 and the ptr to be returned.
3557 (gcc_jit_result_release): Likewise. Also log the result.
3558 * libgccjit.h: Include <stdio.h>, since we need FILE *.
3559 (gcc_jit_context_set_logfile): New declaration.
3560 * libgccjit.map (gcc_jit_context_set_logfile): New.
3562 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3564 * jit-recording.h (gcc::jit::recording::type::is_void): New
3566 (gcc::jit::recording::memento_of_get_type::is_void): New
3567 function, overriding default implementation.
3568 * libgccjit.c (gcc_jit_rvalue_dereference): Verify that
3569 the underlying type is not "void".
3571 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3573 * docs/topics/expressions.rst (Unary Operations): Add
3574 GCC_JIT_UNARY_OP_ABS.
3575 * jit-playback.c (gcc::jit::playback::context::new_unary_op):
3577 * jit-recording.c (unary_op_strings): Likewise.
3578 * libgccjit.c (gcc_jit_context_new_unary_op): Update checking
3579 of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS.
3580 * libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS.
3581 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3583 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3585 * jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix
3588 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3590 * TODO.rst (Test suite): Remove item about running C++ testcases.
3591 * docs/internals/index.rst (Working on the JIT library): Add
3592 "c++" to the enabled languages in the suggested "configure"
3593 invocation, and add a description of why this is necessary.
3594 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3596 2015-01-07 David Malcolm <dmalcolm@redhat.com>
3598 * docs/internals/index.rst: Update to reflect that built
3599 testcases are now test-foo.c.exe, rather than test-foo.exe.
3600 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3602 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3604 Update copyright years.
3606 2014-12-19 David Malcolm <dmalcolm@redhat.com>
3608 * jit-playback.c (gcc::jit::playback::context::build_cast): In
3609 case BOOLEAN_TYPE, don't assume that the source expression is
3612 2014-12-19 David Malcolm <dmalcolm@redhat.com>
3614 * jit-recording.c (gcc::jit::recording::context::context): When
3615 copying string options from a parent context, take a copy of the
3616 underlying buffers, rather than simply copying the pointer.
3618 2014-12-19 David Malcolm <dmalcolm@redhat.com>
3620 * jit-recording.c (gcc::jit::recording::context::set_str_option):
3623 2014-12-11 David Malcolm <dmalcolm@redhat.com>
3625 * docs/cp/topics/contexts.rst (gccjit::context::set_str_option):
3626 Document new function.
3627 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3629 2014-12-10 Ulrich Drepper <drepper@gmail.com>
3631 Minor interface cleanups of libgccjit
3632 * jit-playback.c (convert_to_dso): Use auto_vec instead
3633 of automatic array to build up command line.
3634 * jit-recording.c (recording::context::set_str_option):
3635 Make copy of the string.
3636 (recording::context::~context): Free string options.
3637 * jit-recording.h (recording::context): Adjust type
3638 of m_str_options member.
3639 * libgccjit.h: Adjust comment about
3640 gcc_jit_context_set_str_option parameter being used after
3642 Update comment now that all interfaces are copy strings
3644 * libgccjit++.h (gccjit::context): Add set_str_option
3647 2014-12-10 David Malcolm <dmalcolm@redhat.com>
3649 * docs/cp/index.rst: New file.
3650 * docs/cp/intro/index.rst: New file.
3651 * docs/cp/intro/tutorial01.rst: New file.
3652 * docs/cp/intro/tutorial02.rst: New file.
3653 * docs/cp/intro/tutorial03.rst: New file.
3654 * docs/cp/intro/tutorial04.rst: New file.
3655 * docs/cp/topics/contexts.rst: New file.
3656 * docs/cp/topics/expressions.rst: New file.
3657 * docs/cp/topics/functions.rst: New file.
3658 * docs/cp/topics/index.rst: New file.
3659 * docs/cp/topics/locations.rst: New file.
3660 * docs/cp/topics/objects.rst: New file.
3661 * docs/cp/topics/results.rst: New file.
3662 * docs/cp/topics/types.rst: New file.
3663 * docs/examples/tut01-hello-world.cc: New file.
3664 * docs/examples/tut02-square.c: Fix missing newline in output.
3665 * docs/examples/tut02-square.cc: New file.
3666 * docs/examples/tut03-sum-of-squares.cc: New file.
3667 * docs/examples/tut04-toyvm/toyvm.cc: New file.
3668 * docs/index.rst: Move summary to above the table of contents.
3669 Add text about the C vs C++ APIs.
3670 * docs/topics/contexts.rst: Fix a typo.
3672 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3673 * docs/_build/texinfo/factorial1.png: New file.
3674 * docs/_build/texinfo/sum-of-squares1.png: New file.
3676 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3678 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move
3679 logic for determine "funcname" to new function...
3680 (get_function_name): ...here, adding logic to skip any leading
3681 path from the filename.
3682 (toyvm_function_parse): Use the filename for fn_filename, rather
3683 than "name", so that the debugger can locate the source .toy
3685 (toyvm_function_parse): Don't fclose a NULL FILE *.
3687 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3690 * docs/internals/index.rst (Running under valgrind): New
3692 (docs/_build/texinfo/libgccjit.texi): Regenerate.
3694 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3697 * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o.
3698 * jit-common.h (gcc::jit::tempdir): New forward decl.
3699 * jit-playback.c: Include jit-tempdir.h.
3700 (gcc::jit::playback::context::context): Initialize m_tempdir.
3701 (gcc::jit::playback::context::~context): Move tempdir
3702 cleanup to new file jit-tempdir.c
3703 (make_tempdir_path_template): Move to new file jit-tempdir.c.
3704 (gcc::jit::playback::context::compile): Move tempdir creation
3705 to new tempdir object in new file jit-tempdir.c.
3706 (gcc::jit::playback::context::make_fake_args): Get path from
3707 tempdir object rather than from member data.
3708 (gcc::jit::playback::context::convert_to_dso): Likewise.
3709 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
3710 (gcc::jit::playback::context::dump_generated_code): Likewise.
3711 (gcc::jit::playback::context::get_path_c_file): New function.
3712 (gcc::jit::playback::context::get_path_s_file): New function.
3713 (gcc::jit::playback::context::get_path_so_file): New function.
3714 * jit-playback.h (gcc::jit::playback::context::get_path_c_file):
3716 (gcc::jit::playback::context::get_path_s_file): New function.
3717 (gcc::jit::playback::context::get_path_so_file): New function.
3718 (gcc::jit::playback::context): Move fields "m_path_template",
3719 "m_path_tempdir", "m_path_c_file", "m_path_s_file",
3720 "m_path_so_file" to new jit::tempdir class; add field "m_tempdir".
3721 * jit-tempdir.c: New file.
3722 * jit-tempdir.h: New file.
3724 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3726 * jit-playback.c (gcc::jit::playback::context::compile): Acquire the
3727 mutex here, immediately before using toplev, and release it here, on
3728 each exit path after acquisition.
3729 (jit_mutex): Move this variable here, from jit-recording.c.
3730 (gcc::jit::playback::context::acquire_mutex): New function, based on
3731 code in jit-recording.c.
3732 (gcc::jit::playback::context::release_mutex): Likewise.
3733 * jit-playback.h (gcc::jit::playback::context::acquire_mutex): New
3735 (gcc::jit::playback::context::release_mutex): New function.
3736 * jit-recording.c (jit_mutex): Move this variable to jit-playback.c.
3737 (gcc::jit::recording::context::compile): Move mutex-handling from
3738 here into jit-playback.c's gcc::jit::playback::context::compile.
3739 * notes.txt: Update to show the new locations of ACQUIRE_MUTEX
3742 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3744 * jit-playback.c (gcc::jit::playback::context::compile): Move the
3746 (gcc::jit::playback::context::dlopen_built_dso): ...this new
3748 * jit-playback.h (gcc::jit::playback::context::dlopen_built_dso):
3751 2014-12-09 David Malcolm <dmalcolm@redhat.com>
3754 * docs/topics/contexts.rst (Debugging): Add description of
3755 gcc_jit_context_enable_dump.
3756 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3757 * jit-playback.c: Include context.h.
3758 (class auto_argvec): New class.
3759 (auto_argvec::~auto_argvec): New function.
3760 (gcc::jit::playback::context::compile): Convert fake_args to be
3761 an auto_argvec, so that it can contain dynamically-allocated
3762 strings. Construct a vec of all requested dumps, and pass it to
3763 make_fake_args. Extract requested dumps between the calls to
3764 toplev::main and toplev::finalize.
3765 (gcc::jit::playback::context::make_fake_args): Convert param
3766 "argvec" to be a vec <char *>, and gain a "requested_dumps"
3767 param. Convert to dynamically-allocated arg strings by converting
3768 ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP
3769 for args that are already a copy. Add args for all requested dumps.
3770 (gcc::jit::playback::context::extract_any_requested_dumps): New
3772 (gcc::jit::playback::context::read_dump_file): New function.
3773 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
3774 Convert param "argvec" to be a vec <char *>, and gain a
3775 "requested_dumps" param.
3776 (gcc::jit::playback::context::extract_any_requested_dumps): New
3778 (gcc::jit::playback::context::read_dump_file): New function.
3779 * jit-recording.c (gcc::jit::recording::context::enable_dump): New
3781 (gcc::jit::recording::context::get_all_requested_dumps): New
3783 * jit-recording.h (gcc::jit::recording::requested_dump): New
3785 (gcc::jit::recording::context::enable_dump): New function.
3786 (gcc::jit::recording::context::get_all_requested_dumps): New
3788 (gcc::jit::recording::context::m_requested_dumps): New field.
3789 * libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint.
3790 * libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint.
3791 * libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint.
3793 2014-12-08 David Malcolm <dmalcolm@redhat.com>
3795 * libgccjit++.h: Indent the forward declarations of the classes to
3796 show the inheritance hierarchy.
3798 2014-12-08 David Malcolm <dmalcolm@redhat.com>
3800 * notes.txt: Show the beginning and ending of
3801 recording::context::compile vs playback::context::compile. Show
3802 the creation and unlinking of the tempdir. Show toplev::finalize.
3803 Move "RELEASE MUTEX" to the correct location. Show
3804 gcc_jit_result_release, and indicate where the
3805 dlopen/dlsym/dlclose occur.
3807 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3809 * docs/examples/tut02-square.c (main): Release the context
3810 earlier, to show that this is possible. Update error-handling
3811 to avoid a double-release of the context, and to avoid
3812 releasing a NULL result.
3813 * docs/intro/tutorial02.rst: Discuss gcc_jit_context_release.
3814 * docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize
3815 * docs/topics/results.rst (gcc_jit_result): Mention that this
3816 controls the lifetimes of machine code functions.
3817 (gcc_jit_result_get_code): Spell out the requirements for this
3818 to succeed, and the lifetime of the result.
3819 (gcc_jit_result_release): Mention that this invalidates any code
3820 that was obtained from the result.
3821 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3823 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3826 * docs/intro/tutorial02.rst: Spell out lifetime of generated code.
3827 Add description of error-handling, taken in part from...
3828 * docs/topics/contexts.rst (Error-handling): Expand, and move some
3829 content to tutorial02.rst.
3830 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3832 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3835 * docs/topics/types.rst (Standard types) Add new enum values to
3836 the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT,
3837 GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
3838 Widen the left-hand column so that
3839 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit.
3840 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3842 * jit-builtins.c: Include stringpool.h and jit-playback.h.
3843 Move everything out of the gcc::jit::recording namespace into
3845 (struct builtin_data): Add fields "fnclass", "attr", and
3847 (DEF_BUILTIN): Update macro so populate the new fields.
3848 (builtins_manager::builtins_manager): Update for move out of
3849 recording namespace. Initialize the m_attributes array.
3850 (builtins_manager::get_builtin_function): Likewise.
3851 (builtins_manager::get_builtin_function_by_id): New function.
3852 (builtins_manager::make_builtin_function): Update for move out of
3853 recording namespace. Add fix for PR jit/64020 by detecting
3854 specific builtin ids and having them ensure that builtins for
3855 other ids are created as necessary.
3856 (builtins_manager::get_type): Update for move out of recording
3858 (builtins_manager::make_type): Likewise. Add some missing
3860 (builtins_manager::make_primitive_type): Update for move out of
3861 recording namespace. Implement the three BT_COMPLEX_ cases and
3863 (builtins_manager::make_fn_type): Update for move out of recording
3865 (builtins_manager::make_ptr_type): Likewise.
3866 (builtins_manager::finish_playback): New function.
3867 (builtins_manager::get_class): New function.
3868 (builtins_manager::implicit_p): New function.
3869 (builtins_manager::get_attrs_tree): Two new functions.
3870 (builtins_manager::make_attrs_tree): New function.
3872 * jit-builtins.h: Move everything out of the gcc::jit::recording
3873 namespace into just gcc::jit.
3874 (enum built_in_attribute): New.
3875 (builtins_manager::builtins_manager): Update decl for namespace
3877 (builtins_manager::get_builtin_function): Likewise.
3878 (builtins_manager::get_class): New.
3879 (builtins_manager::implicit_p): New.
3880 (builtins_manager::get_attrs_tree): Two new functions.
3881 (builtins_manager::make_attrs_tree): New function.
3882 (builtins_manager::finish_playback): New.
3883 (builtins_manager::get_builtin_function_by_id): New.
3884 (builtins_manager::make_builtin_function): Update decl for
3886 (builtins_manager::get_type): Likewise.
3887 (builtins_manager::make_type): Likewise.
3888 (builtins_manager::make_primitive_type): Likewise.
3889 (builtins_manager::make_fn_type): Likewise.
3890 (builtins_manager::make_ptr_type): Likewise.
3891 (builtins_manager): Likewise for fields. Add new field
3894 * jit-common.h (NUM_GCC_JIT_TYPES): Update.
3895 (builtins_manager): Update forward decl to reflect namespace
3898 * jit-playback.c: Include attribs.h and jit-builtins.h.
3899 (gcc::jit::playback::context::get_tree_node_for_type): Add cases
3900 for the new COMPLEX_ types.
3901 (gcc::jit::playback::context::new_function): If creating a
3902 builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl,
3903 and call set_builtin_decl.
3904 (gcc::jit::playback::context::replay): If we have a
3905 builtins_manager, call its finish_playback method when we're done.
3908 (gcc::jit::playback::context::get_builtins_manager): New function.
3911 (gcc::jit::recording::context::get_builtins_manager): New function.
3912 (gcc::jit::recording::get_builtin_function): Use
3913 get_builtins_manager, in case we're a child context.
3914 (gcc::jit::recording::memento_of_get_type::dereference): Add the
3916 (gcc::jit::recording::memento_of_get_type::is_int): Likewise.
3917 (gcc::jit::recording::memento_of_get_type::is_float): Likewise.
3918 (gcc::jit::recording::memento_of_get_type::is_bool): Likewise.
3919 (get_type_strings): Likewise.
3922 (gcc::jit::recording::context::get_builtins_manager): New.
3924 * libgccjit.h (enum gcc_jit_types): Add
3925 GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE,
3926 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
3928 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3931 (gcc::jit::recording::builtins_manager::get_builtin_function):
3932 Check for NULL return from make_builtin_function.
3933 (gcc::jit::recording::builtins_manager::make_builtin_function):
3934 Check for NULL return from get_type.
3936 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3938 * jit-playback.c (gcc::jit::playback::context::compile): Move DSO
3939 creation code into...
3940 (gcc::jit::playback::context::convert_to_dso): New function.
3941 * jit-playback.h (gcc::jit::playback::context::convert_to_dso):
3944 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3946 * jit-playback.c (gcc::jit::playback::context::compile): Use an
3947 auto_vec<const char *> rather than a const char *[20] for the
3948 top-level argv, and move the logic to build it to...
3949 (gcc::jit::playback::context::make_fake_args): New function.
3950 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
3953 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3955 * Make-lang.in (jit_OBJS): Add jit/jit-result.o.
3956 * jit-playback.c: Include new header jit-result.h.
3957 (gcc::jit::result::result): Move to new file jit-result.c.
3958 (gcc::jit::result::~result): Likewise.
3959 (gcc::jit::playback::result): Likewise.
3960 * jit-recording.h (class gcc::jit::result): Move to new
3961 header jit-result.h.
3962 * jit-result.c: New file, to contain...
3963 (gcc::jit::result::result): Move here from jit-playback.c,
3964 removing erroneous "playback" namespace from comment.
3965 (gcc::jit::result::~result): Likewise.
3966 (gcc::jit::playback::result): Likewise.
3967 * jit-result.h: New file, to contain...
3968 (class gcc::jit::result): Move from jit-recording.h.
3969 * libgccjit.c: Include jit-result.h.
3970 (gcc_jit_result_get_code): Update comment to reflect move
3972 (gcc_jit_result_release): Likewise.
3974 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3977 * docs/examples/tut04-toyvm/toyvm.c
3978 (toyvm_compiled_function): New typedef.
3979 (toyvm_compiled_func) Rename to...
3980 (toyvm_compiled_code) ...this.
3981 (struct toyvm_compiled_function): New struct.
3982 (toyvm_function_compile): Return a toyvm_compiled_function *
3983 rather than a toyvm_compiled_func, so that the caller can fully
3984 clean things up. Free "funcname".
3985 (test_script): Update for change to toyvm_function_compile.
3986 Clean up the toyvm_compiled_function.
3988 (docs/intro/tutorial04.rst): Update to reflect the above changes,
3989 and to better spell out the lifetime of the compiled code.
3991 2014-12-01 David Malcolm <dmalcolm@redhat.com>
3995 (gcc::jit::recording::builtins_manager::make_fn_type): Call the
3996 context's new_function_type method, rather than directly creating
3997 a function_type instance.
3999 (gcc::jit::recording::context::new_function_type): New method,
4000 adapted from part of...
4001 (gcc::jit::recording::context::new_function_ptr_type): ...this.
4002 Update to call new_function_type.
4004 (gcc::jit::recording::context::new_function_type): New method.
4006 2014-12-01 David Malcolm <dmalcolm@redhat.com>
4009 * jit-playback.c: Ensure that ctxt_progname is non-NULL.
4011 2014-11-19 David Malcolm <dmalcolm@redhat.com>
4014 * jit-playback.c (gcc::jit::playback::compound_type::set_fields):
4015 Convert param from const vec<playback::field *> & to
4016 const auto_vec<playback::field *> *.
4017 (gcc::jit::playback::context::new_function_type): Convert param
4018 "param_types" from vec<type *> * to const auto_vec<type *> *.
4019 (gcc::jit::playback::context::new_function): Convert param
4020 "params" from vec<param *> * to const auto_vec<param *> *.
4021 (gcc::jit::playback::context::build_call): Convert param "args"
4022 from vec<rvalue *> to const auto_vec<rvalue *> *.
4023 (gcc::jit::playback::context::new_call): Likewise.
4024 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
4025 (wrapper_finalizer): New function.
4026 (gcc::jit::playback::wrapper::operator new): Call the finalizer
4027 variant of ggc_internal_cleared_alloc, supplying
4029 (gcc::jit::playback::function::finalizer): New.
4030 (gcc::jit::playback::block::finalizer): New.
4031 (gcc::jit::playback::source_file::finalizer): New.
4032 (gcc::jit::playback::source_line::finalizer): New.
4035 (gcc::jit::playback::context::new_function_type): Convert param
4036 "param_types" from vec<type *> * to const auto_vec<type *> *.
4037 (gcc::jit::playback::context::new_function): Convert param
4038 "params" from vec<param *> * to const auto_vec<param *> *.
4039 (gcc::jit::playback::context::new_call): Convert param
4040 "args" from vec<rvalue *> to const auto_vec<rvalue *> *.
4041 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
4042 (gcc::jit::playback::context::build_call): Likewise.
4043 (gcc::jit::playback::context): Convert fields "m_functions",
4044 "m_source_files", "m_cached_locations" from vec to auto_vec.
4045 (gcc::jit::playback::wrapper::finalizer): New virtual function.
4046 (gcc::jit::playback::compound_type::set_fields): Convert param fro
4047 const vec<playback::field *> & to
4048 const auto_vec<playback::field *> *.
4049 (gcc::jit::playback::function::finalizer): New.
4050 (gcc::jit::playback::block::finalizer): New.
4051 (gcc::jit::playback::source_file::finalizer): New.
4052 (gcc::jit::playback::source_line::finalizer): New.
4055 (gcc::jit::recording::function_type::replay_into): Convert local
4056 from a vec into an auto_vec.
4057 (gcc::jit::recording::fields::replay_into): Likewise.
4058 (gcc::jit::recording::function::replay_into): Likewise.
4059 (gcc::jit::recording::call::replay_into): Likewise.
4060 (gcc::jit::recording::call_through_ptr::replay_into): Likewise.
4062 * jit-recording.h (gcc::jit::recording::context): Convert fields
4063 "m_mementos", "m_compound_types", "m_functions" from vec<> to
4065 (gcc::jit::recording::function_type::get_param_types): Convert
4066 return type from vec<type *> to const vec<type *> &.
4067 (gcc::jit::recording::function_type): Convert field
4068 "m_param_types" from a vec<> to an auto_vec<>.
4069 (gcc::jit::recording::fields): Likewise for field "m_fields".
4070 (gcc::jit::recording::function::get_params): Convert return type
4071 from vec <param *> to const vec<param *> &.
4072 (gcc::jit::recording::function): Convert fields "m_params",
4073 "m_locals", "m_blocks" from vec<> to auto_vec<>.
4074 (gcc::jit::recording::block): Likewise for field "m_statements".
4075 vec<> to auto_vec<>.
4076 (gcc::jit::recording::call): Likewise for field "m_args".
4077 (gcc::jit::recording::call_through_ptr): Likewise.
4079 2014-11-19 David Malcolm <dmalcolm@redhat.com>
4082 * jit-recording.c (recording::function::validate): Convert
4083 "worklist" from vec<> to autovec<> to fix a leak.
4085 2014-11-11 David Malcolm <dmalcolm@redhat.com>
4087 * ChangeLog.jit: New.
4089 * Make-lang.in: New.
4091 * config-lang.in: New.
4092 * docs/Makefile: New.
4093 * docs/_build/texinfo/Makefile: New.
4094 * docs/_build/texinfo/factorial.png: New.
4095 * docs/_build/texinfo/libgccjit.texi: New.
4096 * docs/_build/texinfo/sum-of-squares.png: New.
4097 * docs/conf.py: New.
4098 * docs/examples/tut01-hello-world.c: New.
4099 * docs/examples/tut02-square.c: New.
4100 * docs/examples/tut03-sum-of-squares.c: New.
4101 * docs/examples/tut04-toyvm/Makefile: New.
4102 * docs/examples/tut04-toyvm/factorial.toy: New.
4103 * docs/examples/tut04-toyvm/fibonacci.toy: New.
4104 * docs/examples/tut04-toyvm/toyvm.c: New.
4105 * docs/index.rst: New.
4106 * docs/internals/index.rst: New.
4107 * docs/intro/factorial.png: New.
4108 * docs/intro/index.rst: New.
4109 * docs/intro/sum-of-squares.png: New.
4110 * docs/intro/tutorial01.rst: New.
4111 * docs/intro/tutorial02.rst: New.
4112 * docs/intro/tutorial03.rst: New.
4113 * docs/intro/tutorial04.rst: New.
4114 * docs/topics/contexts.rst: New.
4115 * docs/topics/expressions.rst: New.
4116 * docs/topics/functions.rst: New.
4117 * docs/topics/index.rst: New.
4118 * docs/topics/locations.rst: New.
4119 * docs/topics/objects.rst: New.
4120 * docs/topics/results.rst: New.
4121 * docs/topics/types.rst: New.
4122 * dummy-frontend.c: New.
4123 * jit-builtins.c: New.
4124 * jit-builtins.h: New.
4125 * jit-common.h: New.
4126 * jit-playback.c: New.
4127 * jit-playback.h: New.
4128 * jit-recording.c: New.
4129 * jit-recording.h: New.
4130 * libgccjit++.h: New.
4133 * libgccjit.map: New.
4136 2013-07-26 David Malcolm <dmalcolm@redhat.com>
4140 Copyright (C) 2013-2023 Free Software Foundation, Inc.
4142 Copying and distribution of this file, with or without modification,
4143 are permitted in any medium without royalty provided the copyright
4144 notice and this notice are preserved.