Debian Codegraph @

gcc/jit/ChangeLog

raw
1 2026-06-12 Release Manager
2
3 * GCC 15.3.0 released.
4
5 2025-08-08 Release Manager
6
7 * GCC 15.2.0 released.
8
9 2025-04-25 Release Manager
10
11 * GCC 15.1.0 released.
12
13 2025-03-29 Iain Sandoe <[email protected]>
14
15 * libgccjit.exports: Add symbols for ABI 28 to 34.
16
17 2025-03-13 Matthias Klose <[email protected]>
18
19 * Make-lang.in (LIBGCCJIT_VERSION_NUM): Move to ../Makefile.in.
20
21 2025-02-13 David Malcolm <[email protected]>
22
23 PR other/116613
24 * dummy-frontend.cc
25 (jit_diagnostic_listener::on_report_diagnostic): Add
26 "final override".
27
28 2025-02-07 Richard Biener <[email protected]>
29
30 PR jit/118780
31 * jit-playback.cc: Define INCLUDE_DLFCN_H.
32 * jit-result.cc: Likewise.
33
34 2025-01-24 David Malcolm <[email protected]>
35
36 PR jit/117886
37 * jit-recording.cc (reproducer::get_identifier_as_rvalue): Handle
38 null memento.
39 (reproducer::get_identifier_as_lvalue): Likewise.
40 (reproducer::get_identifier_as_type): Likewise.
41 (recording::ctor::write_reproducer): Use get_identifier_as_rvalue
42 rather than get_identifier when writing out gcc_jit_rvalue *
43 expressions.
44
45 2025-01-22 David Malcolm <[email protected]>
46
47 * dummy-frontend.cc (tree_type_to_jit_type): For POINTER_TYPE,
48 bail out if the inner call to tree_type_to_jit_type fails.
49 Don't abort on unknown types.
50 (jit_langhook_pushdecl): Replace gcc_unreachable with return of
51 NULL_TREE.
52
53 2024-11-22 Andrew Pinski <[email protected]>
54
55 PR bootstrap/117737
56 * dummy-frontend.cc (INCLUDE_MEMORY): Remove.
57 * jit-playback.cc (INCLUDE_MEMORY): Remove.
58 * jit-recording.cc (INCLUDE_MEMORY): Remove.
59
60 2024-11-20 Antoni Boucher <[email protected]>
61
62 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_34): New ABI tag.
63 * docs/topics/contexts.rst: Document gcc_jit_context_set_output_ident.
64 * jit-playback.cc (set_output_ident): New method.
65 * jit-playback.h (set_output_ident): New method.
66 * jit-recording.cc (recording::context::set_output_ident,
67 recording::output_ident::output_ident,
68 recording::output_ident::~output_ident,
69 recording::output_ident::replay_into,
70 recording::output_ident::make_debug_string,
71 recording::output_ident::write_reproducer): New methods.
72 * jit-recording.h (class output_ident): New class.
73 * libgccjit.cc (gcc_jit_context_set_output_ident): New function.
74 * libgccjit.h (gcc_jit_context_set_output_ident): New function.
75 * libgccjit.map: New function.
76
77 2024-01-18 Antoni Boucher <[email protected]>
78
79 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_33): New ABI tag.
80 * docs/topics/functions.rst: Document gcc_jit_function_new_temp.
81 * jit-playback.cc (new_local): Add support for temporary
82 variables.
83 * jit-recording.cc (recording::function::new_temp): New method.
84 (recording::local::write_reproducer): Support temporary
85 variables.
86 * jit-recording.h (new_temp): New method.
87 * libgccjit.cc (gcc_jit_function_new_temp): New function.
88 * libgccjit.h (gcc_jit_function_new_temp): New function.
89 * libgccjit.map: New function.
90
91 2024-11-20 Antoni Boucher <[email protected]>
92
93 PR jit/108762
94 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_32): New ABI tag.
95 * docs/topics/functions.rst: Add documentation for the function
96 gcc_jit_context_get_target_builtin_function.
97 * dummy-frontend.cc: Include headers target.h, jit-recording.h,
98 print-tree.h, unordered_map and string, new variables (target_builtins,
99 target_function_types, and target_builtins_ctxt), new function
100 (tree_type_to_jit_type).
101 * jit-builtins.cc: Specify that the function types are not from
102 target builtins.
103 * jit-playback.cc: New argument is_target_builtin to new_function.
104 * jit-playback.h: New argument is_target_builtin to
105 new_function.
106 * jit-recording.cc: New argument is_target_builtin to
107 new_function_type, function_type constructor and function
108 constructor, new function
109 (get_target_builtin_function).
110 * jit-recording.h: Include headers string and unordered_map, new
111 variable target_function_types, new argument is_target_builtin
112 to new_function_type, function_type and function, new functions
113 (get_target_builtin_function, copy).
114 * libgccjit.cc: New function
115 (gcc_jit_context_get_target_builtin_function).
116 * libgccjit.h: New function
117 (gcc_jit_context_get_target_builtin_function).
118 * libgccjit.map: New functions
119 (gcc_jit_context_get_target_builtin_function).
120
121 2024-11-20 Antoni Boucher <[email protected]>
122
123 * jit-common.h: Add forward declaration of memento_of_get_aligned.
124 * jit-recording.h (type::is_same_type_as): Compare integer
125 types.
126 (dyn_cast_aligned_type): New method.
127 (type::is_aligned, memento_of_get_aligned::is_same_type_as,
128 memento_of_get_aligned::is_aligned): new methods.
129
130 2024-11-20 Antoni Boucher <[email protected]>
131
132 * docs/topics/contexts.rst: Add documentation for new option.
133 * jit-recording.cc (recording::context::get_str_option): New
134 method.
135 * jit-recording.h (get_str_option): New method.
136 * libgccjit.cc (gcc_jit_context_new_function): Allow special
137 characters in function names.
138 * libgccjit.h (enum gcc_jit_str_option): New option.
139
140 2024-11-20 Antoni Boucher <[email protected]>
141
142 PR jit/112602
143 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_31): New ABI tag.
144 * docs/topics/expressions.rst: Document
145 gcc_jit_context_new_rvalue_vector_perm and
146 gcc_jit_context_new_vector_access.
147 * jit-playback.cc (playback::context::new_rvalue_vector_perm,
148 common_mark_addressable_vec,
149 gnu_vector_type_p,
150 lvalue_p,
151 convert_vector_to_array_for_subscript,
152 new_vector_access): new functions.
153 * jit-playback.h (new_rvalue_vector_perm, new_vector_access):
154 New functions.
155 * jit-recording.cc (recording::context::new_rvalue_vector_perm,
156 recording::context::new_vector_access,
157 memento_of_new_rvalue_vector_perm,
158 recording::memento_of_new_rvalue_vector_perm::replay_into,
159 recording::memento_of_new_rvalue_vector_perm::visit_children,
160 recording::memento_of_new_rvalue_vector_perm::make_debug_string,
161 recording::memento_of_new_rvalue_vector_perm::write_reproducer,
162 recording::vector_access::replay_into,
163 recording::vector_access::visit_children,
164 recording::vector_access::make_debug_string,
165 recording::vector_access::write_reproducer): New methods.
166 * jit-recording.h (class memento_of_new_rvalue_vector_perm,
167 class vector_access): New classes.
168 * libgccjit.cc (gcc_jit_context_new_vector_access,
169 gcc_jit_context_new_rvalue_vector_perm): New functions.
170 * libgccjit.h (gcc_jit_context_new_rvalue_vector_perm,
171 gcc_jit_context_new_vector_access): New functions.
172 * libgccjit.map: New functions.
173
174 2024-11-20 Antoni Boucher <[email protected]>
175
176 PR jit/113343
177 * jit-playback.cc (new_rvalue_from_const): Fix to have the
178 correct value when cross-compiling.
179
180 2024-11-20 Antoni Boucher <[email protected]>
181
182 * libgccjit.cc (RETURN_IF_FAIL_PRINTF3): New macro.
183 (gcc_jit_block_add_assignment_op): Add numeric checks.
184
185 2024-11-20 Antoni Boucher <[email protected]>
186
187 * dummy-frontend.cc (jit_langhook_init): Send flag_signed_char
188 argument to build_common_tree_nodes.
189
190 2024-11-04 Antoni Boucher <[email protected]>
191
192 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_30): New ABI tag.
193 * docs/topics/expressions.rst: Document gcc_jit_context_convert_vector.
194 * jit-playback.cc (convert_vector): New method.
195 * jit-playback.h: New method.
196 * jit-recording.cc (recording::context::new_convert_vector,
197 recording::convert_vector::replay_into,
198 recording::convert_vector::visit_children,
199 recording::convert_vector::make_debug_string,
200 recording::convert_vector::write_reproducer): New methods.
201 * jit-recording.h (class convert_vector): New class.
202 (context::new_convert_vector): New method.
203 * libgccjit.cc (gcc_jit_context_convert_vector): New function.
204 * libgccjit.h (gcc_jit_context_convert_vector): New function.
205 * libgccjit.map: New function.
206
207 2024-11-04 Antoni Boucher <[email protected]>
208
209 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_29): New ABI tag.
210 * docs/topics/expressions.rst: Document gcc_jit_global_set_readonly.
211 * jit-playback.cc (global_new_decl, new_global,
212 new_global_initialized): New parameter readonly.
213 * jit-playback.h (global_new_decl, new_global,
214 new_global_initialized): New parameter readonly.
215 * jit-recording.cc (recording::global::replay_into): Use
216 m_readonly.
217 (recording::global::write_reproducer): Dump reproducer for
218 gcc_jit_global_set_readonly.
219 * jit-recording.h (get_readonly, set_readonly): New methods.
220 (m_readonly): New attribute.
221 * libgccjit.cc (gcc_jit_global_set_readonly): New function.
222 (gcc_jit_block_add_assignment): Check that we don't assign to a
223 readonly variable.
224 * libgccjit.h (gcc_jit_global_set_readonly): New function.
225 (LIBGCCJIT_HAVE_gcc_jit_global_set_readonly): New define.
226 * libgccjit.map: New function.
227
228 2024-11-04 Antoni Boucher <[email protected]>
229
230 * jit-builtins.cc (ensure_optimization_builtins_exist): Add
231 missing builtins.
232
233 2024-10-29 David Malcolm <[email protected]>
234
235 PR other/116613
236 * dummy-frontend.cc: Include "make-unique.h".
237 (class jit_diagnostic_listener): New.
238 (jit_begin_diagnostic): Update comment.
239 (jit_end_diagnostic): Drop call to add_diagnostic.
240 (jit_langhook_init): Set the output format to a new
241 jit_diagnostic_listener.
242 * jit-playback.cc (playback::context::add_diagnostic): Add "text"
243 param and use that rather than trying to get the text from a
244 pretty_printer.
245 * jit-playback.h (playback::context::add_diagnostic): Add "text"
246 param.
247
248 2024-10-25 Jakub Jelinek <[email protected]>
249
250 * docs/examples/tut04-toyvm/toyvm.cc: Remove trailing whitespace.
251
252 2024-10-24 David Malcolm <[email protected]>
253 Gaius Mulley <[email protected]>
254
255 PR other/116613
256 * dummy-frontend.cc: Add #define INCLUDE_MEMORY.
257 * jit-playback.cc: Likewise.
258 * jit-recording.cc: Likewise.
259
260 2024-09-20 David Malcolm <[email protected]>
261
262 PR other/116613
263 * dummy-frontend.cc: Include "diagnostic-format-text.h".
264 (jit_begin_diagnostic): Convert first param from
265 diagnostic_context * to diagnostic_text_output_format &
266 (jit_end_diagnostic): Likewise. Update accordingly.
267 (jit_langhook_init): Update for renamings.
268
269 2024-09-18 Francois-Xavier Coudert <[email protected]>
270
271 * libgccjit.h: Include <sys/types.h>
272
273 2024-09-09 David Malcolm <[email protected]>
274
275 PR other/116613
276 * jit-playback.cc (add_diagnostic): Rename diagnostic_context's
277 "printer" field to "m_printer".
278
279 2024-09-02 Richard Sandiford <[email protected]>
280
281 * jit-playback.cc (playback::block::add_extended_asm): Rename
282 ASM_INPUT_P to ASM_BASIC_P.
283
284 2024-07-24 David Malcolm <[email protected]>
285
286 * jit-playback.cc (jit::playback_context::compile) Add a trailing
287 null to argvec.
288
289 2024-07-05 Antoni Boucher <[email protected]>
290
291 * jit-common.h: Add array_type class.
292 * jit-recording.h (type::dyn_cast_array_type,
293 memento_of_get_aligned::dyn_cast_array_type,
294 array_type::dyn_cast_array_type, array_type::is_same_type_as):
295 New methods.
296
297 2024-07-05 Antoni Boucher <[email protected]>
298
299 PR jit/112574
300 * docs/topics/types.rst: Document GCC_JIT_TYPE_BFLOAT16.
301 * jit-common.h: Update NUM_GCC_JIT_TYPES.
302 * jit-playback.cc (get_tree_node_for_type): Support bfloat16.
303 * jit-recording.cc (recording::memento_of_get_type::get_size,
304 recording::memento_of_get_type::dereference,
305 recording::memento_of_get_type::is_int,
306 recording::memento_of_get_type::is_signed,
307 recording::memento_of_get_type::is_float,
308 recording::memento_of_get_type::is_bool): Support bfloat16.
309 * libgccjit.h (enum gcc_jit_types): Add GCC_JIT_TYPE_BFLOAT16.
310
311 2024-06-29 Iain Sandoe <[email protected]>
312
313 * jit-recording.cc
314 (recording::memento_of_typeinfo::make_debug_string): Default the value
315 of ident.
316 (recording::memento_of_typeinfo::write_reproducer): Default the value
317 of type.
318
319 2024-06-27 Antoni Boucher <[email protected]>
320
321 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_28): New ABI tag.
322 * docs/topics/expressions.rst: Document gcc_jit_context_new_alignof.
323 * jit-playback.cc (new_alignof): New method.
324 * jit-playback.h: New method.
325 * jit-recording.cc (recording::context::new_alignof): New
326 method.
327 (recording::memento_of_sizeof::replay_into,
328 recording::memento_of_typeinfo::replay_into,
329 recording::memento_of_sizeof::make_debug_string,
330 recording::memento_of_typeinfo::make_debug_string,
331 recording::memento_of_sizeof::write_reproducer,
332 recording::memento_of_typeinfo::write_reproducer): Rename.
333 * jit-recording.h (enum type_info_type): New enum.
334 (class memento_of_sizeof class memento_of_typeinfo): Rename.
335 * libgccjit.cc (gcc_jit_context_new_alignof): New function.
336 * libgccjit.h (gcc_jit_context_new_alignof): New function.
337 * libgccjit.map: New function.
338
339 2024-06-25 Kewen Lin <[email protected]>
340
341 * jit-recording.cc (recording::memento_of_get_type::get_size): Update
342 macros {FLOAT,DOUBLE,LONG_DOUBLE}_TYPE_SIZE by calling
343 targetm.c.mode_for_floating_type with
344 TI_{FLOAT,DOUBLE,LONG_DOUBLE}_TYPE.
345
346 2024-06-12 David Malcolm <[email protected]>
347
348 * jit-recording.cc (recording::function::dump_to_dot): Update for
349 fields of pretty_printer becoming private.
350
351 2024-06-11 Andrew Pinski <[email protected]>
352
353 PR jit/115442
354 * jit-recording.cc: Define INCLUDE_SSTREAM before including
355 system.h and don't directly incldue sstream.
356
357 2024-04-09 Jakub Jelinek <[email protected]>
358
359 * docs/topics/expressions.rst (Constructor expressions): Fix
360 duplicated words; have have -> have.
361
362 2024-04-02 Iain Sandoe <[email protected]>
363
364 * Make-lang.in: Implement exports list, and use a shared
365 libgcc.
366 * libgccjit.exports: New file.
367
368 2024-03-29 Guillaume Gomez <[email protected]>
369
370 * libgccjit.cc (gcc_jit_type_get_size): Add pointer support
371
372 2024-02-10 Jakub Jelinek <[email protected]>
373
374 * jit-playback.cc (new_bitcast): Use HOST_WIDE_INT_PRINT_DEC instead
375 of "%ld" and casts to long.
376
377 2024-02-02 Antoni Boucher <[email protected]>
378
379 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_27): New ABI tag.
380 * docs/topics/expressions.rst: Document gcc_jit_context_new_sizeof.
381 * jit-playback.cc (new_sizeof): New method.
382 * jit-playback.h (new_sizeof): New method.
383 * jit-recording.cc (recording::context::new_sizeof,
384 recording::memento_of_sizeof::replay_into,
385 recording::memento_of_sizeof::make_debug_string,
386 recording::memento_of_sizeof::write_reproducer): New methods.
387 * jit-recording.h (class memento_of_sizeof): New class.
388 * libgccjit.cc (gcc_jit_context_new_sizeof): New function.
389 * libgccjit.h (gcc_jit_context_new_sizeof): New function.
390 * libgccjit.map: New function.
391
392 2024-01-19 Antoni Boucher <[email protected]>
393
394 * jit-builtins.cc (ensure_optimization_builtins_exist): Add
395 popcount builtins.
396
397 2024-01-19 Antoni Boucher <[email protected]>
398
399 * jit-recording.h (is_numeric_vector, vector_type::new_int): New
400 functions.
401 * libgccjit.cc (gcc_jit_context_new_unary_op,
402 gcc_jit_context_new_binary_op): add checks for
403 is_numeric_vector.
404
405 2024-01-12 Guillaume Gomez <[email protected]>
406 Antoni Boucher <[email protected]>
407
408 * docs/topics/compatibility.rst: Add documentation for LIBGCCJIT_ABI_26.
409 * docs/topics/functions.rst: Add documentation for new functions.
410 * docs/topics/expressions.rst: Add documentation for new functions.
411
412 2024-01-12 Guillaume Gomez <[email protected]>
413 Antoni Boucher <[email protected]>
414
415 * dummy-frontend.cc (handle_alias_attribute): New function.
416 (handle_always_inline_attribute): New function.
417 (handle_cold_attribute): New function.
418 (handle_fnspec_attribute): New function.
419 (handle_format_arg_attribute): New function.
420 (handle_format_attribute): New function.
421 (handle_noinline_attribute): New function.
422 (handle_target_attribute): New function.
423 (handle_used_attribute): New function.
424 (handle_visibility_attribute): New function.
425 (handle_weak_attribute): New function.
426 (handle_alias_ifunc_attribute): New function.
427 * jit-playback.cc (fn_attribute_to_string): New function.
428 (variable_attribute_to_string): New function.
429 (global_new_decl): Add attributes support.
430 (set_variable_attribute): New function.
431 (new_global): Add attributes support.
432 (new_global_initialized): Add attributes support.
433 (new_local): Add attributes support.
434 * jit-playback.h (fn_attribute_to_string): New function.
435 (set_variable_attribute): New function.
436 * jit-recording.cc (recording::lvalue::add_attribute): New function.
437 (recording::function::function): New function.
438 (recording::function::write_to_dump): Add attributes support.
439 (recording::function::add_attribute): New function.
440 (recording::function::add_string_attribute): New function.
441 (recording::function::add_integer_array_attribute): New function.
442 (recording::global::replay_into): Add attributes support.
443 (recording::local::replay_into): Add attributes support.
444 * jit-recording.h: Add attributes support.
445 * libgccjit.cc (gcc_jit_function_add_attribute): New function.
446 (gcc_jit_function_add_string_attribute): New function.
447 (gcc_jit_function_add_integer_array_attribute): New function.
448 (gcc_jit_lvalue_add_attribute): New function.
449 * libgccjit.h (enum gcc_jit_fn_attribute): New enum.
450 (gcc_jit_function_add_attribute): New function.
451 (gcc_jit_function_add_string_attribute): New function.
452 (gcc_jit_function_add_integer_array_attribute): New function.
453 (enum gcc_jit_variable_attribute): New function.
454 (gcc_jit_lvalue_add_string_attribute): New function.
455 * libgccjit.map: Declare new functions.
456
457 2023-12-06 David Malcolm <[email protected]>
458
459 * dummy-frontend.cc (jit_begin_diagnostic): Make diagnostic_info
460 param const.
461 (jit_end_diagnostic): Likewise. Pass to add_diagnostic by
462 reference.
463 * jit-playback.cc (jit::playback::context::add_diagnostic):
464 Convert diagnostic_info to const reference.
465 * jit-playback.h (jit::playback::context::add_diagnostic):
466 Likewise.
467
468 2023-12-05 Richard Sandiford <[email protected]>
469
470 * dummy-frontend.cc (jit_gnu_attribute_table): Add extra braces
471 to work around PR 16333 in older compilers.
472 (jit_format_attribute_table): Likewise.
473
474 2023-12-02 Richard Sandiford <[email protected]>
475
476 * dummy-frontend.cc (jit_format_attribute_table): Change type to
477 scoped_attribute_specs, using...
478 (jit_format_attributes): ...this as the underlying array.
479 (jit_attribute_table): Change to an array of scoped_attribute_specs
480 pointers, using...
481 (jit_gnu_attributes, jit_gnu_attribute_table): ...these new globals
482 for the original array. Include the format attributes.
483 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete.
484 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete.
485 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
486
487 2023-11-09 Guillaume Gomez <[email protected]>
488
489 * libgccjit++.h:
490
491 2023-11-04 David Malcolm <[email protected]>
492
493 * jit-playback.cc: Update for changes to diagnostic_context.
494 * jit-playback.h: Likewise.
495
496 2023-10-25 Vibhav Pant <[email protected]>
497
498 * jit-recording.cc (recording::global::write_to_dump): Fix
499 dump of string literal initializers.
500
501 2023-10-22 Iain Sandoe <[email protected]>
502
503 * Make-lang.in: Handle Darwin rpaths.
504
505 2023-10-02 David Malcolm <[email protected]>
506
507 * dummy-frontend.cc (jit_langhook_init): Update for change to
508 diagnostic_context callbacks.
509
510 2023-08-31 Francois-Xavier Coudert <[email protected]>
511
512 * jit-playback.cc: Change spelling to macOS.
513
514 2023-08-29 Guillaume Gomez <[email protected]>
515
516 * docs/topics/compatibility.rst: Add documentation for LIBGCCJIT_ABI_25.
517 * docs/topics/types.rst: Add documentation for gcc_jit_type_get_restrict.
518
519 2023-08-29 Guillaume Gomez <[email protected]>
520
521 * jit-playback.cc: Remove trailing whitespace characters.
522 * jit-playback.h: Add get_restrict method.
523 * jit-recording.cc: Add get_restrict methods.
524 * jit-recording.h: Add get_restrict methods.
525 * libgccjit++.h: Add get_restrict methods.
526 * libgccjit.cc: Add gcc_jit_type_get_restrict.
527 * libgccjit.h: Declare gcc_jit_type_get_restrict.
528 * libgccjit.map: Declare gcc_jit_type_get_restrict.
529
530 2023-02-16 Patrick Palka <[email protected]>
531
532 * jit-dejagnu.h: Mechanically drop static from static inline
533 functions via s/^static inline/inline/g.
534 * jit-recording.h: Likewise.
535
536 2023-01-07 LIU Hao <[email protected]>
537
538 PR middle-end/108300
539 * jit-w32.h: Define `WIN32_LEAN_AND_MEAN` before <windows.h>.
540
541 2022-12-21 Martin Liska <[email protected]>
542
543 * jit-playback.h: Use unused attribute.
544
545 2022-12-14 Antoni Boucher <[email protected]>
546 Guillaume Gomez <[email protected]>
547
548 PR jit/108078
549 * jit-recording.h: Add vector_type::is_same_type_as method
550
551 2022-12-07 Antoni Boucher <[email protected]>
552 Guillaume Gomez <[email protected]>
553
554 PR jit/107770
555 * jit-playback.cc: Fix vector float comparison
556 * jit-playback.h: Update comparison function signature
557 * jit-recording.cc: Update call for "new_comparison" function
558 * jit-recording.h: Fix vector float comparison
559
560 2022-11-20 Jeff Law <[email protected]>
561
562 PR other/104044
563 * jit-playback.cc (playback::lvale::mark_addressable): Remove
564 extraeous semicolon
565
566 2022-11-19 Jonathan Wakely <[email protected]>
567 LIU Hao <[email protected]>
568
569 * jit-playback.cc (playback::context::scoped_lock): Define RAII
570 lock type.
571 (playback::context::compile): Use scoped_lock to acquire mutex
572 for the active playback context.
573 (jit_mutex): Change to std::mutex.
574 (playback::context::acquire_mutex): Rename to ...
575 (playback::context::lock): ... this.
576 (playback::context::release_mutex): Rename to ...
577 (playback::context::unlock): ... this.
578 * jit-playback.h (playback::context): Rename members and declare
579 scoped_lock.
580 * jit-recording.cc (INCLUDE_PTHREAD_H): Remove unused define.
581 * libgccjit.cc (version_mutex): Change to std::mutex.
582 (struct jit_version_info): Use std::lock_guard to acquire and
583 release mutex.
584
585 2022-11-14 Martin Liska <[email protected]>
586
587 Revert:
588 2022-11-09 Martin Liska <[email protected]>
589
590 * Make-lang.in:
591 * docs/cp/index.rst: Moved to...
592 * doc/cp/index.rst: ...here.
593 * docs/cp/intro/index.rst: Moved to...
594 * doc/cp/intro/index.rst: ...here.
595 * docs/cp/intro/tutorial01.rst: Moved to...
596 * doc/cp/intro/tutorial01.rst: ...here.
597 * docs/cp/intro/tutorial02.rst: Moved to...
598 * doc/cp/intro/tutorial02.rst: ...here.
599 * docs/cp/intro/tutorial03.rst: Moved to...
600 * doc/cp/intro/tutorial03.rst: ...here.
601 * docs/cp/intro/tutorial04.rst: Moved to...
602 * doc/cp/intro/tutorial04.rst: ...here.
603 * docs/cp/topics/asm.rst: Moved to...
604 * doc/cp/topics/asm.rst: ...here.
605 * docs/cp/topics/compilation.rst: Moved to...
606 * doc/cp/topics/compilation.rst: ...here.
607 * docs/cp/topics/contexts.rst: Moved to...
608 * doc/cp/topics/contexts.rst: ...here.
609 * docs/cp/topics/expressions.rst: Moved to...
610 * doc/cp/topics/expressions.rst: ...here.
611 * docs/cp/topics/functions.rst: Moved to...
612 * doc/cp/topics/functions.rst: ...here.
613 * docs/cp/topics/index.rst: Moved to...
614 * doc/cp/topics/index.rst: ...here.
615 * docs/cp/topics/locations.rst: Moved to...
616 * doc/cp/topics/locations.rst: ...here.
617 * docs/cp/topics/objects.rst: Moved to...
618 * doc/cp/topics/objects.rst: ...here.
619 * docs/cp/topics/types.rst: Moved to...
620 * doc/cp/topics/types.rst: ...here.
621 * docs/examples/emit-alphabet.bf: Moved to...
622 * doc/examples/emit-alphabet.bf: ...here.
623 * docs/examples/tut01-hello-world.c: Moved to...
624 * doc/examples/tut01-hello-world.c: ...here.
625 * docs/examples/tut01-hello-world.cc: Moved to...
626 * doc/examples/tut01-hello-world.cc: ...here.
627 * docs/examples/tut02-square.c: Moved to...
628 * doc/examples/tut02-square.c: ...here.
629 * docs/examples/tut02-square.cc: Moved to...
630 * doc/examples/tut02-square.cc: ...here.
631 * docs/examples/tut03-sum-of-squares.c: Moved to...
632 * doc/examples/tut03-sum-of-squares.c: ...here.
633 * docs/examples/tut03-sum-of-squares.cc: Moved to...
634 * doc/examples/tut03-sum-of-squares.cc: ...here.
635 * docs/examples/tut04-toyvm/Makefile: Moved to...
636 * doc/examples/tut04-toyvm/Makefile: ...here.
637 * docs/examples/tut04-toyvm/factorial.toy: Moved to...
638 * doc/examples/tut04-toyvm/factorial.toy: ...here.
639 * docs/examples/tut04-toyvm/fibonacci.toy: Moved to...
640 * doc/examples/tut04-toyvm/fibonacci.toy: ...here.
641 * docs/examples/tut04-toyvm/toyvm.c: Moved to...
642 * doc/examples/tut04-toyvm/toyvm.c: ...here.
643 * docs/examples/tut04-toyvm/toyvm.cc: Moved to...
644 * doc/examples/tut04-toyvm/toyvm.cc: ...here.
645 * docs/examples/tut05-bf.c: Moved to...
646 * doc/examples/tut05-bf.c: ...here.
647 * docs/index.rst: Moved to...
648 * doc/index.rst: ...here.
649 * docs/internals/index.rst: Moved to...
650 * doc/internals/index.rst: ...here.
651 * docs/internals/test-hello-world.exe.log.txt: Moved to...
652 * doc/internals/test-hello-world.exe.log.txt: ...here.
653 * docs/_build/texinfo/libgccjit-figures/factorial.png: Moved to...
654 * doc/intro/factorial.png: ...here.
655 * docs/intro/index.rst: Moved to...
656 * doc/intro/index.rst: ...here.
657 * docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: Moved to...
658 * doc/intro/sum-of-squares.png: ...here.
659 * docs/intro/tutorial01.rst: Moved to...
660 * doc/intro/tutorial01.rst: ...here.
661 * docs/intro/tutorial02.rst: Moved to...
662 * doc/intro/tutorial02.rst: ...here.
663 * docs/intro/tutorial03.rst: Moved to...
664 * doc/intro/tutorial03.rst: ...here.
665 * docs/intro/tutorial04.rst: Moved to...
666 * doc/intro/tutorial04.rst: ...here.
667 * docs/intro/tutorial05.rst: Moved to...
668 * doc/intro/tutorial05.rst: ...here.
669 * docs/topics/asm.rst: Moved to...
670 * doc/topics/asm.rst: ...here.
671 * docs/topics/compatibility.rst: Moved to...
672 * doc/topics/compatibility.rst: ...here.
673 * docs/topics/compilation.rst: Moved to...
674 * doc/topics/compilation.rst: ...here.
675 * docs/topics/contexts.rst: Moved to...
676 * doc/topics/contexts.rst: ...here.
677 * docs/topics/expressions.rst: Moved to...
678 * doc/topics/expressions.rst: ...here.
679 * docs/topics/function-pointers.rst: Moved to...
680 * doc/topics/function-pointers.rst: ...here.
681 * docs/topics/functions.rst: Moved to...
682 * doc/topics/functions.rst: ...here.
683 * docs/topics/index.rst: Moved to...
684 * doc/topics/index.rst: ...here.
685 * docs/topics/locations.rst: Moved to...
686 * doc/topics/locations.rst: ...here.
687 * docs/topics/objects.rst: Moved to...
688 * doc/topics/objects.rst: ...here.
689 * docs/topics/performance.rst: Moved to...
690 * doc/topics/performance.rst: ...here.
691 * docs/topics/types.rst: Moved to...
692 * doc/topics/types.rst: ...here.
693 * docs/Makefile: Removed.
694 * docs/_build/texinfo/Makefile: Removed.
695 * docs/_build/texinfo/libgccjit-figures/factorial1.png: Removed.
696 * docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: Removed.
697 * docs/_build/texinfo/libgccjit.texi: Removed.
698 * docs/conf.py: Removed.
699 * docs/intro/factorial.png: Removed.
700 * docs/intro/sum-of-squares.png: Removed.
701 * doc/conf.py: New file.
702
703 2022-11-14 Martin Liska <[email protected]>
704
705 Revert:
706 2022-11-14 Martin Liska <[email protected]>
707
708 * Make-lang.in: Support --with-sphinx-build.
709
710 2022-11-14 Martin Liska <[email protected]>
711
712 Revert:
713 2022-11-14 Martin Liska <[email protected]>
714
715 * doc/internals/index.rst: Fix cross manual refs.
716 * doc/topics/contexts.rst: Likewise.
717
718 2022-11-14 Martin Liska <[email protected]>
719
720 Revert:
721 2022-11-14 Martin Liska <[email protected]>
722
723 * Make-lang.in:
724 Support installation if sphinx-build is missing.
725
726 2022-11-14 Martin Liska <[email protected]>
727
728 Revert:
729 2022-11-14 Martin Liska <[email protected]>
730
731 * doc/cp/index.rst: Remove trailing .rst in toctree.
732 * doc/cp/intro/index.rst: Likewise.
733 * doc/cp/topics/index.rst: Likewise.
734 * doc/index.rst: Likewise.
735 * doc/intro/index.rst: Likewise.
736 * doc/topics/index.rst: Likewise.
737 * doc/indices-and-tables.rst: New file.
738
739 2022-11-11 Martin Liska <[email protected]>
740
741 * doc/cp/index.rst: Remove trailing .rst in toctree.
742 * doc/cp/intro/index.rst: Likewise.
743 * doc/cp/topics/index.rst: Likewise.
744 * doc/index.rst: Likewise.
745 * doc/intro/index.rst: Likewise.
746 * doc/topics/index.rst: Likewise.
747 * doc/indices-and-tables.rst: New file.
748
749 2022-11-09 Martin Liska <[email protected]>
750
751 * Make-lang.in:
752 Support installation if sphinx-build is missing.
753
754 2022-11-09 Martin Liska <[email protected]>
755
756 * doc/internals/index.rst: Fix cross manual refs.
757 * doc/topics/contexts.rst: Likewise.
758
759 2022-11-09 Martin Liska <[email protected]>
760
761 * Make-lang.in: Support --with-sphinx-build.
762
763 2022-11-09 Martin Liska <[email protected]>
764
765 * Make-lang.in:
766 * docs/cp/index.rst: Moved to...
767 * doc/cp/index.rst: ...here.
768 * docs/cp/intro/index.rst: Moved to...
769 * doc/cp/intro/index.rst: ...here.
770 * docs/cp/intro/tutorial01.rst: Moved to...
771 * doc/cp/intro/tutorial01.rst: ...here.
772 * docs/cp/intro/tutorial02.rst: Moved to...
773 * doc/cp/intro/tutorial02.rst: ...here.
774 * docs/cp/intro/tutorial03.rst: Moved to...
775 * doc/cp/intro/tutorial03.rst: ...here.
776 * docs/cp/intro/tutorial04.rst: Moved to...
777 * doc/cp/intro/tutorial04.rst: ...here.
778 * docs/cp/topics/asm.rst: Moved to...
779 * doc/cp/topics/asm.rst: ...here.
780 * docs/cp/topics/compilation.rst: Moved to...
781 * doc/cp/topics/compilation.rst: ...here.
782 * docs/cp/topics/contexts.rst: Moved to...
783 * doc/cp/topics/contexts.rst: ...here.
784 * docs/cp/topics/expressions.rst: Moved to...
785 * doc/cp/topics/expressions.rst: ...here.
786 * docs/cp/topics/functions.rst: Moved to...
787 * doc/cp/topics/functions.rst: ...here.
788 * docs/cp/topics/index.rst: Moved to...
789 * doc/cp/topics/index.rst: ...here.
790 * docs/cp/topics/locations.rst: Moved to...
791 * doc/cp/topics/locations.rst: ...here.
792 * docs/cp/topics/objects.rst: Moved to...
793 * doc/cp/topics/objects.rst: ...here.
794 * docs/cp/topics/types.rst: Moved to...
795 * doc/cp/topics/types.rst: ...here.
796 * docs/examples/emit-alphabet.bf: Moved to...
797 * doc/examples/emit-alphabet.bf: ...here.
798 * docs/examples/tut01-hello-world.c: Moved to...
799 * doc/examples/tut01-hello-world.c: ...here.
800 * docs/examples/tut01-hello-world.cc: Moved to...
801 * doc/examples/tut01-hello-world.cc: ...here.
802 * docs/examples/tut02-square.c: Moved to...
803 * doc/examples/tut02-square.c: ...here.
804 * docs/examples/tut02-square.cc: Moved to...
805 * doc/examples/tut02-square.cc: ...here.
806 * docs/examples/tut03-sum-of-squares.c: Moved to...
807 * doc/examples/tut03-sum-of-squares.c: ...here.
808 * docs/examples/tut03-sum-of-squares.cc: Moved to...
809 * doc/examples/tut03-sum-of-squares.cc: ...here.
810 * docs/examples/tut04-toyvm/Makefile: Moved to...
811 * doc/examples/tut04-toyvm/Makefile: ...here.
812 * docs/examples/tut04-toyvm/factorial.toy: Moved to...
813 * doc/examples/tut04-toyvm/factorial.toy: ...here.
814 * docs/examples/tut04-toyvm/fibonacci.toy: Moved to...
815 * doc/examples/tut04-toyvm/fibonacci.toy: ...here.
816 * docs/examples/tut04-toyvm/toyvm.c: Moved to...
817 * doc/examples/tut04-toyvm/toyvm.c: ...here.
818 * docs/examples/tut04-toyvm/toyvm.cc: Moved to...
819 * doc/examples/tut04-toyvm/toyvm.cc: ...here.
820 * docs/examples/tut05-bf.c: Moved to...
821 * doc/examples/tut05-bf.c: ...here.
822 * docs/index.rst: Moved to...
823 * doc/index.rst: ...here.
824 * docs/internals/index.rst: Moved to...
825 * doc/internals/index.rst: ...here.
826 * docs/internals/test-hello-world.exe.log.txt: Moved to...
827 * doc/internals/test-hello-world.exe.log.txt: ...here.
828 * docs/_build/texinfo/libgccjit-figures/factorial.png: Moved to...
829 * doc/intro/factorial.png: ...here.
830 * docs/intro/index.rst: Moved to...
831 * doc/intro/index.rst: ...here.
832 * docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: Moved to...
833 * doc/intro/sum-of-squares.png: ...here.
834 * docs/intro/tutorial01.rst: Moved to...
835 * doc/intro/tutorial01.rst: ...here.
836 * docs/intro/tutorial02.rst: Moved to...
837 * doc/intro/tutorial02.rst: ...here.
838 * docs/intro/tutorial03.rst: Moved to...
839 * doc/intro/tutorial03.rst: ...here.
840 * docs/intro/tutorial04.rst: Moved to...
841 * doc/intro/tutorial04.rst: ...here.
842 * docs/intro/tutorial05.rst: Moved to...
843 * doc/intro/tutorial05.rst: ...here.
844 * docs/topics/asm.rst: Moved to...
845 * doc/topics/asm.rst: ...here.
846 * docs/topics/compatibility.rst: Moved to...
847 * doc/topics/compatibility.rst: ...here.
848 * docs/topics/compilation.rst: Moved to...
849 * doc/topics/compilation.rst: ...here.
850 * docs/topics/contexts.rst: Moved to...
851 * doc/topics/contexts.rst: ...here.
852 * docs/topics/expressions.rst: Moved to...
853 * doc/topics/expressions.rst: ...here.
854 * docs/topics/function-pointers.rst: Moved to...
855 * doc/topics/function-pointers.rst: ...here.
856 * docs/topics/functions.rst: Moved to...
857 * doc/topics/functions.rst: ...here.
858 * docs/topics/index.rst: Moved to...
859 * doc/topics/index.rst: ...here.
860 * docs/topics/locations.rst: Moved to...
861 * doc/topics/locations.rst: ...here.
862 * docs/topics/objects.rst: Moved to...
863 * doc/topics/objects.rst: ...here.
864 * docs/topics/performance.rst: Moved to...
865 * doc/topics/performance.rst: ...here.
866 * docs/topics/types.rst: Moved to...
867 * doc/topics/types.rst: ...here.
868 * docs/Makefile: Removed.
869 * docs/_build/texinfo/Makefile: Removed.
870 * docs/_build/texinfo/libgccjit-figures/factorial1.png: Removed.
871 * docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: Removed.
872 * docs/_build/texinfo/libgccjit.texi: Removed.
873 * docs/conf.py: Removed.
874 * docs/intro/factorial.png: Removed.
875 * docs/intro/sum-of-squares.png: Removed.
876 * doc/conf.py: New file.
877
878 2022-09-15 Richard Biener <[email protected]>
879
880 * dummy-frontend.cc (jit_langhook_init): Do not initialize
881 void_list_node.
882
883 2022-08-09 Vibhav Pant <[email protected]>
884
885 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_context_new_bitcast): Move
886 definition out of comment.
887
888 2022-07-28 David Malcolm <[email protected]>
889
890 * docs/internals/index.rst: Remove reference to ".c" extensions
891 of source files.
892
893 2022-07-28 Martin LiÅ¡ka <[email protected]>
894
895 * docs/cp/intro/tutorial02.rst:
896 Shorten the assembly example so that there is not slider.
897 * docs/cp/intro/tutorial04.rst: Likewise.
898 * docs/intro/tutorial02.rst: Likewise.
899 * docs/intro/tutorial04.rst: Likewise.
900 * docs/topics/contexts.rst: Likewise.
901
902 2022-07-28 marxin <[email protected]>
903
904 * docs/index.rst: Remove reference to module index
905 as we don't emit any.
906
907 2022-07-28 marxin <[email protected]>
908
909 * docs/cp/intro/tutorial02.rst: Use :expr:`type *` for pointers to a type
910 * docs/cp/topics/asm.rst: Likewise.
911 * docs/cp/topics/contexts.rst: Likewise.
912 * docs/cp/topics/expressions.rst: Likewise.
913 * docs/cp/topics/functions.rst: Likewise.
914 * docs/cp/topics/objects.rst: Likewise.
915 * docs/intro/tutorial02.rst: Likewise.
916 * docs/intro/tutorial03.rst: Likewise.
917 * docs/intro/tutorial04.rst: Likewise.
918 * docs/intro/tutorial05.rst: Likewise.
919 * docs/topics/compilation.rst: Likewise.
920 * docs/topics/contexts.rst: Likewise.
921 * docs/topics/objects.rst: Likewise.
922
923 2022-07-28 marxin <[email protected]>
924
925 * docs/cp/intro/tutorial04.rst: Use list-table.
926 * docs/intro/tutorial04.rst: Likewise.
927 * docs/intro/tutorial05.rst: Likewise.
928 * docs/topics/compilation.rst: Likewise.
929 * docs/topics/expressions.rst: Likewise.
930 * docs/topics/types.rst: Likewise.
931
932 2022-07-28 marxin <[email protected]>
933
934 * docs/cp/topics/expressions.rst: Compact so that the generated
935 output is also more compact.
936
937 2022-07-28 marxin <[email protected]>
938
939 * docs/cp/intro/tutorial02.rst: Use proper reference.
940 * docs/cp/topics/contexts.rst: Likewise.
941 * docs/cp/topics/functions.rst: Put `class` directive before a
942 function as it is not allowed declaring a class in a fn.
943 * docs/cp/topics/types.rst: Add template keyword.
944 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile):
945 Add removed comment used for code snippet ending detection.
946 * docs/intro/tutorial04.rst: Fix to match the real comment.
947
948 2022-07-28 marxin <[email protected]>
949
950 * docs/cp/topics/expressions.rst: Use :expr: for basic types.
951 * docs/topics/compilation.rst: Likewise.
952 * docs/topics/expressions.rst: Likewise.
953 * docs/topics/function-pointers.rst: Likewise.
954
955 2022-07-28 marxin <[email protected]>
956
957 * docs/conf.py: Add needs_sphinx = '3.0' where c:type was added.
958 * docs/index.rst: Remove note about it.
959 * docs/topics/compilation.rst: Use enum directive and reference.
960 * docs/topics/contexts.rst: Likewise.
961 * docs/topics/expressions.rst: Likewise.
962 * docs/topics/functions.rst: Likewise.
963
964 2022-07-14 Jonathan Wakely <[email protected]>
965
966 * jit-recording.h (recording::memento): Define copy constructor
967 and copy assignment operator as deleted.
968 (recording::string): Likewise.
969 (recording::string::c_str): Add const qualifier.
970
971 2022-06-29 Antoni Boucher <[email protected]>
972
973 PR jit/105812
974 * jit-playback.cc: Use the correct return type when folding in
975 as_truth_value.
976
977 2022-06-29 Sergei Trofimovich <[email protected]>
978
979 PR c++/106102
980 * jit-playback.cc: Include <pthread.h> via "system.h" to avoid calloc()
981 poisoning.
982 * jit-recording.cc: Ditto.
983 * libgccjit.cc: Ditto.
984
985 2022-06-10 Antoni Boucher <[email protected]>
986
987 PR jit/105829
988 * libgccjit.cc: Add support for floating-point types in
989 gcc_jit_type_get_size.
990
991 2022-06-08 Yang Yujie <[email protected]>
992
993 * Make-lang.in: only link objects from $(EXTRA_GCC_OBJS)
994 that's not in $(EXTRA_OBJS) into libgccjit.
995
996 2022-05-23 David Malcolm <[email protected]>
997
998 * jit-recording.h: Add "final" and "override" to all vfunc
999 implementations that were missing them, as appropriate.
1000
1001 2022-05-20 David Malcolm <[email protected]>
1002
1003 * jit-playback.h: Replace uses of "FINAL" and "OVERRIDE" with
1004 "final" and "override".
1005 * jit-recording.cc: Likewise.
1006 * jit-recording.h: Likewise.
1007
1008 2022-05-16 Martin Liska <[email protected]>
1009
1010 * jit-builtins.cc (find_builtin_by_name): Use ARRAY_SIZE.
1011 (get_string_for_type_id): Likewise.
1012 * jit-recording.cc (recording::context::context): Likewise.
1013
1014 2022-04-14 Iain Sandoe <[email protected]>
1015
1016 * jit-playback.cc (new_bitcast): Cast values returned by tree_to_uhwi
1017 to 'long' to match the print format.
1018
1019 2022-04-12 Antoni Boucher <[email protected]>
1020
1021 PR jit/104293
1022 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1023 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_24): New ABI tag.
1024 * docs/topics/expressions.rst: Add documentation for the
1025 functions gcc_jit_lvalue_set_alignment and
1026 gcc_jit_lvalue_get_alignment.
1027 * jit-playback.h: New function (set_alignment).
1028 * jit-recording.cc: New function (set_alignment).
1029 * jit-recording.h: New functions (set_alignment, get_alignment)
1030 and new field (m_alignment).
1031 * libgccjit.cc: New functions (gcc_jit_lvalue_get_alignment,
1032 gcc_jit_lvalue_set_alignment)
1033 * libgccjit.h: New functions (gcc_jit_lvalue_get_alignment,
1034 gcc_jit_lvalue_set_alignment)
1035 * libgccjit.map (LIBGCCJIT_ABI_24): New ABI tag.
1036
1037 2022-04-12 Antoni Boucher <[email protected]>
1038
1039 PR jit/104073
1040 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1041 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_23): New ABI tag.
1042 * docs/topics/contexts.rst: Add documentation for the new
1043 function gcc_jit_context_set_bool_print_errors_to_stderr.
1044 * jit-common.h: New enum value
1045 (INNER_BOOL_OPTION_PRINT_ERRORS_TO_STDERR).
1046 * jit-recording.cc: Handle the new option
1047 INNER_BOOL_OPTION_PRINT_ERRORS_TO_STDERR.
1048 * libgccjit.cc: New function
1049 (gcc_jit_context_set_bool_print_errors_to_stderr).
1050 * libgccjit.h: New function
1051 (gcc_jit_context_set_bool_print_errors_to_stderr).
1052 * libgccjit.map (LIBGCCJIT_ABI_23): New ABI tag.
1053
1054 2022-04-12 Antoni Boucher <[email protected]>
1055
1056 PR jit/104072
1057 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1058 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_22): New ABI tag.
1059 * docs/topics/expressions.rst: Add documentation for the
1060 function gcc_jit_lvalue_set_register_name.
1061 * jit-playback.h: New function (set_register_name).
1062 * jit-recording.cc: New function (set_register_name) and add
1063 support for register variables.
1064 * jit-recording.h: New field (m_reg_name) and new function
1065 (set_register_name).
1066 * libgccjit.cc: New function (gcc_jit_lvalue_set_register_name).
1067 * libgccjit.h: New function (gcc_jit_lvalue_set_register_name).
1068 * libgccjit.map (LIBGCCJIT_ABI_22): New ABI tag.
1069
1070 2022-04-12 Antoni Boucher <[email protected]>
1071
1072 PR jit/104071
1073 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1074 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_21): New ABI tag.
1075 * docs/topics/expressions.rst: Add documentation for the
1076 function gcc_jit_context_new_bitcast.
1077 * jit-playback.cc: New function (new_bitcast).
1078 * jit-playback.h: New function (new_bitcast).
1079 * jit-recording.cc: New functions (new_bitcast,
1080 bitcast::replay_into, bitcast::visit_children,
1081 bitcast::make_debug_string, bitcast::write_reproducer).
1082 * jit-recording.h: New class (bitcast) and new function
1083 (new_bitcast, bitcast::replay_into, bitcast::visit_children,
1084 bitcast::make_debug_string, bitcast::write_reproducer,
1085 bitcast::get_precedence).
1086 * libgccjit.cc: New function (gcc_jit_context_new_bitcast)
1087 * libgccjit.h: New function (gcc_jit_context_new_bitcast)
1088 * libgccjit.map (LIBGCCJIT_ABI_21): New ABI tag.
1089
1090 2022-04-12 Antoni Boucher <[email protected]>
1091
1092 PR target/95325
1093 * docs/_build/texinfo/libgccjit.texi: Regenerate
1094 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_20): New ABI tag.
1095 * docs/topics/types.rst: Add documentation for the new types
1096 GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T,
1097 GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T,
1098 GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T, GCC_JIT_TYPE_INT16_T,
1099 GCC_JIT_TYPE_INT32_T, GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T and
1100 new functions (gcc_jit_compatible_types, gcc_jit_type_get_size).
1101 * jit-builtins.cc: Add support for BT_UINT128.
1102 * jit-common.h: Update the value of NUM_GCC_JIT_TYPES.
1103 * jit-playback.cc: Add support for the sized integer types.
1104 * jit-recording.cc: Add support for the sized integer types.
1105 * jit-recording.h: Add support for comparing integer types
1106 and new function (is_signed).
1107 * libgccjit.cc (gcc_jit_compatible_types): New.
1108 (gcc_jit_type_get_size) New.
1109 * libgccjit.h: New enum variants for gcc_jit_types
1110 (GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T,
1111 GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T,
1112 GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T,
1113 GCC_JIT_TYPE_INT16_T, GCC_JIT_TYPE_INT32_T,
1114 GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T) and new functions
1115 (gcc_jit_compatible_types, gcc_jit_type_get_size).
1116 * libgccjit.map (LIBGCCJIT_ABI_20): New ABI tag.
1117
1118 2022-04-06 David Malcolm <[email protected]>
1119
1120 PR jit/102824
1121 * docs/_build/texinfo/factorial.png: Move to...
1122 * docs/_build/texinfo/libgccjit-figures/factorial.png: ...here.
1123 * docs/_build/texinfo/factorial1.png: Move to...
1124 * docs/_build/texinfo/libgccjit-figures/factorial1.png: ...here.
1125 * docs/_build/texinfo/sum-of-squares.png: Move to...
1126 * docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: ...here.
1127 * docs/_build/texinfo/sum-of-squares1.png: Move to...
1128 * docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: ...here.
1129
1130 2022-04-01 David Malcolm <[email protected]>
1131
1132 * docs/topics/expressions.rst: Fix formatting.
1133 * docs/topics/types.rst: Likewise.
1134 * docs/_build/texinfo/libgccjit.texi: Regenerate
1135
1136 2022-04-01 Petter Tomner <[email protected]>
1137
1138 * docs/topics/compatibility.rst: Add 19 tag
1139 * docs/topics/compilation.rst: Linking
1140 * docs/topics/contexts.rst: Linking example
1141 * docs/topics/expressions.rst: Fix formatting and dropped 's'
1142
1143 2022-03-07 Jakub Jelinek <[email protected]>
1144
1145 * libgccjit.h: Fix up duplicated word issue in a comment.
1146
1147 2022-01-17 Martin Liska <[email protected]>
1148
1149 * config-lang.in: Rename .c names to .cc.
1150 * docs/_build/texinfo/libgccjit.texi: Likewise.
1151 * docs/internals/index.rst: Likewise.
1152 * jit-builtins.cc (builtins_manager::make_builtin_function): Likewise.
1153 * jit-playback.cc (fold_const_var): Likewise.
1154 (playback::context::~context): Likewise.
1155 (new_field): Likewise.
1156 (new_bitfield): Likewise.
1157 (new_compound_type): Likewise.
1158 (playback::compound_type::set_fields): Likewise.
1159 (global_set_init_rvalue): Likewise.
1160 (load_blob_in_ctor): Likewise.
1161 (new_global_initialized): Likewise.
1162 (double>): Likewise.
1163 (new_string_literal): Likewise.
1164 (as_truth_value): Likewise.
1165 (build_call): Likewise.
1166 (playback::context::build_cast): Likewise.
1167 (new_array_access): Likewise.
1168 (new_field_access): Likewise.
1169 (dereference): Likewise.
1170 (postprocess): Likewise.
1171 (add_jump): Likewise.
1172 (add_switch): Likewise.
1173 (build_goto_operands): Likewise.
1174 (playback::context::read_dump_file): Likewise.
1175 (init_types): Likewise.
1176 * jit-recording.cc (recording::context::get_int_type): Likewise.
1177 * jit-recording.h: Likewise.
1178 * libgccjit.cc (compatible_types): Likewise.
1179 (gcc_jit_context_acquire): Likewise.
1180 (gcc_jit_context_release): Likewise.
1181 (gcc_jit_context_new_child_context): Likewise.
1182 (gcc_jit_type_as_object): Likewise.
1183 (gcc_jit_context_get_type): Likewise.
1184 (gcc_jit_context_get_int_type): Likewise.
1185 (gcc_jit_type_get_pointer): Likewise.
1186 (gcc_jit_type_get_const): Likewise.
1187 (gcc_jit_type_get_volatile): Likewise.
1188 (gcc_jit_type_dyncast_array): Likewise.
1189 (gcc_jit_type_is_bool): Likewise.
1190 (gcc_jit_type_is_pointer): Likewise.
1191 (gcc_jit_type_is_integral): Likewise.
1192 (gcc_jit_type_dyncast_vector): Likewise.
1193 (gcc_jit_type_is_struct): Likewise.
1194 (gcc_jit_vector_type_get_num_units): Likewise.
1195 (gcc_jit_vector_type_get_element_type): Likewise.
1196 (gcc_jit_type_unqualified): Likewise.
1197 (gcc_jit_type_dyncast_function_ptr_type): Likewise.
1198 (gcc_jit_function_type_get_return_type): Likewise.
1199 (gcc_jit_function_type_get_param_count): Likewise.
1200 (gcc_jit_function_type_get_param_type): Likewise.
1201 (gcc_jit_context_new_array_type): Likewise.
1202 (gcc_jit_context_new_field): Likewise.
1203 (gcc_jit_field_as_object): Likewise.
1204 (gcc_jit_context_new_struct_type): Likewise.
1205 (gcc_jit_struct_as_type): Likewise.
1206 (gcc_jit_struct_set_fields): Likewise.
1207 (gcc_jit_struct_get_field_count): Likewise.
1208 (gcc_jit_context_new_union_type): Likewise.
1209 (gcc_jit_context_new_function_ptr_type): Likewise.
1210 (gcc_jit_param_as_rvalue): Likewise.
1211 (gcc_jit_context_new_function): Likewise.
1212 (gcc_jit_function_get_return_type): Likewise.
1213 (gcc_jit_function_dump_to_dot): Likewise.
1214 (gcc_jit_block_get_function): Likewise.
1215 (gcc_jit_global_set_initializer_rvalue): Likewise.
1216 (gcc_jit_rvalue_get_type): Likewise.
1217 (gcc_jit_context_new_rvalue_from_int): Likewise.
1218 (gcc_jit_context_one): Likewise.
1219 (gcc_jit_context_new_rvalue_from_double): Likewise.
1220 (gcc_jit_context_null): Likewise.
1221 (gcc_jit_context_new_string_literal): Likewise.
1222 (valid_binary_op_p): Likewise.
1223 (gcc_jit_context_new_binary_op): Likewise.
1224 (gcc_jit_context_new_comparison): Likewise.
1225 (gcc_jit_context_new_call): Likewise.
1226 (is_valid_cast): Likewise.
1227 (gcc_jit_context_new_cast): Likewise.
1228 (gcc_jit_object_get_context): Likewise.
1229 (gcc_jit_object_get_debug_string): Likewise.
1230 (gcc_jit_lvalue_access_field): Likewise.
1231 (gcc_jit_rvalue_access_field): Likewise.
1232 (gcc_jit_rvalue_dereference_field): Likewise.
1233 (gcc_jit_rvalue_dereference): Likewise.
1234 (gcc_jit_lvalue_get_address): Likewise.
1235 (gcc_jit_lvalue_set_tls_model): Likewise.
1236 (gcc_jit_lvalue_set_link_section): Likewise.
1237 (gcc_jit_function_new_local): Likewise.
1238 (gcc_jit_block_add_eval): Likewise.
1239 (gcc_jit_block_add_assignment): Likewise.
1240 (is_bool): Likewise.
1241 (gcc_jit_block_end_with_conditional): Likewise.
1242 (gcc_jit_block_add_comment): Likewise.
1243 (gcc_jit_block_end_with_jump): Likewise.
1244 (gcc_jit_block_end_with_return): Likewise.
1245 (gcc_jit_block_end_with_void_return): Likewise.
1246 (case_range_validator::case_range_validator): Likewise.
1247 (case_range_validator::validate): Likewise.
1248 (case_range_validator::get_wide_int): Likewise.
1249 (gcc_jit_block_end_with_switch): Likewise.
1250 (gcc_jit_context_set_str_option): Likewise.
1251 (gcc_jit_context_set_int_option): Likewise.
1252 (gcc_jit_context_set_bool_option): Likewise.
1253 (gcc_jit_context_set_bool_allow_unreachable_blocks): Likewise.
1254 (gcc_jit_context_set_bool_use_external_driver): Likewise.
1255 (gcc_jit_context_add_command_line_option): Likewise.
1256 (gcc_jit_context_add_driver_option): Likewise.
1257 (gcc_jit_context_enable_dump): Likewise.
1258 (gcc_jit_context_compile): Likewise.
1259 (gcc_jit_context_compile_to_file): Likewise.
1260 (gcc_jit_context_set_logfile): Likewise.
1261 (gcc_jit_context_dump_reproducer_to_file): Likewise.
1262 (gcc_jit_context_get_first_error): Likewise.
1263 (gcc_jit_context_get_last_error): Likewise.
1264 (gcc_jit_result_get_code): Likewise.
1265 (gcc_jit_result_get_global): Likewise.
1266 (gcc_jit_rvalue_set_bool_require_tail_call): Likewise.
1267 (gcc_jit_type_get_aligned): Likewise.
1268 (gcc_jit_type_get_vector): Likewise.
1269 (gcc_jit_function_get_address): Likewise.
1270 (gcc_jit_version_patchlevel): Likewise.
1271 (gcc_jit_block_add_extended_asm): Likewise.
1272 (gcc_jit_extended_asm_as_object): Likewise.
1273 (gcc_jit_extended_asm_set_volatile_flag): Likewise.
1274 (gcc_jit_extended_asm_set_inline_flag): Likewise.
1275 (gcc_jit_extended_asm_add_output_operand): Likewise.
1276 (gcc_jit_extended_asm_add_input_operand): Likewise.
1277 (gcc_jit_extended_asm_add_clobber): Likewise.
1278 * notes.txt: Likewise.
1279
1280 2022-01-17 Martin Liska <[email protected]>
1281
1282 * dummy-frontend.c: Moved to...
1283 * dummy-frontend.cc: ...here.
1284 * jit-builtins.c: Moved to...
1285 * jit-builtins.cc: ...here.
1286 * jit-logging.c: Moved to...
1287 * jit-logging.cc: ...here.
1288 * jit-playback.c: Moved to...
1289 * jit-playback.cc: ...here.
1290 * jit-recording.c: Moved to...
1291 * jit-recording.cc: ...here.
1292 * jit-result.c: Moved to...
1293 * jit-result.cc: ...here.
1294 * jit-spec.c: Moved to...
1295 * jit-spec.cc: ...here.
1296 * jit-tempdir.c: Moved to...
1297 * jit-tempdir.cc: ...here.
1298 * jit-w32.c: Moved to...
1299 * jit-w32.cc: ...here.
1300 * libgccjit.c: Moved to...
1301 * libgccjit.cc: ...here.
1302
1303 2021-12-28 Martin Liska <[email protected]>
1304
1305 * docs/_build/texinfo/libgccjit.texi: Replace http:// with https.
1306 * docs/cp/index.rst: Likewise.
1307 * docs/cp/intro/index.rst: Likewise.
1308 * docs/cp/intro/tutorial01.rst: Likewise.
1309 * docs/cp/intro/tutorial02.rst: Likewise.
1310 * docs/cp/intro/tutorial03.rst: Likewise.
1311 * docs/cp/intro/tutorial04.rst: Likewise.
1312 * docs/cp/topics/asm.rst: Likewise.
1313 * docs/cp/topics/compilation.rst: Likewise.
1314 * docs/cp/topics/contexts.rst: Likewise.
1315 * docs/cp/topics/expressions.rst: Likewise.
1316 * docs/cp/topics/functions.rst: Likewise.
1317 * docs/cp/topics/index.rst: Likewise.
1318 * docs/cp/topics/locations.rst: Likewise.
1319 * docs/cp/topics/objects.rst: Likewise.
1320 * docs/cp/topics/types.rst: Likewise.
1321 * docs/index.rst: Likewise.
1322 * docs/internals/index.rst: Likewise.
1323 * docs/intro/index.rst: Likewise.
1324 * docs/intro/tutorial01.rst: Likewise.
1325 * docs/intro/tutorial02.rst: Likewise.
1326 * docs/intro/tutorial03.rst: Likewise.
1327 * docs/intro/tutorial04.rst: Likewise.
1328 * docs/intro/tutorial05.rst: Likewise.
1329 * docs/topics/asm.rst: Likewise.
1330 * docs/topics/compatibility.rst: Likewise.
1331 * docs/topics/compilation.rst: Likewise.
1332 * docs/topics/contexts.rst: Likewise.
1333 * docs/topics/expressions.rst: Likewise.
1334 * docs/topics/function-pointers.rst: Likewise.
1335 * docs/topics/functions.rst: Likewise.
1336 * docs/topics/index.rst: Likewise.
1337 * docs/topics/locations.rst: Likewise.
1338 * docs/topics/objects.rst: Likewise.
1339 * docs/topics/performance.rst: Likewise.
1340 * docs/topics/types.rst: Likewise.
1341
1342 2021-12-20 Martin Liska <[email protected]>
1343
1344 * libgccjit.c (struct version_info): Rename to jit_version_info.
1345 (struct jit_version_info): Likewise.
1346 (gcc_jit_version_major): Likewise.
1347 (gcc_jit_version_minor): Likewise.
1348 (gcc_jit_version_patchlevel): Likewise.
1349
1350 2021-12-14 Petter Tomner <[email protected]>
1351
1352 * jit-common.h: New enum
1353 * jit-playback.c : Folding an setting intitial
1354 (global_new_decl) : Handle const global generation
1355 (new_global) : New flag
1356 (global_set_init_rvalue) : New
1357 (new_ctor) : New
1358 (new_global_initialized) : Flag
1359 (as_truth_value) : Fold
1360 (new_unary_op) : Fold
1361 (new_binary_op) : Fold
1362 (new_comparison) : Fold
1363 (new_array_access) : Fold
1364 (new_dereference) : Fold
1365 (get_address) : Fold
1366 * jit-playback.h :
1367 (global_set_init_rvalue) : New
1368 (new_ctor) : New
1369 * jit-recording.c :
1370 * jit-recording.h :
1371 (new_global_init_rvalue) : New
1372 (new_ctor) : New
1373 (ctor) : New, inherits rvalue
1374 (global_init_rvalue) : New, inherits memento
1375 (type::is_union) : New
1376 * libgccjit++.h : New entrypoints, see C-header
1377 * libgccjit.c : See .h
1378 * libgccjit.h : New entrypoints
1379 (gcc_jit_context_new_array_constructor) : New
1380 (gcc_jit_context_new_struct_constructor) : New
1381 (gcc_jit_context_new_union_constructor) : New
1382 (gcc_jit_global_set_initializer_rvalue) : New
1383 (LIBGCCJIT_HAVE_CTORS) : New feuture macro
1384 * libgccjit.map : New entrypoints added to ABI 19
1385 * docs/topics/expressions.rst : Updated docs
1386
1387 2021-12-12 Antoni Boucher <[email protected]>
1388
1389 PR target/100688
1390 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_18): New ABI
1391 tag.
1392 * docs/topics/expressions.rst: Add documentation for the
1393 function gcc_jit_lvalue_set_link_section.
1394 * jit-playback.h: New function (set_link_section).
1395 * jit-recording.c: New function (set_link_section) and
1396 support for setting the link section.
1397 * jit-recording.h: New function (set_link_section) and new
1398 field m_link_section.
1399 * libgccjit.c: New function (gcc_jit_lvalue_set_link_section).
1400 * libgccjit.h: New function (gcc_jit_lvalue_set_link_section).
1401 * libgccjit.map (LIBGCCJIT_ABI_18): New ABI tag.
1402
1403 2021-12-12 Antoni Boucher <[email protected]>
1404
1405 PR target/95415
1406 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_17): New ABI
1407 tag.
1408 * docs/topics/expressions.rst: Add document for the function
1409 gcc_jit_lvalue_set_tls_model.
1410 * jit-playback.h: New function (set_tls_model).
1411 * jit-recording.c: New function (set_tls_model), new
1412 variables (tls_models and tls_model_enum_strings) and support
1413 for setting the tls model.
1414 * jit-recording.h: New function (set_tls_model) and new
1415 field m_tls_model.
1416 * libgccjit.c: New function (gcc_jit_lvalue_set_tls_model).
1417 * libgccjit.h: New function (gcc_jit_lvalue_set_tls_model)
1418 and new enum (gcc_jit_tls_model).
1419 * libgccjit.map (LIBGCCJIT_ABI_17): New ABI tag.
1420
1421 2021-12-11 Antoni Boucher <[email protected]>
1422
1423 PR target/96066
1424 PR target/96067
1425 * jit-builtins.c: Implement missing types for builtins.
1426 * jit-recording.c:: Allow sending a volatile const void * as
1427 argument.
1428 * jit-recording.h: New functions (is_volatile, is_const) and
1429 allow comparing qualified types.
1430
1431 2021-12-10 David Malcolm <[email protected]>
1432
1433 PR jit/103562
1434 * jit-playback.c (gcc::jit::playback::context::new_function): Set
1435 DECL_CONTEXT of the result_decl.
1436
1437 2021-11-27 Petter Tomner <[email protected]>
1438
1439 * libgccjit.c: %ld -> %zu
1440
1441 2021-11-24 Martin Liska <[email protected]>
1442
1443 * jit-playback.c (function): Initialize m_blocks vector.
1444
1445 2021-11-20 Antoni Boucher <[email protected]>
1446
1447 PR target/96889
1448 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_16): New ABI tag.
1449 * docs/topics/functions.rst: Add documentation for the
1450 functions gcc_jit_function_get_return_type and
1451 gcc_jit_function_get_param_count
1452 * docs/topics/types.rst: Add documentation for the functions
1453 gcc_jit_function_type_get_return_type,
1454 gcc_jit_function_type_get_param_count,
1455 gcc_jit_function_type_get_param_type,
1456 gcc_jit_type_unqualified, gcc_jit_type_dyncast_array,
1457 gcc_jit_type_is_bool,
1458 gcc_jit_type_dyncast_function_ptr_type,
1459 gcc_jit_type_is_integral, gcc_jit_type_is_pointer,
1460 gcc_jit_type_dyncast_vector,
1461 gcc_jit_vector_type_get_element_type,
1462 gcc_jit_vector_type_get_num_units,
1463 gcc_jit_struct_get_field, gcc_jit_type_is_struct,
1464 and gcc_jit_struct_get_field_count
1465 * libgccjit.c:
1466 (gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
1467 gcc_jit_function_type_get_return_type,
1468 gcc_jit_function_type_get_param_count,
1469 gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
1470 gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
1471 gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
1472 gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
1473 gcc_jit_vector_type_get_element_type,
1474 gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
1475 gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
1476 functions.
1477 (struct gcc_jit_function_type, struct gcc_jit_vector_type):
1478 New types.
1479 * libgccjit.h:
1480 (gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
1481 gcc_jit_function_type_get_return_type,
1482 gcc_jit_function_type_get_param_count,
1483 gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
1484 gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
1485 gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
1486 gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
1487 gcc_jit_vector_type_get_element_type,
1488 gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
1489 gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
1490 function declarations.
1491 (struct gcc_jit_function_type, struct gcc_jit_vector_type):
1492 New types.
1493 * jit-recording.h: New functions (is_struct and is_vector)
1494 * libgccjit.map (LIBGCCJIT_ABI_16): New ABI tag.
1495
1496 2021-11-12 David Malcolm <[email protected]>
1497
1498 PR jit/103199
1499 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile):
1500 Increase size of buffer.
1501 * docs/examples/tut04-toyvm/toyvm.cc
1502 (compilation_state::create_function): Likewise.
1503
1504 2021-09-10 Petter Tomner <[email protected]>
1505
1506 * jit-playback.c: Moved global var processing to after loc handling.
1507 Setting TYPE_NAME for fundamental types.
1508 Using common functions for finalizing globals.
1509 * jit-playback.h: New method init_types().
1510 Changed get_tree_node_for_type() to method.
1511
1512 2021-08-19 Iain Sandoe <[email protected]>
1513
1514 * docs/examples/tut04-toyvm/toyvm.c: Include jit-dejagnu.h.
1515 * docs/examples/tut04-toyvm/toyvm.cc: Likewise.
1516 * jit-dejagnu.h: New file, imported from dejagnu-1.6.2 and
1517 patched for this application.
1518
1519 2021-08-18 Iain Sandoe <[email protected]>
1520
1521 PR jit/100613
1522 * Make-lang.in: Provide clauses for Darwin hosts.
1523
1524 2021-07-18 Antoni Boucher <[email protected]>
1525
1526 PR target/95498
1527 * jit-playback.c (convert): Add support to handle truncation and
1528 extension in the convert function.
1529
1530 2021-05-19 Martin Liska <[email protected]>
1531
1532 PR testsuite/100658
1533 * libgccjit.c (gcc_jit_context_new_function): Fix typos.
1534
1535 2021-03-24 Matthias Klose <[email protected]>
1536
1537 * Make-lang.in (jit.sphinx.html, jit.sphinx.pdf): Use $(mkinstalldirs),
1538 (jit.install-headers): Depend on installdirs.
1539
1540 2021-02-19 David Malcolm <[email protected]>
1541
1542 PR jit/99126
1543 * jit-builtins.c
1544 (gcc::jit::builtins_manager::get_builtin_function_by_id):
1545 Update assertion to reject BUILT_IN_NONE.
1546 (gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
1547 New.
1548 * jit-builtins.h
1549 (gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
1550 New decl.
1551 * jit-playback.c (gcc::jit::playback::context::replay): Call it.
1552 Remove redundant conditional on bm.
1553
1554 2021-01-14 David Malcolm <[email protected]>
1555
1556 * docs/cp/index.rst: Remove "Alpha" warning.
1557 * docs/index.rst: Likewise.
1558 * docs/_build/texinfo/libgccjit.texi: Regenerate
1559
1560 2020-11-25 Martin Sebor <[email protected]>
1561
1562 PR bootstrap/94982
1563 * jit-recording.c (recording::function::dump_to_dot): Avoid
1564 -Wformat-diag.
1565 (recording::block::dump_to_dot): Same.
1566
1567 2020-11-20 Jakub Jelinek <[email protected]>
1568
1569 PR other/97911
1570 * Make-lang.in (jit.serial): Change from goal to a
1571 variable.
1572 (.PHONY): Drop jit.serial and jit.prev.
1573 ($(LIBGCCJIT_FILENAME)): Depend on $(jit.serial) rather than
1574 jit.serial.
1575
1576 2020-11-18 Jakub Jelinek <[email protected]>
1577
1578 * Make-lang.in (jit.serial): New goal.
1579 (.PHONY): Add jit.serial jit.prev.
1580 ($(LIBGCCJIT_FILENAME)): Depend on jit.prev. Call LINK_PROGRESS.
1581
1582 2020-11-12 David Malcolm <[email protected]>
1583
1584 PR jit/87291
1585 * docs/cp/topics/asm.rst: New file.
1586 * docs/cp/topics/index.rst (Topic Reference): Add it.
1587 * docs/topics/asm.rst: New file.
1588 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_15): New.
1589 * docs/topics/functions.rst (Statements): Add link to extended
1590 asm.
1591 * docs/topics/index.rst (Topic Reference): Add asm.rst.
1592 * docs/topics/objects.rst: Add gcc_jit_extended_asm to ASCII art.
1593 * docs/_build/texinfo/Makefile: Regenerate.
1594 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1595 * jit-common.h (gcc::jit::recording::extended_asm): New forward
1596 decl.
1597 (gcc::jit::recording::top_level_asm): Likewise.
1598 * jit-playback.c: Include "stmt.h".
1599 (build_string): New.
1600 (gcc::jit::playback::context::new_string_literal): Disambiguate
1601 build_string call.
1602 (gcc::jit::playback::context::add_top_level_asm): New.
1603 (build_operand_chain): New.
1604 (build_clobbers): New.
1605 (build_goto_operands): New.
1606 (gcc::jit::playback::block::add_extended_asm): New.
1607 * jit-playback.h (gcc::jit::playback::context::add_top_level_asm):
1608 New decl.
1609 (struct gcc::jit::playback::asm_operand): New struct.
1610 (gcc::jit::playback::block::add_extended_asm): New decl.
1611 * jit-recording.c (gcc::jit::recording::context::dump_to_file):
1612 Dump top-level asms.
1613 (gcc::jit::recording::context::add_top_level_asm): New.
1614 (gcc::jit::recording::block::add_extended_asm): New.
1615 (gcc::jit::recording::block::end_with_extended_asm_goto): New.
1616 (gcc::jit::recording::asm_operand::asm_operand): New.
1617 (gcc::jit::recording::asm_operand::print): New.
1618 (gcc::jit::recording::asm_operand::make_debug_string): New.
1619 (gcc::jit::recording::output_asm_operand::write_reproducer): New.
1620 (gcc::jit::recording::output_asm_operand::print): New.
1621 (gcc::jit::recording::input_asm_operand::write_reproducer): New.
1622 (gcc::jit::recording::input_asm_operand::print): New.
1623 (gcc::jit::recording::extended_asm::add_output_operand): New.
1624 (gcc::jit::recording::extended_asm::add_input_operand): New.
1625 (gcc::jit::recording::extended_asm::add_clobber): New.
1626 (gcc::jit::recording::extended_asm::replay_into): New.
1627 (gcc::jit::recording::extended_asm::make_debug_string): New.
1628 (gcc::jit::recording::extended_asm::write_flags): New.
1629 (gcc::jit::recording::extended_asm::write_clobbers): New.
1630 (gcc::jit::recording::extended_asm_simple::write_reproducer): New.
1631 (gcc::jit::recording::extended_asm::maybe_populate_playback_blocks):
1632 New.
1633 (gcc::jit::recording::extended_asm_goto::extended_asm_goto): New.
1634 (gcc::jit::recording::extended_asm_goto::replay_into): New.
1635 (gcc::jit::recording::extended_asm_goto::write_reproducer): New.
1636 (gcc::jit::recording::extended_asm_goto::get_successor_blocks):
1637 New.
1638 (gcc::jit::recording::extended_asm_goto::maybe_print_gotos): New.
1639 (gcc::jit::recording::extended_asm_goto::maybe_populate_playback_blocks):
1640 New.
1641 (gcc::jit::recording::top_level_asm::top_level_asm): New.
1642 (gcc::jit::recording::top_level_asm::replay_into): New.
1643 (gcc::jit::recording::top_level_asm::make_debug_string): New.
1644 (gcc::jit::recording::top_level_asm::write_to_dump): New.
1645 (gcc::jit::recording::top_level_asm::write_reproducer): New.
1646 * jit-recording.h
1647 (gcc::jit::recording::context::add_top_level_asm): New decl.
1648 (gcc::jit::recording::context::m_top_level_asms): New field.
1649 (gcc::jit::recording::block::add_extended_asm): New decl.
1650 (gcc::jit::recording::block::end_with_extended_asm_goto): New
1651 decl.
1652 (gcc::jit::recording::asm_operand): New class.
1653 (gcc::jit::recording::output_asm_operand): New class.
1654 (gcc::jit::recording::input_asm_operand): New class.
1655 (gcc::jit::recording::extended_asm): New class.
1656 (gcc::jit::recording::extended_asm_simple): New class.
1657 (gcc::jit::recording::extended_asm_goto): New class.
1658 (gcc::jit::recording::top_level_asm): New class.
1659 * libgccjit++.h (gccjit::extended_asm): New forward decl.
1660 (gccjit::context::add_top_level_asm): New.
1661 (gccjit::block::add_extended_asm): New.
1662 (gccjit::block::end_with_extended_asm_goto): New.
1663 (gccjit::extended_asm): New class.
1664 (gccjit::extended_asm::extended_asm): New ctors.
1665 (gccjit::extended_asm::set_volatile_flag): New.
1666 (gccjit::extended_asm::set_inline_flag): New.
1667 (gccjit::extended_asm::add_output_operand): New.
1668 (gccjit::extended_asm::add_input_operand): New.
1669 (gccjit::extended_asm::add_clobber): New.
1670 (gccjit::extended_asm::get_inner_extended_asm): New.
1671 * libgccjit.c (struct gcc_jit_extended_asm): New.
1672 (jit_error): Make "loc" param take a gcc::jit::recording::location *
1673 rather than a gcc_jit_location *.
1674 (gcc_jit_block_add_extended_asm): New entrypoint.
1675 (gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
1676 (gcc_jit_extended_asm_as_object): New entrypoint.
1677 (gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
1678 (gcc_jit_extended_asm_set_inline_flag): New entrypoint.
1679 (gcc_jit_extended_asm_add_output_operand): New entrypoint.
1680 (gcc_jit_extended_asm_add_clobber): New entrypoint.
1681 (gcc_jit_context_add_top_level_asm): New entrypoint.
1682 * libgccjit.h: Add gcc_jit_extended_asm to ASCII art.
1683 (gcc_jit_extended_asm): New typedef.
1684 (LIBGCCJIT_HAVE_ASM_STATEMENTS): New define.
1685 (gcc_jit_block_add_extended_asm): New entrypoint.
1686 (gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
1687 (gcc_jit_extended_asm_as_object): New entrypoint.
1688 (gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
1689 (gcc_jit_extended_asm_set_inline_flag): New entrypoint.
1690 (gcc_jit_extended_asm_add_output_operand): New entrypoint.
1691 (gcc_jit_extended_asm_add_input_operand): New entrypoint.
1692 (gcc_jit_extended_asm_add_clobber): New entrypoint.
1693 (gcc_jit_context_add_top_level_asm): New entrypoint.
1694 * libgccjit.map (LIBGCCJIT_ABI_15): New.
1695
1696 2020-11-12 David Malcolm <[email protected]>
1697
1698 * jit-recording.c (recording::context::new_string): Add "escaped"
1699 param and use it when creating the new recording::string instance.
1700 (recording::string::string): Add "escaped" param and use it to
1701 initialize m_escaped.
1702 (recording::string::make_debug_string): Replace check that first
1703 char is double-quote with use of m_escaped. Fix escaping of
1704 '\t' and '\n'. Set "escaped" on the result.
1705 * jit-recording.h (recording::context::new_string): Add "escaped"
1706 param.
1707 (recording::string::string): Add "escaped" param.
1708 (recording::string::m_escaped): New field.
1709
1710 2020-11-12 David Malcolm <[email protected]>
1711
1712 * libgccjit.h: Fix typo in comment.
1713
1714 2020-09-14 Andrea Corallo <[email protected]>
1715
1716 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1717
1718 2020-09-11 Andrea Corallo <[email protected]>
1719
1720 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_14): New ABI tag.
1721 * docs/topics/expressions.rst (gcc_jit_global_set_initializer):
1722 Document new entry point in section 'Global variables'.
1723 * jit-playback.c (global_new_decl, global_finalize_lvalue): New
1724 method.
1725 (playback::context::new_global): Make use of global_new_decl,
1726 global_finalize_lvalue.
1727 (load_blob_in_ctor): New template function in use by the
1728 following.
1729 (playback::context::new_global_initialized): New method.
1730 * jit-playback.h (class context): Decl 'new_global_initialized',
1731 'global_new_decl', 'global_finalize_lvalue'.
1732 (lvalue::set_initializer): Add implementation.
1733 * jit-recording.c (recording::memento_of_get_pointer::get_size)
1734 (recording::memento_of_get_type::get_size): Add implementation.
1735 (recording::global::write_initializer_reproducer): New function in
1736 use by 'recording::global::write_reproducer'.
1737 (recording::global::replay_into)
1738 (recording::global::write_to_dump)
1739 (recording::global::write_reproducer): Handle
1740 initialized case.
1741 * jit-recording.h (class type): Decl 'get_size' and
1742 'num_elements'.
1743 * libgccjit++.h (class lvalue): Declare new 'set_initializer'
1744 method.
1745 (class lvalue): Decl 'is_global' and 'set_initializer'.
1746 (class global) Decl 'write_initializer_reproducer'. Add
1747 'm_initializer', 'm_initializer_num_bytes' fields. Implement
1748 'set_initializer'. Add a destructor to free 'm_initializer'.
1749 * libgccjit.c (gcc_jit_global_set_initializer): New function.
1750 * libgccjit.h (gcc_jit_global_set_initializer): New function
1751 declaration.
1752 * libgccjit.map (LIBGCCJIT_ABI_14): New ABI tag.
1753
1754 2020-08-28 Martin Sebor <[email protected]>
1755
1756 * jit-recording.c (recording::switch_::make_debug_string): Add argument
1757 to a call.
1758
1759 2020-08-22 Andrea Corallo <[email protected]>
1760
1761 * libgccjit.c:
1762 (gcc_jit_context_new_rvalue_from_int)
1763 (gcc_jit_context_new_rvalue_from_long)
1764 (gcc_jit_context_new_rvalue_from_double)
1765 (gcc_jit_context_new_rvalue_from_ptr): Update function heading
1766 comments.
1767
1768 2020-06-16 Nicolas Bértolo <[email protected]>
1769
1770 * Make-lang.in: Always define version, minor and release
1771 numbers. Create the Windows shared library as
1772 libgccjit-$(LIBGCCJIT_VERSION_NUM).dll.
1773
1774 2020-06-03 David Malcolm <[email protected]>
1775
1776 PR jit/95306
1777 * jit-builtins.c (builtins_manager::make_primitive_type):
1778 Implement BT_CONST_VOLATILE_PTR.
1779
1780 2020-06-02 David Malcolm <[email protected]>
1781
1782 PR jit/95426
1783 * dummy-frontend.c: Include "options.h", "stringpool.h", and
1784 "attribs.h".
1785 (ATTR_EXCL): New, copied from lto/lto-lang.c.
1786 (attr_noreturn_exclusions): Likewise.
1787 (attr_returns_twice_exclusions): Likewise.
1788 (attr_const_pure_exclusions): Likewise.
1789 (jit_attribute_table): Likewise, copied from lto_attribute_table.
1790 (jit_format_attribute_table): Likewise, copied from
1791 lto_format_attribute_table.
1792 (handle_noreturn_attribute): New, copied from lto/lto-lang.c.
1793 (handle_leaf_attribute): Likewise.
1794 (handle_const_attribute): Likewise.
1795 (handle_malloc_attribute): Likewise.
1796 (handle_pure_attribute): Likewise.
1797 (handle_novops_attribute): Likewise.
1798 (get_nonnull_operand): Likewise.
1799 (handle_nonnull_attribute): Likewise.
1800 (handle_nothrow_attribute): Likewise.
1801 (handle_sentinel_attribute): Likewise.
1802 (handle_type_generic_attribute): Likewise.
1803 (handle_transaction_pure_attribute): Likewise.
1804 (handle_returns_twice_attribute): Likewise.
1805 (handle_patchable_function_entry_attribute): Likewise.
1806 (ignore_attribute): Likewise.
1807 (handle_format_attribute): Likewise.
1808 (handle_format_arg_attribute): Likewise.
1809 (handle_fnspec_attribute): Likewise.
1810 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
1811 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
1812
1813 2020-05-28 Nicolas Bértolo <[email protected]>
1814
1815 * Make-lang.in: Remove extra slash. Build libgccjit.dll and its
1816 import library in Windows.
1817 * config-lang.in: Update comment about --enable-host-shared.
1818 * jit-w32.h: New file.
1819 * jit-w32.c: New file.
1820 (print_last_error): New function that prints the error
1821 string corresponding to GetLastError().
1822 (get_TOKEN_USER_current_user): Helper function used for getting
1823 the SID belonging to the current user.
1824 (create_directory_for_current_user): Helper function to create
1825 a directory with permissions such that only the current user can
1826 access it.
1827 (win_mkdtemp): Create a temporary directory using Windows APIs.
1828 * jit-playback.c: Do not chmod files in Windows. Use LoadLibrary,
1829 FreeLibrary and GetProcAddress instead of libdl.
1830 * jit-result.h, jit-result.c: Introduce result::handle_t to
1831 abstract over the types used for dynamic library handles.
1832 * jit-tempdir.c: Do not use mkdtemp() in Windows, use
1833 win_mkdtemp().
1834
1835 2020-05-27 David Malcolm <[email protected]>
1836
1837 PR jit/95314
1838 * dummy-frontend.c (LANG_HOOKS_DEEP_UNSHARING): Define to be true.
1839 * jit-playback.h (gcc::jit::playback::rvalue): Mark tree node with
1840 TREE_VISITED.
1841
1842 2020-05-27 Tom Tromey <[email protected]>
1843
1844 PR jit/91330
1845 * docs/conf.py (texinfo_documents): Set description.
1846 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1847
1848 2020-05-26 David Malcolm <[email protected]>
1849
1850 PR jit/95306
1851 * docs/topics/functions.rst
1852 (gcc_jit_context_get_builtin_function): Document.
1853 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1854 * dummy-frontend.c (jit_langhook_global_bindings_p): Remove
1855 gcc_unreachable.
1856 * jit-builtins.c (type_names): New array.
1857 (get_string_for_type_id): New function.
1858 (gcc::jit::builtins_manager::make_primitive_type): Show name of
1859 type in error messages. Update cases to reflect the order in
1860 builtin-types.def. Implement cases for BT_INT8, BT_INT16,
1861 BT_UINT8, BT_CONST_PTR, BT_VOLATILE_PTR, BT_INT_PTR, BT_FLOAT_PTR,
1862 BT_CONST_DOUBLE_PTR, BT_SIZE, BT_CONST_SIZE.
1863
1864 2020-05-26 David Malcolm <[email protected]>
1865
1866 * docs/topics/compatibility.rst: Fix underline.
1867 Fix missing labels.
1868 * docs/topics/types.rst: Fix missing blank line.
1869 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1870
1871 2020-05-26 David Malcolm <[email protected]>
1872
1873 PR jit/95296
1874 * docs/topics/expressions.rst (Unary Operations): Document that
1875 result_type of gcc_jit_context_new_unary_op must be a numeric type.
1876 (Binary Operations): Likewise for gcc_jit_context_new_binary_op.
1877 (Global variables): Document that "type" of
1878 gcc_jit_context_new_global must be non-`void`.
1879 * docs/topics/function-pointers.rst
1880 (gcc_jit_context_new_function_ptr_type): Document that the
1881 param_types must be non-void, but that return_type may be.
1882 * docs/topics/functions.rst (Params): Document that
1883 gcc_jit_context_new_param's type must be non-void.
1884 (Functions): Likewise for gcc_jit_function_new_local.
1885 * docs/topics/types.rst (gcc_jit_context_new_array_type): Document
1886 that the type must be non-void.
1887 (gcc_jit_context_new_field): Likewise.
1888 * docs/_build/texinfo/Makefile: Regenerate.
1889 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1890 * libgccjit.c (gcc_jit_context_new_array_type): Fail if
1891 element_type is void.
1892 (gcc_jit_context_new_field): Likewise for "type".
1893 (gcc_jit_context_new_function_ptr_type): Likewise for each
1894 element of param_types.
1895 (gcc_jit_context_new_param): Likewise for "type".
1896 (gcc_jit_context_new_global): Likewise.
1897 (gcc_jit_function_new_local): Likewise.
1898 (gcc_jit_type_get_aligned): Likewise.
1899
1900 2020-03-31 Andrea Corallo <[email protected]>
1901 David Malcolm <[email protected]>
1902
1903 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_13): New ABI tag
1904 plus add version paragraph.
1905 * libgccjit++.h (namespace gccjit::version): Add new namespace.
1906 * libgccjit.c (gcc_jit_version_major, gcc_jit_version_minor)
1907 (gcc_jit_version_patchlevel): New functions.
1908 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_version): New macro.
1909 (gcc_jit_version_major, gcc_jit_version_minor)
1910 (gcc_jit_version_patchlevel): New functions.
1911 * libgccjit.map (LIBGCCJIT_ABI_13) New ABI tag.
1912
1913 2020-03-23 Andrea Corallo <[email protected]>
1914
1915 * jit-playback.h
1916 (gcc::jit::playback::context m_recording_ctxt): Remove
1917 m_char_array_type_node field.
1918 * jit-playback.c
1919 (playback::context::context) Remove m_char_array_type_node from member
1920 initializer list.
1921 (playback::context::new_string_literal) Fix logic to handle string
1922 length > 200.
1923
1924 2020-01-01 Jakub Jelinek <[email protected]>
1925
1926 Update copyright years.
1927
1928 2019-11-29 Julian Brown <[email protected]>
1929
1930 * jit-builtins.c (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR):
1931 Remove commented-out cases.
1932
1933 2019-11-20 David Malcolm <[email protected]>
1934
1935 PR jit/92483
1936 * jit-playback.c (gcc::jit::playback::context::make_fake_args):
1937 Update GCC_JIT_BOOL_OPTION_SELFCHECK_GC for new --param syntax.
1938
1939 2019-08-13 Richard Sandiford <[email protected]>
1940
1941 PR middle-end/91421
1942 * jit-playback.c (new_function): Use set_decl_built_in_function.
1943
1944 2019-07-22 Andrea Corallo <[email protected]>
1945
1946 * jit-recording.c (unary_op_reproducer_strings): Make it extern.
1947 (binary_op_reproducer_strings): Likewise.
1948 * jit-recording.h (unary_op_reproducer_strings): Likewise.
1949 (binary_op_reproducer_strings): Likewise.
1950 * libgccjit.c (gcc_jit_context_new_unary_op): Check result_type to be a
1951 numeric type.
1952 * libgccjit.c (gcc_jit_context_new_binary_op): Improve error message.
1953
1954 2019-07-04 Andrea Corallo <[email protected]>
1955
1956 * libgccjit.c (gcc_jit_context_new_binary_op): Check result_type to be a
1957 numeric type.
1958
1959 2019-07-04 Andrea Corallo <[email protected]>
1960
1961 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_12): New ABI tag.
1962 * docs/topics/types.rst: Add gcc_jit_context_new_bitfield.
1963 * jit-common.h (namespace recording): Add class bitfield.
1964 * jit-playback.c:
1965 (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): Add macros.
1966 (playback::context::new_bitfield): New method.
1967 (playback::compound_type::set_fields): Add bitfield support.
1968 (playback::lvalue::mark_addressable): Was jit_mark_addressable make this
1969 a method of lvalue plus return a bool to communicate success.
1970 (playback::lvalue::get_address): Check for jit_mark_addressable return
1971 value.
1972 * jit-playback.h (new_bitfield): New method.
1973 (class bitfield): New class.
1974 (class lvalue): Add jit_mark_addressable method.
1975 * jit-recording.c (recording::context::new_bitfield): New method.
1976 (recording::bitfield::replay_into): New method.
1977 (recording::bitfield::write_to_dump): Likewise.
1978 (recording::bitfield::make_debug_string): Likewise.
1979 (recording::bitfield::write_reproducer): Likewise.
1980 * jit-recording.h (class context): Add new_bitfield method.
1981 (class field): Make it derivable by class bitfield.
1982 (class bitfield): Add new class.
1983 * libgccjit++.h (class context): Add new_bitfield method.
1984 * libgccjit.c (struct gcc_jit_bitfield): New structure.
1985 (gcc_jit_context_new_bitfield): New function.
1986 * libgccjit.h
1987 (LIBGCCJIT_HAVE_gcc_jit_context_new_bitfield) New macro.
1988 (gcc_jit_context_new_bitfield): New function.
1989 * libgccjit.map (LIBGCCJIT_ABI_12) New ABI tag.
1990
1991 2019-03-21 Jakub Jelinek <[email protected]>
1992
1993 * jit-recording.c (reproducer::m_set_identifiers): Use false as Lazy
1994 in hash_set template param.
1995
1996 2019-02-05 Andrea Corallo <[email protected]>
1997
1998 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_11): New ABI tag.
1999 * docs/topics/contexts.rst (Additional driver options): New
2000 section.
2001 * jit-playback.c (invoke_driver): Add call to append_driver_options.
2002 * jit-recording.c: Within namespace gcc::jit...
2003 (recording::context::~context): Free the optnames within
2004 m_driver_options.
2005 (recording::context::add_driver_option): New method.
2006 (recording::context::append_driver_options): New method.
2007 (recording::context::dump_reproducer_to_file): Add driver
2008 options.
2009 * jit-recording.h: Within namespace gcc::jit...
2010 (recording::context::add_driver_option): New method.
2011 (recording::context::append_driver_options): New method.
2012 (recording::context::m_driver_options): New field.
2013 * libgccjit++.h (gccjit::context::add_driver_option): New
2014 method.
2015 * libgccjit.c (gcc_jit_context_add_driver_option): New API
2016 entrypoint.
2017 * libgccjit.h (gcc_jit_context_add_driver_option): New API
2018 entrypoint.
2019 (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option): New
2020 macro.
2021 * libgccjit.map (LIBGCCJIT_ABI_11): New ABI tag.
2022
2023 2019-01-01 Jakub Jelinek <[email protected]>
2024
2025 Update copyright years.
2026
2027 2018-11-15 David Malcolm <[email protected]>
2028
2029 PR other/19165
2030 * dummy-frontend.c (jit_begin_diagnostic): Add diagnostic_t param.
2031
2032 2018-11-13 David Malcolm <[email protected]>
2033
2034 * jit-playback.c: Replace "source_location" with "location_t".
2035
2036 2018-10-17 David Malcolm <[email protected]>
2037
2038 * Make-lang.in (selftest-jit): New.
2039
2040 2018-06-28 Martin Liska <[email protected]>
2041
2042 * jit-playback.c: Include opt-suggestions.h.
2043
2044 2018-06-28 Martin Liska <[email protected]>
2045
2046 * jit-playback.c (class auto_argvec): Moved to vec.h.
2047 (auto_argvec::~auto_argvec): Likewise.
2048 (compile): Use the renamed name.
2049 (invoke_driver): Likewise.
2050
2051 2018-03-21 Rainer Orth <[email protected]>
2052
2053 PR jit/84288
2054 * Make-lang.in ($(LIBGCCJIT_FILENAME)): Add $(EXTRA_GCC_LIBS).
2055
2056 2018-03-09 David Malcolm <[email protected]>
2057 Francois-Xavier Coudert <[email protected]>
2058
2059 PR jit/64089
2060 PR jit/84288
2061 * Make-lang.in (COMMA): New.
2062 (LIBGCCJIT_VERSION_SCRIPT_OPTION): New.
2063 (LIBGCCJIT_SONAME_OPTION): New.
2064 (jit): Move --version-script and -soname linker options to the
2065 above.
2066
2067 2018-01-25 David Malcolm <[email protected]>
2068
2069 PR jit/81672
2070 * jit-recording.h (gcc::jit::recording::union_): Remove fields
2071 "m_loc" and "m_name".
2072
2073 2018-01-03 Jakub Jelinek <[email protected]>
2074
2075 Update copyright years.
2076
2077 2017-12-19 Jakub Jelinek <[email protected]>
2078
2079 * jit-playback.c (get_type, playback::compile_to_file::copy_file,
2080 playback::context::acquire_mutex): Replace Yoda conditions with
2081 typical order conditions.
2082 * libgccjit.c (gcc_jit_context_new_struct_type,
2083 gcc_jit_struct_set_fields, gcc_jit_context_new_union_type,
2084 gcc_jit_context_new_function, gcc_jit_timer_pop): Likewise.
2085 * jit-builtins.c (matches_builtin): Likewise.
2086 * jit-recording.c (recording::compound_type::set_fields,
2087 recording::fields::write_reproducer, recording::rvalue::set_scope,
2088 recording::function::validate): Likewise.
2089 * jit-logging.c (logger::decref): Likewise.
2090
2091 2017-11-30 Jakub Jelinek <[email protected]>
2092
2093 * jit-recording.c
2094 (recording::memento_of_new_rvalue_from_const <long>::write_reproducer):
2095 Use ; instead of ;;.
2096
2097 2017-11-28 Jakub Jelinek <[email protected]>
2098
2099 * jit-playback.c (add_switch): Build SWITCH_EXPR using build2 instead
2100 of build3. Formatting fixes. Adjust funciton comment.
2101
2102 2017-11-23 Tom de Vries <[email protected]>
2103
2104 * libgccjit.c (RETURN_NULL_IF_FAIL_NONNULL_NUMERIC_TYPE): Wrap in
2105 JIT_{BEGIN,END}_STMT.
2106
2107 2017-10-31 David Malcolm <[email protected]>
2108
2109 * docs/internals/index.rst (Running the test suite): Document
2110 PRESERVE_EXECUTABLES.
2111 (Running under valgrind): Add markup to RUN_UNDER_VALGRIND.
2112 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2113
2114 2017-10-04 David Malcolm <[email protected]>
2115
2116 * docs/cp/topics/expressions.rst (Vector expressions): New
2117 section.
2118 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_10): New ABI tag.
2119 * docs/topics/expressions.rst (Vector expressions): New section.
2120 * docs/topics/types.rst (gcc_jit_type_get_vector): Add link to
2121 gcc_jit_context_new_rvalue_from_vector.
2122 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2123 * jit-common.h (gcc::jit:recording::vector_type): New forward
2124 decl.
2125 * jit-playback.c
2126 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
2127 * jit-playback.h
2128 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
2129 * jit-recording.c: In namespace gcc::jit::
2130 (class comma_separated_string): New class.
2131 (comma_separated_string::comma_separated_string): New ctor,
2132 adapted from recording::call::make_debug_string.
2133 (comma_separated_string::~comma_separated_string): New dtor.
2134 In namespace gcc::jit::recording::
2135 (context::new_rvalue_from_vector): New method.
2136 (type::get_vector): Update for renaming of memento_of_get_vector.
2137 (class memento_of_get_vector): Rename to...
2138 (class vector_type): ..this.
2139 (memento_of_new_rvalue_from_vector::memento_of_new_rvalue_from_vector):
2140 New ctor.
2141 (memento_of_new_rvalue_from_vector::replay_into): New method.
2142 (memento_of_new_rvalue_from_vector::visit_children): New method.
2143 (memento_of_new_rvalue_from_vector::make_debug_string): New
2144 method.
2145 (memento_of_new_rvalue_from_vector::write_reproducer): New method.
2146 (call::make_debug_string): Split out arg-printing code into ctor
2147 for comma_separated_string.
2148 * jit-recording.h: In namespace gcc::jit::recording::
2149 (context::new_rvalue_from_vector): New method.
2150 (type::dyn_cast_vector_type): New virtual function.
2151 (class memento_of_get_vector): Rename to...
2152 (class vector_type): ...this.
2153 (vector_type::unqualified): Remove this vfunc override in favor
2154 of...
2155 (vector_type::get_element_type): ...this new method.
2156 (vector_type::get_num_units): New method.
2157 (vector_type::dyn_cast_vector_type): New vfunc override.
2158 (class memento_of_new_rvalue_from_vector): New class.
2159 * libgccjit++.h (gccjit::context::new_rvalue): Add overload for
2160 vector of rvalue.
2161 * libgccjit.c (gcc_jit_context_new_binary_op): Strip off type
2162 qualifications when checking that both operands have same type.
2163 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
2164 * libgccjit.h
2165 (LIBGCCJIT_HAVE_gcc_jit_context_new_rvalue_from_vector): New
2166 macro.
2167 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
2168 * libgccjit.map (LIBGCCJIT_ABI_10): New ABI tag.
2169
2170 2017-09-28 David Malcolm <[email protected]>
2171
2172 * docs/topics/expressions.rst (Function calls): Add link to
2173 gcc_jit_context_new_function_ptr_type.
2174 (Function pointers): Convert to cross-references to
2175 function-pointers.rst, moving material there.
2176 * docs/topics/function-pointers.rst: New page.
2177 * docs/topics/index.rst: Add function-pointers.rst.
2178 * docs/topics/types.rst (Function pointer types): New section.
2179 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2180
2181 2017-09-28 David Malcolm <[email protected]>
2182
2183 * jit-recording.c
2184 (gcc::jit::recording::function_type::is_same_type_as): New function.
2185 * jit-recording.h: In namespace gcc::jit::recording::
2186 (type::accepts_writes_from): Use is_same_type_as rather than pointer
2187 equality.
2188 (type::is_same_type_as): New virtual function.
2189 (function_type::is_same_type_as): New override.
2190
2191 2017-09-27 David Malcolm <[email protected]>
2192
2193 * docs/cp/topics/expressions.rst (Function pointers): New section.
2194 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_9): New tag.
2195 * docs/topics/expressions.rst (Function pointers): New section.
2196 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2197 * jit-common.h (class gcc::jit::recording::function_pointer): New
2198 forward decl.
2199 * jit-playback.c (gcc::jit::playback::function::get_address): New
2200 method.
2201 * jit-playback.h (gcc::jit::playback::function::get_address): New
2202 method decl.
2203 * jit-recording.c: Within namespace gcc::jit::recording...
2204 (function::function): Initialize new field "m_fn_ptr_type".
2205 (function::get_address): New method.
2206 (function_pointer::replay_into): New method.
2207 (function_pointer::visit_children): New method.
2208 (function_pointer::make_debug_string): New method.
2209 (function_pointer::write_reproducer): New method.
2210 * jit-recording.h: Within namespace gcc::jit::recording...
2211 (function::get_address): New method.
2212 (function): Add field "m_fn_ptr_type".
2213 (class function_pointer): New subclass of rvalue.
2214 * libgccjit++.h (gccjit::function::get_address): New method.
2215 * libgccjit.c (gcc_jit_function_get_address): New function.
2216 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_function_get_address): New
2217 macro.
2218 (gcc_jit_function_get_address): New API entrypoint.
2219 * libgccjit.map (LIBGCCJIT_ABI_9): New tag.
2220
2221 2017-09-14 David Malcolm <[email protected]>
2222
2223 PR jit/82174
2224 * jit-builtins.c (matches_builtin): Ignore entries with a NULL
2225 name.
2226
2227 2017-08-18 David Malcolm <[email protected]>
2228
2229 PR tree-optimization/46805
2230 * dummy-frontend.c (jit_langhook_parse_file): Handle vector types.
2231
2232 2017-08-18 David Malcolm <[email protected]>
2233
2234 * jit-recording.c (class gcc::jit::reproducer): Rename field
2235 "m_identifiers" to "m_map_memento_to_identifier". Add field
2236 "m_set_identifiers" and struct hash_traits for it.
2237 (gcc::jit::reproducer::reproducer): Update for above.
2238 (convert_to_identifier): New function.
2239 (gcc::jit::reproducer::ensure_identifier_is_unique): New method.
2240 (gcc::jit::reproducer::make_identifier): Avoid appending the %p
2241 unless necessary for uniqueness. Update for field renaming.
2242 (gcc::jit::reproducer::get_identifier): Update for field renaming.
2243
2244 2017-08-09 David Malcolm <[email protected]>
2245
2246 * docs/cp/topics/types.rst (Vector types): New section.
2247 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_8): New tag.
2248 * docs/topics/types.rst (gcc_jit_context_get_type): Fix typo in
2249 example.
2250 (Vector types): New section.
2251 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2252 * jit-playback.c (gcc::jit::playback::type::get_vector): New
2253 method.
2254 * jit-playback.h (gcc::jit::playback::type::get_vector): New
2255 method.
2256 * jit-recording.c: In namespace gcc::jit::recording::
2257 (type::get_vector): New method.
2258 (memento_of_get_aligned::write_reproducer): Fix typo
2259 in leading comment.
2260 (memento_of_get_vector::replay_into): New method.
2261 (memento_of_get_vector::make_debug_string): New method.
2262 (memento_of_get_vector::write_reproducer): New method.
2263 * jit-recording.h: In namespace gcc::jit::recording::
2264 (type::get_vector): New
2265 method.
2266 (class memento_of_get_vector): New class.
2267 * libgccjit++.h (gccjit::type::get_vector): New method.
2268 * libgccjit.c (gcc_jit_type_get_vector): New public entrypoint.
2269 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_type_get_vector): New
2270 define.
2271 (gcc_jit_type_get_vector): New decl.
2272 * libgccjit.map (LIBGCCJIT_ABI_8): New ABI tag.
2273
2274 2017-07-05 Richard Sandiford <[email protected]>
2275 Alan Hayward <[email protected]>
2276 David Sherwood <[email protected]>
2277
2278 * dummy-frontend.c (jit_langhook_type_for_mode): Remove "enum" before
2279 "machine_mode".
2280
2281 2017-04-24 David Malcolm <[email protected]>
2282
2283 * docs/cp/topics/types.rst (gccjit::type::get_const): Remove
2284 comment.
2285 (gccjit::type::get_aligned): Add.
2286 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_7.
2287 * docs/topics/types.rst: Add gcc_jit_type_get_aligned.
2288 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2289 * jit-playback.c (gcc::jit::playback::type::get_aligned): New
2290 method.
2291 * jit-playback.h (gcc::jit::playback::type::get_aligned): New
2292 method.
2293 * jit-recording.c: Within namespace gcc::jit::recording...
2294 (type::get_aligned): New method.
2295 (memento_of_get_aligned::replay_into): New method.
2296 (memento_of_get_aligned::make_debug_string): New method.
2297 (memento_of_get_aligned::write_reproducer): New method.
2298 * jit-recording.h: Within namespace gcc::jit::recording...
2299 (type::get_aligned): New method.
2300 (type::accepts_writes_from): Strip off qualifications from
2301 this when comparing pointer equality.
2302 (decorated_type): New subclass of type, subsuming the
2303 commonality between memento_of_get_const and
2304 memento_of_get_volatile.
2305 (memento_of_get_const): Make a subclass of decorated_type,
2306 rather than type.
2307 (memento_of_get_volatile): Likewise.
2308 (memento_of_get_aligned): Likewise.
2309 * libgccjit++.h: Within namespace gccjit...
2310 (type::get_const): New method.
2311 (type::get_aligned): New method.
2312 * libgccjit.c (gcc_jit_type_get_aligned): New function.
2313 * libgccjit.h (gcc_jit_type_get_aligned): New decl.
2314 * libgccjit.map (LIBGCCJIT_ABI_7): New
2315 (gcc_jit_type_get_aligned): Add.
2316
2317 2017-01-19 David Malcolm <[email protected]>
2318
2319 * dummy-frontend.c (jit_langhook_type_for_size): Delete.
2320 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
2321
2322 2017-01-18 David Malcolm <[email protected]>
2323
2324 * dummy-frontend.c (jit_langhook_type_for_size): Implement, using
2325 lto's lto_type_for_size.
2326
2327 2017-01-01 Jakub Jelinek <[email protected]>
2328
2329 Update copyright years.
2330
2331 2016-05-20 David Malcolm <[email protected]>
2332
2333 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_6.
2334 * docs/topics/expressions.rst (Function calls): Add documentation
2335 of gcc_jit_rvalue_set_bool_require_tail_call.
2336 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2337 * jit-common.h (gcc::jit::recording::base_call): Add forward decl.
2338 * jit-playback.c: Within namespace gcc::jit::playback...
2339 (context::build_call) Add "require_tail_call" param and use it
2340 to set CALL_EXPR_MUST_TAIL_CALL.
2341 (context::new_call): Add "require_tail_call" param.
2342 (context::new_call_through_ptr): Likewise.
2343 * jit-playback.h: Within namespace gcc::jit::playback...
2344 (context::new_call: Add "require_tail_call" param.
2345 (context::new_call_through_ptr): Likewise.
2346 (context::build_call): Likewise.
2347 * jit-recording.c: Within namespace gcc::jit::recording...
2348 (base_call::base_call): New constructor.
2349 (base_call::write_reproducer_tail_call): New method.
2350 (call::call): Update for inheritance from base_call.
2351 (call::replay_into): Provide m_require_tail_call to call
2352 to new_call.
2353 (call::write_reproducer): Call write_reproducer_tail_call.
2354 (call_through_ptr::call_through_ptr): Update for inheritance from
2355 base_call.
2356 (call_through_ptr::replay_into): Provide m_require_tail_call to call
2357 to new_call_through_ptr.
2358 (recording::call_through_ptr::write_reproducer): Call
2359 write_reproducer_tail_call.
2360 * jit-recording.h: Within namespace gcc::jit::recording...
2361 (rvalue::dyn_cast_base_call): New virtual function.
2362 (class base_call): New subclass of class rvalue.
2363 (class call): Inherit from base_call rather than directly from
2364 rvalue, moving get_precedence and m_args to base_call.
2365 (class call_through_ptr): Likewise.
2366 * libgccjit.c (gcc_jit_rvalue_set_bool_require_tail_call): New
2367 function.
2368 * libgccjit.h
2369 (LIBGCCJIT_HAVE_gcc_jit_rvalue_set_bool_require_tail_call): New
2370 macro.
2371 (gcc_jit_rvalue_set_bool_require_tail_call): New function.
2372 * libgccjit.map (LIBGCCJIT_ABI_6): New.
2373 (gcc_jit_rvalue_set_bool_require_tail_call): Add.
2374
2375 2016-05-17 David Malcolm <[email protected]>
2376
2377 * dummy-frontend.c: Include diagnostic.h.
2378 (jit_begin_diagnostic): New function.
2379 (jit_end_diagnostic): New function.
2380 (jit_langhook_init): Register jit_begin_diagnostic
2381 and jit_end_diagnostic with the global_dc.
2382 * jit-playback.c: Include diagnostic.h.
2383 (gcc::jit::playback::context::add_diagnostic): New method.
2384 * jit-playback.h (struct diagnostic_context): Add forward
2385 declaration.
2386 (gcc::jit::playback::context::add_diagnostic): New method.
2387
2388 2016-05-17 David Malcolm <[email protected]>
2389
2390 * docs/topics/expressions.rst (Function calls): Document
2391 gcc_jit_context_new_call_through_ptr.
2392 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2393
2394 2016-05-13 David Malcolm <[email protected]>
2395
2396 * jit-playback.h: Within namespace gcc:jit::playback...
2397 (compile_to_memory::postprocess): Mark with FINAL OVERRIDE.
2398 (compile_to_file::postprocess): Likewise.
2399 (function::finalizer): Likewise.
2400 (block::finalizer): Likewise.
2401 (source_file::finalizer): Likewise.
2402 (source_line::finalizer): Likewise.
2403 * jit-recording.c (gcc::jit::rvalue_usage_validator):: Likewise.
2404 * jit-recording.h: Within namespace gcc::jit::recording...
2405 (string::replay_into): Mark with FINAL OVERRIDE.
2406 (string::make_debug_string): Likewise.
2407 (string::write_reproducer): Likewise.
2408 (location::replay_into): Likewise.
2409 (location::dyn_cast_location): Likewise.
2410 (location::make_debug_string): Likewise.
2411 (location::write_reproducer): Likewise.
2412 (memento_of_get_type::dereference): Likewise.
2413 (memento_of_get_type::accepts_writes_from): Likewise.
2414 (memento_of_get_type::is_int): Likewise.
2415 (memento_of_get_type::is_float): Likewise.
2416 (memento_of_get_type::is_bool): Likewise.
2417 (memento_of_get_type::is_pointer): Likewise.
2418 (memento_of_get_type::is_array): Likewise.
2419 (memento_of_get_type::is_void): Likewise.
2420 (memento_of_get_type::replay_into): Likewise.
2421 (memento_of_get_type::make_debug_string): Likewise.
2422 (memento_of_get_type::write_reproducer): Likewise.
2423 (memento_of_get_pointer::dereference): Likewise.
2424 (memento_of_get_pointer::accepts_writes_from): Likewise.
2425 (memento_of_get_pointer::replay_into): Likewise.
2426 (memento_of_get_pointer::is_int): Likewise.
2427 (memento_of_get_pointer::is_float): Likewise.
2428 (memento_of_get_pointer::is_bool): Likewise.
2429 (memento_of_get_pointer::is_pointer): Likewise.
2430 (memento_of_get_pointer::is_array): Likewise.
2431 (memento_of_get_pointer::make_debug_string): Likewise.
2432 (memento_of_get_pointer::write_reproducer): Likewise.
2433 (memento_of_get_const::dereference): Likewise.
2434 (memento_of_get_const::accepts_writes_from): Likewise.
2435 (memento_of_get_const::unqualified): Likewise.
2436 (memento_of_get_const::is_int): Likewise.
2437 (memento_of_get_const::is_float): Likewise.
2438 (memento_of_get_const::is_bool): Likewise.
2439 (memento_of_get_const::is_pointer): Likewise.
2440 (memento_of_get_const::is_array): Likewise.
2441 (memento_of_get_const::void replay_into): Likewise;
2442 (memento_of_get_const::make_debug_string): Likewise.
2443 (memento_of_get_const::write_reproducer): Likewise.
2444 (memento_of_get_volatile::dereference): Likewise.
2445 (memento_of_get_volatile::unqualified): Likewise.
2446 (memento_of_get_volatile::is_int): Likewise.
2447 (memento_of_get_volatile::is_float): Likewise.
2448 (memento_of_get_volatile::is_bool): Likewise.
2449 (memento_of_get_volatile::is_pointer): Likewise.
2450 (memento_of_get_volatile::is_array): Likewise.
2451 (memento_of_get_volatile::replay_into): Likewise;
2452 (memento_of_get_volatile::make_debug_string): Likewise.
2453 (memento_of_get_volatile::write_reproducer): Likewise.
2454 (array_type::dereference): Likewise.
2455 (array_type::is_int): Likewise.
2456 (array_type::is_float): Likewise.
2457 (array_type::is_bool): Likewise.
2458 (array_type::is_pointer): Likewise.
2459 (array_type::is_array): Likewise.
2460 (array_type::replay_into): Likewise;
2461 (array_type::make_debug_string): Likewise.
2462 (array_type::write_reproducer): Likewise.
2463 (function_type::dereference): Likewise.
2464 (function_type::function_dyn_cast_function_type): Likewise.
2465 (function_type::function_as_a_function_type): Likewise.
2466 (function_type::is_int): Likewise.
2467 (function_type::is_float): Likewise.
2468 (function_type::is_bool): Likewise.
2469 (function_type::is_pointer): Likewise.
2470 (function_type::is_array): Likewise.
2471 (function_type::replay_into): Likewise;
2472 (function_type::make_debug_string): Likewise.
2473 (function_type::write_reproducer): Likewise.
2474 (field::replay_into): Likewise;
2475 (field::write_to_dump): Likewise.
2476 (field::make_debug_string): Likewise.
2477 (field::write_reproducer): Likewise.
2478 (compound_type::dereference): Likewise.
2479 (compound_type::is_int): Likewise.
2480 (compound_type::is_float): Likewise.
2481 (compound_type::is_bool): Likewise.
2482 (compound_type::is_pointer): Likewise.
2483 (compound_type::is_array): Likewise.
2484 (compound_type::has_known_size): Likewise.
2485 (struct_::dyn_cast_struct): Likewise.
2486 (struct_::replay_into): Likewise.
2487 (struct_::access_as_type): Likewise.
2488 (struct_::make_debug_string): Likewise.
2489 (struct_::write_reproducer): Likewise.
2490 (fields::replay_into): Likewise.
2491 (fields::write_to_dump): Likewise.
2492 (fields::make_debug_string): Likewise.
2493 (fields::write_reproducer): Likewise.
2494 (union_::replay_into): Likewise.
2495 (union_::make_debug_string): Likewise.
2496 (union_::write_reproducer): Likewise.
2497 (lvalue::access_as_rvalue): Mark with OVERRIDE.
2498 (param::replay_into): Mark with FINAL OVERRIDE.
2499 (param::visit_children): Likewise.
2500 (param::dyn_cast_param): Likewise.
2501 (param::access_as_rvalue): Likewise.
2502 (param::access_as_lvalue): Likewise.
2503 (param::make_debug_string): Likewise.
2504 (param::write_reproducer): Likewise.
2505 (param::get_precedence): Likewise.
2506 (function::replay_into): Likewise.
2507 (function::write_to_dump): Likewise.
2508 (function::make_debug_string): Likewise.
2509 (function::write_reproducer): Likewise.
2510 (block::write_to_dump): Likewise.
2511 (block::make_debug_string): Likewise.
2512 (block::write_reproducer): Likewise.
2513 (block::replay_into): Likewise.
2514 (global::replay_into): Likewise;
2515 (global::visit_children): Likewise.
2516 (global::write_to_dump): Likewise.
2517 (global::make_debug_string): Likewise.
2518 (global::write_reproducer): Likewise.
2519 (global::get_precedence): Likewise.
2520 (memento_of_new_rvalue_from_const::replay_into): Likewise.
2521 (memento_of_new_rvalue_from_const::visit_children): Likewise.
2522 (memento_of_new_rvalue_from_const::is_constant): Likewise.
2523 (memento_of_new_rvalue_from_const::get_wide_int): Likewise.
2524 (memento_of_new_rvalue_from_const::make_debug_string): Likewise.
2525 (memento_of_new_rvalue_from_const::write_reproducer): Likewise.
2526 (memento_of_new_rvalue_from_const::get_precedence): Likewise.
2527 (memento_of_new_string_literal::replay_into): Likewise.
2528 (memento_of_new_string_literal::visit_children): Likewise.
2529 (memento_of_new_string_literal::make_debug_string): Likewise.
2530 (memento_of_new_string_literal::write_reproducer): Likewise.
2531 (memento_of_new_string_literal::get_precedence): Likewise.
2532 (unary_op::replay_into): Likewise.
2533 (unary_op::visit_children): Likewise.
2534 (unary_op::make_debug_string): Likewise.
2535 (unary_op::write_reproducer): Likewise.
2536 (unary_op::get_precedence): Likewise.
2537 (binary_op::replay_into): Likewise.
2538 (binary_op::visit_children): Likewise.
2539 (binary_op::make_debug_string): Likewise.
2540 (binary_op::write_reproducer): Likewise.
2541 (binary_op::get_precedence): Likewise.
2542 (comparison::replay_into): Likewise.
2543 (comparison::visit_children): Likewise.
2544 (comparison::make_debug_string): Likewise.
2545 (comparison::write_reproducer): Likewise.
2546 (comparison::get_precedence): Likewise.
2547 (cast::replay_into): Likewise.
2548 (cast::visit_children): Likewise.
2549 (cast::make_debug_string): Likewise.
2550 (cast::write_reproducer): Likewise.
2551 (cast::get_precedence): Likewise.
2552 (call::replay_into): Likewise.
2553 (call::visit_children): Likewise.
2554 (call::make_debug_string): Likewise.
2555 (call::write_reproducer): Likewise.
2556 (call::get_precedence): Likewise.
2557 (call_through_ptr::replay_into): Likewise.
2558 (call_through_ptr::visit_children): Likewise.
2559 (call_through_ptr::make_debug_string): Likewise.
2560 (call_through_ptr::write_reproducer): Likewise.
2561 (call_through_ptr::get_precedence): Likewise.
2562 (array_access::replay_into): Likewise.
2563 (array_access::visit_children): Likewise.
2564 (array_access::make_debug_string): Likewise.
2565 (array_access::write_reproducer): Likewise.
2566 (array_access::get_precedence): Likewise.
2567 (access_field_of_lvalue::replay_into): Likewise.
2568 (access_field_of_lvalue::visit_children): Likewise.
2569 (access_field_of_lvalue::make_debug_string): Likewise.
2570 (access_field_of_lvalue::write_reproducer): Likewise.
2571 (access_field_of_lvalue::get_precedence): Likewise.
2572 (access_field_rvalue::replay_into): Likewise.
2573 (access_field_rvalue::visit_children): Likewise.
2574 (access_field_rvalue::make_debug_string): Likewise.
2575 (access_field_rvalue::write_reproducer): Likewise.
2576 (access_field_rvalue::get_precedence): Likewise.
2577 (dereference_field_rvalue::replay_into): Likewise.
2578 (dereference_field_rvalue::visit_children): Likewise.
2579 (dereference_field_rvalue::make_debug_string): Likewise.
2580 (dereference_field_rvalue::write_reproducer): Likewise.
2581 (dereference_field_rvalue::get_precedence): Likewise.
2582 (dereference_rvalue::replay_into): Likewise.
2583 (dereference_rvalue::visit_children): Likewise.
2584 (dereference_rvalue::make_debug_string): Likewise.
2585 (dereference_rvalue::write_reproducer): Likewise.
2586 (dereference_rvalue::get_precedence): Likewise.
2587 (get_address_of_lvalue::replay_into): Likewise.
2588 (get_address_of_lvalue::visit_children): Likewise.
2589 (get_address_of_lvalue::make_debug_string): Likewise.
2590 (get_address_of_lvalue::write_reproducer): Likewise.
2591 (get_address_of_lvalue::get_precedence): Likewise.
2592 (local::replay_into): Likewise.
2593 (local::visit_children): Likewise.
2594 (local::write_to_dump): Likewise.
2595 (local::make_debug_string): Likewise.
2596 (local::write_reproducer): Likewise.
2597 (local::get_precedence): Likewise.
2598 (statement::write_to_dump): Likewise.
2599 (eval::replay_into): Likewise.
2600 (eval::make_debug_string): Likewise.
2601 (eval::write_reproducer): Likewise.
2602 (assignment::replay_into): Likewise.
2603 (assignment::make_debug_string): Likewise.
2604 (assignment::write_reproducer): Likewise.
2605 (assignment_op::replay_into): Likewise.
2606 (assignment_op::make_debug_string): Likewise.
2607 (assignment_op::write_reproducer): Likewise.
2608 (comment::replay_into): Likewise.
2609 (comment::make_debug_string): Likewise.
2610 (comment::write_reproducer): Likewise.
2611 (conditional::replay_into): Likewise.
2612 (conditional::get_successor_blocks): Likewise.
2613 (conditional::make_debug_string): Likewise.
2614 (conditional::write_reproducer): Likewise.
2615 (jump::replay_into): Likewise.
2616 (jump::get_successor_blocks): Likewise.
2617 (jump::make_debug_string): Likewise.
2618 (jump::write_reproducer): Likewise.
2619 (return_::replay_into): Likewise.
2620 (return_::get_successor_blocks): Likewise.
2621 (return_::make_debug_string): Likewise.
2622 (return_::write_reproducer): Likewise.
2623 (case_::replay_into): Likewise.
2624 (case_::write_reproducer): Likewise.
2625 (case_::make_debug_string): Likewise.
2626 (switch_::replay_into): Likewise.
2627 (switch_::get_successor_blocks): Likewise.
2628 (switch_::make_debug_string): Likewise.
2629 (switch_::write_reproducer): Likewise.
2630
2631 2016-02-08 David Malcolm <[email protected]>
2632
2633 * dummy-frontend.c (jit_langhook_init): Remove
2634 second argument to build_common_tree_nodes to
2635 track r233218.
2636
2637 2016-01-23 Iain Buclaw <[email protected]>
2638
2639 * jit-playback.c: Include pthread.h.
2640
2641 2016-01-19 David Malcolm <[email protected]>
2642
2643 PR jit/69144
2644 * jit-playback.c (gcc::jit::playback::compile_to_file::postprocess):
2645 Potentially add the temporary artifact to the tempdir's list of
2646 tempfiles needing additional cleanup.
2647 (gcc::jit::playback::context::extract_any_requested_dumps): Likewise
2648 for the dumpfile.
2649 * jit-tempdir.c (gcc::jit::tempdir::~tempdir): Clean up additional
2650 tempfiles.
2651 * jit-tempdir.h (gcc::jit::tempdir::add_temp_file): New method.
2652 (gcc::jit::tempdir::m_tempfiles): New field.
2653 * docs/cp/intro/tutorial04.rst: Update for changes to toyvm.cc.
2654 * docs/examples/tut04-toyvm/toyvm.cc (class compilation_result):
2655 New.
2656 (toyvm_function::compile): Change return type from function ptr
2657 to a compilation_result.
2658 (toyvm_function::get_function_name): New accessor.
2659 (toyvm_function::m_funcname): New field.
2660 (get_function_name): Convert to...
2661 (toyvm_function::make_function_name): ...this new method.
2662 (toyvm_function::parse): Call make_function_name.
2663 (toyvm_function::compile): Convert return type from function ptr
2664 to a compilation_result. Use get_function_name.
2665 (compilation_state::compile): Convert return type from
2666 gcc_jit_result * to a compilation_result.
2667 (test_script): Update for above changes, extracting the code from
2668 the compilation_result.
2669 (main): Likewise.
2670 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2671
2672 2016-01-04 Jakub Jelinek <[email protected]>
2673
2674 Update copyright years.
2675
2676 2015-11-11 Andrew MacLeod <[email protected]>
2677
2678 * dummy-frontend.c: Remove unused header files.
2679 * jit-builtins.c: Likewise.
2680 * jit-playback.c: Likewise.
2681 * jit-recording.c: Likewise.
2682 * jit-spec.c: Likewise.
2683 * libgccjit.c: Likewise.
2684
2685 2015-11-07 Richard Sandiford <[email protected]>
2686
2687 * jit-builtins.c: Don't undef DEF_BUILTIN.
2688
2689 2015-10-29 Andrew MacLeod <[email protected]>
2690
2691 * dummy-frontend.c: Reorder #include's and remove duplicates.
2692 * jit-builtins.c: Likewise.
2693 * jit-playback.c: Likewise.
2694 * jit-recording.c: Likewise.
2695 * libgccjit.c: Likewise.
2696
2697 2015-10-13 Jakub Jelinek <[email protected]>
2698
2699 * jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
2700 DEF_FUNCTION_TYPE_11): Define.
2701 * jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
2702 DEF_FUNCTION_TYPE_11): Define.
2703
2704 2015-09-30 Thomas Schwinge <[email protected]>
2705 Ulrich Drepper <[email protected]>
2706
2707 * jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use.
2708
2709 2015-09-30 Matthias Klose <[email protected]>
2710
2711 * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,
2712 remove DEF_FUNCTION_TYPE_VAR_11.
2713 * jit-builtins.c (builtins_manager::make_type): Define and handle
2714 DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.
2715
2716 2015-08-25 David Malcolm <[email protected]>
2717
2718 * docs/cp/topics/contexts.rst
2719 (gccjit::context::set_bool_use_external_driver): New.
2720 * docs/internals/test-hello-world.exe.log.txt: Update.
2721 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_5): New.
2722 * docs/topics/contexts.rst
2723 (gcc_jit_context_set_bool_use_external_driver): New.
2724 * jit-common.h (enum inner_bool_option): Add
2725 INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
2726 * jit-playback.c (gcc_driver_name): New global.
2727 (gcc:jit::playback::context::invoke_driver): Split out second
2728 half into...
2729 (gcc::jit::playback::context::invoke_embedded_driver): ...this new
2730 function, and...
2731 (gcc::jit::playback::context::invoke_external_driver): ...this new
2732 function.
2733 * jit-playback.h
2734 (gcc::jit::playback::context::get_inner_bool_option): New.
2735 (gcc::jit::playback::context::invoke_embedded_driver): New.
2736 (gcc::jit::playback::context::invoke_external_driver): New.
2737 * jit-recording.c (inner_bool_option_reproducer_strings):
2738 Add entry for INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
2739 * libgccjit++.h
2740 (gccjit::context::set_bool_use_external_driver): New.
2741 * libgccjit.c (gcc_jit_context_set_bool_use_external_driver): New.
2742 * libgccjit.h (gcc_jit_context_set_bool_use_external_driver): New.
2743 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_use_external_driver):
2744 New.
2745 * libgccjit.map (LIBGCCJIT_ABI_5): New.
2746 * notes.txt: Show invocation of embedded copy of driver.
2747 * docs/internals/test-hello-world.exe.log.txt: Update
2748
2749 2015-08-13 David Malcolm <[email protected]>
2750
2751 * jit-playback.c (invoke_driver): On OS X, add
2752 "-Wl,-undefined,dynamic_lookup" to the driver arguments.
2753
2754 2015-08-03 David Malcolm <[email protected]>
2755
2756 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
2757 * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY):
2758 We no longer show a profile.
2759 * docs/topics/index.rst (Topic Reference): Add performance.rst.
2760 * docs/topics/performance.rst: New file.
2761 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2762 * jit-playback.c (gcc::jit::playback::context::compile): Add timer
2763 param when constructing the "toplev" instance.
2764 (gcc::jit::playback::context::acquire_mutex): Add timer param when
2765 constructing auto_timevar instance.
2766 (gcc::jit::playback::context::make_fake_args): If we have a timer,
2767 add "-ftime-report".
2768 (gcc::jit::playback::context::invoke_driver): Add timer param when
2769 constructing auto_timevar instance.
2770 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
2771 * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor.
2772 * jit-recording.c: Include timevar.h.
2773 (gcc::jit::recording::context::context): Initialize field "m_timer".
2774 * jit-recording.h: Add forward declaration of class timer.
2775 (gcc::jit::recording::context::set_timer): New method.
2776 (gcc::jit::recording::context::get_timer): New method.
2777 (gcc::jit::recording::context::m_timer): New field.
2778 * libgccjit++.h (gccjit::timer): New class.
2779 (gccjit::auto_time): New class.
2780 (gccjit::context::set_timer): New method.
2781 (gccjit::context::get_timer): New.
2782 (gccjit::timer::timer): New.
2783 (gccjit::timer::push): New.
2784 (gccjit::timer::pop): New.
2785 (timer::print): New.
2786 (timer::get_inner_timer): New.
2787 (timer::release): New.
2788 (auto_time::auto_time): New.
2789 (auto_time::~auto_time): New.
2790 * libgccjit.c: Include timevar.h.
2791 (struct gcc_jit_timer): New.
2792 (gcc_jit_timer_new): New function.
2793 (gcc_jit_timer_release): New function.
2794 (gcc_jit_context_set_timer): New function.
2795 (gcc_jit_context_get_timer): New function.
2796 (gcc_jit_timer_push): New function.
2797 (gcc_jit_timer_pop): New function.
2798 (gcc_jit_timer_print): New function.
2799 * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro.
2800 (gcc_jit_timer): New typedef.
2801 (gcc_jit_timer_new): New function.
2802 (gcc_jit_timer_release): New function.
2803 (gcc_jit_context_set_timer): New function.
2804 (gcc_jit_context_get_timer): New function.
2805 (gcc_jit_timer_push): New function.
2806 (gcc_jit_timer_pop): New function.
2807 (gcc_jit_timer_print): New function.
2808 * libgccjit.map (LIBGCCJIT_ABI_4): New.
2809 (gcc_jit_timer_new): New function.
2810 (gcc_jit_timer_release): New function.
2811 (gcc_jit_context_set_timer): New function.
2812 (gcc_jit_context_get_timer): New function.
2813 (gcc_jit_timer_push): New function.
2814 (gcc_jit_timer_pop): New function.
2815 (gcc_jit_timer_print): New function.
2816
2817 2015-07-23 David Malcolm <[email protected]>
2818
2819 * jit-playback.c (invoke_driver): Convert local "argvec"
2820 to an auto_argvec, so that it owns copies of the strings,
2821 rather than borrows them, updating ADD_ARG to use xstrdup
2822 and special-casing the NULL terminator to avoid
2823 xstrdup (NULL). Call add_multilib_driver_arguments at the front
2824 of the arguments.
2825 (MULTILIB_DEFAULTS): Provide a default definition.
2826 (multilib_defaults_raw): New constant array.
2827 (gcc::jit::playback::context::add_multilib_driver_arguments): New
2828 method.
2829 * jit-playback.h
2830 (gcc::jit::playback::context::add_multilib_driver_arguments): New
2831 method.
2832 * docs/internals/test-hello-world.exe.log.txt: Update.
2833 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2834
2835 2015-07-16 David Malcolm <[email protected]>
2836
2837 * docs/internals/index.rst (Overview of code structure): Add note
2838 that the implementation is in C++, despite the .c extension.
2839 (Submitting patches): New subsection.
2840 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2841
2842 2015-07-09 Andrew MacLeod <[email protected]>
2843
2844 * dummy-frontend.c: Adjust includes for flags.h changes.
2845 * jit-common.h: Likewise.
2846 * jit-playback.c: Likewise.
2847
2848 2015-07-08 David Malcolm <[email protected]>
2849
2850 PR jit/66783
2851 * libgccjit.c (gcc_jit_context_new_field): Show name of field in
2852 "unknown size" error message.
2853 (gcc_jit_struct_set_fields): Show name of struct in error message.
2854 (gcc_jit_context_new_global): Show name of global in
2855 "unknown size" error message.
2856 (gcc_jit_function_new_local): Likewise for local.
2857
2858 2015-07-07 Andrew MacLeod <[email protected]>
2859
2860 * dummy-frontend.c: Adjust includes.
2861 * jit-common.h: Likewise.
2862 * jit-playback.c: Likewise.
2863
2864 2015-07-07 David Malcolm <[email protected]>
2865
2866 PR jit/66783
2867 * jit-recording.h: Within namespace gcc:jit::recording...
2868 (type::has_known_size): New virtual function.
2869 (struct_has_known_size): New function.
2870 * libgccjit.c (gcc_jit_context_new_field): Verify that the type
2871 has a known size.
2872 (gcc_jit_context_new_global): Likewise.
2873 (gcc_jit_function_new_local): Likewise.
2874
2875 2015-07-07 David Malcolm <[email protected]>
2876
2877 PR jit/66779
2878 * dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we
2879 handle modes QI, HI, SI, DI, TI.
2880
2881 2015-07-01 David Malcolm <[email protected]>
2882
2883 PR jit/66700
2884 * jit-playback.c (jit_mark_addressable): New function.
2885 (gcc::jit::playback::lvalue::get_address): Call
2886 jit_mark_addressable on the underlying tree.
2887
2888 2015-07-01 David Malcolm <[email protected]>
2889
2890 * docs/topics/types.rst (gcc_jit_context_new_union_type): Add
2891 documentation.
2892 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2893
2894 2015-07-01 David Malcolm <[email protected]>
2895
2896 * docs/topics/contexts.rst (gcc_jit_context_set_bool_option):
2897 Clarify lack of lifetime requirements on (const char *) parameter.
2898 * docs/topics/expressions.rst
2899 (gcc_jit_context_new_string_literal): Likewise.
2900 (gcc_jit_context_new_global): Likewise.
2901 * docs/topics/functions.rst (gcc_jit_context_new_param): Likewise.
2902 (gcc_jit_context_new_function): Likewise.
2903 (gcc_jit_function_new_block): Likewise.
2904 (gcc_jit_block_add_comment): Likewise.
2905 * docs/topics/locations.rst (gcc_jit_context_new_location):
2906 Likewise.
2907 * docs/topics/types.rst (gcc_jit_context_new_field): Likewise.
2908 (gcc_jit_context_new_struct_type): Likewise.
2909 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2910
2911 2015-06-30 David Malcolm <[email protected]>
2912
2913 * docs/cp/topics/functions.rst (Blocks): Add switch statements to
2914 list of ways to terminate a block.
2915 (gccjit::block::end_with_switch): Add function description.
2916 (gccjit::case_): Add class.
2917 (gccjit::context::new_case): Add function description.
2918 * docs/cp/topics/objects.rst: Add "case_" to class hierarchy.
2919 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New.
2920 * docs/topics/functions.rst (Blocks): Add switch statements to
2921 list of ways to terminate a block.
2922 (gcc_jit_block_end_with_switch): Add function description.
2923 (gcc_jit_case): Add type.
2924 (gcc_jit_context_new_case): Add function description.
2925 (gcc_jit_case_as_object): Add function description.
2926 * docs/topics/objects.rst: Add gcc_jit_case to class hierarchy.
2927 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2928 * jit-common.h (gcc::jit::recording::case_): Add forward decl.
2929 (gcc::jit::playback::case_): Add forward decl.
2930 * jit-playback.c (add_case): New function.
2931 (gcc::jit::playback::block::add_switch): New function.
2932 * jit-playback.h (gcc::jit::playback::case_): New struct.
2933 (gcc::jit::playback::block::get_function): New method.
2934 (gcc::jit::playback::block::add_switch): New method.
2935 * jit-recording.c: Within namespace gcc::jit...
2936 (recording::context::new_case): New method.
2937 (recording::function::validate): Update for change to
2938 get_successor_blocks.
2939 (recording::block::end_with_switch): New method.
2940 (recording::block::get_successor_blocks): Update to support an
2941 arbitrary number of successor blocks.
2942 (recording::block::dump_edges_to_dot): Likewise.
2943 (memento_of_new_rvalue_from_const <int>::get_wide_int): New.
2944 (memento_of_new_rvalue_from_const <long>::get_wide_int): New.
2945 (memento_of_new_rvalue_from_const <double>::get_wide_int): New.
2946 (memento_of_new_rvalue_from_const <void *>::get_wide_int): New.
2947 (recording::statement::get_successor_blocks): Update to support an
2948 arbitrary number of successor blocks.
2949 (recording::conditional::get_successor_blocks): Likewise.
2950 (recording::jump::get_successor_blocks): Likewise.
2951 (recording::return_::get_successor_blocks): Likewise.
2952 (recording::case_::write_reproducer): New.
2953 (recording::case_::make_debug_string): New.
2954 (recording::switch_::switch_): New.
2955 (recording::switch_::replay_into): New.
2956 (recording::switch_::get_successor_blocks): New.
2957 (recording::switch_::make_debug_string): New.
2958 (recording::switch_::write_reproducer): New.
2959 * jit-recording.h: Within namespace gcc::jit::recording...
2960 (context::new_case): New.
2961 (rvalue::is_constant): New.
2962 (rvalue::get_wide_int): New.
2963 (block::end_with_switch): New.
2964 (block::get_successor_blocks): Update to support an arbitrary
2965 number of successor blocks.
2966 (memento_of_new_rvalue_from_const::is_constant): New.
2967 (memento_of_new_rvalue_from_const::get_wide_int): New.
2968 (statement::get_successor_blocks): Update to support an arbitrary
2969 number of successor blocks.
2970 (conditional::get_successor_blocks): Likewise.
2971 (jump::get_successor_blocks): Likewise.
2972 (return_::get_successor_blocks): Likewise.
2973 (case_): New subclass of memento.
2974 (switch_): New subclass of statement.
2975 * libgccjit++.h (gccjit::case_): New subclass of gccjit::object.
2976 (gccjit::context::new_case): New method.
2977 (gccjit::block::end_with_switch): New method.
2978 (gccjit::case_::case): New ctors.
2979 (gccjit::case_::get_inner_case): New method.
2980 * libgccjit.c: Include "typed-splay-tree.h"
2981 (struct gcc_jit_case): New.
2982 (gcc_jit_context_new_case): New function.
2983 (gcc_jit_case_as_object): New function.
2984 (valid_dest_for_switch): New function.
2985 (valid_case_for_switch): New function.
2986 (class api_call_validator): New class.
2987 (class case_range_validator): New class.
2988 (case_range_validator::case_range_validator): New.
2989 (case_range_validator::validate): New.
2990 (case_range_validator::case_compare): New.
2991 (case_range_validator::get_wide_int): new.
2992 (gcc_jit_block_end_with_switch): New.
2993 * libgccjit.h: Add gcc_jit_case to class hierarchy comment.
2994 (gcc_jit_case): New typedef.
2995 (gcc_jit_context_new_case): New function.
2996 (gcc_jit_case_as_object): New function.
2997 (gcc_jit_block_end_with_switch): New function.
2998 (LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New.
2999 * libgccjit.map: Add gcc_jit_block_end_with_switch,
3000 gcc_jit_case_as_object and gcc_jit_context_new_case.
3001
3002 2015-06-30 David Malcolm <[email protected]>
3003
3004 PR jit/66546
3005 * docs/cp/topics/contexts.rst
3006 (gccjit::context::set_bool_allow_unreachable_blocks): New.
3007 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New.
3008 * docs/topics/contexts.rst (Options): Add notes discussing the
3009 transition from enums to entrypoints for new options.
3010 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
3011 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3012 * jit-common.h (gcc::jit::inner_bool_option): New enum.
3013 * jit-recording.c: Within namespace gcc::jit...
3014 (recording::context::context): Handle m_inner_bool_options.
3015 (recording::context::set_inner_bool_option): New.
3016 (inner_bool_option_reproducer_strings): New.
3017 (recording::context::log_all_options): Log the "inner" bool
3018 options.
3019 (recording::context::log_inner_bool_option): New.
3020 (recording::context::dump_reproducer_to_file): Write initializers
3021 for "inner" bool options.
3022 (recording::function::validate): Don't check for block
3023 reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set.
3024 * jit-recording.h: Within namespace gcc::jit...
3025 (recording::context::set_inner_bool_option): New.
3026 (recording::context::get_inner_bool_option): New.
3027 (recording::context::log_inner_bool_option): New.
3028 (recording::context::m_inner_bool_options): New.
3029 * libgccjit++.h
3030 (gccjit::context::set_bool_allow_unreachable_blocks): New.
3031 * libgccjit.c
3032 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
3033 * libgccjit.h: Add note about options present in the
3034 initial release of libgccjit.
3035 (gcc_jit_context_set_bool_allow_unreachable_blocks): New API
3036 entrypoint.
3037 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks):
3038 New macro.
3039 * libgccjit.map (LIBGCCJIT_ABI_2): New, containing...
3040 (gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new
3041 entrypoint.
3042
3043 2015-06-30 David Malcolm <[email protected]>
3044
3045 PR jit/66628
3046 * docs/cp/topics/contexts.rst (Additional command-line options):
3047 New section.
3048 * docs/topics/compatibility.rst: New file.
3049 * docs/topics/contexts.rst (Additional command-line options): New
3050 section.
3051 * docs/topics/index.rst: Add compatibility.rst.
3052 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3053 * jit-playback.c (make_fake_args): Add call to
3054 append_command_line_options.
3055 * jit-recording.c: Within namespace gcc::jit...
3056 (recording::context::~context): Free the optnames within
3057 m_command_line_options.
3058 (recording::context::set_bool_option): Likewise.
3059 (recording::context::add_command_line_option): New method.
3060 (recording::context::append_command_line_options): New method.
3061 (recording::context::dump_reproducer_to_file): Add command-line
3062 options.
3063 * jit-recording.h: Within namespace gcc::jit...
3064 (recording::context::add_command_line_option): New method.
3065 (recording::context::append_command_line_options): New method.
3066 (recording::context::m_command_line_options): New field.
3067 * libgccjit++.h (gccjit::context::add_command_line_option): New
3068 method.
3069 * libgccjit.c (gcc_jit_context_add_command_line_option): New API
3070 entrypoint.
3071 * libgccjit.h (gcc_jit_context_add_command_line_option): New API
3072 entrypoint.
3073 (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New
3074 macro.
3075 * libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add
3076 LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option.
3077
3078 2015-06-30 David Malcolm <[email protected]>
3079
3080 * jit-recording.c
3081 (gcc::jit::recording::context::dump_reproducer_to_file):
3082 Add pragma to generated reproducers to disable -Wunused-variable.
3083 Fix handling of NULL string options.
3084
3085 2015-06-30 David Malcolm <[email protected]>
3086
3087 * docs/cp/topics/expressions.rst: Remove stray semicolon.
3088 * docs/cp/topics/functions.rst: Remove stray backslash.
3089 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3090
3091 2015-06-25 Andrew MacLeod <[email protected]>
3092
3093 * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
3094 * jit-playback.c: Likewise.
3095
3096 2015-06-25 Andrew Macleod <[email protected]>
3097
3098 * jit-common.h: Don't include alias.h.
3099
3100 2015-06-17 David Malcolm <[email protected]>
3101
3102 * libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field
3103 is for the correct struct.
3104 (gcc_jit_rvalue_access_field): Likewise.
3105
3106 2015-06-17 Andrew MacLeod <[email protected]>
3107
3108 * dummy-frontend.c: Do not include input.h, line-map.h or is-a.h.
3109 * jit-common.h: Likewise.
3110 * jit-playback.c: Likewise.
3111
3112 2015-06-16 David Malcolm <[email protected]>
3113
3114 PR jit/66539
3115 * jit-recording.c: Within namespace gcc::jit::recording::
3116 (rvalue::get_debug_string_parens): New function.
3117 (binary_op::make_debug_string): Update to mimic C precedence
3118 rules.
3119 (binary_op_precedence): New array.
3120 (binary_op::get_precedence): New function.
3121 (comparison::make_debug_string): Update to mimic C precedence
3122 rules.
3123 (comparison_precedence): New array.
3124 (comparison::get_precedence): New function.
3125 (cast::make_debug_string): Update to mimic C precedence rules.
3126 (call::make_debug_string): Likewise.
3127 (call_through_ptr::make_debug_string): Likewise.
3128 (array_access::make_debug_string): Likewise.
3129 (access_field_of_lvalue::make_debug_string): Likewise.
3130 (access_field_rvalue::make_debug_string): Likewise.
3131 (dereference_field_rvalue::make_debug_string): Likewise.
3132 (dereference_rvalue::make_debug_string): Likewise.
3133 (get_address_of_lvalue::make_debug_string): Likewise.
3134 * jit-recording.h: Within namespace gcc::jit::recording::
3135 (precedence): New enum.
3136 (rvalue::rvalue): Initialize field "m_parenthesized_string".
3137 (rvalue::get_debug_string_parens): New method.
3138 (rvalue::get_precedence): New pure virtual function.
3139 (rvalue::m_parenthesized_string): New field.
3140 (param::get_precedence): New function.
3141 (global::get_precedence): New function.
3142 (memento_of_new_rvalue_from_const::get_precedence): New function.
3143 (memento_of_new_string_literal::get_precedence): New function.
3144 (unary_op::get_precedence): New function.
3145 (binary_op::get_precedence): New function.
3146 (comparison::get_precedence): New function.
3147 (cast::get_precedence): New function.
3148 (call::get_precedence): New function.
3149 (call_through_ptr::get_precedence): New function.
3150 (array_access::get_precedence): New function.
3151 (access_field_of_lvalue::get_precedence): New function.
3152 (access_field_rvalue::get_precedence): New function.
3153 (dereference_field_rvalue::get_precedence): New function.
3154 (dereference_rvalue::get_precedence): New function.
3155 (get_address_of_lvalue::get_precedence): New function.
3156 (local::get_precedence): New function.
3157
3158 2015-06-09 Matthias Klose <[email protected]>
3159
3160 * Make-lang.in (jit.install-common): Install headers using INSTALL_DATA.
3161
3162 2015-06-08 Andrew MacLeod <[email protected]>
3163
3164 * dummy-frontend.c : Adjust include files.
3165 * jit-common.h : Likewise.
3166 * jit-playback.c : Likewise.
3167
3168 2015-06-05 David Malcolm <[email protected]>
3169
3170 * dummy-frontend.c
3171 (jit_langhook_post_compilation_parsing_cleanups): Remove.
3172 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
3173 * jit-playback.c (gcc::jit::playback::context::new_global): Add
3174 call to varpool_node::finalize_decl.
3175 (gcc::jit::playback::context::finalize_global_decls): Remove.
3176 * jit-playback.h
3177 (gcc::jit::playback::context::finalize_global_decls): Remove.
3178
3179 2015-06-05 David Malcolm <[email protected]>
3180
3181 * dummy-frontend.c (jit_langhook_write_globals): Rename to...
3182 (jit_langhook_post_compilation_parsing_cleanups): ...this, and
3183 eliminate calls to finalize_compilation_unit and
3184 write_global_decls_2.
3185 (LANG_HOOKS_WRITE_GLOBALS): Rename to...
3186 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
3187 redirect from jit_langhook_write_globals to
3188 jit_langhook_post_compilation_parsing_cleanups.
3189 * jit-playback.c
3190 (gcc::jit::playback::context::write_global_decls_1): Rename to...
3191 (gcc::jit::playback::context::finalize_global_decls): ...this.
3192 (gcc::jit::playback::context::write_global_decls_1): Delete.
3193 * jit-playback.h
3194 (gcc::jit::playback::context::write_global_decls_1): Rename to...
3195 (gcc::jit::playback::context::finalize_global_decls): ...this.
3196 (gcc::jit::playback::context::write_global_decls_1): Delete.
3197
3198 2015-06-04 Andrew MacLeod <[email protected]>
3199
3200 * dummy-frontend.c: Adjust includes for restructured coretypes.h.
3201 * jit-common.h: Likewise.
3202 * jit-playback.c: Likewise.
3203
3204 2015-05-12 David Malcolm <[email protected]>
3205
3206 * jit-builtins.c: Include vec.h before target.h.
3207
3208 2015-04-27 Jim Wilson <[email protected]>
3209
3210 * Make-lang.in (jit.mostlyclean): Remove shared libraries and object
3211 files.
3212
3213 2015-04-09 David Malcolm <[email protected]>
3214
3215 PR jit/65691
3216 * docs/cp/topics/expressions.rst (Simple expressions): Fix copy
3217 and paste error in description of gccjit::context::one.
3218 * docs/topics/expressions.rst (Simple expressions): Likewise in
3219 description of gcc_jit_context_one.
3220 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3221
3222 2015-03-13 Uros Bizjak <[email protected]>
3223
3224 * jit-recording.c (dump::write): Also check vasprintf return value.
3225 (recording::context::add_error_va): Ditto.
3226 (recording::string::from_printf): Ditto.
3227
3228 2015-03-13 David Malcolm <[email protected]>
3229
3230 * docs/internals/index.rst (Packaging notes): New section.
3231 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3232
3233 2015-03-05 David Malcolm <[email protected]>
3234
3235 * docs/cp/intro/tutorial03.rst: Add missing arguments to
3236 gccjit::block::end_with_conditional call. Add on_true/on_false
3237 comments. Tweak the wording.
3238 * docs/intro/tutorial03.rst: Add missing arguments to
3239 gcc_jit_block_end_with_conditional call. Add some clarifying
3240 comments.
3241 * docs/topics/compilation.rst: Tweak the wording to avoid an
3242 ambiguous use of "this".
3243 * docs/topics/contexts.rst: Fix a typo.
3244 * docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
3245 a stray backtick.
3246 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3247
3248 2015-02-24 Thomas Schwinge <[email protected]>
3249
3250 PR libgomp/64625
3251 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8)
3252 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
3253 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3254 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8)
3255 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
3256 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3257
3258 2015-02-04 David Malcolm <[email protected]>
3259
3260 PR jit/64257
3261 * docs/conf.py (html_theme): Change from 'pyramid'
3262 to 'sphinxdoc'.
3263
3264 2015-02-04 David Malcolm <[email protected]>
3265
3266 * docs/topics/contexts.rst (gcc_jit_context_acquire): Fix
3267 typo.
3268 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3269
3270 2015-02-03 David Malcolm <[email protected]>
3271
3272 * jit-logging.h (gcc::jit::log_user::log): Make const.
3273 * jit-recording.c (gcc::jit::recording::context::set_str_option):
3274 Log the new value of the option.
3275 (gcc::jit::recording::context::set_int_option): Likewise.
3276 (gcc::jit::recording::context::set_bool_option): Likewise.
3277 (gcc::jit::recording::context::compile): Log the value of all
3278 options.
3279 (gcc::jit::recording::context::compile_to_file): Likewise.
3280 (gcc::jit::recording::context::log_all_options): New function.
3281 (gcc::jit::recording::context::log_str_option): New function.
3282 (gcc::jit::recording::context::log_int_option): New function.
3283 (gcc::jit::recording::context::log_bool_option): New function.
3284 * jit-recording.h (gcc::jit::recording::context::log_all_options):
3285 New function.
3286 (gcc::jit::recording::context::log_str_option): New function.
3287 (gcc::jit::recording::context::log_int_option): New function.
3288 (gcc::jit::recording::context::log_bool_option): New function.
3289 * docs/internals/test-hello-world.exe.log.txt: Update for above
3290 changes.
3291 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3292
3293 2015-02-03 David Malcolm <[email protected]>
3294
3295 PR jit/64810
3296 * Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o.
3297 (LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS.
3298 * jit-playback.c: Include gcc.h.
3299 (gcc::jit::playback::context::compile): Move mutex acquisition
3300 to before the call to make_fake_args.
3301 (append_arg_from_driver): New function.
3302 (gcc::jit::playback::context::make_fake_args): On the first call,
3303 call into driver_get_configure_time_options to get configure-time
3304 default options and cache them. Add them to the args for
3305 toplev::main.
3306 * jit-spec.c: New source file.
3307 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
3308 above changes.
3309 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3310
3311 2015-02-02 David Malcolm <[email protected]>
3312
3313 PR jit/64810
3314 * dummy-frontend.c (jit_langhook_type_for_mode): Support
3315 TYPE_MODE (long_long_integer_type_node).
3316
3317 2015-01-27 David Malcolm <[email protected]>
3318
3319 * docs/internals/test-hello-world.exe.log.txt: Add example version
3320 lines.
3321 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3322 * jit-common.h (gcc::jit::dump::get_file): New accessor.
3323 * jit-logging.c: Include toplev.h.
3324 (gcc::jit::logger::logger): Log the GCC version.
3325 * jit-recording.c: Include toplev.h.
3326 (gcc:jit::recording::context::dump_reproducer_to_file): Log the
3327 GCC version.
3328
3329 2015-01-26 David Malcolm <[email protected]>
3330
3331 * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo.
3332 * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The
3333 error buffer is only valid until the next call to the context.
3334 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3335 * libgccjit.h (gcc_jit_context_get_first_error): Reword the
3336 comment to omit mention of compiling.
3337 (gcc_jit_context_get_last_error): The error buffer is only valid
3338 until the next call to the context.
3339
3340 2015-01-26 David Malcolm <[email protected]>
3341
3342 PR jit/64708
3343 * config-lang.in (compilers): Drop "libgccjit.so".
3344
3345 2015-01-23 David Malcolm <[email protected]>
3346
3347 PR jit/64721
3348 * jit-playback.c (gcc::jit::playback::context::compile): Construct
3349 toplev instances with init_signals=false.
3350
3351 2015-01-19 David Malcolm <[email protected]>
3352
3353 * docs/cp/topics/results.rst: Rename to...
3354 * docs/cp/topics/compilation.rst: ...this, and add section on
3355 ahead-of-time compilation.
3356 * docs/cp/topics/index.rst: Update for renaming of results.rst
3357 to compilation.rst.
3358 * docs/examples/emit-alphabet.bf: New file, a sample "brainf"
3359 script.
3360 * docs/examples/tut05-bf.c: New file, implementing a compiler
3361 for "brainf".
3362 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
3363 changes to logger output.
3364 * docs/intro/index.rst: Add tutorial05.rst
3365 * docs/intro/tutorial05.rst: New file.
3366 * docs/topics/results.rst: Rename to...
3367 * docs/topics/compilation.rst: ...this, and add section on
3368 ahead-of-time compilation.
3369 * docs/topics/index.rst: Update for renaming of results.rst to
3370 compilation.rst.
3371 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3372 * jit-playback.c (gcc::jit::playback::context::compile): Convert
3373 return type from result * to void. Move the code to convert to
3374 dso and dlopen the result to a new pure virtual "postprocess"
3375 method.
3376 (gcc::jit::playback::compile_to_memory::compile_to_memory): New
3377 function.
3378 (gcc::jit::playback::compile_to_memory::postprocess): New
3379 function, based on playback::context::compile.
3380 (gcc::jit::playback::compile_to_file::compile_to_file): New
3381 function.
3382 (gcc::jit::playback::compile_to_file::postprocess): New function.
3383 (gcc::jit::playback::compile_to_file::copy_file): New function.
3384 (gcc::jit::playback::context::convert_to_dso): Move internals
3385 to...
3386 (gcc::jit::playback::context::invoke_driver): New method. Add
3387 "-shared" and "-c" options to driver's argv as needed.
3388 * jit-playback.h: Include "timevar.h".
3389 (gcc::jit::playback::context::compile): Convert return type from
3390 result * to void.
3391 (gcc::jit::playback::context::postprocess): New pure virtual
3392 function, making this an abstract base class.
3393 (gcc::jit::playback::context::get_tempdir): New accessor.
3394 (gcc::jit::playback::context::invoke_driver): New function.
3395 (class gcc::jit::playback::compile_to_memory): New subclass of
3396 playback::context.
3397 (class gcc::jit::playback::compile_to_file): Likewise.
3398 * jit-recording.c (gcc::jit::recording::context::compile): Use a
3399 playback::compile_to_memory, and extract its result.
3400 (gcc::jit::recording::context::compile_to_file): New function.
3401 * jit-recording.h (gcc::jit::recording::context::compile_to_file):
3402 New function.
3403 * libgccjit++.h (gccjit::context::compile_to_file): New method.
3404 * libgccjit.c (gcc_jit_context_compile): Update log message to
3405 clarify that this is an in-memory compile.
3406 (gcc_jit_context_compile_to_file): New function.
3407 * libgccjit.h (gcc_jit_context): Clarify that you can compile
3408 a context more than once, and that you can compile to a file
3409 as well as to memory.
3410 (gcc_jit_result): Clarify that this is the result of an
3411 in-memory compilation.
3412 (gcc_jit_context_compile): Clarify that you can compile, and that
3413 this is an in-memory compilation.
3414 (enum gcc_jit_output_kind): New enum.
3415 (gcc_jit_context_compile_to_file): New function.
3416 (gcc_jit_context_enable_dump): Clarify comment to cover both forms
3417 of compilation.
3418 * libgccjit.map (gcc_jit_context_compile_to_file): New API
3419 entrypoint.
3420 * notes.txt: Update to show the playback::context::postprocess
3421 virtual function.
3422
3423 2015-01-19 David Malcolm <[email protected]>
3424
3425 * jit-recording.c
3426 (gcc::jit::recording::memento_of_new_string_literal::make_debug_string):
3427 Add missing format string.
3428
3429 2015-01-16 David Malcolm <[email protected]>
3430
3431 * Make-lang.in (lang_checks_parallelized): Add "check-jit".
3432 (check_jit_parallelize): Set this to an arbitrary value (10).
3433
3434 2015-01-16 Jakub Jelinek <[email protected]>
3435
3436 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of
3437 last argument.
3438 (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and
3439 undef afterwards.
3440 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
3441 Likewise.
3442
3443 2015-01-15 Richard Sandiford <[email protected]>
3444
3445 Update copyright years in docs/.
3446
3447 2015-01-15 David Malcolm <[email protected]>
3448
3449 * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the
3450 lvalue and the rvalue are of compatible type.
3451
3452 2015-01-13 David Malcolm <[email protected]>
3453
3454 * docs/cp/topics/contexts.rst (Debugging): Add
3455 gccjit::context::dump_reproducer_to_file.
3456 * docs/internals/index.rst (Design notes): New section,
3457 discussing input validation and
3458 gcc_jit_context_dump_reproducer_to_file.
3459 * docs/topics/contexts.rst (Debugging): Add
3460 gcc_jit_context_dump_reproducer_to_file.
3461 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3462 * jit-common.h (gcc::jit::dump::get_context): New accessor.
3463 * jit-recording.c: Include "hash-map.h".
3464 Within namespace ::gcc::jit...
3465 (dump::write): Flush each line.
3466 (dump::make_location): Pass false for new param "created_by_user".
3467 (class allocator): New class.
3468 (allocator::~allocator): New function.
3469 (allocator::xstrdup_printf): New function.
3470 (allocator::xstrdup_printf_va): New function.
3471 (class reproducer): New subclass of dump.
3472 (reproducer::reproducer): New function.
3473 (reproducer::write_params): New function.
3474 (reproducer::write_args): New function.
3475 (reproducer::make_identifier): New function.
3476 (reproducer::make_tmp_identifier): New function.
3477 (reproducer::get_identifier): New pair of functions.
3478 (reproducer::get_identifier_as_rvalue): New function.
3479 (reproducer::get_identifier_as_lvalue): New function.
3480 (reproducer::get_identifier_as_type): New function.
3481 (reproducer::xstrdup_printf): New function.
3482 (recording::context::context): Initialize m_toplevel_ctxt.
3483 (recording::context::new_location): Add param created_by_user.
3484 (str_option_reproducer_strings): New table of strings.
3485 (int_option_reproducer_strings): Likewise.
3486 (bool_option_reproducer_strings): Likewise.
3487 (get_type_enum_strings): Likewise.
3488 (names_of_function_kinds): Likewise.
3489 (global_kind_reproducer_strings): Likewise.
3490 (unary_op_reproducer_strings): Likewise.
3491 (binary_op_reproducer_strings): Likewise.
3492 (comparison_reproducer_strings): Likewise.
3493 Within namespace ::gcc::jit::recording::...
3494 (context::dump_reproducer_to_file): New function.
3495 (string::write_reproducer): Likewise.
3496 (location::write_reproducer): Likewise.
3497 (type::access_as_type): Likewise.
3498 (memento_of_get_type::write_reproducer): Likewise.
3499 (memento_of_get_pointer::write_reproducer): Likewise.
3500 (memento_of_get_const::write_reproducer): Likewise.
3501 (memento_of_get_volatile::write_reproducer): Likewise.
3502 (array_type::write_reproducer): Likewise.
3503 (function_type::write_reproducer): Likewise.
3504 (function_type::write_deferred_reproducer): Likewise.
3505 (field::write_reproducer): Likewise.
3506 (struct_::access_as_type): Likewise.
3507 (struct_::write_reproducer): Likewise.
3508 (union_::write_reproducer): Likewise.
3509 (fields::write_reproducer): Likewise.
3510 (rvalue::access_as_rvalue): Likewise.
3511 (lvalue::access_as_rvalue): Likewise.
3512 (lvalue::access_as_lvalue): Likewise.
3513 (param::access_as_rvalue): Likewise.
3514 (param::access_as_lvalue): Likewise.
3515 (param::write_reproducer): Likewise.
3516 (function::write_reproducer): Likewise.
3517 (block::write_reproducer): Likewise.
3518 (global::write_reproducer): Likewise.
3519 (memento_of_new_rvalue_from_const <int>::write_reproducer):
3520 Likewise.
3521 (memento_of_new_rvalue_from_const <long>::write_reproducer):
3522 Likewise.
3523 (memento_of_new_rvalue_from_const <double>::write_reproducer):
3524 Likewise.
3525 (memento_of_new_rvalue_from_const <void *>::write_reproducer):
3526 Likewise.
3527 (memento_of_new_string_literal::write_reproducer): Likewise.
3528 (unary_op::write_reproducer): Likewise.
3529 (binary_op::write_reproducer): Likewise.
3530 (comparison::write_reproducer): Likewise.
3531 (cast::write_reproducer): Likewise.
3532 (call::write_reproducer): Likewise.
3533 (call_through_ptr::write_reproducer): Likewise.
3534 (array_access::write_reproducer): Likewise.
3535 (access_field_of_lvalue::write_reproducer): Likewise.
3536 (access_field_rvalue::write_reproducer): Likewise.
3537 (dereference_field_rvalue::write_reproducer): Likewise.
3538 (dereference_rvalue::write_reproducer): Likewise.
3539 (get_address_of_lvalue::write_reproducer): Likewise.
3540 (local::write_reproducer): Likewise.
3541 (eval::write_reproducer): Likewise.
3542 (assignment::write_reproducer): Likewise.
3543 (assignment_op::write_reproducer): Likewise.
3544 (comment::write_reproducer): Likewise.
3545 (conditional::write_reproducer): Likewise.
3546 (jump::write_reproducer): Likewise.
3547 (return_::write_reproducer): Likewise.
3548 * jit-recording.h (gcc::jit::reproducer): New forward declararion.
3549 Within namespace ::gcc::jit::recording::...
3550 (context::new_location): Add "created_by_user" param.
3551 (context::dump_reproducer_to_file): New method.
3552 (context::m_toplevel_ctxt): New field.
3553 (memento::write_reproducer): New pure virtual function.
3554 (memento::dyn_cast_location): New virtual function.
3555 (string::write_reproducer):
3556 (location::location): Add "created_by_user" param.
3557 (location::dyn_cast_location): New function.
3558 (location::created_by_user): New accessor.
3559 (location::write_reproducer): New function.
3560 (location::m_created_by_user): New field.
3561 (type::access_as_type): New virtual function.
3562 (location::write_reproducer): Likewise.
3563 (type::access_as_type): Likewise.
3564 (memento_of_get_type::write_reproducer): Likewise.
3565 (memento_of_get_pointer::write_reproducer): Likewise.
3566 (memento_of_get_const::write_reproducer): Likewise.
3567 (memento_of_get_volatile::write_reproducer): Likewise.
3568 (array_type::write_reproducer): Likewise.
3569 (function_type::write_reproducer): Likewise.
3570 (function_type::write_deferred_reproducer): Likewise.
3571 (field::write_reproducer): Likewise.
3572 (struct_::access_as_type): Likewise.
3573 (struct_::write_reproducer): Likewise.
3574 (union_::write_reproducer): Likewise.
3575 (union_::m_fields): Remove stray unused field.
3576 (fields::length): New accessor.
3577 (fields::get_field): New accessor.
3578 (fields::write_reproducer): New function.
3579 (rvalue::access_as_rvalue): Likewise.
3580 (lvalue::access_as_rvalue): Likewise.
3581 (lvalue::access_as_lvalue): Likewise.
3582 (param::access_as_rvalue): Likewise.
3583 (param::access_as_lvalue): Likewise.
3584 (param::write_reproducer): Likewise.
3585 (function::write_reproducer): Likewise.
3586 (block::write_reproducer): Likewise.
3587 (global::write_reproducer): Likewise.
3588 (memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer):
3589 Likewise.
3590 (memento_of_new_string_literal::write_reproducer): Likewise.
3591 (unary_op::write_reproducer): Likewise.
3592 (binary_op::write_reproducer): Likewise.
3593 (comparison::write_reproducer): Likewise.
3594 (cast::write_reproducer): Likewise.
3595 (call::write_reproducer): Likewise.
3596 (call_through_ptr::write_reproducer): Likewise.
3597 (array_access::write_reproducer): Likewise.
3598 (access_field_of_lvalue::write_reproducer): Likewise.
3599 (access_field_rvalue::write_reproducer): Likewise.
3600 (dereference_field_rvalue::write_reproducer): Likewise.
3601 (dereference_rvalue::write_reproducer): Likewise.
3602 (get_address_of_lvalue::write_reproducer): Likewise.
3603 (local::write_reproducer): Likewise.
3604 (eval::write_reproducer): Likewise.
3605 (assignment::write_reproducer): Likewise.
3606 (assignment_op::write_reproducer): Likewise.
3607 (comment::write_reproducer): Likewise.
3608 (conditional::write_reproducer): Likewise.
3609 (jump::write_reproducer): Likewise.
3610 (return_::write_reproducer): Likewise.
3611 * libgccjit++.h (gccjit::context::dump_reproducer_to_file): New.
3612 * libgccjit.c (gcc_jit_context_new_location): Pass "true" as
3613 param "created_by_user".
3614 (gcc_jit_context_dump_reproducer_to_file): New API entrypoint.
3615 * libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API
3616 entrypoint.
3617 * libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API
3618 entrypoint.
3619
3620 2015-01-12 David Malcolm <[email protected]>
3621
3622 * jit-recording.c (class gcc::jit::rvalue_usage_validator): New.
3623 (gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New
3624 ctor.
3625 (gcc::jit::rvalue_usage_validator::visit): New function.
3626 (gcc::jit::recording::rvalue::verify_valid_within_stmt): New
3627 function.
3628 (gcc::jit::recording::rvalue::set_scope): New function.
3629 (gcc::jit::recording::function::function): Call set_scope on each
3630 param, issuing errors for any params that already have a function.
3631 (gcc::jit::recording::block::add_eval): Return the new statement;
3632 update the comment given that some error-checking now happens after
3633 this returns.
3634 (gcc::jit::recording::block::add_assignment): Likewise.
3635 (gcc::jit::recording::block::add_assignment_op): Likewise.
3636 (gcc::jit::recording::block::add_comment): Likewise.
3637 (gcc::jit::recording::block::end_with_conditional): Likewise.
3638 (gcc::jit::recording::block::end_with_jump): Likewise.
3639 (gcc::jit::recording::block::end_with_return): Likewise.
3640 (gcc::jit::recording::block::validate): Add a comment.
3641 (gcc::jit::recording::unary_op::visit_children): New function.
3642 (gcc::jit::recording::binary_op::visit_children): New function.
3643 (gcc::jit::recording::comparison::visit_children): New function.
3644 (gcc::jit::recording::cast::visit_children): New function.
3645 (gcc::jit::recording::call::visit_children): New function.
3646 (gcc::jit::recording::call_through_ptr::visit_children): New function.
3647 (gcc::jit::recording::array_access::visit_children): New function.
3648 (gcc::jit::recording::access_field_of_lvalue::visit_children): New
3649 function.
3650 (gcc::jit::recording::access_field_rvalue::visit_children): New
3651 function.
3652 (gcc::jit::recording::dereference_field_rvalue::visit_children):
3653 New function.
3654 (gcc::jit::recording::dereference_rvalue::visit_children): New
3655 function.
3656 (gcc::jit::recording::get_address_of_lvalue::visit_children): New
3657 function.
3658 * jit-recording.h: Within namespace gcc::jit::recording...
3659 (class rvalue_visitor): New.
3660 (rvalue::rvalue): Initialize m_scope.
3661 (rvalue::get_loc): New accessor.
3662 (rvalue::verify_valid_within_stmt): New function.
3663 (rvalue::visit_children): New pure virtual function.
3664 (rvalue::set_scope): New function.
3665 (rvalue::get_scope): New function.
3666 (rvalue::dyn_cast_param): New function.
3667 (rvalue::m_scope): New field.
3668 (param::visit_children): New empty function.
3669 (param::dyn_cast_param): New function.
3670 (function::get_loc): New function.
3671 (block::add_eval): Return the new statement.
3672 (block::add_assignment): Likewise.
3673 (block::add_assignment_op): Likewise.
3674 (block::add_comment): Likewise.
3675 (block::end_with_conditional): Likewise.
3676 (block::end_with_jump): Likewise.
3677 (block::end_with_return): Likewise.
3678 (global::visit_children): New function.
3679 (memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children):
3680 New function.
3681 (memento_of_new_string_literal::visit_children): New function.
3682 (unary_op::visit_children): New function.
3683 (binary_op::visit_children): New function.
3684 (comparison::visit_children): New function.
3685 (cast::visit_children): New function.
3686 (call::visit_children): New function.
3687 (call_through_ptr::visit_children): New function.
3688 (array_access::visit_children): New function.
3689 (access_field_of_lvalue::visit_children): New function.
3690 (access_field_rvalue::visit_children): New function.
3691 (dereference_field_rvalue::visit_children): New function.
3692 (dereference_rvalue::visit_children): New function.
3693 (get_address_of_lvalue::visit_children): New function.
3694 (local::local): Call set_scope.
3695 (local::visit_children): New function.
3696 (statement::get_block): Make public.
3697 * libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro.
3698 (RETURN_NULL_IF_FAIL_PRINTF5): New macro.
3699 (gcc_jit_context_new_function): Verify that each param has
3700 not yet been used for creating another function.
3701 (gcc_jit_block_add_eval): After creating the stmt, verify
3702 that the rvalue expression tree is valid to use within it.
3703 (gcc_jit_block_add_assignment): Likewise for the lvalue and
3704 rvalue expression trees.
3705 (gcc_jit_block_add_assignment_op): Likewise.
3706 (gcc_jit_block_end_with_conditional): Likewise for the boolval
3707 expression tree.
3708 (gcc_jit_block_end_with_return): Likewise for the rvalue
3709 expression tree.
3710 (gcc_jit_block_end_with_void_return): Remove return of "void",
3711 now that block::end_with_return is now non-void.
3712
3713 2015-01-12 David Malcolm <[email protected]>
3714
3715 * jit-playback.c (gcc::jit::playback::context::read_dump_file):
3716 Add missing fclose on error-handling path.
3717
3718 2015-01-12 David Malcolm <[email protected]>
3719
3720 * docs/cp/topics/expressions.rst (Global variables): Add
3721 enum gcc_jit_global_kind param to gccjit::context::new_global.
3722 * docs/topics/expressions.rst (Global variables): Likewise.
3723 Document the new enum.
3724 * docs/topics/results.rst (Compilation results): Document
3725 globals-handling.
3726 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3727 * dummy-frontend.c (jit_langhook_write_globals): Call into the
3728 playback context's write_global_decls_1 and write_global_decls_2
3729 before and after calling symtab->finalize_compilation_unit ().
3730 * jit-playback.c: Include "debug.h".
3731 (gcc::jit::playback::context::new_global): Add "kind" param and
3732 use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the
3733 underlying VAR_DECL. Call varpool_node::get_create on the
3734 VAR_DECL, and add it to m_globals.
3735 (gcc::jit::playback::context::write_global_decls_1): New function.
3736 (gcc::jit::playback::context::write_global_decls_2): New function.
3737 * jit-playback.h (gcc::jit::playback::context::context): Call
3738 create on m_globals.
3739 (gcc::jit::playback::context::new_global): Add "kind" param.
3740 (gcc::jit::playback::context::write_global_decls_1): New function.
3741 (gcc::jit::playback::context::write_global_decls_2): New function.
3742 (gcc::jit::playback::context::m_globals): New field.
3743 * jit-recording.c (gcc::jit::recording::context::context):
3744 Initialize m_globals.
3745 (gcc::jit::recording::context::new_global): Add param "kind".
3746 Add the new global to m_globals.
3747 (gcc::jit::recording::context::dump_to_file): Dump the globals.
3748 (gcc::jit::recording::global::replay_into): Add field m_kind.
3749 (gcc::jit::recording::global::write_to_dump): New override.
3750 * jit-recording.h (gcc::jit::recording::context::new_global): Add
3751 param "kind".
3752 (gcc::jit::recording::context::m_globals): New field.
3753 (gcc::jit::recording::global::global): Add param kind.
3754 (gcc::jit::recording::global::write_to_dump): New override.
3755 (gcc::jit::recording::global::m_kind): New field.
3756 * jit-result.c (gcc::jit::result::get_global): New function.
3757 * jit-result.h (gcc::jit::result::get_global): New function.
3758 * libgccjit++.h (gccjit::context::new_global): Add "kind" param.
3759 * libgccjit.c (gcc_jit_context_new_global): Likewise.
3760 (gcc_jit_result_get_global): New API entrypoint.
3761 * libgccjit.h (gcc_jit_result_get_global): New API entrypoint.
3762 (enum gcc_jit_global_kind): New enum.
3763 (gcc_jit_context_new_global): API change: add "kind" param.
3764 * libgccjit.map (gcc_jit_result_get_global): New symbol.
3765
3766 2015-01-09 David Malcolm <[email protected]>
3767
3768 * dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h",
3769 "symtab.h", "inchash.h". Move include of "hash-set.h" much
3770 earlier.
3771 * jit-builtins.c: Remove redundant includes of "opts.h" and
3772 "tree.h".
3773 * jit-common.h: Include "hash-set.h", "input.h", "vec.h",
3774 "double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h".
3775 * jit-playback.c: Include "hashtab.h", "machmode.h", "input.h",
3776 "statistics.h", "vec.h", "double-int.h", "real.h",
3777 "fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h",
3778 "inchash.h", "fold-const.h". Move include of "hash-set.h" to
3779 earlier.
3780 * jit-recording.c: Remove redundant includes of "opts.h" and
3781 "tree.h".
3782
3783 2015-01-09 David Malcolm <[email protected]>
3784
3785 * docs/cp/topics/expressions.rst (Simple expressions): Use
3786 ":c:type:" for C types. Document new overload of
3787 gcc::jit::context::new_rvalue.
3788 * docs/topics/expressions.rst (Simple expressions): Use
3789 ":c:type:" for C types. Document new entrypoint
3790 gcc_jit_context_new_rvalue_from_long.
3791 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3792 * jit-playback.c: Within namespace gcc::jit::playback...
3793 (context::new_rvalue_from_int): Eliminate in favor of...
3794 (context::new_rvalue_from_const <int>): ...this.
3795 (context::new_rvalue_from_double): Eliminate in favor of...
3796 (context::new_rvalue_from_const <double>): ...this.
3797 (context::new_rvalue_from_const <long>): New.
3798 (context::new_rvalue_from_ptr): Eliminate in favor of...
3799 (context::new_rvalue_from_const <void *>): ...this.
3800 * jit-playback.h: Within namespace gcc::jit::playback...
3801 (context::new_rvalue_from_int): Eliminate in favor of...
3802 (context::new_rvalue_from_const <HOST_TYPE>): ...this.
3803 (context::new_rvalue_from_double): Likewise.
3804 (context::new_rvalue_from_ptr): Likewise.
3805 * jit-recording.c: Within namespace gcc::jit::recording...
3806 (context::new_rvalue_from_int): Eliminate.
3807 (context::new_rvalue_from_double): Likewise.
3808 (context::new_rvalue_from_ptr): Likewise.
3809 (class memento_of_new_rvalue_from_const <int>):
3810 Add explicit specialization.
3811 (class memento_of_new_rvalue_from_const <long>):
3812 Likewise.
3813 (class memento_of_new_rvalue_from_const <double>):
3814 Likewise.
3815 (class memento_of_new_rvalue_from_const <void *>):
3816 Likewise.
3817 (memento_of_new_rvalue_from_int::replay_into):
3818 Generalize into...
3819 (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into):
3820 ...this...
3821 (memento_of_new_rvalue_from_double::replay_into):
3822 ...allowing this...
3823 (memento_of_new_rvalue_from_ptr::replay_into):
3824 ...and this to be deleted.
3825 (memento_of_new_rvalue_from_int::make_debug_string):
3826 Convert to...
3827 (memento_of_new_rvalue_from_const <int>::make_debug_string):
3828 ...this.
3829 (memento_of_new_rvalue_from_double::make_debug_string):
3830 Convert to...
3831 (memento_of_new_rvalue_from_const <double>::make_debug_string):
3832 ...this.
3833 (memento_of_new_rvalue_from_ptr::make_debug_string)
3834 Convert to...
3835 (memento_of_new_rvalue_from_const <void *>::make_debug_string):
3836 ...this.
3837 (memento_of_new_rvalue_from_const <long>::make_debug_string):
3838 New function.
3839 * jit-recording.h: Within namespace gcc::jit::recording...
3840 (context::new_rvalue_from_int): Eliminate.
3841 (context::new_rvalue_from_double): Likewise.
3842 (context::new_rvalue_from_ptr): Likewise, all in favor of...
3843 (context::new_rvalue_from_const <HOST_TYPE>): New family of
3844 methods.
3845 (class memento_of_new_rvalue_from_int): Eliminate.
3846 (class memento_of_new_rvalue_from_double): Likewise.
3847 (class memento_of_new_rvalue_from_ptr): Likewise.
3848 (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family
3849 of rvalue subclasses.
3850 * libgccjit++.h (gccjit::context::new_rvalue): New overload, for
3851 "long".
3852 * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for
3853 rewriting of recording::context::new_rvalue_from_int to
3854 recording::context::new_rvalue_from_const <int>.
3855 (gcc_jit_context_new_rvalue_from_long): New API entrypoint.
3856 (gcc_jit_context_new_rvalue_from_double): Update for
3857 rewriting of recording::context::new_rvalue_from_double to
3858 recording::context::new_rvalue_from_const <double>.
3859 (gcc_jit_context_new_rvalue_from_ptr): Update for
3860 rewriting of recording::context::new_rvalue_from_ptr to
3861 recording::context::new_rvalue_from_const <void *>.
3862 * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API
3863 entrypoint.
3864 * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise.
3865
3866 2015-01-09 David Malcolm <[email protected]>
3867
3868 PR jit/64206
3869 * docs/internals/test-hello-world.exe.log.txt: Update, the log now
3870 shows tempdir creation/cleanup.
3871 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3872 * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir
3873 to the list of subclasses in the comment.
3874 * jit-playback.c (gcc::jit::playback::context::context): Add a
3875 comment clarifying when the tempdir gets cleaned up.
3876 (gcc::jit::playback::context::compile): Pass the context's logger,
3877 if any, to the tempdir.
3878 (gcc::jit::playback::context::dlopen_built_dso): When creating the
3879 gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand
3880 over ownership of the tempdir to it.
3881 * jit-result.c: Include "jit-tempdir.h".
3882 (gcc::jit::result::result): Add tempdir param, saving it as
3883 m_tempdir.
3884 (gcc::jit::result::~result): Delete m_tempdir.
3885 * jit-result.h (gcc::jit::result::result): Add tempdir param.
3886 (gcc::jit::result::m_tempdir): New field.
3887 * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param;
3888 add JIT_LOG_SCOPE.
3889 (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit,
3890 and log m_path_template and m_path_tempdir.
3891 (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log
3892 entry/exit, and log the unlink and rmdir calls.
3893 * jit-tempdir.h: Include "jit-logging.h".
3894 (class gcc::jit::tempdir): Make this be a subclass of log_user.
3895 (gcc::jit::tempdir::tempdir): Add logger param.
3896 * notes.txt: Update to show the two possible places where the
3897 tempdir can be cleaned up.
3898
3899 2015-01-08 David Malcolm <[email protected]>
3900
3901 * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive
3902 comment.
3903
3904 2015-01-08 David Malcolm <[email protected]>
3905
3906 * docs/topics/contexts.rst (Error-handling): Document new
3907 entrypoint gcc_jit_context_get_last_error.
3908 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3909 * jit-recording.c (gcc::jit::recording::context::context):
3910 Initialize new fields "m_last_error_str" and
3911 "m_owns_last_error_str".
3912 (gcc::jit::recording::context::~context): Clean up
3913 m_last_error_str, if needed.
3914 (gcc::jit::recording::context::add_error_va): Update
3915 m_last_error_str and m_owns_last_error_str, freeing the old
3916 value if appropriate.
3917 (gcc::jit::recording::context::get_last_error): New function.
3918 * jit-recording.h (gcc::jit::recording::context::get_last_error):
3919 New function.
3920 (gcc::jit::recording::context): New fields m_last_error_str and
3921 m_owns_last_error_str.
3922 * libgccjit.c (gcc_jit_context_get_last_error): New function.
3923 * libgccjit.h (gcc_jit_context_get_last_error): New declaration.
3924 * libgccjit.map (gcc_jit_context_get_last_error): New function.
3925
3926 2015-01-08 David Malcolm <[email protected]>
3927
3928 * Make-lang.in (jit_OBJS): Add jit/jit-logging.o.
3929 * docs/internals/index.rst (Overview of code structure): Mention
3930 gcc_jit_context_set_logfile, and embed the example logfile.
3931 * docs/internals/test-hello-world.exe.log.txt: New file: example
3932 of a logfile.
3933 * docs/topics/contexts.rst (Debugging): Add documentation
3934 for gcc_jit_context_set_logfile.
3935 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3936 * dummy-frontend.c: Include "jit-logging.h".
3937 (jit_langhook_init): Assert that there is an active playback
3938 context. If it has a logger, log entry/exit to this function.
3939 (jit_langhook_write_globals): Likewise.
3940 * jit-common.h (gcc::jit::logger): New forward declaration.
3941 * jit-logging.c: New file.
3942 * jit-logging.h: New file.
3943 * jit-playback.c: Include "jit-logging.h".
3944 (gcc::jit::playback::context::context): Initialize the log_user
3945 base class from the recording context's logger (if any). Use
3946 JIT_LOG_SCOPE to log entry/exit from the function body.
3947 (gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to
3948 log entry/exit from the function body.
3949 (gcc::jit::playback::build_stmt_list): Likewise.
3950 (gcc::jit::playback::function::postprocess): Likewise.
3951 (gcc::jit::playback::context::compile): Likewise. Log the
3952 entry/exit to toplev::main and toplev::finalize. Log the
3953 fake argv passed to toplev::main.
3954 (gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to
3955 log entry/exit from the function body.
3956 (gcc::jit::playback::context::release_mutex): Likewise.
3957 (gcc::jit::playback::context::make_fake_args): Likewise.
3958 (gcc::jit::playback::context::extract_any_requested_dumps):
3959 Likewise.
3960 (gcc::jit::playback::context::convert_to_dso): Likewise. Also,
3961 log the arguments that the driver is invoked with.
3962 (gcc::jit::playback::context::dlopen_built_dso): Likewise. Pass
3963 the logger to the result object.
3964 (gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to
3965 log entry/exit from the function body.
3966 (gcc::jit::playback::context::dump_generated_code): Likewise.
3967 (gcc::jit::playback::context::handle_locations): Likewise.
3968 * jit-playback.h (gcc::jit::playback::context): Make this be
3969 a subclass of gcc::jit::log_user.
3970 * jit-recording.c: Include "jit-logging.h".
3971 (gcc::jit::recording::context::context: Initialize the logger to
3972 NULL for root contexts, or to the parent's logger for child
3973 contexts.
3974 (gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to
3975 log entry/exit from the function body.
3976 (gcc::jit::recording::context::replay_into): Likewise.
3977 (gcc::jit::recording::context::disassociate_from_playback):
3978 Likewise.
3979 (gcc::jit::recording::context::compile): Likewise.
3980 (recording::context::add_error_va): Likewise. Also, log the
3981 error.
3982 (gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to
3983 log entry/exit from the function body.
3984 * jit-recording.h: Include "jit-logging.h".
3985 (gcc::jit::recording::context): Make this be a subclass of
3986 gcc::jit::log_user.
3987 * jit-result.c: Include "jit-common.h" and "jit-logging.h".
3988 (gcc::jit::result::result): Add logger param, recording it.
3989 Use JIT_LOG_SCOPE to log entry/exit from the function body.
3990 (gcc::jit::result::~result(): Use JIT_LOG_SCOPE to
3991 log entry/exit from the function body.
3992 (gcc::jit::result::get_code): Likewise.
3993 * jit-result.h (gcc::jit::result): Make this be a subclass of
3994 gcc::jit::log_user.
3995 (gcc::jit::result::result): Add logger parameter.
3996 * libgccjit++.h (gccjit::context::set_logfile): New function.
3997 * libgccjit.c: Include "jit-logging.h".
3998 (gcc_jit_context_acquire): Log the context.
3999 (gcc_jit_context_release): Use JIT_LOG_FUNC to
4000 log entry/exit from the function body, and log the context.
4001 (gcc_jit_context_new_child_context): Likewise, logging both
4002 contexts.
4003 (gcc_jit_context_new_location): Use JIT_LOG_FUNC to
4004 log entry/exit from the function body.
4005 (gcc_jit_context_get_type): Likewise.
4006 (gcc_jit_context_get_int_type): Likewise.
4007 (gcc_jit_context_new_array_type): Likewise.
4008 (gcc_jit_context_new_field): Likewise.
4009 (gcc_jit_context_new_struct_type): Likewise.
4010 (gcc_jit_context_new_opaque_struct): Likewise.
4011 (gcc_jit_struct_set_fields): Likewise.
4012 (gcc_jit_context_new_union_type): Likewise.
4013 (gcc_jit_context_new_function_ptr_type): Likewise.
4014 (gcc_jit_context_new_param): Likewise.
4015 (gcc_jit_context_new_function): Likewise.
4016 (gcc_jit_context_get_builtin_function): Likewise.
4017 (gcc_jit_function_get_param): Likewise.
4018 (gcc_jit_function_dump_to_dot): Likewise.
4019 (gcc_jit_function_new_block): Likewise.
4020 (gcc_jit_context_new_global): Likewise.
4021 (gcc_jit_context_new_rvalue_from_int): Likewise.
4022 (gcc_jit_context_zero): Likewise.
4023 (gcc_jit_context_one): Likewise.
4024 (gcc_jit_context_new_rvalue_from_double): Likewise.
4025 (gcc_jit_context_new_rvalue_from_ptr): Likewise.
4026 (gcc_jit_context_null): Likewise.
4027 (gcc_jit_context_new_string_literal): Likewise.
4028 (gcc_jit_context_new_unary_op): Likewise.
4029 (gcc_jit_context_new_binary_op): Likewise.
4030 (gcc_jit_context_new_comparison): Likewise.
4031 (gcc_jit_context_new_call): Likewise.
4032 (gcc_jit_context_new_call_through_ptr): Likewise.
4033 (gcc_jit_context_new_cast): Likewise.
4034 (gcc_jit_context_new_array_access): Likewise.
4035 (gcc_jit_lvalue_access_field): Likewise.
4036 (gcc_jit_rvalue_access_field): Likewise.
4037 (gcc_jit_rvalue_dereference_field): Likewise.
4038 (gcc_jit_rvalue_dereference): Likewise.
4039 (gcc_jit_lvalue_get_address): Likewise.
4040 (gcc_jit_function_new_local): Likewise.
4041 (gcc_jit_block_add_eval): Likewise.
4042 (gcc_jit_block_add_assignment): Likewise.
4043 (gcc_jit_block_add_assignment_op): Likewise.
4044 (gcc_jit_block_end_with_conditional): Likewise.
4045 (gcc_jit_block_add_comment): Likewise.
4046 (gcc_jit_block_end_with_jump): Likewise.
4047 (gcc_jit_block_end_with_return): Likewise.
4048 (gcc_jit_block_end_with_void_return): Likewise.
4049 (gcc_jit_context_set_str_option): Likewise.
4050 (gcc_jit_context_set_int_option): Likewise.
4051 (gcc_jit_context_set_bool_option): Likewise.
4052 (gcc_jit_context_enable_dump): Likewise.
4053 (gcc_jit_context_compile): Likewise. Also log the context,
4054 and the result.
4055 (gcc_jit_context_dump_to_file): Likewise.
4056 (gcc_jit_context_set_logfile): New function.
4057 (gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to
4058 log entry/exit from the function body.
4059 (gcc_jit_result_get_code): Likewise. Also log the fnname)
4060 and the ptr to be returned.
4061 (gcc_jit_result_release): Likewise. Also log the result.
4062 * libgccjit.h: Include <stdio.h>, since we need FILE *.
4063 (gcc_jit_context_set_logfile): New declaration.
4064 * libgccjit.map (gcc_jit_context_set_logfile): New.
4065
4066 2015-01-07 David Malcolm <[email protected]>
4067
4068 * jit-recording.h (gcc::jit::recording::type::is_void): New
4069 virtual function.
4070 (gcc::jit::recording::memento_of_get_type::is_void): New
4071 function, overriding default implementation.
4072 * libgccjit.c (gcc_jit_rvalue_dereference): Verify that
4073 the underlying type is not "void".
4074
4075 2015-01-07 David Malcolm <[email protected]>
4076
4077 * docs/topics/expressions.rst (Unary Operations): Add
4078 GCC_JIT_UNARY_OP_ABS.
4079 * jit-playback.c (gcc::jit::playback::context::new_unary_op):
4080 Likewise.
4081 * jit-recording.c (unary_op_strings): Likewise.
4082 * libgccjit.c (gcc_jit_context_new_unary_op): Update checking
4083 of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS.
4084 * libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS.
4085 * docs/_build/texinfo/libgccjit.texi: Regenerate.
4086
4087 2015-01-07 David Malcolm <[email protected]>
4088
4089 * jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix
4090 typo in comment.
4091
4092 2015-01-07 David Malcolm <[email protected]>
4093
4094 * TODO.rst (Test suite): Remove item about running C++ testcases.
4095 * docs/internals/index.rst (Working on the JIT library): Add
4096 "c++" to the enabled languages in the suggested "configure"
4097 invocation, and add a description of why this is necessary.
4098 * docs/_build/texinfo/libgccjit.texi: Regenerate.
4099
4100 2015-01-07 David Malcolm <[email protected]>
4101
4102 * docs/internals/index.rst: Update to reflect that built
4103 testcases are now test-foo.c.exe, rather than test-foo.exe.
4104 * docs/_build/texinfo/libgccjit.texi: Regenerate.
4105
4106 2015-01-05 Jakub Jelinek <[email protected]>
4107
4108 Update copyright years.
4109
4110 2014-12-19 David Malcolm <[email protected]>
4111
4112 * jit-playback.c (gcc::jit::playback::context::build_cast): In
4113 case BOOLEAN_TYPE, don't assume that the source expression is
4114 of type "int".
4115
4116 2014-12-19 David Malcolm <[email protected]>
4117
4118 * jit-recording.c (gcc::jit::recording::context::context): When
4119 copying string options from a parent context, take a copy of the
4120 underlying buffers, rather than simply copying the pointer.
4121
4122 2014-12-19 David Malcolm <[email protected]>
4123
4124 * jit-recording.c (gcc::jit::recording::context::set_str_option):
4125 Handle NULL.
4126
4127 2014-12-11 David Malcolm <[email protected]>
4128
4129 * docs/cp/topics/contexts.rst (gccjit::context::set_str_option):
4130 Document new function.
4131 * docs/_build/texinfo/libgccjit.texi: Regenerate.
4132
4133 2014-12-10 Ulrich Drepper <[email protected]>
4134
4135 Minor interface cleanups of libgccjit
4136 * jit-playback.c (convert_to_dso): Use auto_vec instead
4137 of automatic array to build up command line.
4138 * jit-recording.c (recording::context::set_str_option):
4139 Make copy of the string.
4140 (recording::context::~context): Free string options.
4141 * jit-recording.h (recording::context): Adjust type
4142 of m_str_options member.
4143 * libgccjit.h: Adjust comment about
4144 gcc_jit_context_set_str_option parameter being used after
4145 the call.
4146 Update comment now that all interfaces are copy strings
4147 if necessary.
4148 * libgccjit++.h (gccjit::context): Add set_str_option
4149 member function.
4150
4151 2014-12-10 David Malcolm <[email protected]>
4152
4153 * docs/cp/index.rst: New file.
4154 * docs/cp/intro/index.rst: New file.
4155 * docs/cp/intro/tutorial01.rst: New file.
4156 * docs/cp/intro/tutorial02.rst: New file.
4157 * docs/cp/intro/tutorial03.rst: New file.
4158 * docs/cp/intro/tutorial04.rst: New file.
4159 * docs/cp/topics/contexts.rst: New file.
4160 * docs/cp/topics/expressions.rst: New file.
4161 * docs/cp/topics/functions.rst: New file.
4162 * docs/cp/topics/index.rst: New file.
4163 * docs/cp/topics/locations.rst: New file.
4164 * docs/cp/topics/objects.rst: New file.
4165 * docs/cp/topics/results.rst: New file.
4166 * docs/cp/topics/types.rst: New file.
4167 * docs/examples/tut01-hello-world.cc: New file.
4168 * docs/examples/tut02-square.c: Fix missing newline in output.
4169 * docs/examples/tut02-square.cc: New file.
4170 * docs/examples/tut03-sum-of-squares.cc: New file.
4171 * docs/examples/tut04-toyvm/toyvm.cc: New file.
4172 * docs/index.rst: Move summary to above the table of contents.
4173 Add text about the C vs C++ APIs.
4174 * docs/topics/contexts.rst: Fix a typo.
4175
4176 * docs/_build/texinfo/libgccjit.texi: Regenerate.
4177 * docs/_build/texinfo/factorial1.png: New file.
4178 * docs/_build/texinfo/sum-of-squares1.png: New file.
4179
4180 2014-12-09 David Malcolm <[email protected]>
4181
4182 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move
4183 logic for determine "funcname" to new function...
4184 (get_function_name): ...here, adding logic to skip any leading
4185 path from the filename.
4186 (toyvm_function_parse): Use the filename for fn_filename, rather
4187 than "name", so that the debugger can locate the source .toy
4188 file.
4189 (toyvm_function_parse): Don't fclose a NULL FILE *.
4190
4191 2014-12-09 David Malcolm <[email protected]>
4192
4193 PR jit/63854
4194 * docs/internals/index.rst (Running under valgrind): New
4195 subsection.
4196 (docs/_build/texinfo/libgccjit.texi): Regenerate.
4197
4198 2014-12-09 David Malcolm <[email protected]>
4199
4200 PR jit/64206
4201 * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o.
4202 * jit-common.h (gcc::jit::tempdir): New forward decl.
4203 * jit-playback.c: Include jit-tempdir.h.
4204 (gcc::jit::playback::context::context): Initialize m_tempdir.
4205 (gcc::jit::playback::context::~context): Move tempdir
4206 cleanup to new file jit-tempdir.c
4207 (make_tempdir_path_template): Move to new file jit-tempdir.c.
4208 (gcc::jit::playback::context::compile): Move tempdir creation
4209 to new tempdir object in new file jit-tempdir.c.
4210 (gcc::jit::playback::context::make_fake_args): Get path from
4211 tempdir object rather than from member data.
4212 (gcc::jit::playback::context::convert_to_dso): Likewise.
4213 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
4214 (gcc::jit::playback::context::dump_generated_code): Likewise.
4215 (gcc::jit::playback::context::get_path_c_file): New function.
4216 (gcc::jit::playback::context::get_path_s_file): New function.
4217 (gcc::jit::playback::context::get_path_so_file): New function.
4218 * jit-playback.h (gcc::jit::playback::context::get_path_c_file):
4219 New function.
4220 (gcc::jit::playback::context::get_path_s_file): New function.
4221 (gcc::jit::playback::context::get_path_so_file): New function.
4222 (gcc::jit::playback::context): Move fields "m_path_template",
4223 "m_path_tempdir", "m_path_c_file", "m_path_s_file",
4224 "m_path_so_file" to new jit::tempdir class; add field "m_tempdir".
4225 * jit-tempdir.c: New file.
4226 * jit-tempdir.h: New file.
4227
4228 2014-12-09 David Malcolm <[email protected]>
4229
4230 * jit-playback.c (gcc::jit::playback::context::compile): Acquire the
4231 mutex here, immediately before using toplev, and release it here, on
4232 each exit path after acquisition.
4233 (jit_mutex): Move this variable here, from jit-recording.c.
4234 (gcc::jit::playback::context::acquire_mutex): New function, based on
4235 code in jit-recording.c.
4236 (gcc::jit::playback::context::release_mutex): Likewise.
4237 * jit-playback.h (gcc::jit::playback::context::acquire_mutex): New
4238 function.
4239 (gcc::jit::playback::context::release_mutex): New function.
4240 * jit-recording.c (jit_mutex): Move this variable to jit-playback.c.
4241 (gcc::jit::recording::context::compile): Move mutex-handling from
4242 here into jit-playback.c's gcc::jit::playback::context::compile.
4243 * notes.txt: Update to show the new locations of ACQUIRE_MUTEX
4244 and RELEASE_MUTEX.
4245
4246 2014-12-09 David Malcolm <[email protected]>
4247
4248 * jit-playback.c (gcc::jit::playback::context::compile): Move the
4249 dlopen code into...
4250 (gcc::jit::playback::context::dlopen_built_dso): ...this new
4251 function.
4252 * jit-playback.h (gcc::jit::playback::context::dlopen_built_dso):
4253 New function.
4254
4255 2014-12-09 David Malcolm <[email protected]>
4256
4257 PR jit/64166
4258 * docs/topics/contexts.rst (Debugging): Add description of
4259 gcc_jit_context_enable_dump.
4260 * docs/_build/texinfo/libgccjit.texi: Regenerate.
4261 * jit-playback.c: Include context.h.
4262 (class auto_argvec): New class.
4263 (auto_argvec::~auto_argvec): New function.
4264 (gcc::jit::playback::context::compile): Convert fake_args to be
4265 an auto_argvec, so that it can contain dynamically-allocated
4266 strings. Construct a vec of all requested dumps, and pass it to
4267 make_fake_args. Extract requested dumps between the calls to
4268 toplev::main and toplev::finalize.
4269 (gcc::jit::playback::context::make_fake_args): Convert param
4270 "argvec" to be a vec <char *>, and gain a "requested_dumps"
4271 param. Convert to dynamically-allocated arg strings by converting
4272 ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP
4273 for args that are already a copy. Add args for all requested dumps.
4274 (gcc::jit::playback::context::extract_any_requested_dumps): New
4275 function.
4276 (gcc::jit::playback::context::read_dump_file): New function.
4277 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
4278 Convert param "argvec" to be a vec <char *>, and gain a
4279 "requested_dumps" param.
4280 (gcc::jit::playback::context::extract_any_requested_dumps): New
4281 function.
4282 (gcc::jit::playback::context::read_dump_file): New function.
4283 * jit-recording.c (gcc::jit::recording::context::enable_dump): New
4284 function.
4285 (gcc::jit::recording::context::get_all_requested_dumps): New
4286 function.
4287 * jit-recording.h (gcc::jit::recording::requested_dump): New
4288 struct.
4289 (gcc::jit::recording::context::enable_dump): New function.
4290 (gcc::jit::recording::context::get_all_requested_dumps): New
4291 function.
4292 (gcc::jit::recording::context::m_requested_dumps): New field.
4293 * libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint.
4294 * libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint.
4295 * libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint.
4296
4297 2014-12-08 David Malcolm <[email protected]>
4298
4299 * libgccjit++.h: Indent the forward declarations of the classes to
4300 show the inheritance hierarchy.
4301
4302 2014-12-08 David Malcolm <[email protected]>
4303
4304 * notes.txt: Show the beginning and ending of
4305 recording::context::compile vs playback::context::compile. Show
4306 the creation and unlinking of the tempdir. Show toplev::finalize.
4307 Move "RELEASE MUTEX" to the correct location. Show
4308 gcc_jit_result_release, and indicate where the
4309 dlopen/dlsym/dlclose occur.
4310
4311 2014-12-01 David Malcolm <[email protected]>
4312
4313 * docs/examples/tut02-square.c (main): Release the context
4314 earlier, to show that this is possible. Update error-handling
4315 to avoid a double-release of the context, and to avoid
4316 releasing a NULL result.
4317 * docs/intro/tutorial02.rst: Discuss gcc_jit_context_release.
4318 * docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize
4319 * docs/topics/results.rst (gcc_jit_result): Mention that this
4320 controls the lifetimes of machine code functions.
4321 (gcc_jit_result_get_code): Spell out the requirements for this
4322 to succeed, and the lifetime of the result.
4323 (gcc_jit_result_release): Mention that this invalidates any code
4324 that was obtained from the result.
4325 * docs/_build/texinfo/libgccjit.texi: Regenerate.
4326
4327 2014-12-01 David Malcolm <[email protected]>
4328
4329 PR jit/64018
4330 * docs/intro/tutorial02.rst: Spell out lifetime of generated code.
4331 Add description of error-handling, taken in part from...
4332 * docs/topics/contexts.rst (Error-handling): Expand, and move some
4333 content to tutorial02.rst.
4334 * docs/_build/texinfo/libgccjit.texi: Regenerate.
4335
4336 2014-12-01 David Malcolm <[email protected]>
4337
4338 PR jit/64020
4339 * docs/topics/types.rst (Standard types) Add new enum values to
4340 the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT,
4341 GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
4342 Widen the left-hand column so that
4343 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit.
4344 * docs/_build/texinfo/libgccjit.texi: Regenerate.
4345
4346 * jit-builtins.c: Include stringpool.h and jit-playback.h.
4347 Move everything out of the gcc::jit::recording namespace into
4348 just gcc::jit.
4349 (struct builtin_data): Add fields "fnclass", "attr", and
4350 "implicit_p".
4351 (DEF_BUILTIN): Update macro so populate the new fields.
4352 (builtins_manager::builtins_manager): Update for move out of
4353 recording namespace. Initialize the m_attributes array.
4354 (builtins_manager::get_builtin_function): Likewise.
4355 (builtins_manager::get_builtin_function_by_id): New function.
4356 (builtins_manager::make_builtin_function): Update for move out of
4357 recording namespace. Add fix for PR jit/64020 by detecting
4358 specific builtin ids and having them ensure that builtins for
4359 other ids are created as necessary.
4360 (builtins_manager::get_type): Update for move out of recording
4361 namespace.
4362 (builtins_manager::make_type): Likewise. Add some missing
4363 #undefs.
4364 (builtins_manager::make_primitive_type): Update for move out of
4365 recording namespace. Implement the three BT_COMPLEX_ cases and
4366 BT_DOUBLE_PTR.
4367 (builtins_manager::make_fn_type): Update for move out of recording
4368 namespace.
4369 (builtins_manager::make_ptr_type): Likewise.
4370 (builtins_manager::finish_playback): New function.
4371 (builtins_manager::get_class): New function.
4372 (builtins_manager::implicit_p): New function.
4373 (builtins_manager::get_attrs_tree): Two new functions.
4374 (builtins_manager::make_attrs_tree): New function.
4375
4376 * jit-builtins.h: Move everything out of the gcc::jit::recording
4377 namespace into just gcc::jit.
4378 (enum built_in_attribute): New.
4379 (builtins_manager::builtins_manager): Update decl for namespace
4380 change.
4381 (builtins_manager::get_builtin_function): Likewise.
4382 (builtins_manager::get_class): New.
4383 (builtins_manager::implicit_p): New.
4384 (builtins_manager::get_attrs_tree): Two new functions.
4385 (builtins_manager::make_attrs_tree): New function.
4386 (builtins_manager::finish_playback): New.
4387 (builtins_manager::get_builtin_function_by_id): New.
4388 (builtins_manager::make_builtin_function): Update decl for
4389 namespace change.
4390 (builtins_manager::get_type): Likewise.
4391 (builtins_manager::make_type): Likewise.
4392 (builtins_manager::make_primitive_type): Likewise.
4393 (builtins_manager::make_fn_type): Likewise.
4394 (builtins_manager::make_ptr_type): Likewise.
4395 (builtins_manager): Likewise for fields. Add new field
4396 "m_attributes".
4397
4398 * jit-common.h (NUM_GCC_JIT_TYPES): Update.
4399 (builtins_manager): Update forward decl to reflect namespace
4400 change.
4401
4402 * jit-playback.c: Include attribs.h and jit-builtins.h.
4403 (gcc::jit::playback::context::get_tree_node_for_type): Add cases
4404 for the new COMPLEX_ types.
4405 (gcc::jit::playback::context::new_function): If creating a
4406 builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl,
4407 and call set_builtin_decl.
4408 (gcc::jit::playback::context::replay): If we have a
4409 builtins_manager, call its finish_playback method when we're done.
4410
4411 * jit-playback.h:
4412 (gcc::jit::playback::context::get_builtins_manager): New function.
4413
4414 * jit-recording.c
4415 (gcc::jit::recording::context::get_builtins_manager): New function.
4416 (gcc::jit::recording::get_builtin_function): Use
4417 get_builtins_manager, in case we're a child context.
4418 (gcc::jit::recording::memento_of_get_type::dereference): Add the
4419 COMPLEX_ types.
4420 (gcc::jit::recording::memento_of_get_type::is_int): Likewise.
4421 (gcc::jit::recording::memento_of_get_type::is_float): Likewise.
4422 (gcc::jit::recording::memento_of_get_type::is_bool): Likewise.
4423 (get_type_strings): Likewise.
4424
4425 * jit-recording.h
4426 (gcc::jit::recording::context::get_builtins_manager): New.
4427
4428 * libgccjit.h (enum gcc_jit_types): Add
4429 GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE,
4430 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
4431
4432 2014-12-01 David Malcolm <[email protected]>
4433
4434 * jit-builtins.c
4435 (gcc::jit::recording::builtins_manager::get_builtin_function):
4436 Check for NULL return from make_builtin_function.
4437 (gcc::jit::recording::builtins_manager::make_builtin_function):
4438 Check for NULL return from get_type.
4439
4440 2014-12-01 David Malcolm <[email protected]>
4441
4442 * jit-playback.c (gcc::jit::playback::context::compile): Move DSO
4443 creation code into...
4444 (gcc::jit::playback::context::convert_to_dso): New function.
4445 * jit-playback.h (gcc::jit::playback::context::convert_to_dso):
4446 New function.
4447
4448 2014-12-01 David Malcolm <[email protected]>
4449
4450 * jit-playback.c (gcc::jit::playback::context::compile): Use an
4451 auto_vec<const char *> rather than a const char *[20] for the
4452 top-level argv, and move the logic to build it to...
4453 (gcc::jit::playback::context::make_fake_args): New function.
4454 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
4455 New function.
4456
4457 2014-12-01 David Malcolm <[email protected]>
4458
4459 * Make-lang.in (jit_OBJS): Add jit/jit-result.o.
4460 * jit-playback.c: Include new header jit-result.h.
4461 (gcc::jit::result::result): Move to new file jit-result.c.
4462 (gcc::jit::result::~result): Likewise.
4463 (gcc::jit::playback::result): Likewise.
4464 * jit-recording.h (class gcc::jit::result): Move to new
4465 header jit-result.h.
4466 * jit-result.c: New file, to contain...
4467 (gcc::jit::result::result): Move here from jit-playback.c,
4468 removing erroneous "playback" namespace from comment.
4469 (gcc::jit::result::~result): Likewise.
4470 (gcc::jit::playback::result): Likewise.
4471 * jit-result.h: New file, to contain...
4472 (class gcc::jit::result): Move from jit-recording.h.
4473 * libgccjit.c: Include jit-result.h.
4474 (gcc_jit_result_get_code): Update comment to reflect move
4475 of implementation.
4476 (gcc_jit_result_release): Likewise.
4477
4478 2014-12-01 David Malcolm <[email protected]>
4479
4480 PR jit/63854
4481 * docs/examples/tut04-toyvm/toyvm.c
4482 (toyvm_compiled_function): New typedef.
4483 (toyvm_compiled_func) Rename to...
4484 (toyvm_compiled_code) ...this.
4485 (struct toyvm_compiled_function): New struct.
4486 (toyvm_function_compile): Return a toyvm_compiled_function *
4487 rather than a toyvm_compiled_func, so that the caller can fully
4488 clean things up. Free "funcname".
4489 (test_script): Update for change to toyvm_function_compile.
4490 Clean up the toyvm_compiled_function.
4491 (main): Likewise.
4492 (docs/intro/tutorial04.rst): Update to reflect the above changes,
4493 and to better spell out the lifetime of the compiled code.
4494
4495 2014-12-01 David Malcolm <[email protected]>
4496
4497 PR jit/63854
4498 * jit-builtins.c
4499 (gcc::jit::recording::builtins_manager::make_fn_type): Call the
4500 context's new_function_type method, rather than directly creating
4501 a function_type instance.
4502 * jit-recording.c
4503 (gcc::jit::recording::context::new_function_type): New method,
4504 adapted from part of...
4505 (gcc::jit::recording::context::new_function_ptr_type): ...this.
4506 Update to call new_function_type.
4507 * jit-recording.h
4508 (gcc::jit::recording::context::new_function_type): New method.
4509
4510 2014-12-01 David Malcolm <[email protected]>
4511
4512 PR jit/63969
4513 * jit-playback.c: Ensure that ctxt_progname is non-NULL.
4514
4515 2014-11-19 David Malcolm <[email protected]>
4516
4517 PR jit/63854
4518 * jit-playback.c (gcc::jit::playback::compound_type::set_fields):
4519 Convert param from const vec<playback::field *> & to
4520 const auto_vec<playback::field *> *.
4521 (gcc::jit::playback::context::new_function_type): Convert param
4522 "param_types" from vec<type *> * to const auto_vec<type *> *.
4523 (gcc::jit::playback::context::new_function): Convert param
4524 "params" from vec<param *> * to const auto_vec<param *> *.
4525 (gcc::jit::playback::context::build_call): Convert param "args"
4526 from vec<rvalue *> to const auto_vec<rvalue *> *.
4527 (gcc::jit::playback::context::new_call): Likewise.
4528 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
4529 (wrapper_finalizer): New function.
4530 (gcc::jit::playback::wrapper::operator new): Call the finalizer
4531 variant of ggc_internal_cleared_alloc, supplying
4532 wrapper_finalizer.
4533 (gcc::jit::playback::function::finalizer): New.
4534 (gcc::jit::playback::block::finalizer): New.
4535 (gcc::jit::playback::source_file::finalizer): New.
4536 (gcc::jit::playback::source_line::finalizer): New.
4537
4538 * jit-playback.h
4539 (gcc::jit::playback::context::new_function_type): Convert param
4540 "param_types" from vec<type *> * to const auto_vec<type *> *.
4541 (gcc::jit::playback::context::new_function): Convert param
4542 "params" from vec<param *> * to const auto_vec<param *> *.
4543 (gcc::jit::playback::context::new_call): Convert param
4544 "args" from vec<rvalue *> to const auto_vec<rvalue *> *.
4545 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
4546 (gcc::jit::playback::context::build_call): Likewise.
4547 (gcc::jit::playback::context): Convert fields "m_functions",
4548 "m_source_files", "m_cached_locations" from vec to auto_vec.
4549 (gcc::jit::playback::wrapper::finalizer): New virtual function.
4550 (gcc::jit::playback::compound_type::set_fields): Convert param fro
4551 const vec<playback::field *> & to
4552 const auto_vec<playback::field *> *.
4553 (gcc::jit::playback::function::finalizer): New.
4554 (gcc::jit::playback::block::finalizer): New.
4555 (gcc::jit::playback::source_file::finalizer): New.
4556 (gcc::jit::playback::source_line::finalizer): New.
4557
4558 * jit-recording.c
4559 (gcc::jit::recording::function_type::replay_into): Convert local
4560 from a vec into an auto_vec.
4561 (gcc::jit::recording::fields::replay_into): Likewise.
4562 (gcc::jit::recording::function::replay_into): Likewise.
4563 (gcc::jit::recording::call::replay_into): Likewise.
4564 (gcc::jit::recording::call_through_ptr::replay_into): Likewise.
4565
4566 * jit-recording.h (gcc::jit::recording::context): Convert fields
4567 "m_mementos", "m_compound_types", "m_functions" from vec<> to
4568 auto_vec <>.
4569 (gcc::jit::recording::function_type::get_param_types): Convert
4570 return type from vec<type *> to const vec<type *> &.
4571 (gcc::jit::recording::function_type): Convert field
4572 "m_param_types" from a vec<> to an auto_vec<>.
4573 (gcc::jit::recording::fields): Likewise for field "m_fields".
4574 (gcc::jit::recording::function::get_params): Convert return type
4575 from vec <param *> to const vec<param *> &.
4576 (gcc::jit::recording::function): Convert fields "m_params",
4577 "m_locals", "m_blocks" from vec<> to auto_vec<>.
4578 (gcc::jit::recording::block): Likewise for field "m_statements".
4579 vec<> to auto_vec<>.
4580 (gcc::jit::recording::call): Likewise for field "m_args".
4581 (gcc::jit::recording::call_through_ptr): Likewise.
4582
4583 2014-11-19 David Malcolm <[email protected]>
4584
4585 PR jit/63854
4586 * jit-recording.c (recording::function::validate): Convert
4587 "worklist" from vec<> to autovec<> to fix a leak.
4588
4589 2014-11-11 David Malcolm <[email protected]>
4590
4591 * ChangeLog.jit: New.
4592 * ChangeLog: New.
4593 * Make-lang.in: New.
4594 * TODO.rst: New.
4595 * config-lang.in: New.
4596 * docs/Makefile: New.
4597 * docs/_build/texinfo/Makefile: New.
4598 * docs/_build/texinfo/factorial.png: New.
4599 * docs/_build/texinfo/libgccjit.texi: New.
4600 * docs/_build/texinfo/sum-of-squares.png: New.
4601 * docs/conf.py: New.
4602 * docs/examples/tut01-hello-world.c: New.
4603 * docs/examples/tut02-square.c: New.
4604 * docs/examples/tut03-sum-of-squares.c: New.
4605 * docs/examples/tut04-toyvm/Makefile: New.
4606 * docs/examples/tut04-toyvm/factorial.toy: New.
4607 * docs/examples/tut04-toyvm/fibonacci.toy: New.
4608 * docs/examples/tut04-toyvm/toyvm.c: New.
4609 * docs/index.rst: New.
4610 * docs/internals/index.rst: New.
4611 * docs/intro/factorial.png: New.
4612 * docs/intro/index.rst: New.
4613 * docs/intro/sum-of-squares.png: New.
4614 * docs/intro/tutorial01.rst: New.
4615 * docs/intro/tutorial02.rst: New.
4616 * docs/intro/tutorial03.rst: New.
4617 * docs/intro/tutorial04.rst: New.
4618 * docs/topics/contexts.rst: New.
4619 * docs/topics/expressions.rst: New.
4620 * docs/topics/functions.rst: New.
4621 * docs/topics/index.rst: New.
4622 * docs/topics/locations.rst: New.
4623 * docs/topics/objects.rst: New.
4624 * docs/topics/results.rst: New.
4625 * docs/topics/types.rst: New.
4626 * dummy-frontend.c: New.
4627 * jit-builtins.c: New.
4628 * jit-builtins.h: New.
4629 * jit-common.h: New.
4630 * jit-playback.c: New.
4631 * jit-playback.h: New.
4632 * jit-recording.c: New.
4633 * jit-recording.h: New.
4634 * libgccjit++.h: New.
4635 * libgccjit.c: New.
4636 * libgccjit.h: New.
4637 * libgccjit.map: New.
4638 * notes.txt: New.
4639
4640 2013-07-26 David Malcolm <[email protected]>
4641
4642 * Initial creation
4643
4644 Copyright (C) 2013-2025 Free Software Foundation, Inc.
4645
4646 Copying and distribution of this file, with or without modification,
4647 are permitted in any medium without royalty provided the copyright
4648 notice and this notice are preserved.