]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/jit/ChangeLog
git-backport: support renamed .cc files in commit message.
[thirdparty/gcc.git] / gcc / jit / ChangeLog
CommitLineData
054e57e4
GA
12021-12-28 Martin Liska <mliska@suse.cz>
2
3 * docs/_build/texinfo/libgccjit.texi: Replace http:// with https.
4 * docs/cp/index.rst: Likewise.
5 * docs/cp/intro/index.rst: Likewise.
6 * docs/cp/intro/tutorial01.rst: Likewise.
7 * docs/cp/intro/tutorial02.rst: Likewise.
8 * docs/cp/intro/tutorial03.rst: Likewise.
9 * docs/cp/intro/tutorial04.rst: Likewise.
10 * docs/cp/topics/asm.rst: Likewise.
11 * docs/cp/topics/compilation.rst: Likewise.
12 * docs/cp/topics/contexts.rst: Likewise.
13 * docs/cp/topics/expressions.rst: Likewise.
14 * docs/cp/topics/functions.rst: Likewise.
15 * docs/cp/topics/index.rst: Likewise.
16 * docs/cp/topics/locations.rst: Likewise.
17 * docs/cp/topics/objects.rst: Likewise.
18 * docs/cp/topics/types.rst: Likewise.
19 * docs/index.rst: Likewise.
20 * docs/internals/index.rst: Likewise.
21 * docs/intro/index.rst: Likewise.
22 * docs/intro/tutorial01.rst: Likewise.
23 * docs/intro/tutorial02.rst: Likewise.
24 * docs/intro/tutorial03.rst: Likewise.
25 * docs/intro/tutorial04.rst: Likewise.
26 * docs/intro/tutorial05.rst: Likewise.
27 * docs/topics/asm.rst: Likewise.
28 * docs/topics/compatibility.rst: Likewise.
29 * docs/topics/compilation.rst: Likewise.
30 * docs/topics/contexts.rst: Likewise.
31 * docs/topics/expressions.rst: Likewise.
32 * docs/topics/function-pointers.rst: Likewise.
33 * docs/topics/functions.rst: Likewise.
34 * docs/topics/index.rst: Likewise.
35 * docs/topics/locations.rst: Likewise.
36 * docs/topics/objects.rst: Likewise.
37 * docs/topics/performance.rst: Likewise.
38 * docs/topics/types.rst: Likewise.
39
7631a4d1
GA
402021-12-20 Martin Liska <mliska@suse.cz>
41
42 * libgccjit.c (struct version_info): Rename to jit_version_info.
43 (struct jit_version_info): Likewise.
44 (gcc_jit_version_major): Likewise.
45 (gcc_jit_version_minor): Likewise.
46 (gcc_jit_version_patchlevel): Likewise.
47
9c6586bc
GA
482021-12-14 Petter Tomner <tomner@kth.se>
49
50 * jit-common.h: New enum
51 * jit-playback.c : Folding an setting intitial
52 (global_new_decl) : Handle const global generation
53 (new_global) : New flag
54 (global_set_init_rvalue) : New
55 (new_ctor) : New
56 (new_global_initialized) : Flag
57 (as_truth_value) : Fold
58 (new_unary_op) : Fold
59 (new_binary_op) : Fold
60 (new_comparison) : Fold
61 (new_array_access) : Fold
62 (new_dereference) : Fold
63 (get_address) : Fold
64 * jit-playback.h :
65 (global_set_init_rvalue) : New
66 (new_ctor) : New
67 * jit-recording.c :
68 * jit-recording.h :
69 (new_global_init_rvalue) : New
70 (new_ctor) : New
71 (ctor) : New, inherits rvalue
72 (global_init_rvalue) : New, inherits memento
73 (type::is_union) : New
74 * libgccjit++.h : New entrypoints, see C-header
75 * libgccjit.c : See .h
76 * libgccjit.h : New entrypoints
77 (gcc_jit_context_new_array_constructor) : New
78 (gcc_jit_context_new_struct_constructor) : New
79 (gcc_jit_context_new_union_constructor) : New
80 (gcc_jit_global_set_initializer_rvalue) : New
81 (LIBGCCJIT_HAVE_CTORS) : New feuture macro
82 * libgccjit.map : New entrypoints added to ABI 19
83 * docs/topics/expressions.rst : Updated docs
84
c8dcf64b
GA
852021-12-12 Antoni Boucher <bouanto@zoho.com>
86
87 PR target/100688
88 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_18): New ABI
89 tag.
90 * docs/topics/expressions.rst: Add documentation for the
91 function gcc_jit_lvalue_set_link_section.
92 * jit-playback.h: New function (set_link_section).
93 * jit-recording.c: New function (set_link_section) and
94 support for setting the link section.
95 * jit-recording.h: New function (set_link_section) and new
96 field m_link_section.
97 * libgccjit.c: New function (gcc_jit_lvalue_set_link_section).
98 * libgccjit.h: New function (gcc_jit_lvalue_set_link_section).
99 * libgccjit.map (LIBGCCJIT_ABI_18): New ABI tag.
100
e8decbe7
GA
1012021-12-12 Antoni Boucher <bouanto@zoho.com>
102
103 PR target/95415
104 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_17): New ABI
105 tag.
106 * docs/topics/expressions.rst: Add document for the function
107 gcc_jit_lvalue_set_tls_model.
108 * jit-playback.h: New function (set_tls_model).
109 * jit-recording.c: New function (set_tls_model), new
110 variables (tls_models and tls_model_enum_strings) and support
111 for setting the tls model.
112 * jit-recording.h: New function (set_tls_model) and new
113 field m_tls_model.
114 * libgccjit.c: New function (gcc_jit_lvalue_set_tls_model).
115 * libgccjit.h: New function (gcc_jit_lvalue_set_tls_model)
116 and new enum (gcc_jit_tls_model).
117 * libgccjit.map (LIBGCCJIT_ABI_17): New ABI tag.
118
1192021-12-11 Antoni Boucher <bouanto@zoho.com>
120
121 PR target/96066
122 PR target/96067
123 * jit-builtins.c: Implement missing types for builtins.
124 * jit-recording.c:: Allow sending a volatile const void * as
125 argument.
126 * jit-recording.h: New functions (is_volatile, is_const) and
127 allow comparing qualified types.
128
0bceef16
GA
1292021-12-10 David Malcolm <dmalcolm@redhat.com>
130
131 PR jit/103562
132 * jit-playback.c (gcc::jit::playback::context::new_function): Set
133 DECL_CONTEXT of the result_decl.
134
d62c8c74
GA
1352021-11-27 Petter Tomner <tomner@kth.se>
136
137 * libgccjit.c: %ld -> %zu
138
d9ca4b45
GA
1392021-11-24 Martin Liska <mliska@suse.cz>
140
141 * jit-playback.c (function): Initialize m_blocks vector.
142
f658f1d7
GA
1432021-11-20 Antoni Boucher <bouanto@zoho.com>
144
145 PR target/96889
146 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_16): New ABI tag.
147 * docs/topics/functions.rst: Add documentation for the
148 functions gcc_jit_function_get_return_type and
149 gcc_jit_function_get_param_count
150 * docs/topics/types.rst: Add documentation for the functions
151 gcc_jit_function_type_get_return_type,
152 gcc_jit_function_type_get_param_count,
153 gcc_jit_function_type_get_param_type,
154 gcc_jit_type_unqualified, gcc_jit_type_dyncast_array,
155 gcc_jit_type_is_bool,
156 gcc_jit_type_dyncast_function_ptr_type,
157 gcc_jit_type_is_integral, gcc_jit_type_is_pointer,
158 gcc_jit_type_dyncast_vector,
159 gcc_jit_vector_type_get_element_type,
160 gcc_jit_vector_type_get_num_units,
161 gcc_jit_struct_get_field, gcc_jit_type_is_struct,
162 and gcc_jit_struct_get_field_count
163 * libgccjit.c:
164 (gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
165 gcc_jit_function_type_get_return_type,
166 gcc_jit_function_type_get_param_count,
167 gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
168 gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
169 gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
170 gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
171 gcc_jit_vector_type_get_element_type,
172 gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
173 gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
174 functions.
175 (struct gcc_jit_function_type, struct gcc_jit_vector_type):
176 New types.
177 * libgccjit.h:
178 (gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
179 gcc_jit_function_type_get_return_type,
180 gcc_jit_function_type_get_param_count,
181 gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
182 gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
183 gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
184 gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
185 gcc_jit_vector_type_get_element_type,
186 gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
187 gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
188 function declarations.
189 (struct gcc_jit_function_type, struct gcc_jit_vector_type):
190 New types.
191 * jit-recording.h: New functions (is_struct and is_vector)
192 * libgccjit.map (LIBGCCJIT_ABI_16): New ABI tag.
193
af2852b9
GA
1942021-11-12 David Malcolm <dmalcolm@redhat.com>
195
196 PR jit/103199
197 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile):
198 Increase size of buffer.
199 * docs/examples/tut04-toyvm/toyvm.cc
200 (compilation_state::create_function): Likewise.
201
a26206ec
GA
2022021-09-10 Petter Tomner <tomner@kth.se>
203
204 * jit-playback.c: Moved global var processing to after loc handling.
205 Setting TYPE_NAME for fundamental types.
206 Using common functions for finalizing globals.
207 * jit-playback.h: New method init_types().
208 Changed get_tree_node_for_type() to method.
209
b57fba5e
GA
2102021-08-19 Iain Sandoe <iain@sandoe.co.uk>
211
212 * docs/examples/tut04-toyvm/toyvm.c: Include jit-dejagnu.h.
213 * docs/examples/tut04-toyvm/toyvm.cc: Likewise.
214 * jit-dejagnu.h: New file, imported from dejagnu-1.6.2 and
215 patched for this application.
216
6e529985
GA
2172021-08-18 Iain Sandoe <iain@sandoe.co.uk>
218
219 PR jit/100613
220 * Make-lang.in: Provide clauses for Darwin hosts.
221
bdea84c4
GA
2222021-07-18 Antoni Boucher <bouanto@zoho.com>
223
224 PR target/95498
225 * jit-playback.c (convert): Add support to handle truncation and
226 extension in the convert function.
227
65f32e5d
GA
2282021-05-19 Martin Liska <mliska@suse.cz>
229
230 PR testsuite/100658
231 * libgccjit.c (gcc_jit_context_new_function): Fix typos.
232
8bf52ffa
GA
2332021-03-24 Matthias Klose <doko@ubuntu.com>
234
235 * Make-lang.in (jit.sphinx.html, jit.sphinx.pdf): Use $(mkinstalldirs),
236 (jit.install-headers): Depend on installdirs.
237
50352c6c
GA
2382021-02-19 David Malcolm <dmalcolm@redhat.com>
239
240 PR jit/99126
241 * jit-builtins.c
242 (gcc::jit::builtins_manager::get_builtin_function_by_id):
243 Update assertion to reject BUILT_IN_NONE.
244 (gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
245 New.
246 * jit-builtins.h
247 (gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
248 New decl.
249 * jit-playback.c (gcc::jit::playback::context::replay): Call it.
250 Remove redundant conditional on bm.
251
5fff80fd
GA
2522021-01-14 David Malcolm <dmalcolm@redhat.com>
253
254 * docs/cp/index.rst: Remove "Alpha" warning.
255 * docs/index.rst: Likewise.
256 * docs/_build/texinfo/libgccjit.texi: Regenerate
257
360258da
GA
2582020-11-25 Martin Sebor <msebor@redhat.com>
259
260 PR bootstrap/94982
261 * jit-recording.c (recording::function::dump_to_dot): Avoid
262 -Wformat-diag.
263 (recording::block::dump_to_dot): Same.
264
82e5048e
GA
2652020-11-20 Jakub Jelinek <jakub@redhat.com>
266
267 PR other/97911
268 * Make-lang.in (jit.serial): Change from goal to a
269 variable.
270 (.PHONY): Drop jit.serial and jit.prev.
271 ($(LIBGCCJIT_FILENAME)): Depend on $(jit.serial) rather than
272 jit.serial.
273
25bb75f8
GA
2742020-11-18 Jakub Jelinek <jakub@redhat.com>
275
276 * Make-lang.in (jit.serial): New goal.
277 (.PHONY): Add jit.serial jit.prev.
278 ($(LIBGCCJIT_FILENAME)): Depend on jit.prev. Call LINK_PROGRESS.
279
a5a11525
GA
2802020-11-12 David Malcolm <dmalcolm@redhat.com>
281
282 PR jit/87291
283 * docs/cp/topics/asm.rst: New file.
284 * docs/cp/topics/index.rst (Topic Reference): Add it.
285 * docs/topics/asm.rst: New file.
286 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_15): New.
287 * docs/topics/functions.rst (Statements): Add link to extended
288 asm.
289 * docs/topics/index.rst (Topic Reference): Add asm.rst.
290 * docs/topics/objects.rst: Add gcc_jit_extended_asm to ASCII art.
291 * docs/_build/texinfo/Makefile: Regenerate.
292 * docs/_build/texinfo/libgccjit.texi: Regenerate.
293 * jit-common.h (gcc::jit::recording::extended_asm): New forward
294 decl.
295 (gcc::jit::recording::top_level_asm): Likewise.
296 * jit-playback.c: Include "stmt.h".
297 (build_string): New.
298 (gcc::jit::playback::context::new_string_literal): Disambiguate
299 build_string call.
300 (gcc::jit::playback::context::add_top_level_asm): New.
301 (build_operand_chain): New.
302 (build_clobbers): New.
303 (build_goto_operands): New.
304 (gcc::jit::playback::block::add_extended_asm): New.
305 * jit-playback.h (gcc::jit::playback::context::add_top_level_asm):
306 New decl.
307 (struct gcc::jit::playback::asm_operand): New struct.
308 (gcc::jit::playback::block::add_extended_asm): New decl.
309 * jit-recording.c (gcc::jit::recording::context::dump_to_file):
310 Dump top-level asms.
311 (gcc::jit::recording::context::add_top_level_asm): New.
312 (gcc::jit::recording::block::add_extended_asm): New.
313 (gcc::jit::recording::block::end_with_extended_asm_goto): New.
314 (gcc::jit::recording::asm_operand::asm_operand): New.
315 (gcc::jit::recording::asm_operand::print): New.
316 (gcc::jit::recording::asm_operand::make_debug_string): New.
317 (gcc::jit::recording::output_asm_operand::write_reproducer): New.
318 (gcc::jit::recording::output_asm_operand::print): New.
319 (gcc::jit::recording::input_asm_operand::write_reproducer): New.
320 (gcc::jit::recording::input_asm_operand::print): New.
321 (gcc::jit::recording::extended_asm::add_output_operand): New.
322 (gcc::jit::recording::extended_asm::add_input_operand): New.
323 (gcc::jit::recording::extended_asm::add_clobber): New.
324 (gcc::jit::recording::extended_asm::replay_into): New.
325 (gcc::jit::recording::extended_asm::make_debug_string): New.
326 (gcc::jit::recording::extended_asm::write_flags): New.
327 (gcc::jit::recording::extended_asm::write_clobbers): New.
328 (gcc::jit::recording::extended_asm_simple::write_reproducer): New.
329 (gcc::jit::recording::extended_asm::maybe_populate_playback_blocks):
330 New.
331 (gcc::jit::recording::extended_asm_goto::extended_asm_goto): New.
332 (gcc::jit::recording::extended_asm_goto::replay_into): New.
333 (gcc::jit::recording::extended_asm_goto::write_reproducer): New.
334 (gcc::jit::recording::extended_asm_goto::get_successor_blocks):
335 New.
336 (gcc::jit::recording::extended_asm_goto::maybe_print_gotos): New.
337 (gcc::jit::recording::extended_asm_goto::maybe_populate_playback_blocks):
338 New.
339 (gcc::jit::recording::top_level_asm::top_level_asm): New.
340 (gcc::jit::recording::top_level_asm::replay_into): New.
341 (gcc::jit::recording::top_level_asm::make_debug_string): New.
342 (gcc::jit::recording::top_level_asm::write_to_dump): New.
343 (gcc::jit::recording::top_level_asm::write_reproducer): New.
344 * jit-recording.h
345 (gcc::jit::recording::context::add_top_level_asm): New decl.
346 (gcc::jit::recording::context::m_top_level_asms): New field.
347 (gcc::jit::recording::block::add_extended_asm): New decl.
348 (gcc::jit::recording::block::end_with_extended_asm_goto): New
349 decl.
350 (gcc::jit::recording::asm_operand): New class.
351 (gcc::jit::recording::output_asm_operand): New class.
352 (gcc::jit::recording::input_asm_operand): New class.
353 (gcc::jit::recording::extended_asm): New class.
354 (gcc::jit::recording::extended_asm_simple): New class.
355 (gcc::jit::recording::extended_asm_goto): New class.
356 (gcc::jit::recording::top_level_asm): New class.
357 * libgccjit++.h (gccjit::extended_asm): New forward decl.
358 (gccjit::context::add_top_level_asm): New.
359 (gccjit::block::add_extended_asm): New.
360 (gccjit::block::end_with_extended_asm_goto): New.
361 (gccjit::extended_asm): New class.
362 (gccjit::extended_asm::extended_asm): New ctors.
363 (gccjit::extended_asm::set_volatile_flag): New.
364 (gccjit::extended_asm::set_inline_flag): New.
365 (gccjit::extended_asm::add_output_operand): New.
366 (gccjit::extended_asm::add_input_operand): New.
367 (gccjit::extended_asm::add_clobber): New.
368 (gccjit::extended_asm::get_inner_extended_asm): New.
369 * libgccjit.c (struct gcc_jit_extended_asm): New.
370 (jit_error): Make "loc" param take a gcc::jit::recording::location *
371 rather than a gcc_jit_location *.
372 (gcc_jit_block_add_extended_asm): New entrypoint.
373 (gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
374 (gcc_jit_extended_asm_as_object): New entrypoint.
375 (gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
376 (gcc_jit_extended_asm_set_inline_flag): New entrypoint.
377 (gcc_jit_extended_asm_add_output_operand): New entrypoint.
378 (gcc_jit_extended_asm_add_clobber): New entrypoint.
379 (gcc_jit_context_add_top_level_asm): New entrypoint.
380 * libgccjit.h: Add gcc_jit_extended_asm to ASCII art.
381 (gcc_jit_extended_asm): New typedef.
382 (LIBGCCJIT_HAVE_ASM_STATEMENTS): New define.
383 (gcc_jit_block_add_extended_asm): New entrypoint.
384 (gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
385 (gcc_jit_extended_asm_as_object): New entrypoint.
386 (gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
387 (gcc_jit_extended_asm_set_inline_flag): New entrypoint.
388 (gcc_jit_extended_asm_add_output_operand): New entrypoint.
389 (gcc_jit_extended_asm_add_input_operand): New entrypoint.
390 (gcc_jit_extended_asm_add_clobber): New entrypoint.
391 (gcc_jit_context_add_top_level_asm): New entrypoint.
392 * libgccjit.map (LIBGCCJIT_ABI_15): New.
393
3942020-11-12 David Malcolm <dmalcolm@redhat.com>
395
396 * jit-recording.c (recording::context::new_string): Add "escaped"
397 param and use it when creating the new recording::string instance.
398 (recording::string::string): Add "escaped" param and use it to
399 initialize m_escaped.
400 (recording::string::make_debug_string): Replace check that first
401 char is double-quote with use of m_escaped. Fix escaping of
402 '\t' and '\n'. Set "escaped" on the result.
403 * jit-recording.h (recording::context::new_string): Add "escaped"
404 param.
405 (recording::string::string): Add "escaped" param.
406 (recording::string::m_escaped): New field.
407
4082020-11-12 David Malcolm <dmalcolm@redhat.com>
409
410 * libgccjit.h: Fix typo in comment.
411
50a71cd0
GA
4122020-09-14 Andrea Corallo <andrea.corallo@arm.com>
413
414 * docs/_build/texinfo/libgccjit.texi: Regenerate.
415
ac35c090
GA
4162020-09-11 Andrea Corallo <andrea.corallo@arm.com>
417
418 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_14): New ABI tag.
419 * docs/topics/expressions.rst (gcc_jit_global_set_initializer):
420 Document new entry point in section 'Global variables'.
421 * jit-playback.c (global_new_decl, global_finalize_lvalue): New
422 method.
423 (playback::context::new_global): Make use of global_new_decl,
424 global_finalize_lvalue.
425 (load_blob_in_ctor): New template function in use by the
426 following.
427 (playback::context::new_global_initialized): New method.
428 * jit-playback.h (class context): Decl 'new_global_initialized',
429 'global_new_decl', 'global_finalize_lvalue'.
430 (lvalue::set_initializer): Add implementation.
431 * jit-recording.c (recording::memento_of_get_pointer::get_size)
432 (recording::memento_of_get_type::get_size): Add implementation.
433 (recording::global::write_initializer_reproducer): New function in
434 use by 'recording::global::write_reproducer'.
435 (recording::global::replay_into)
436 (recording::global::write_to_dump)
437 (recording::global::write_reproducer): Handle
438 initialized case.
439 * jit-recording.h (class type): Decl 'get_size' and
440 'num_elements'.
441 * libgccjit++.h (class lvalue): Declare new 'set_initializer'
442 method.
443 (class lvalue): Decl 'is_global' and 'set_initializer'.
444 (class global) Decl 'write_initializer_reproducer'. Add
445 'm_initializer', 'm_initializer_num_bytes' fields. Implement
446 'set_initializer'. Add a destructor to free 'm_initializer'.
447 * libgccjit.c (gcc_jit_global_set_initializer): New function.
448 * libgccjit.h (gcc_jit_global_set_initializer): New function
449 declaration.
450 * libgccjit.map (LIBGCCJIT_ABI_14): New ABI tag.
451
8f7ea26a
GA
4522020-08-28 Martin Sebor <msebor@redhat.com>
453
454 * jit-recording.c (recording::switch_::make_debug_string): Add argument
455 to a call.
456
e769f970
GA
4572020-08-22 Andrea Corallo <andrea.corallo@arm.com>
458
459 * libgccjit.c:
460 (gcc_jit_context_new_rvalue_from_int)
461 (gcc_jit_context_new_rvalue_from_long)
462 (gcc_jit_context_new_rvalue_from_double)
463 (gcc_jit_context_new_rvalue_from_ptr): Update function heading
464 comments.
465
6fb94d67
GA
4662020-06-16 Nicolas Bértolo <nicolasbertolo@gmail.com>
467
468 * Make-lang.in: Always define version, minor and release
469 numbers. Create the Windows shared library as
470 libgccjit-$(LIBGCCJIT_VERSION_NUM).dll.
471
9a5b7438
GA
4722020-06-03 David Malcolm <dmalcolm@redhat.com>
473
474 PR jit/95306
475 * jit-builtins.c (builtins_manager::make_primitive_type):
476 Implement BT_CONST_VOLATILE_PTR.
477
a9312a79
GA
4782020-06-02 David Malcolm <dmalcolm@redhat.com>
479
480 PR jit/95426
481 * dummy-frontend.c: Include "options.h", "stringpool.h", and
482 "attribs.h".
483 (ATTR_EXCL): New, copied from lto/lto-lang.c.
484 (attr_noreturn_exclusions): Likewise.
485 (attr_returns_twice_exclusions): Likewise.
486 (attr_const_pure_exclusions): Likewise.
487 (jit_attribute_table): Likewise, copied from lto_attribute_table.
488 (jit_format_attribute_table): Likewise, copied from
489 lto_format_attribute_table.
490 (handle_noreturn_attribute): New, copied from lto/lto-lang.c.
491 (handle_leaf_attribute): Likewise.
492 (handle_const_attribute): Likewise.
493 (handle_malloc_attribute): Likewise.
494 (handle_pure_attribute): Likewise.
495 (handle_novops_attribute): Likewise.
496 (get_nonnull_operand): Likewise.
497 (handle_nonnull_attribute): Likewise.
498 (handle_nothrow_attribute): Likewise.
499 (handle_sentinel_attribute): Likewise.
500 (handle_type_generic_attribute): Likewise.
501 (handle_transaction_pure_attribute): Likewise.
502 (handle_returns_twice_attribute): Likewise.
503 (handle_patchable_function_entry_attribute): Likewise.
504 (ignore_attribute): Likewise.
505 (handle_format_attribute): Likewise.
506 (handle_format_arg_attribute): Likewise.
507 (handle_fnspec_attribute): Likewise.
508 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
509 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
510
53ffb43a
GA
5112020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
512
513 * Make-lang.in: Remove extra slash. Build libgccjit.dll and its
514 import library in Windows.
515 * config-lang.in: Update comment about --enable-host-shared.
516 * jit-w32.h: New file.
517 * jit-w32.c: New file.
518 (print_last_error): New function that prints the error
519 string corresponding to GetLastError().
520 (get_TOKEN_USER_current_user): Helper function used for getting
521 the SID belonging to the current user.
522 (create_directory_for_current_user): Helper function to create
523 a directory with permissions such that only the current user can
524 access it.
525 (win_mkdtemp): Create a temporary directory using Windows APIs.
526 * jit-playback.c: Do not chmod files in Windows. Use LoadLibrary,
527 FreeLibrary and GetProcAddress instead of libdl.
528 * jit-result.h, jit-result.c: Introduce result::handle_t to
529 abstract over the types used for dynamic library handles.
530 * jit-tempdir.c: Do not use mkdtemp() in Windows, use
531 win_mkdtemp().
532
61f3b605
GA
5332020-05-27 David Malcolm <dmalcolm@redhat.com>
534
535 PR jit/95314
536 * dummy-frontend.c (LANG_HOOKS_DEEP_UNSHARING): Define to be true.
537 * jit-playback.h (gcc::jit::playback::rvalue): Mark tree node with
538 TREE_VISITED.
539
5402020-05-27 Tom Tromey <tromey@gcc.gnu.org>
541
542 PR jit/91330
543 * docs/conf.py (texinfo_documents): Set description.
544 * docs/_build/texinfo/libgccjit.texi: Regenerate.
545
c3a4169b
GA
5462020-05-26 David Malcolm <dmalcolm@redhat.com>
547
548 PR jit/95306
549 * docs/topics/functions.rst
550 (gcc_jit_context_get_builtin_function): Document.
551 * docs/_build/texinfo/libgccjit.texi: Regenerate.
552 * dummy-frontend.c (jit_langhook_global_bindings_p): Remove
553 gcc_unreachable.
554 * jit-builtins.c (type_names): New array.
555 (get_string_for_type_id): New function.
556 (gcc::jit::builtins_manager::make_primitive_type): Show name of
557 type in error messages. Update cases to reflect the order in
558 builtin-types.def. Implement cases for BT_INT8, BT_INT16,
559 BT_UINT8, BT_CONST_PTR, BT_VOLATILE_PTR, BT_INT_PTR, BT_FLOAT_PTR,
560 BT_CONST_DOUBLE_PTR, BT_SIZE, BT_CONST_SIZE.
561
5622020-05-26 David Malcolm <dmalcolm@redhat.com>
563
564 * docs/topics/compatibility.rst: Fix underline.
565 Fix missing labels.
566 * docs/topics/types.rst: Fix missing blank line.
567 * docs/_build/texinfo/libgccjit.texi: Regenerate.
568
5692020-05-26 David Malcolm <dmalcolm@redhat.com>
570
571 PR jit/95296
572 * docs/topics/expressions.rst (Unary Operations): Document that
573 result_type of gcc_jit_context_new_unary_op must be a numeric type.
574 (Binary Operations): Likewise for gcc_jit_context_new_binary_op.
575 (Global variables): Document that "type" of
576 gcc_jit_context_new_global must be non-`void`.
577 * docs/topics/function-pointers.rst
578 (gcc_jit_context_new_function_ptr_type): Document that the
579 param_types must be non-void, but that return_type may be.
580 * docs/topics/functions.rst (Params): Document that
581 gcc_jit_context_new_param's type must be non-void.
582 (Functions): Likewise for gcc_jit_function_new_local.
583 * docs/topics/types.rst (gcc_jit_context_new_array_type): Document
584 that the type must be non-void.
585 (gcc_jit_context_new_field): Likewise.
586 * docs/_build/texinfo/Makefile: Regenerate.
587 * docs/_build/texinfo/libgccjit.texi: Regenerate.
588 * libgccjit.c (gcc_jit_context_new_array_type): Fail if
589 element_type is void.
590 (gcc_jit_context_new_field): Likewise for "type".
591 (gcc_jit_context_new_function_ptr_type): Likewise for each
592 element of param_types.
593 (gcc_jit_context_new_param): Likewise for "type".
594 (gcc_jit_context_new_global): Likewise.
595 (gcc_jit_function_new_local): Likewise.
596 (gcc_jit_type_get_aligned): Likewise.
597
63b2923d
A
5982020-03-31 Andrea Corallo <andrea.corallo@arm.com>
599 David Malcolm <dmalcolm@redhat.com>
600
601 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_13): New ABI tag
602 plus add version paragraph.
603 * libgccjit++.h (namespace gccjit::version): Add new namespace.
604 * libgccjit.c (gcc_jit_version_major, gcc_jit_version_minor)
605 (gcc_jit_version_patchlevel): New functions.
606 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_version): New macro.
607 (gcc_jit_version_major, gcc_jit_version_minor)
608 (gcc_jit_version_patchlevel): New functions.
609 * libgccjit.map (LIBGCCJIT_ABI_13) New ABI tag.
610
0cd55f9d
A
6112020-03-23 Andrea Corallo <andrea.corallo@arm.com>
612
613 * jit-playback.h
614 (gcc::jit::playback::context m_recording_ctxt): Remove
615 m_char_array_type_node field.
616 * jit-playback.c
617 (playback::context::context) Remove m_char_array_type_node from member
618 initializer list.
619 (playback::context::new_string_literal) Fix logic to handle string
620 length > 200.
621
8d9254fc
JJ
6222020-01-01 Jakub Jelinek <jakub@redhat.com>
623
624 Update copyright years.
625
70ce1ab9
JB
6262019-11-29 Julian Brown <julian@codesourcery.com>
627
628 * jit-builtins.c (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR):
629 Remove commented-out cases.
630
56e04525
DM
6312019-11-20 David Malcolm <dmalcolm@redhat.com>
632
633 PR jit/92483
634 * jit-playback.c (gcc::jit::playback::context::make_fake_args):
635 Update GCC_JIT_BOOL_OPTION_SELFCHECK_GC for new --param syntax.
636
4d732405
RS
6372019-08-13 Richard Sandiford <richard.sandiford@arm.com>
638
639 PR middle-end/91421
640 * jit-playback.c (new_function): Use set_decl_built_in_function.
641
ab20d992 6422019-07-22 Andrea Corallo <andrea.corallo@arm.com>
9afb91b2
AC
643
644 * jit-recording.c (unary_op_reproducer_strings): Make it extern.
645 (binary_op_reproducer_strings): Likewise.
646 * jit-recording.h (unary_op_reproducer_strings): Likewise.
647 (binary_op_reproducer_strings): Likewise.
648 * libgccjit.c (gcc_jit_context_new_unary_op): Check result_type to be a
649 numeric type.
650 * libgccjit.c (gcc_jit_context_new_binary_op): Improve error message.
651
ab20d992 6522019-07-04 Andrea Corallo <andrea.corallo@arm.com>
2b442504
AC
653
654 * libgccjit.c (gcc_jit_context_new_binary_op): Check result_type to be a
655 numeric type.
656
ab20d992 6572019-07-04 Andrea Corallo <andrea.corallo@arm.com>
ee118c14
AC
658
659 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_12): New ABI tag.
660 * docs/topics/types.rst: Add gcc_jit_context_new_bitfield.
661 * jit-common.h (namespace recording): Add class bitfield.
662 * jit-playback.c:
663 (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): Add macros.
664 (playback::context::new_bitfield): New method.
665 (playback::compound_type::set_fields): Add bitfield support.
666 (playback::lvalue::mark_addressable): Was jit_mark_addressable make this
667 a method of lvalue plus return a bool to communicate success.
668 (playback::lvalue::get_address): Check for jit_mark_addressable return
669 value.
670 * jit-playback.h (new_bitfield): New method.
671 (class bitfield): New class.
672 (class lvalue): Add jit_mark_addressable method.
673 * jit-recording.c (recording::context::new_bitfield): New method.
674 (recording::bitfield::replay_into): New method.
675 (recording::bitfield::write_to_dump): Likewise.
676 (recording::bitfield::make_debug_string): Likewise.
677 (recording::bitfield::write_reproducer): Likewise.
678 * jit-recording.h (class context): Add new_bitfield method.
679 (class field): Make it derivable by class bitfield.
680 (class bitfield): Add new class.
681 * libgccjit++.h (class context): Add new_bitfield method.
682 * libgccjit.c (struct gcc_jit_bitfield): New structure.
683 (gcc_jit_context_new_bitfield): New function.
684 * libgccjit.h
685 (LIBGCCJIT_HAVE_gcc_jit_context_new_bitfield) New macro.
686 (gcc_jit_context_new_bitfield): New function.
687 * libgccjit.map (LIBGCCJIT_ABI_12) New ABI tag.
688
36a3a7a3
JJ
6892019-03-21 Jakub Jelinek <jakub@redhat.com>
690
691 * jit-recording.c (reproducer::m_set_identifiers): Use false as Lazy
692 in hash_set template param.
693
ab20d992 6942019-02-05 Andrea Corallo <andrea.corallo@arm.com>
216090cc
AC
695
696 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_11): New ABI tag.
697 * docs/topics/contexts.rst (Additional driver options): New
698 section.
699 * jit-playback.c (invoke_driver): Add call to append_driver_options.
700 * jit-recording.c: Within namespace gcc::jit...
701 (recording::context::~context): Free the optnames within
702 m_driver_options.
703 (recording::context::add_driver_option): New method.
704 (recording::context::append_driver_options): New method.
705 (recording::context::dump_reproducer_to_file): Add driver
706 options.
707 * jit-recording.h: Within namespace gcc::jit...
708 (recording::context::add_driver_option): New method.
709 (recording::context::append_driver_options): New method.
710 (recording::context::m_driver_options): New field.
711 * libgccjit++.h (gccjit::context::add_driver_option): New
712 method.
713 * libgccjit.c (gcc_jit_context_add_driver_option): New API
714 entrypoint.
715 * libgccjit.h (gcc_jit_context_add_driver_option): New API
716 entrypoint.
717 (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option): New
718 macro.
719 * libgccjit.map (LIBGCCJIT_ABI_11): New ABI tag.
720
a5544970
JJ
7212019-01-01 Jakub Jelinek <jakub@redhat.com>
722
723 Update copyright years.
724
478dd60d
DM
7252018-11-15 David Malcolm <dmalcolm@redhat.com>
726
727 PR other/19165
728 * dummy-frontend.c (jit_begin_diagnostic): Add diagnostic_t param.
729
620e594b
DM
7302018-11-13 David Malcolm <dmalcolm@redhat.com>
731
732 * jit-playback.c: Replace "source_location" with "location_t".
733
033eb567
DM
7342018-10-17 David Malcolm <dmalcolm@redhat.com>
735
736 * Make-lang.in (selftest-jit): New.
737
98086b2b
ML
7382018-06-28 Martin Liska <mliska@suse.cz>
739
740 * jit-playback.c: Include opt-suggestions.h.
741
3de37a5d
ML
7422018-06-28 Martin Liska <mliska@suse.cz>
743
744 * jit-playback.c (class auto_argvec): Moved to vec.h.
745 (auto_argvec::~auto_argvec): Likewise.
746 (compile): Use the renamed name.
747 (invoke_driver): Likewise.
748
ea143da7
RO
7492018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
750
751 PR jit/84288
752 * Make-lang.in ($(LIBGCCJIT_FILENAME)): Add $(EXTRA_GCC_LIBS).
753
deb3da39
DM
7542018-03-09 David Malcolm <dmalcolm@redhat.com>
755 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
756
757 PR jit/64089
758 PR jit/84288
759 * Make-lang.in (COMMA): New.
760 (LIBGCCJIT_VERSION_SCRIPT_OPTION): New.
761 (LIBGCCJIT_SONAME_OPTION): New.
762 (jit): Move --version-script and -soname linker options to the
763 above.
764
9aba6f77
DM
7652018-01-25 David Malcolm <dmalcolm@redhat.com>
766
767 PR jit/81672
768 * jit-recording.h (gcc::jit::recording::union_): Remove fields
769 "m_loc" and "m_name".
770
85ec4feb
JJ
7712018-01-03 Jakub Jelinek <jakub@redhat.com>
772
773 Update copyright years.
774
01512446
JJ
7752017-12-19 Jakub Jelinek <jakub@redhat.com>
776
777 * jit-playback.c (get_type, playback::compile_to_file::copy_file,
778 playback::context::acquire_mutex): Replace Yoda conditions with
779 typical order conditions.
780 * libgccjit.c (gcc_jit_context_new_struct_type,
781 gcc_jit_struct_set_fields, gcc_jit_context_new_union_type,
782 gcc_jit_context_new_function, gcc_jit_timer_pop): Likewise.
783 * jit-builtins.c (matches_builtin): Likewise.
784 * jit-recording.c (recording::compound_type::set_fields,
785 recording::fields::write_reproducer, recording::rvalue::set_scope,
786 recording::function::validate): Likewise.
787 * jit-logging.c (logger::decref): Likewise.
788
5de73c05
JJ
7892017-11-30 Jakub Jelinek <jakub@redhat.com>
790
791 * jit-recording.c
792 (recording::memento_of_new_rvalue_from_const <long>::write_reproducer):
793 Use ; instead of ;;.
794
9e851845
JJ
7952017-11-28 Jakub Jelinek <jakub@redhat.com>
796
797 * jit-playback.c (add_switch): Build SWITCH_EXPR using build2 instead
798 of build3. Formatting fixes. Adjust funciton comment.
799
120e92fc
TV
8002017-11-23 Tom de Vries <tom@codesourcery.com>
801
802 * libgccjit.c (RETURN_NULL_IF_FAIL_NONNULL_NUMERIC_TYPE): Wrap in
803 JIT_{BEGIN,END}_STMT.
804
77f4ead7
DM
8052017-10-31 David Malcolm <dmalcolm@redhat.com>
806
807 * docs/internals/index.rst (Running the test suite): Document
808 PRESERVE_EXECUTABLES.
809 (Running under valgrind): Add markup to RUN_UNDER_VALGRIND.
810 * docs/_build/texinfo/libgccjit.texi: Regenerate.
811
6069fe72
DM
8122017-10-04 David Malcolm <dmalcolm@redhat.com>
813
814 * docs/cp/topics/expressions.rst (Vector expressions): New
815 section.
816 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_10): New ABI tag.
817 * docs/topics/expressions.rst (Vector expressions): New section.
818 * docs/topics/types.rst (gcc_jit_type_get_vector): Add link to
819 gcc_jit_context_new_rvalue_from_vector.
820 * docs/_build/texinfo/libgccjit.texi: Regenerate.
821 * jit-common.h (gcc::jit:recording::vector_type): New forward
822 decl.
823 * jit-playback.c
824 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
825 * jit-playback.h
826 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
827 * jit-recording.c: In namespace gcc::jit::
828 (class comma_separated_string): New class.
829 (comma_separated_string::comma_separated_string): New ctor,
830 adapted from recording::call::make_debug_string.
831 (comma_separated_string::~comma_separated_string): New dtor.
832 In namespace gcc::jit::recording::
833 (context::new_rvalue_from_vector): New method.
834 (type::get_vector): Update for renaming of memento_of_get_vector.
835 (class memento_of_get_vector): Rename to...
836 (class vector_type): ..this.
837 (memento_of_new_rvalue_from_vector::memento_of_new_rvalue_from_vector):
838 New ctor.
839 (memento_of_new_rvalue_from_vector::replay_into): New method.
840 (memento_of_new_rvalue_from_vector::visit_children): New method.
841 (memento_of_new_rvalue_from_vector::make_debug_string): New
842 method.
843 (memento_of_new_rvalue_from_vector::write_reproducer): New method.
844 (call::make_debug_string): Split out arg-printing code into ctor
845 for comma_separated_string.
846 * jit-recording.h: In namespace gcc::jit::recording::
847 (context::new_rvalue_from_vector): New method.
848 (type::dyn_cast_vector_type): New virtual function.
849 (class memento_of_get_vector): Rename to...
850 (class vector_type): ...this.
851 (vector_type::unqualified): Remove this vfunc override in favor
852 of...
853 (vector_type::get_element_type): ...this new method.
854 (vector_type::get_num_units): New method.
855 (vector_type::dyn_cast_vector_type): New vfunc override.
856 (class memento_of_new_rvalue_from_vector): New class.
857 * libgccjit++.h (gccjit::context::new_rvalue): Add overload for
858 vector of rvalue.
859 * libgccjit.c (gcc_jit_context_new_binary_op): Strip off type
860 qualifications when checking that both operands have same type.
861 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
862 * libgccjit.h
863 (LIBGCCJIT_HAVE_gcc_jit_context_new_rvalue_from_vector): New
864 macro.
865 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
866 * libgccjit.map (LIBGCCJIT_ABI_10): New ABI tag.
867
ecd5156d
DM
8682017-09-28 David Malcolm <dmalcolm@redhat.com>
869
870 * docs/topics/expressions.rst (Function calls): Add link to
871 gcc_jit_context_new_function_ptr_type.
872 (Function pointers): Convert to cross-references to
873 function-pointers.rst, moving material there.
874 * docs/topics/function-pointers.rst: New page.
875 * docs/topics/index.rst: Add function-pointers.rst.
876 * docs/topics/types.rst (Function pointer types): New section.
877 * docs/_build/texinfo/libgccjit.texi: Regenerate.
878
5a47aa2c
DM
8792017-09-28 David Malcolm <dmalcolm@redhat.com>
880
881 * jit-recording.c
882 (gcc::jit::recording::function_type::is_same_type_as): New function.
883 * jit-recording.h: In namespace gcc::jit::recording::
884 (type::accepts_writes_from): Use is_same_type_as rather than pointer
885 equality.
886 (type::is_same_type_as): New virtual function.
887 (function_type::is_same_type_as): New override.
888
15a65e63
DM
8892017-09-27 David Malcolm <dmalcolm@redhat.com>
890
891 * docs/cp/topics/expressions.rst (Function pointers): New section.
892 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_9): New tag.
893 * docs/topics/expressions.rst (Function pointers): New section.
894 * docs/_build/texinfo/libgccjit.texi: Regenerate.
895 * jit-common.h (class gcc::jit::recording::function_pointer): New
896 forward decl.
897 * jit-playback.c (gcc::jit::playback::function::get_address): New
898 method.
899 * jit-playback.h (gcc::jit::playback::function::get_address): New
900 method decl.
901 * jit-recording.c: Within namespace gcc::jit::recording...
902 (function::function): Initialize new field "m_fn_ptr_type".
903 (function::get_address): New method.
904 (function_pointer::replay_into): New method.
905 (function_pointer::visit_children): New method.
906 (function_pointer::make_debug_string): New method.
907 (function_pointer::write_reproducer): New method.
908 * jit-recording.h: Within namespace gcc::jit::recording...
909 (function::get_address): New method.
910 (function): Add field "m_fn_ptr_type".
911 (class function_pointer): New subclass of rvalue.
912 * libgccjit++.h (gccjit::function::get_address): New method.
913 * libgccjit.c (gcc_jit_function_get_address): New function.
914 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_function_get_address): New
915 macro.
916 (gcc_jit_function_get_address): New API entrypoint.
917 * libgccjit.map (LIBGCCJIT_ABI_9): New tag.
918
595ced60
DM
9192017-09-14 David Malcolm <dmalcolm@redhat.com>
920
921 PR jit/82174
922 * jit-builtins.c (matches_builtin): Ignore entries with a NULL
923 name.
924
953e520d
DM
9252017-08-18 David Malcolm <dmalcolm@redhat.com>
926
927 PR tree-optimization/46805
928 * dummy-frontend.c (jit_langhook_parse_file): Handle vector types.
929
519d0798
DM
9302017-08-18 David Malcolm <dmalcolm@redhat.com>
931
932 * jit-recording.c (class gcc::jit::reproducer): Rename field
933 "m_identifiers" to "m_map_memento_to_identifier". Add field
934 "m_set_identifiers" and struct hash_traits for it.
935 (gcc::jit::reproducer::reproducer): Update for above.
936 (convert_to_identifier): New function.
937 (gcc::jit::reproducer::ensure_identifier_is_unique): New method.
938 (gcc::jit::reproducer::make_identifier): Avoid appending the %p
939 unless necessary for uniqueness. Update for field renaming.
940 (gcc::jit::reproducer::get_identifier): Update for field renaming.
941
47ee1b7c
DM
9422017-08-09 David Malcolm <dmalcolm@redhat.com>
943
944 * docs/cp/topics/types.rst (Vector types): New section.
945 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_8): New tag.
946 * docs/topics/types.rst (gcc_jit_context_get_type): Fix typo in
947 example.
948 (Vector types): New section.
949 * docs/_build/texinfo/libgccjit.texi: Regenerate.
950 * jit-playback.c (gcc::jit::playback::type::get_vector): New
951 method.
952 * jit-playback.h (gcc::jit::playback::type::get_vector): New
953 method.
954 * jit-recording.c: In namespace gcc::jit::recording::
955 (type::get_vector): New method.
956 (memento_of_get_aligned::write_reproducer): Fix typo
957 in leading comment.
958 (memento_of_get_vector::replay_into): New method.
959 (memento_of_get_vector::make_debug_string): New method.
960 (memento_of_get_vector::write_reproducer): New method.
961 * jit-recording.h: In namespace gcc::jit::recording::
962 (type::get_vector): New
963 method.
964 (class memento_of_get_vector): New class.
965 * libgccjit++.h (gccjit::type::get_vector): New method.
966 * libgccjit.c (gcc_jit_type_get_vector): New public entrypoint.
967 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_type_get_vector): New
968 define.
969 (gcc_jit_type_get_vector): New decl.
970 * libgccjit.map (LIBGCCJIT_ABI_8): New ABI tag.
971
b8506a8a
RS
9722017-07-05 Richard Sandiford <richard.sandiford@linaro.org>
973 Alan Hayward <alan.hayward@arm.com>
974 David Sherwood <david.sherwood@arm.com>
975
976 * dummy-frontend.c (jit_langhook_type_for_mode): Remove "enum" before
977 "machine_mode".
978
0ebd1f00
DM
9792017-04-24 David Malcolm <dmalcolm@redhat.com>
980
981 * docs/cp/topics/types.rst (gccjit::type::get_const): Remove
982 comment.
983 (gccjit::type::get_aligned): Add.
984 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_7.
985 * docs/topics/types.rst: Add gcc_jit_type_get_aligned.
986 * docs/_build/texinfo/libgccjit.texi: Regenerate.
987 * jit-playback.c (gcc::jit::playback::type::get_aligned): New
988 method.
989 * jit-playback.h (gcc::jit::playback::type::get_aligned): New
990 method.
991 * jit-recording.c: Within namespace gcc::jit::recording...
992 (type::get_aligned): New method.
993 (memento_of_get_aligned::replay_into): New method.
994 (memento_of_get_aligned::make_debug_string): New method.
995 (memento_of_get_aligned::write_reproducer): New method.
996 * jit-recording.h: Within namespace gcc::jit::recording...
997 (type::get_aligned): New method.
998 (type::accepts_writes_from): Strip off qualifications from
999 this when comparing pointer equality.
1000 (decorated_type): New subclass of type, subsuming the
1001 commonality between memento_of_get_const and
1002 memento_of_get_volatile.
1003 (memento_of_get_const): Make a subclass of decorated_type,
1004 rather than type.
1005 (memento_of_get_volatile): Likewise.
1006 (memento_of_get_aligned): Likewise.
1007 * libgccjit++.h: Within namespace gccjit...
1008 (type::get_const): New method.
1009 (type::get_aligned): New method.
1010 * libgccjit.c (gcc_jit_type_get_aligned): New function.
1011 * libgccjit.h (gcc_jit_type_get_aligned): New decl.
1012 * libgccjit.map (LIBGCCJIT_ABI_7): New
1013 (gcc_jit_type_get_aligned): Add.
1014
8a3a6ab4
DM
10152017-01-19 David Malcolm <dmalcolm@redhat.com>
1016
1017 * dummy-frontend.c (jit_langhook_type_for_size): Delete.
1018 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
1019
b37589b0
DM
10202017-01-18 David Malcolm <dmalcolm@redhat.com>
1021
1022 * dummy-frontend.c (jit_langhook_type_for_size): Implement, using
1023 lto's lto_type_for_size.
1024
cbe34bb5
JJ
10252017-01-01 Jakub Jelinek <jakub@redhat.com>
1026
1027 Update copyright years.
1028
15c671a7
DM
10292016-05-20 David Malcolm <dmalcolm@redhat.com>
1030
1031 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_6.
1032 * docs/topics/expressions.rst (Function calls): Add documentation
1033 of gcc_jit_rvalue_set_bool_require_tail_call.
1034 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1035 * jit-common.h (gcc::jit::recording::base_call): Add forward decl.
1036 * jit-playback.c: Within namespace gcc::jit::playback...
1037 (context::build_call) Add "require_tail_call" param and use it
1038 to set CALL_EXPR_MUST_TAIL_CALL.
1039 (context::new_call): Add "require_tail_call" param.
1040 (context::new_call_through_ptr): Likewise.
1041 * jit-playback.h: Within namespace gcc::jit::playback...
1042 (context::new_call: Add "require_tail_call" param.
1043 (context::new_call_through_ptr): Likewise.
1044 (context::build_call): Likewise.
1045 * jit-recording.c: Within namespace gcc::jit::recording...
1046 (base_call::base_call): New constructor.
1047 (base_call::write_reproducer_tail_call): New method.
1048 (call::call): Update for inheritance from base_call.
1049 (call::replay_into): Provide m_require_tail_call to call
1050 to new_call.
1051 (call::write_reproducer): Call write_reproducer_tail_call.
1052 (call_through_ptr::call_through_ptr): Update for inheritance from
1053 base_call.
1054 (call_through_ptr::replay_into): Provide m_require_tail_call to call
1055 to new_call_through_ptr.
1056 (recording::call_through_ptr::write_reproducer): Call
1057 write_reproducer_tail_call.
1058 * jit-recording.h: Within namespace gcc::jit::recording...
1059 (rvalue::dyn_cast_base_call): New virtual function.
1060 (class base_call): New subclass of class rvalue.
1061 (class call): Inherit from base_call rather than directly from
1062 rvalue, moving get_precedence and m_args to base_call.
1063 (class call_through_ptr): Likewise.
1064 * libgccjit.c (gcc_jit_rvalue_set_bool_require_tail_call): New
1065 function.
1066 * libgccjit.h
1067 (LIBGCCJIT_HAVE_gcc_jit_rvalue_set_bool_require_tail_call): New
1068 macro.
1069 (gcc_jit_rvalue_set_bool_require_tail_call): New function.
1070 * libgccjit.map (LIBGCCJIT_ABI_6): New.
1071 (gcc_jit_rvalue_set_bool_require_tail_call): Add.
1072
6b5423a5
DM
10732016-05-17 David Malcolm <dmalcolm@redhat.com>
1074
1075 * dummy-frontend.c: Include diagnostic.h.
1076 (jit_begin_diagnostic): New function.
1077 (jit_end_diagnostic): New function.
1078 (jit_langhook_init): Register jit_begin_diagnostic
1079 and jit_end_diagnostic with the global_dc.
1080 * jit-playback.c: Include diagnostic.h.
1081 (gcc::jit::playback::context::add_diagnostic): New method.
1082 * jit-playback.h (struct diagnostic_context): Add forward
1083 declaration.
1084 (gcc::jit::playback::context::add_diagnostic): New method.
1085
f51703a8
DM
10862016-05-17 David Malcolm <dmalcolm@redhat.com>
1087
1088 * docs/topics/expressions.rst (Function calls): Document
1089 gcc_jit_context_new_call_through_ptr.
1090 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1091
54ece5e2
DM
10922016-05-13 David Malcolm <dmalcolm@redhat.com>
1093
1094 * jit-playback.h: Within namespace gcc:jit::playback...
1095 (compile_to_memory::postprocess): Mark with FINAL OVERRIDE.
1096 (compile_to_file::postprocess): Likewise.
1097 (function::finalizer): Likewise.
1098 (block::finalizer): Likewise.
1099 (source_file::finalizer): Likewise.
1100 (source_line::finalizer): Likewise.
1101 * jit-recording.c (gcc::jit::rvalue_usage_validator):: Likewise.
1102 * jit-recording.h: Within namespace gcc::jit::recording...
1103 (string::replay_into): Mark with FINAL OVERRIDE.
1104 (string::make_debug_string): Likewise.
1105 (string::write_reproducer): Likewise.
1106 (location::replay_into): Likewise.
1107 (location::dyn_cast_location): Likewise.
1108 (location::make_debug_string): Likewise.
1109 (location::write_reproducer): Likewise.
1110 (memento_of_get_type::dereference): Likewise.
1111 (memento_of_get_type::accepts_writes_from): Likewise.
1112 (memento_of_get_type::is_int): Likewise.
1113 (memento_of_get_type::is_float): Likewise.
1114 (memento_of_get_type::is_bool): Likewise.
1115 (memento_of_get_type::is_pointer): Likewise.
1116 (memento_of_get_type::is_array): Likewise.
1117 (memento_of_get_type::is_void): Likewise.
1118 (memento_of_get_type::replay_into): Likewise.
1119 (memento_of_get_type::make_debug_string): Likewise.
1120 (memento_of_get_type::write_reproducer): Likewise.
1121 (memento_of_get_pointer::dereference): Likewise.
1122 (memento_of_get_pointer::accepts_writes_from): Likewise.
1123 (memento_of_get_pointer::replay_into): Likewise.
1124 (memento_of_get_pointer::is_int): Likewise.
1125 (memento_of_get_pointer::is_float): Likewise.
1126 (memento_of_get_pointer::is_bool): Likewise.
1127 (memento_of_get_pointer::is_pointer): Likewise.
1128 (memento_of_get_pointer::is_array): Likewise.
1129 (memento_of_get_pointer::make_debug_string): Likewise.
1130 (memento_of_get_pointer::write_reproducer): Likewise.
1131 (memento_of_get_const::dereference): Likewise.
1132 (memento_of_get_const::accepts_writes_from): Likewise.
1133 (memento_of_get_const::unqualified): Likewise.
1134 (memento_of_get_const::is_int): Likewise.
1135 (memento_of_get_const::is_float): Likewise.
1136 (memento_of_get_const::is_bool): Likewise.
1137 (memento_of_get_const::is_pointer): Likewise.
1138 (memento_of_get_const::is_array): Likewise.
1139 (memento_of_get_const::void replay_into): Likewise;
1140 (memento_of_get_const::make_debug_string): Likewise.
1141 (memento_of_get_const::write_reproducer): Likewise.
1142 (memento_of_get_volatile::dereference): Likewise.
1143 (memento_of_get_volatile::unqualified): Likewise.
1144 (memento_of_get_volatile::is_int): Likewise.
1145 (memento_of_get_volatile::is_float): Likewise.
1146 (memento_of_get_volatile::is_bool): Likewise.
1147 (memento_of_get_volatile::is_pointer): Likewise.
1148 (memento_of_get_volatile::is_array): Likewise.
1149 (memento_of_get_volatile::replay_into): Likewise;
1150 (memento_of_get_volatile::make_debug_string): Likewise.
1151 (memento_of_get_volatile::write_reproducer): Likewise.
1152 (array_type::dereference): Likewise.
1153 (array_type::is_int): Likewise.
1154 (array_type::is_float): Likewise.
1155 (array_type::is_bool): Likewise.
1156 (array_type::is_pointer): Likewise.
1157 (array_type::is_array): Likewise.
1158 (array_type::replay_into): Likewise;
1159 (array_type::make_debug_string): Likewise.
1160 (array_type::write_reproducer): Likewise.
1161 (function_type::dereference): Likewise.
1162 (function_type::function_dyn_cast_function_type): Likewise.
1163 (function_type::function_as_a_function_type): Likewise.
1164 (function_type::is_int): Likewise.
1165 (function_type::is_float): Likewise.
1166 (function_type::is_bool): Likewise.
1167 (function_type::is_pointer): Likewise.
1168 (function_type::is_array): Likewise.
1169 (function_type::replay_into): Likewise;
1170 (function_type::make_debug_string): Likewise.
1171 (function_type::write_reproducer): Likewise.
1172 (field::replay_into): Likewise;
1173 (field::write_to_dump): Likewise.
1174 (field::make_debug_string): Likewise.
1175 (field::write_reproducer): Likewise.
1176 (compound_type::dereference): Likewise.
1177 (compound_type::is_int): Likewise.
1178 (compound_type::is_float): Likewise.
1179 (compound_type::is_bool): Likewise.
1180 (compound_type::is_pointer): Likewise.
1181 (compound_type::is_array): Likewise.
1182 (compound_type::has_known_size): Likewise.
1183 (struct_::dyn_cast_struct): Likewise.
1184 (struct_::replay_into): Likewise.
1185 (struct_::access_as_type): Likewise.
1186 (struct_::make_debug_string): Likewise.
1187 (struct_::write_reproducer): Likewise.
1188 (fields::replay_into): Likewise.
1189 (fields::write_to_dump): Likewise.
1190 (fields::make_debug_string): Likewise.
1191 (fields::write_reproducer): Likewise.
1192 (union_::replay_into): Likewise.
1193 (union_::make_debug_string): Likewise.
1194 (union_::write_reproducer): Likewise.
1195 (lvalue::access_as_rvalue): Mark with OVERRIDE.
1196 (param::replay_into): Mark with FINAL OVERRIDE.
1197 (param::visit_children): Likewise.
1198 (param::dyn_cast_param): Likewise.
1199 (param::access_as_rvalue): Likewise.
1200 (param::access_as_lvalue): Likewise.
1201 (param::make_debug_string): Likewise.
1202 (param::write_reproducer): Likewise.
1203 (param::get_precedence): Likewise.
1204 (function::replay_into): Likewise.
1205 (function::write_to_dump): Likewise.
1206 (function::make_debug_string): Likewise.
1207 (function::write_reproducer): Likewise.
1208 (block::write_to_dump): Likewise.
1209 (block::make_debug_string): Likewise.
1210 (block::write_reproducer): Likewise.
1211 (block::replay_into): Likewise.
1212 (global::replay_into): Likewise;
1213 (global::visit_children): Likewise.
1214 (global::write_to_dump): Likewise.
1215 (global::make_debug_string): Likewise.
1216 (global::write_reproducer): Likewise.
1217 (global::get_precedence): Likewise.
1218 (memento_of_new_rvalue_from_const::replay_into): Likewise.
1219 (memento_of_new_rvalue_from_const::visit_children): Likewise.
1220 (memento_of_new_rvalue_from_const::is_constant): Likewise.
1221 (memento_of_new_rvalue_from_const::get_wide_int): Likewise.
1222 (memento_of_new_rvalue_from_const::make_debug_string): Likewise.
1223 (memento_of_new_rvalue_from_const::write_reproducer): Likewise.
1224 (memento_of_new_rvalue_from_const::get_precedence): Likewise.
1225 (memento_of_new_string_literal::replay_into): Likewise.
1226 (memento_of_new_string_literal::visit_children): Likewise.
1227 (memento_of_new_string_literal::make_debug_string): Likewise.
1228 (memento_of_new_string_literal::write_reproducer): Likewise.
1229 (memento_of_new_string_literal::get_precedence): Likewise.
1230 (unary_op::replay_into): Likewise.
1231 (unary_op::visit_children): Likewise.
1232 (unary_op::make_debug_string): Likewise.
1233 (unary_op::write_reproducer): Likewise.
1234 (unary_op::get_precedence): Likewise.
1235 (binary_op::replay_into): Likewise.
1236 (binary_op::visit_children): Likewise.
1237 (binary_op::make_debug_string): Likewise.
1238 (binary_op::write_reproducer): Likewise.
1239 (binary_op::get_precedence): Likewise.
1240 (comparison::replay_into): Likewise.
1241 (comparison::visit_children): Likewise.
1242 (comparison::make_debug_string): Likewise.
1243 (comparison::write_reproducer): Likewise.
1244 (comparison::get_precedence): Likewise.
1245 (cast::replay_into): Likewise.
1246 (cast::visit_children): Likewise.
1247 (cast::make_debug_string): Likewise.
1248 (cast::write_reproducer): Likewise.
1249 (cast::get_precedence): Likewise.
1250 (call::replay_into): Likewise.
1251 (call::visit_children): Likewise.
1252 (call::make_debug_string): Likewise.
1253 (call::write_reproducer): Likewise.
1254 (call::get_precedence): Likewise.
1255 (call_through_ptr::replay_into): Likewise.
1256 (call_through_ptr::visit_children): Likewise.
1257 (call_through_ptr::make_debug_string): Likewise.
1258 (call_through_ptr::write_reproducer): Likewise.
1259 (call_through_ptr::get_precedence): Likewise.
1260 (array_access::replay_into): Likewise.
1261 (array_access::visit_children): Likewise.
1262 (array_access::make_debug_string): Likewise.
1263 (array_access::write_reproducer): Likewise.
1264 (array_access::get_precedence): Likewise.
1265 (access_field_of_lvalue::replay_into): Likewise.
1266 (access_field_of_lvalue::visit_children): Likewise.
1267 (access_field_of_lvalue::make_debug_string): Likewise.
1268 (access_field_of_lvalue::write_reproducer): Likewise.
1269 (access_field_of_lvalue::get_precedence): Likewise.
1270 (access_field_rvalue::replay_into): Likewise.
1271 (access_field_rvalue::visit_children): Likewise.
1272 (access_field_rvalue::make_debug_string): Likewise.
1273 (access_field_rvalue::write_reproducer): Likewise.
1274 (access_field_rvalue::get_precedence): Likewise.
1275 (dereference_field_rvalue::replay_into): Likewise.
1276 (dereference_field_rvalue::visit_children): Likewise.
1277 (dereference_field_rvalue::make_debug_string): Likewise.
1278 (dereference_field_rvalue::write_reproducer): Likewise.
1279 (dereference_field_rvalue::get_precedence): Likewise.
1280 (dereference_rvalue::replay_into): Likewise.
1281 (dereference_rvalue::visit_children): Likewise.
1282 (dereference_rvalue::make_debug_string): Likewise.
1283 (dereference_rvalue::write_reproducer): Likewise.
1284 (dereference_rvalue::get_precedence): Likewise.
1285 (get_address_of_lvalue::replay_into): Likewise.
1286 (get_address_of_lvalue::visit_children): Likewise.
1287 (get_address_of_lvalue::make_debug_string): Likewise.
1288 (get_address_of_lvalue::write_reproducer): Likewise.
1289 (get_address_of_lvalue::get_precedence): Likewise.
1290 (local::replay_into): Likewise.
1291 (local::visit_children): Likewise.
1292 (local::write_to_dump): Likewise.
1293 (local::make_debug_string): Likewise.
1294 (local::write_reproducer): Likewise.
1295 (local::get_precedence): Likewise.
1296 (statement::write_to_dump): Likewise.
1297 (eval::replay_into): Likewise.
1298 (eval::make_debug_string): Likewise.
1299 (eval::write_reproducer): Likewise.
1300 (assignment::replay_into): Likewise.
1301 (assignment::make_debug_string): Likewise.
1302 (assignment::write_reproducer): Likewise.
1303 (assignment_op::replay_into): Likewise.
1304 (assignment_op::make_debug_string): Likewise.
1305 (assignment_op::write_reproducer): Likewise.
1306 (comment::replay_into): Likewise.
1307 (comment::make_debug_string): Likewise.
1308 (comment::write_reproducer): Likewise.
1309 (conditional::replay_into): Likewise.
1310 (conditional::get_successor_blocks): Likewise.
1311 (conditional::make_debug_string): Likewise.
1312 (conditional::write_reproducer): Likewise.
1313 (jump::replay_into): Likewise.
1314 (jump::get_successor_blocks): Likewise.
1315 (jump::make_debug_string): Likewise.
1316 (jump::write_reproducer): Likewise.
1317 (return_::replay_into): Likewise.
1318 (return_::get_successor_blocks): Likewise.
1319 (return_::make_debug_string): Likewise.
1320 (return_::write_reproducer): Likewise.
1321 (case_::replay_into): Likewise.
1322 (case_::write_reproducer): Likewise.
1323 (case_::make_debug_string): Likewise.
1324 (switch_::replay_into): Likewise.
1325 (switch_::get_successor_blocks): Likewise.
1326 (switch_::make_debug_string): Likewise.
1327 (switch_::write_reproducer): Likewise.
1328
f258ad62
DM
13292016-02-08 David Malcolm <dmalcolm@redhat.com>
1330
1331 * dummy-frontend.c (jit_langhook_init): Remove
1332 second argument to build_common_tree_nodes to
1333 track r233218.
1334
1c652ccb
IB
13352016-01-23 Iain Buclaw <ibuclaw@gdcproject.org>
1336
1337 * jit-playback.c: Include pthread.h.
1338
199501ea
DM
13392016-01-19 David Malcolm <dmalcolm@redhat.com>
1340
1341 PR jit/69144
1342 * jit-playback.c (gcc::jit::playback::compile_to_file::postprocess):
1343 Potentially add the temporary artifact to the tempdir's list of
1344 tempfiles needing additional cleanup.
1345 (gcc::jit::playback::context::extract_any_requested_dumps): Likewise
1346 for the dumpfile.
1347 * jit-tempdir.c (gcc::jit::tempdir::~tempdir): Clean up additional
1348 tempfiles.
1349 * jit-tempdir.h (gcc::jit::tempdir::add_temp_file): New method.
1350 (gcc::jit::tempdir::m_tempfiles): New field.
1351 * docs/cp/intro/tutorial04.rst: Update for changes to toyvm.cc.
1352 * docs/examples/tut04-toyvm/toyvm.cc (class compilation_result):
1353 New.
1354 (toyvm_function::compile): Change return type from function ptr
1355 to a compilation_result.
1356 (toyvm_function::get_function_name): New accessor.
1357 (toyvm_function::m_funcname): New field.
1358 (get_function_name): Convert to...
1359 (toyvm_function::make_function_name): ...this new method.
1360 (toyvm_function::parse): Call make_function_name.
1361 (toyvm_function::compile): Convert return type from function ptr
1362 to a compilation_result. Use get_function_name.
1363 (compilation_state::compile): Convert return type from
1364 gcc_jit_result * to a compilation_result.
1365 (test_script): Update for above changes, extracting the code from
1366 the compilation_result.
1367 (main): Likewise.
1368 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1369
818ab71a
JJ
13702016-01-04 Jakub Jelinek <jakub@redhat.com>
1371
1372 Update copyright years.
1373
69f293c9
AM
13742015-11-11 Andrew MacLeod <amacleod@redhat.com>
1375
1376 * dummy-frontend.c: Remove unused header files.
1377 * jit-builtins.c: Likewise.
1378 * jit-playback.c: Likewise.
1379 * jit-recording.c: Likewise.
1380 * jit-spec.c: Likewise.
1381 * libgccjit.c: Likewise.
1382
0aad0198
RS
13832015-11-07 Richard Sandiford <richard.sandiford@arm.com>
1384
1385 * jit-builtins.c: Don't undef DEF_BUILTIN.
1386
2adfab87
AM
13872015-10-29 Andrew MacLeod <amacleod@redhat.com>
1388
1389 * dummy-frontend.c: Reorder #include's and remove duplicates.
1390 * jit-builtins.c: Likewise.
1391 * jit-playback.c: Likewise.
1392 * jit-recording.c: Likewise.
1393 * libgccjit.c: Likewise.
1394
d9a6bd32
JJ
13952015-10-13 Jakub Jelinek <jakub@redhat.com>
1396
1397 * jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
1398 DEF_FUNCTION_TYPE_11): Define.
1399 * jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
1400 DEF_FUNCTION_TYPE_11): Define.
1401
fa83660d
TS
14022015-09-30 Thomas Schwinge <thomas@codesourcery.com>
1403 Ulrich Drepper <drepper@gmail.com>
1404
1405 * jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use.
1406
20a44562
MK
14072015-09-30 Matthias Klose <doko@ubuntu.com>
1408
1409 * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,
1410 remove DEF_FUNCTION_TYPE_VAR_11.
1411 * jit-builtins.c (builtins_manager::make_type): Define and handle
1412 DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.
1413
9376dd63
DM
14142015-08-25 David Malcolm <dmalcolm@redhat.com>
1415
1416 * docs/cp/topics/contexts.rst
1417 (gccjit::context::set_bool_use_external_driver): New.
1418 * docs/internals/test-hello-world.exe.log.txt: Update.
1419 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_5): New.
1420 * docs/topics/contexts.rst
1421 (gcc_jit_context_set_bool_use_external_driver): New.
1422 * jit-common.h (enum inner_bool_option): Add
1423 INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
1424 * jit-playback.c (gcc_driver_name): New global.
1425 (gcc:jit::playback::context::invoke_driver): Split out second
1426 half into...
1427 (gcc::jit::playback::context::invoke_embedded_driver): ...this new
1428 function, and...
1429 (gcc::jit::playback::context::invoke_external_driver): ...this new
1430 function.
1431 * jit-playback.h
1432 (gcc::jit::playback::context::get_inner_bool_option): New.
1433 (gcc::jit::playback::context::invoke_embedded_driver): New.
1434 (gcc::jit::playback::context::invoke_external_driver): New.
1435 * jit-recording.c (inner_bool_option_reproducer_strings):
1436 Add entry for INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
1437 * libgccjit++.h
1438 (gccjit::context::set_bool_use_external_driver): New.
1439 * libgccjit.c (gcc_jit_context_set_bool_use_external_driver): New.
1440 * libgccjit.h (gcc_jit_context_set_bool_use_external_driver): New.
1441 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_use_external_driver):
1442 New.
1443 * libgccjit.map (LIBGCCJIT_ABI_5): New.
1444 * notes.txt: Show invocation of embedded copy of driver.
1445 * docs/internals/test-hello-world.exe.log.txt: Update
1446
baf3fbad
DM
14472015-08-13 David Malcolm <dmalcolm@redhat.com>
1448
1449 * jit-playback.c (invoke_driver): On OS X, add
1450 "-Wl,-undefined,dynamic_lookup" to the driver arguments.
1451
afed3459
DM
14522015-08-03 David Malcolm <dmalcolm@redhat.com>
1453
1454 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
1455 * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY):
1456 We no longer show a profile.
1457 * docs/topics/index.rst (Topic Reference): Add performance.rst.
1458 * docs/topics/performance.rst: New file.
1459 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1460 * jit-playback.c (gcc::jit::playback::context::compile): Add timer
1461 param when constructing the "toplev" instance.
1462 (gcc::jit::playback::context::acquire_mutex): Add timer param when
1463 constructing auto_timevar instance.
1464 (gcc::jit::playback::context::make_fake_args): If we have a timer,
1465 add "-ftime-report".
1466 (gcc::jit::playback::context::invoke_driver): Add timer param when
1467 constructing auto_timevar instance.
1468 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
1469 * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor.
1470 * jit-recording.c: Include timevar.h.
1471 (gcc::jit::recording::context::context): Initialize field "m_timer".
1472 * jit-recording.h: Add forward declaration of class timer.
1473 (gcc::jit::recording::context::set_timer): New method.
1474 (gcc::jit::recording::context::get_timer): New method.
1475 (gcc::jit::recording::context::m_timer): New field.
1476 * libgccjit++.h (gccjit::timer): New class.
1477 (gccjit::auto_time): New class.
1478 (gccjit::context::set_timer): New method.
1479 (gccjit::context::get_timer): New.
1480 (gccjit::timer::timer): New.
1481 (gccjit::timer::push): New.
1482 (gccjit::timer::pop): New.
1483 (timer::print): New.
1484 (timer::get_inner_timer): New.
1485 (timer::release): New.
1486 (auto_time::auto_time): New.
1487 (auto_time::~auto_time): New.
1488 * libgccjit.c: Include timevar.h.
1489 (struct gcc_jit_timer): New.
1490 (gcc_jit_timer_new): New function.
1491 (gcc_jit_timer_release): New function.
1492 (gcc_jit_context_set_timer): New function.
1493 (gcc_jit_context_get_timer): New function.
1494 (gcc_jit_timer_push): New function.
1495 (gcc_jit_timer_pop): New function.
1496 (gcc_jit_timer_print): New function.
1497 * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro.
1498 (gcc_jit_timer): New typedef.
1499 (gcc_jit_timer_new): New function.
1500 (gcc_jit_timer_release): New function.
1501 (gcc_jit_context_set_timer): New function.
1502 (gcc_jit_context_get_timer): New function.
1503 (gcc_jit_timer_push): New function.
1504 (gcc_jit_timer_pop): New function.
1505 (gcc_jit_timer_print): New function.
1506 * libgccjit.map (LIBGCCJIT_ABI_4): New.
1507 (gcc_jit_timer_new): New function.
1508 (gcc_jit_timer_release): New function.
1509 (gcc_jit_context_set_timer): New function.
1510 (gcc_jit_context_get_timer): New function.
1511 (gcc_jit_timer_push): New function.
1512 (gcc_jit_timer_pop): New function.
1513 (gcc_jit_timer_print): New function.
1514
eb3982c1
DM
15152015-07-23 David Malcolm <dmalcolm@redhat.com>
1516
1517 * jit-playback.c (invoke_driver): Convert local "argvec"
1518 to an auto_argvec, so that it owns copies of the strings,
1519 rather than borrows them, updating ADD_ARG to use xstrdup
1520 and special-casing the NULL terminator to avoid
1521 xstrdup (NULL). Call add_multilib_driver_arguments at the front
1522 of the arguments.
1523 (MULTILIB_DEFAULTS): Provide a default definition.
1524 (multilib_defaults_raw): New constant array.
1525 (gcc::jit::playback::context::add_multilib_driver_arguments): New
1526 method.
1527 * jit-playback.h
1528 (gcc::jit::playback::context::add_multilib_driver_arguments): New
1529 method.
1530 * docs/internals/test-hello-world.exe.log.txt: Update.
1531 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1532
1470e75f
DM
15332015-07-16 David Malcolm <dmalcolm@redhat.com>
1534
1535 * docs/internals/index.rst (Overview of code structure): Add note
1536 that the implementation is in C++, despite the .c extension.
1537 (Submitting patches): New subsection.
1538 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1539
1916bcb5
AM
15402015-07-09 Andrew MacLeod <amacleod@redhat.com>
1541
1542 * dummy-frontend.c: Adjust includes for flags.h changes.
1543 * jit-common.h: Likewise.
1544 * jit-playback.c: Likewise.
1545
58c5ad40
DM
15462015-07-08 David Malcolm <dmalcolm@redhat.com>
1547
1548 PR jit/66783
1549 * libgccjit.c (gcc_jit_context_new_field): Show name of field in
1550 "unknown size" error message.
1551 (gcc_jit_struct_set_fields): Show name of struct in error message.
1552 (gcc_jit_context_new_global): Show name of global in
1553 "unknown size" error message.
1554 (gcc_jit_function_new_local): Likewise for local.
1555
c7131fb2
AM
15562015-07-07 Andrew MacLeod <amacleod@redhat.com>
1557
1558 * dummy-frontend.c: Adjust includes.
1559 * jit-common.h: Likewise.
1560 * jit-playback.c: Likewise.
1561
3457d39e
DM
15622015-07-07 David Malcolm <dmalcolm@redhat.com>
1563
1564 PR jit/66783
1565 * jit-recording.h: Within namespace gcc:jit::recording...
1566 (type::has_known_size): New virtual function.
1567 (struct_has_known_size): New function.
1568 * libgccjit.c (gcc_jit_context_new_field): Verify that the type
1569 has a known size.
1570 (gcc_jit_context_new_global): Likewise.
1571 (gcc_jit_function_new_local): Likewise.
1572
bada4bed
DM
15732015-07-07 David Malcolm <dmalcolm@redhat.com>
1574
1575 PR jit/66779
1576 * dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we
1577 handle modes QI, HI, SI, DI, TI.
1578
e09abfa4
DM
15792015-07-01 David Malcolm <dmalcolm@redhat.com>
1580
1581 PR jit/66700
1582 * jit-playback.c (jit_mark_addressable): New function.
1583 (gcc::jit::playback::lvalue::get_address): Call
1584 jit_mark_addressable on the underlying tree.
1585
e807aeaa
DM
15862015-07-01 David Malcolm <dmalcolm@redhat.com>
1587
1588 * docs/topics/types.rst (gcc_jit_context_new_union_type): Add
1589 documentation.
1590 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1591
c575221a
DM
15922015-07-01 David Malcolm <dmalcolm@redhat.com>
1593
1594 * docs/topics/contexts.rst (gcc_jit_context_set_bool_option):
1595 Clarify lack of lifetime requirements on (const char *) parameter.
1596 * docs/topics/expressions.rst
1597 (gcc_jit_context_new_string_literal): Likewise.
1598 (gcc_jit_context_new_global): Likewise.
1599 * docs/topics/functions.rst (gcc_jit_context_new_param): Likewise.
1600 (gcc_jit_context_new_function): Likewise.
1601 (gcc_jit_function_new_block): Likewise.
1602 (gcc_jit_block_add_comment): Likewise.
1603 * docs/topics/locations.rst (gcc_jit_context_new_location):
1604 Likewise.
1605 * docs/topics/types.rst (gcc_jit_context_new_field): Likewise.
1606 (gcc_jit_context_new_struct_type): Likewise.
1607 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1608
ec5d0088
DM
16092015-06-30 David Malcolm <dmalcolm@redhat.com>
1610
1611 * docs/cp/topics/functions.rst (Blocks): Add switch statements to
1612 list of ways to terminate a block.
1613 (gccjit::block::end_with_switch): Add function description.
1614 (gccjit::case_): Add class.
1615 (gccjit::context::new_case): Add function description.
1616 * docs/cp/topics/objects.rst: Add "case_" to class hierarchy.
1617 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New.
1618 * docs/topics/functions.rst (Blocks): Add switch statements to
1619 list of ways to terminate a block.
1620 (gcc_jit_block_end_with_switch): Add function description.
1621 (gcc_jit_case): Add type.
1622 (gcc_jit_context_new_case): Add function description.
1623 (gcc_jit_case_as_object): Add function description.
1624 * docs/topics/objects.rst: Add gcc_jit_case to class hierarchy.
1625 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1626 * jit-common.h (gcc::jit::recording::case_): Add forward decl.
1627 (gcc::jit::playback::case_): Add forward decl.
1628 * jit-playback.c (add_case): New function.
1629 (gcc::jit::playback::block::add_switch): New function.
1630 * jit-playback.h (gcc::jit::playback::case_): New struct.
1631 (gcc::jit::playback::block::get_function): New method.
1632 (gcc::jit::playback::block::add_switch): New method.
1633 * jit-recording.c: Within namespace gcc::jit...
1634 (recording::context::new_case): New method.
1635 (recording::function::validate): Update for change to
1636 get_successor_blocks.
1637 (recording::block::end_with_switch): New method.
1638 (recording::block::get_successor_blocks): Update to support an
1639 arbitrary number of successor blocks.
1640 (recording::block::dump_edges_to_dot): Likewise.
1641 (memento_of_new_rvalue_from_const <int>::get_wide_int): New.
1642 (memento_of_new_rvalue_from_const <long>::get_wide_int): New.
1643 (memento_of_new_rvalue_from_const <double>::get_wide_int): New.
1644 (memento_of_new_rvalue_from_const <void *>::get_wide_int): New.
1645 (recording::statement::get_successor_blocks): Update to support an
1646 arbitrary number of successor blocks.
1647 (recording::conditional::get_successor_blocks): Likewise.
1648 (recording::jump::get_successor_blocks): Likewise.
1649 (recording::return_::get_successor_blocks): Likewise.
1650 (recording::case_::write_reproducer): New.
1651 (recording::case_::make_debug_string): New.
1652 (recording::switch_::switch_): New.
1653 (recording::switch_::replay_into): New.
1654 (recording::switch_::get_successor_blocks): New.
1655 (recording::switch_::make_debug_string): New.
1656 (recording::switch_::write_reproducer): New.
1657 * jit-recording.h: Within namespace gcc::jit::recording...
1658 (context::new_case): New.
1659 (rvalue::is_constant): New.
1660 (rvalue::get_wide_int): New.
1661 (block::end_with_switch): New.
1662 (block::get_successor_blocks): Update to support an arbitrary
1663 number of successor blocks.
1664 (memento_of_new_rvalue_from_const::is_constant): New.
1665 (memento_of_new_rvalue_from_const::get_wide_int): New.
1666 (statement::get_successor_blocks): Update to support an arbitrary
1667 number of successor blocks.
1668 (conditional::get_successor_blocks): Likewise.
1669 (jump::get_successor_blocks): Likewise.
1670 (return_::get_successor_blocks): Likewise.
1671 (case_): New subclass of memento.
1672 (switch_): New subclass of statement.
1673 * libgccjit++.h (gccjit::case_): New subclass of gccjit::object.
1674 (gccjit::context::new_case): New method.
1675 (gccjit::block::end_with_switch): New method.
1676 (gccjit::case_::case): New ctors.
1677 (gccjit::case_::get_inner_case): New method.
1678 * libgccjit.c: Include "typed-splay-tree.h"
1679 (struct gcc_jit_case): New.
1680 (gcc_jit_context_new_case): New function.
1681 (gcc_jit_case_as_object): New function.
1682 (valid_dest_for_switch): New function.
1683 (valid_case_for_switch): New function.
1684 (class api_call_validator): New class.
1685 (class case_range_validator): New class.
1686 (case_range_validator::case_range_validator): New.
1687 (case_range_validator::validate): New.
1688 (case_range_validator::case_compare): New.
1689 (case_range_validator::get_wide_int): new.
1690 (gcc_jit_block_end_with_switch): New.
1691 * libgccjit.h: Add gcc_jit_case to class hierarchy comment.
1692 (gcc_jit_case): New typedef.
1693 (gcc_jit_context_new_case): New function.
1694 (gcc_jit_case_as_object): New function.
1695 (gcc_jit_block_end_with_switch): New function.
1696 (LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New.
1697 * libgccjit.map: Add gcc_jit_block_end_with_switch,
1698 gcc_jit_case_as_object and gcc_jit_context_new_case.
1699
6a3603e3
DM
17002015-06-30 David Malcolm <dmalcolm@redhat.com>
1701
1702 PR jit/66546
1703 * docs/cp/topics/contexts.rst
1704 (gccjit::context::set_bool_allow_unreachable_blocks): New.
1705 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New.
1706 * docs/topics/contexts.rst (Options): Add notes discussing the
1707 transition from enums to entrypoints for new options.
1708 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
1709 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1710 * jit-common.h (gcc::jit::inner_bool_option): New enum.
1711 * jit-recording.c: Within namespace gcc::jit...
1712 (recording::context::context): Handle m_inner_bool_options.
1713 (recording::context::set_inner_bool_option): New.
1714 (inner_bool_option_reproducer_strings): New.
1715 (recording::context::log_all_options): Log the "inner" bool
1716 options.
1717 (recording::context::log_inner_bool_option): New.
1718 (recording::context::dump_reproducer_to_file): Write initializers
1719 for "inner" bool options.
1720 (recording::function::validate): Don't check for block
1721 reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set.
1722 * jit-recording.h: Within namespace gcc::jit...
1723 (recording::context::set_inner_bool_option): New.
1724 (recording::context::get_inner_bool_option): New.
1725 (recording::context::log_inner_bool_option): New.
1726 (recording::context::m_inner_bool_options): New.
1727 * libgccjit++.h
1728 (gccjit::context::set_bool_allow_unreachable_blocks): New.
1729 * libgccjit.c
1730 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
1731 * libgccjit.h: Add note about options present in the
1732 initial release of libgccjit.
1733 (gcc_jit_context_set_bool_allow_unreachable_blocks): New API
1734 entrypoint.
1735 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks):
1736 New macro.
1737 * libgccjit.map (LIBGCCJIT_ABI_2): New, containing...
1738 (gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new
1739 entrypoint.
1740
fa22c20d
DM
17412015-06-30 David Malcolm <dmalcolm@redhat.com>
1742
1743 PR jit/66628
1744 * docs/cp/topics/contexts.rst (Additional command-line options):
1745 New section.
1746 * docs/topics/compatibility.rst: New file.
1747 * docs/topics/contexts.rst (Additional command-line options): New
1748 section.
1749 * docs/topics/index.rst: Add compatibility.rst.
1750 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1751 * jit-playback.c (make_fake_args): Add call to
1752 append_command_line_options.
1753 * jit-recording.c: Within namespace gcc::jit...
1754 (recording::context::~context): Free the optnames within
1755 m_command_line_options.
1756 (recording::context::set_bool_option): Likewise.
1757 (recording::context::add_command_line_option): New method.
1758 (recording::context::append_command_line_options): New method.
1759 (recording::context::dump_reproducer_to_file): Add command-line
1760 options.
1761 * jit-recording.h: Within namespace gcc::jit...
1762 (recording::context::add_command_line_option): New method.
1763 (recording::context::append_command_line_options): New method.
1764 (recording::context::m_command_line_options): New field.
1765 * libgccjit++.h (gccjit::context::add_command_line_option): New
1766 method.
1767 * libgccjit.c (gcc_jit_context_add_command_line_option): New API
1768 entrypoint.
1769 * libgccjit.h (gcc_jit_context_add_command_line_option): New API
1770 entrypoint.
1771 (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New
1772 macro.
1773 * libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add
1774 LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option.
1775
a6314e15
DM
17762015-06-30 David Malcolm <dmalcolm@redhat.com>
1777
1778 * jit-recording.c
1779 (gcc::jit::recording::context::dump_reproducer_to_file):
1780 Add pragma to generated reproducers to disable -Wunused-variable.
1781 Fix handling of NULL string options.
1782
adb6d84b
DM
17832015-06-30 David Malcolm <dmalcolm@redhat.com>
1784
1785 * docs/cp/topics/expressions.rst: Remove stray semicolon.
1786 * docs/cp/topics/functions.rst: Remove stray backslash.
1787 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1788
f0889939
AM
17892015-06-25 Andrew MacLeod <amacleod@redhat.com>
1790
1791 * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
1792 * jit-playback.c: Likewise.
1793
9cad7a76
AM
17942015-06-25 Andrew Macleod <amacleod@redhat.com>
1795
1796 * jit-common.h: Don't include alias.h.
1797
41571b55
DM
17982015-06-17 David Malcolm <dmalcolm@redhat.com>
1799
1800 * libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field
1801 is for the correct struct.
1802 (gcc_jit_rvalue_access_field): Likewise.
1803
abb226c9
AM
18042015-06-17 Andrew MacLeod <amacleod@redhat.com>
1805
1806 * dummy-frontend.c: Do not include input.h, line-map.h or is-a.h.
1807 * jit-common.h: Likewise.
1808 * jit-playback.c: Likewise.
1809
bd93aa1a
DM
18102015-06-16 David Malcolm <dmalcolm@redhat.com>
1811
1812 PR jit/66539
1813 * jit-recording.c: Within namespace gcc::jit::recording::
1814 (rvalue::get_debug_string_parens): New function.
1815 (binary_op::make_debug_string): Update to mimic C precedence
1816 rules.
1817 (binary_op_precedence): New array.
1818 (binary_op::get_precedence): New function.
1819 (comparison::make_debug_string): Update to mimic C precedence
1820 rules.
1821 (comparison_precedence): New array.
1822 (comparison::get_precedence): New function.
1823 (cast::make_debug_string): Update to mimic C precedence rules.
1824 (call::make_debug_string): Likewise.
1825 (call_through_ptr::make_debug_string): Likewise.
1826 (array_access::make_debug_string): Likewise.
1827 (access_field_of_lvalue::make_debug_string): Likewise.
1828 (access_field_rvalue::make_debug_string): Likewise.
1829 (dereference_field_rvalue::make_debug_string): Likewise.
1830 (dereference_rvalue::make_debug_string): Likewise.
1831 (get_address_of_lvalue::make_debug_string): Likewise.
1832 * jit-recording.h: Within namespace gcc::jit::recording::
1833 (precedence): New enum.
1834 (rvalue::rvalue): Initialize field "m_parenthesized_string".
1835 (rvalue::get_debug_string_parens): New method.
1836 (rvalue::get_precedence): New pure virtual function.
1837 (rvalue::m_parenthesized_string): New field.
1838 (param::get_precedence): New function.
1839 (global::get_precedence): New function.
1840 (memento_of_new_rvalue_from_const::get_precedence): New function.
1841 (memento_of_new_string_literal::get_precedence): New function.
1842 (unary_op::get_precedence): New function.
1843 (binary_op::get_precedence): New function.
1844 (comparison::get_precedence): New function.
1845 (cast::get_precedence): New function.
1846 (call::get_precedence): New function.
1847 (call_through_ptr::get_precedence): New function.
1848 (array_access::get_precedence): New function.
1849 (access_field_of_lvalue::get_precedence): New function.
1850 (access_field_rvalue::get_precedence): New function.
1851 (dereference_field_rvalue::get_precedence): New function.
1852 (dereference_rvalue::get_precedence): New function.
1853 (get_address_of_lvalue::get_precedence): New function.
1854 (local::get_precedence): New function.
1855
83c1b80e
MK
18562015-06-09 Matthias Klose <doko@ubuntu.com>
1857
1858 * Make-lang.in (jit.install-common): Install headers using INSTALL_DATA.
1859
13fdf2e2
AM
18602015-06-08 Andrew MacLeod <amacleod@redhat.com>
1861
1862 * dummy-frontend.c : Adjust include files.
1863 * jit-common.h : Likewise.
1864 * jit-playback.c : Likewise.
1865
e4753451
DM
18662015-06-05 David Malcolm <dmalcolm@redhat.com>
1867
1868 * dummy-frontend.c
1869 (jit_langhook_post_compilation_parsing_cleanups): Remove.
1870 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
1871 * jit-playback.c (gcc::jit::playback::context::new_global): Add
1872 call to varpool_node::finalize_decl.
1873 (gcc::jit::playback::context::finalize_global_decls): Remove.
1874 * jit-playback.h
1875 (gcc::jit::playback::context::finalize_global_decls): Remove.
1876
e7547bc6
DM
18772015-06-05 David Malcolm <dmalcolm@redhat.com>
1878
1879 * dummy-frontend.c (jit_langhook_write_globals): Rename to...
1880 (jit_langhook_post_compilation_parsing_cleanups): ...this, and
1881 eliminate calls to finalize_compilation_unit and
1882 write_global_decls_2.
1883 (LANG_HOOKS_WRITE_GLOBALS): Rename to...
1884 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
1885 redirect from jit_langhook_write_globals to
1886 jit_langhook_post_compilation_parsing_cleanups.
1887 * jit-playback.c
1888 (gcc::jit::playback::context::write_global_decls_1): Rename to...
1889 (gcc::jit::playback::context::finalize_global_decls): ...this.
1890 (gcc::jit::playback::context::write_global_decls_1): Delete.
1891 * jit-playback.h
1892 (gcc::jit::playback::context::write_global_decls_1): Rename to...
1893 (gcc::jit::playback::context::finalize_global_decls): ...this.
1894 (gcc::jit::playback::context::write_global_decls_1): Delete.
1895
ecb9f223
AM
18962015-06-04 Andrew MacLeod <amacleod@redhat.com>
1897
1898 * dummy-frontend.c: Adjust includes for restructured coretypes.h.
1899 * jit-common.h: Likewise.
1900 * jit-playback.c: Likewise.
1901
2637afb7
DM
19022015-05-12 David Malcolm <dmalcolm@redhat.com>
1903
1904 * jit-builtins.c: Include vec.h before target.h.
1905
46bf0b0a
JW
19062015-04-27 Jim Wilson <jim.wilson@linaro.org>
1907
1908 * Make-lang.in (jit.mostlyclean): Remove shared libraries and object
1909 files.
1910
51c5c6b5
DM
19112015-04-09 David Malcolm <dmalcolm@redhat.com>
1912
1913 PR jit/65691
1914 * docs/cp/topics/expressions.rst (Simple expressions): Fix copy
1915 and paste error in description of gccjit::context::one.
1916 * docs/topics/expressions.rst (Simple expressions): Likewise in
1917 description of gcc_jit_context_one.
1918 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1919
f40fd895
UB
19202015-03-13 Uros Bizjak <ubizjak@gmail.com>
1921
1922 * jit-recording.c (dump::write): Also check vasprintf return value.
1923 (recording::context::add_error_va): Ditto.
1924 (recording::string::from_printf): Ditto.
1925
18eb0d13
DM
19262015-03-13 David Malcolm <dmalcolm@redhat.com>
1927
1928 * docs/internals/index.rst (Packaging notes): New section.
1929 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1930
7ef96183
DM
19312015-03-05 David Malcolm <dmalcolm@redhat.com>
1932
1933 * docs/cp/intro/tutorial03.rst: Add missing arguments to
1934 gccjit::block::end_with_conditional call. Add on_true/on_false
1935 comments. Tweak the wording.
1936 * docs/intro/tutorial03.rst: Add missing arguments to
1937 gcc_jit_block_end_with_conditional call. Add some clarifying
1938 comments.
1939 * docs/topics/compilation.rst: Tweak the wording to avoid an
1940 ambiguous use of "this".
1941 * docs/topics/contexts.rst: Fix a typo.
1942 * docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
1943 a stray backtick.
1944 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1945
56a9f6bc
TS
19462015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1947
1948 PR libgomp/64625
1949 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8)
1950 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
1951 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1952 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8)
1953 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
1954 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1955
a4be4e91
DM
19562015-02-04 David Malcolm <dmalcolm@redhat.com>
1957
1958 PR jit/64257
1959 * docs/conf.py (html_theme): Change from 'pyramid'
1960 to 'sphinxdoc'.
1961
f435bff3
DM
19622015-02-04 David Malcolm <dmalcolm@redhat.com>
1963
1964 * docs/topics/contexts.rst (gcc_jit_context_acquire): Fix
1965 typo.
1966 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1967
0ed4f017
DM
19682015-02-03 David Malcolm <dmalcolm@redhat.com>
1969
1970 * jit-logging.h (gcc::jit::log_user::log): Make const.
1971 * jit-recording.c (gcc::jit::recording::context::set_str_option):
1972 Log the new value of the option.
1973 (gcc::jit::recording::context::set_int_option): Likewise.
1974 (gcc::jit::recording::context::set_bool_option): Likewise.
1975 (gcc::jit::recording::context::compile): Log the value of all
1976 options.
1977 (gcc::jit::recording::context::compile_to_file): Likewise.
1978 (gcc::jit::recording::context::log_all_options): New function.
1979 (gcc::jit::recording::context::log_str_option): New function.
1980 (gcc::jit::recording::context::log_int_option): New function.
1981 (gcc::jit::recording::context::log_bool_option): New function.
1982 * jit-recording.h (gcc::jit::recording::context::log_all_options):
1983 New function.
1984 (gcc::jit::recording::context::log_str_option): New function.
1985 (gcc::jit::recording::context::log_int_option): New function.
1986 (gcc::jit::recording::context::log_bool_option): New function.
1987 * docs/internals/test-hello-world.exe.log.txt: Update for above
1988 changes.
1989 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1990
2cb844ce
DM
19912015-02-03 David Malcolm <dmalcolm@redhat.com>
1992
1993 PR jit/64810
1994 * Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o.
1995 (LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS.
1996 * jit-playback.c: Include gcc.h.
1997 (gcc::jit::playback::context::compile): Move mutex acquisition
1998 to before the call to make_fake_args.
1999 (append_arg_from_driver): New function.
2000 (gcc::jit::playback::context::make_fake_args): On the first call,
2001 call into driver_get_configure_time_options to get configure-time
2002 default options and cache them. Add them to the args for
2003 toplev::main.
2004 * jit-spec.c: New source file.
2005 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
2006 above changes.
2007 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2008
16a71c50
DM
20092015-02-02 David Malcolm <dmalcolm@redhat.com>
2010
2011 PR jit/64810
2012 * dummy-frontend.c (jit_langhook_type_for_mode): Support
2013 TYPE_MODE (long_long_integer_type_node).
2014
53c04ec9
DM
20152015-01-27 David Malcolm <dmalcolm@redhat.com>
2016
2017 * docs/internals/test-hello-world.exe.log.txt: Add example version
2018 lines.
2019 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2020 * jit-common.h (gcc::jit::dump::get_file): New accessor.
2021 * jit-logging.c: Include toplev.h.
2022 (gcc::jit::logger::logger): Log the GCC version.
2023 * jit-recording.c: Include toplev.h.
2024 (gcc:jit::recording::context::dump_reproducer_to_file): Log the
2025 GCC version.
2026
dc44ee3a
DM
20272015-01-26 David Malcolm <dmalcolm@redhat.com>
2028
2029 * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo.
2030 * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The
2031 error buffer is only valid until the next call to the context.
2032 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2033 * libgccjit.h (gcc_jit_context_get_first_error): Reword the
2034 comment to omit mention of compiling.
2035 (gcc_jit_context_get_last_error): The error buffer is only valid
2036 until the next call to the context.
2037
3349605d
DM
20382015-01-26 David Malcolm <dmalcolm@redhat.com>
2039
2040 PR jit/64708
2041 * config-lang.in (compilers): Drop "libgccjit.so".
2042
6fc2d0f3
DM
20432015-01-23 David Malcolm <dmalcolm@redhat.com>
2044
2045 PR jit/64721
2046 * jit-playback.c (gcc::jit::playback::context::compile): Construct
2047 toplev instances with init_signals=false.
2048
fdce7209
DM
20492015-01-19 David Malcolm <dmalcolm@redhat.com>
2050
2051 * docs/cp/topics/results.rst: Rename to...
2052 * docs/cp/topics/compilation.rst: ...this, and add section on
2053 ahead-of-time compilation.
2054 * docs/cp/topics/index.rst: Update for renaming of results.rst
2055 to compilation.rst.
2056 * docs/examples/emit-alphabet.bf: New file, a sample "brainf"
2057 script.
2058 * docs/examples/tut05-bf.c: New file, implementing a compiler
2059 for "brainf".
2060 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
2061 changes to logger output.
2062 * docs/intro/index.rst: Add tutorial05.rst
2063 * docs/intro/tutorial05.rst: New file.
2064 * docs/topics/results.rst: Rename to...
2065 * docs/topics/compilation.rst: ...this, and add section on
2066 ahead-of-time compilation.
2067 * docs/topics/index.rst: Update for renaming of results.rst to
2068 compilation.rst.
2069 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2070 * jit-playback.c (gcc::jit::playback::context::compile): Convert
2071 return type from result * to void. Move the code to convert to
2072 dso and dlopen the result to a new pure virtual "postprocess"
2073 method.
2074 (gcc::jit::playback::compile_to_memory::compile_to_memory): New
2075 function.
2076 (gcc::jit::playback::compile_to_memory::postprocess): New
2077 function, based on playback::context::compile.
2078 (gcc::jit::playback::compile_to_file::compile_to_file): New
2079 function.
2080 (gcc::jit::playback::compile_to_file::postprocess): New function.
2081 (gcc::jit::playback::compile_to_file::copy_file): New function.
2082 (gcc::jit::playback::context::convert_to_dso): Move internals
2083 to...
2084 (gcc::jit::playback::context::invoke_driver): New method. Add
2085 "-shared" and "-c" options to driver's argv as needed.
2086 * jit-playback.h: Include "timevar.h".
2087 (gcc::jit::playback::context::compile): Convert return type from
2088 result * to void.
2089 (gcc::jit::playback::context::postprocess): New pure virtual
2090 function, making this an abstract base class.
2091 (gcc::jit::playback::context::get_tempdir): New accessor.
2092 (gcc::jit::playback::context::invoke_driver): New function.
2093 (class gcc::jit::playback::compile_to_memory): New subclass of
2094 playback::context.
2095 (class gcc::jit::playback::compile_to_file): Likewise.
2096 * jit-recording.c (gcc::jit::recording::context::compile): Use a
2097 playback::compile_to_memory, and extract its result.
2098 (gcc::jit::recording::context::compile_to_file): New function.
2099 * jit-recording.h (gcc::jit::recording::context::compile_to_file):
2100 New function.
2101 * libgccjit++.h (gccjit::context::compile_to_file): New method.
2102 * libgccjit.c (gcc_jit_context_compile): Update log message to
2103 clarify that this is an in-memory compile.
2104 (gcc_jit_context_compile_to_file): New function.
2105 * libgccjit.h (gcc_jit_context): Clarify that you can compile
2106 a context more than once, and that you can compile to a file
2107 as well as to memory.
2108 (gcc_jit_result): Clarify that this is the result of an
2109 in-memory compilation.
2110 (gcc_jit_context_compile): Clarify that you can compile, and that
2111 this is an in-memory compilation.
2112 (enum gcc_jit_output_kind): New enum.
2113 (gcc_jit_context_compile_to_file): New function.
2114 (gcc_jit_context_enable_dump): Clarify comment to cover both forms
2115 of compilation.
2116 * libgccjit.map (gcc_jit_context_compile_to_file): New API
2117 entrypoint.
2118 * notes.txt: Update to show the playback::context::postprocess
2119 virtual function.
2120
450e225b
DM
21212015-01-19 David Malcolm <dmalcolm@redhat.com>
2122
2123 * jit-recording.c
2124 (gcc::jit::recording::memento_of_new_string_literal::make_debug_string):
2125 Add missing format string.
2126
499de348
DM
21272015-01-16 David Malcolm <dmalcolm@redhat.com>
2128
2129 * Make-lang.in (lang_checks_parallelized): Add "check-jit".
2130 (check_jit_parallelize): Set this to an arbitrary value (10).
2131
e989e68d
JJ
21322015-01-16 Jakub Jelinek <jakub@redhat.com>
2133
2134 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of
2135 last argument.
2136 (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and
2137 undef afterwards.
2138 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
2139 Likewise.
2140
179ed8f5
RS
21412015-01-15 Richard Sandiford <richard.sandiford@arm.com>
2142
2143 Update copyright years in docs/.
2144
96a87981
DM
21452015-01-15 David Malcolm <dmalcolm@redhat.com>
2146
2147 * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the
2148 lvalue and the rvalue are of compatible type.
2149
86d0ac88
DM
21502015-01-13 David Malcolm <dmalcolm@redhat.com>
2151
2152 * docs/cp/topics/contexts.rst (Debugging): Add
2153 gccjit::context::dump_reproducer_to_file.
2154 * docs/internals/index.rst (Design notes): New section,
2155 discussing input validation and
2156 gcc_jit_context_dump_reproducer_to_file.
2157 * docs/topics/contexts.rst (Debugging): Add
2158 gcc_jit_context_dump_reproducer_to_file.
2159 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2160 * jit-common.h (gcc::jit::dump::get_context): New accessor.
2161 * jit-recording.c: Include "hash-map.h".
2162 Within namespace ::gcc::jit...
2163 (dump::write): Flush each line.
2164 (dump::make_location): Pass false for new param "created_by_user".
2165 (class allocator): New class.
2166 (allocator::~allocator): New function.
2167 (allocator::xstrdup_printf): New function.
2168 (allocator::xstrdup_printf_va): New function.
2169 (class reproducer): New subclass of dump.
2170 (reproducer::reproducer): New function.
2171 (reproducer::write_params): New function.
2172 (reproducer::write_args): New function.
2173 (reproducer::make_identifier): New function.
2174 (reproducer::make_tmp_identifier): New function.
2175 (reproducer::get_identifier): New pair of functions.
2176 (reproducer::get_identifier_as_rvalue): New function.
2177 (reproducer::get_identifier_as_lvalue): New function.
2178 (reproducer::get_identifier_as_type): New function.
2179 (reproducer::xstrdup_printf): New function.
2180 (recording::context::context): Initialize m_toplevel_ctxt.
2181 (recording::context::new_location): Add param created_by_user.
2182 (str_option_reproducer_strings): New table of strings.
2183 (int_option_reproducer_strings): Likewise.
2184 (bool_option_reproducer_strings): Likewise.
2185 (get_type_enum_strings): Likewise.
2186 (names_of_function_kinds): Likewise.
2187 (global_kind_reproducer_strings): Likewise.
2188 (unary_op_reproducer_strings): Likewise.
2189 (binary_op_reproducer_strings): Likewise.
2190 (comparison_reproducer_strings): Likewise.
2191 Within namespace ::gcc::jit::recording::...
2192 (context::dump_reproducer_to_file): New function.
2193 (string::write_reproducer): Likewise.
2194 (location::write_reproducer): Likewise.
2195 (type::access_as_type): Likewise.
2196 (memento_of_get_type::write_reproducer): Likewise.
2197 (memento_of_get_pointer::write_reproducer): Likewise.
2198 (memento_of_get_const::write_reproducer): Likewise.
2199 (memento_of_get_volatile::write_reproducer): Likewise.
2200 (array_type::write_reproducer): Likewise.
2201 (function_type::write_reproducer): Likewise.
2202 (function_type::write_deferred_reproducer): Likewise.
2203 (field::write_reproducer): Likewise.
2204 (struct_::access_as_type): Likewise.
2205 (struct_::write_reproducer): Likewise.
2206 (union_::write_reproducer): Likewise.
2207 (fields::write_reproducer): Likewise.
2208 (rvalue::access_as_rvalue): Likewise.
2209 (lvalue::access_as_rvalue): Likewise.
2210 (lvalue::access_as_lvalue): Likewise.
2211 (param::access_as_rvalue): Likewise.
2212 (param::access_as_lvalue): Likewise.
2213 (param::write_reproducer): Likewise.
2214 (function::write_reproducer): Likewise.
2215 (block::write_reproducer): Likewise.
2216 (global::write_reproducer): Likewise.
2217 (memento_of_new_rvalue_from_const <int>::write_reproducer):
2218 Likewise.
2219 (memento_of_new_rvalue_from_const <long>::write_reproducer):
2220 Likewise.
2221 (memento_of_new_rvalue_from_const <double>::write_reproducer):
2222 Likewise.
2223 (memento_of_new_rvalue_from_const <void *>::write_reproducer):
2224 Likewise.
2225 (memento_of_new_string_literal::write_reproducer): Likewise.
2226 (unary_op::write_reproducer): Likewise.
2227 (binary_op::write_reproducer): Likewise.
2228 (comparison::write_reproducer): Likewise.
2229 (cast::write_reproducer): Likewise.
2230 (call::write_reproducer): Likewise.
2231 (call_through_ptr::write_reproducer): Likewise.
2232 (array_access::write_reproducer): Likewise.
2233 (access_field_of_lvalue::write_reproducer): Likewise.
2234 (access_field_rvalue::write_reproducer): Likewise.
2235 (dereference_field_rvalue::write_reproducer): Likewise.
2236 (dereference_rvalue::write_reproducer): Likewise.
2237 (get_address_of_lvalue::write_reproducer): Likewise.
2238 (local::write_reproducer): Likewise.
2239 (eval::write_reproducer): Likewise.
2240 (assignment::write_reproducer): Likewise.
2241 (assignment_op::write_reproducer): Likewise.
2242 (comment::write_reproducer): Likewise.
2243 (conditional::write_reproducer): Likewise.
2244 (jump::write_reproducer): Likewise.
2245 (return_::write_reproducer): Likewise.
2246 * jit-recording.h (gcc::jit::reproducer): New forward declararion.
2247 Within namespace ::gcc::jit::recording::...
2248 (context::new_location): Add "created_by_user" param.
2249 (context::dump_reproducer_to_file): New method.
2250 (context::m_toplevel_ctxt): New field.
2251 (memento::write_reproducer): New pure virtual function.
2252 (memento::dyn_cast_location): New virtual function.
2253 (string::write_reproducer):
2254 (location::location): Add "created_by_user" param.
2255 (location::dyn_cast_location): New function.
2256 (location::created_by_user): New accessor.
2257 (location::write_reproducer): New function.
2258 (location::m_created_by_user): New field.
2259 (type::access_as_type): New virtual function.
2260 (location::write_reproducer): Likewise.
2261 (type::access_as_type): Likewise.
2262 (memento_of_get_type::write_reproducer): Likewise.
2263 (memento_of_get_pointer::write_reproducer): Likewise.
2264 (memento_of_get_const::write_reproducer): Likewise.
2265 (memento_of_get_volatile::write_reproducer): Likewise.
2266 (array_type::write_reproducer): Likewise.
2267 (function_type::write_reproducer): Likewise.
2268 (function_type::write_deferred_reproducer): Likewise.
2269 (field::write_reproducer): Likewise.
2270 (struct_::access_as_type): Likewise.
2271 (struct_::write_reproducer): Likewise.
2272 (union_::write_reproducer): Likewise.
2273 (union_::m_fields): Remove stray unused field.
2274 (fields::length): New accessor.
2275 (fields::get_field): New accessor.
2276 (fields::write_reproducer): New function.
2277 (rvalue::access_as_rvalue): Likewise.
2278 (lvalue::access_as_rvalue): Likewise.
2279 (lvalue::access_as_lvalue): Likewise.
2280 (param::access_as_rvalue): Likewise.
2281 (param::access_as_lvalue): Likewise.
2282 (param::write_reproducer): Likewise.
2283 (function::write_reproducer): Likewise.
2284 (block::write_reproducer): Likewise.
2285 (global::write_reproducer): Likewise.
2286 (memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer):
2287 Likewise.
2288 (memento_of_new_string_literal::write_reproducer): Likewise.
2289 (unary_op::write_reproducer): Likewise.
2290 (binary_op::write_reproducer): Likewise.
2291 (comparison::write_reproducer): Likewise.
2292 (cast::write_reproducer): Likewise.
2293 (call::write_reproducer): Likewise.
2294 (call_through_ptr::write_reproducer): Likewise.
2295 (array_access::write_reproducer): Likewise.
2296 (access_field_of_lvalue::write_reproducer): Likewise.
2297 (access_field_rvalue::write_reproducer): Likewise.
2298 (dereference_field_rvalue::write_reproducer): Likewise.
2299 (dereference_rvalue::write_reproducer): Likewise.
2300 (get_address_of_lvalue::write_reproducer): Likewise.
2301 (local::write_reproducer): Likewise.
2302 (eval::write_reproducer): Likewise.
2303 (assignment::write_reproducer): Likewise.
2304 (assignment_op::write_reproducer): Likewise.
2305 (comment::write_reproducer): Likewise.
2306 (conditional::write_reproducer): Likewise.
2307 (jump::write_reproducer): Likewise.
2308 (return_::write_reproducer): Likewise.
2309 * libgccjit++.h (gccjit::context::dump_reproducer_to_file): New.
2310 * libgccjit.c (gcc_jit_context_new_location): Pass "true" as
2311 param "created_by_user".
2312 (gcc_jit_context_dump_reproducer_to_file): New API entrypoint.
2313 * libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API
2314 entrypoint.
2315 * libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API
2316 entrypoint.
2317
f6f2b019
DM
23182015-01-12 David Malcolm <dmalcolm@redhat.com>
2319
2320 * jit-recording.c (class gcc::jit::rvalue_usage_validator): New.
2321 (gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New
2322 ctor.
2323 (gcc::jit::rvalue_usage_validator::visit): New function.
2324 (gcc::jit::recording::rvalue::verify_valid_within_stmt): New
2325 function.
2326 (gcc::jit::recording::rvalue::set_scope): New function.
2327 (gcc::jit::recording::function::function): Call set_scope on each
2328 param, issuing errors for any params that already have a function.
2329 (gcc::jit::recording::block::add_eval): Return the new statement;
2330 update the comment given that some error-checking now happens after
2331 this returns.
2332 (gcc::jit::recording::block::add_assignment): Likewise.
2333 (gcc::jit::recording::block::add_assignment_op): Likewise.
2334 (gcc::jit::recording::block::add_comment): Likewise.
2335 (gcc::jit::recording::block::end_with_conditional): Likewise.
2336 (gcc::jit::recording::block::end_with_jump): Likewise.
2337 (gcc::jit::recording::block::end_with_return): Likewise.
2338 (gcc::jit::recording::block::validate): Add a comment.
2339 (gcc::jit::recording::unary_op::visit_children): New function.
2340 (gcc::jit::recording::binary_op::visit_children): New function.
2341 (gcc::jit::recording::comparison::visit_children): New function.
2342 (gcc::jit::recording::cast::visit_children): New function.
2343 (gcc::jit::recording::call::visit_children): New function.
2344 (gcc::jit::recording::call_through_ptr::visit_children): New function.
2345 (gcc::jit::recording::array_access::visit_children): New function.
2346 (gcc::jit::recording::access_field_of_lvalue::visit_children): New
2347 function.
2348 (gcc::jit::recording::access_field_rvalue::visit_children): New
2349 function.
2350 (gcc::jit::recording::dereference_field_rvalue::visit_children):
2351 New function.
2352 (gcc::jit::recording::dereference_rvalue::visit_children): New
2353 function.
2354 (gcc::jit::recording::get_address_of_lvalue::visit_children): New
2355 function.
2356 * jit-recording.h: Within namespace gcc::jit::recording...
2357 (class rvalue_visitor): New.
2358 (rvalue::rvalue): Initialize m_scope.
2359 (rvalue::get_loc): New accessor.
2360 (rvalue::verify_valid_within_stmt): New function.
2361 (rvalue::visit_children): New pure virtual function.
2362 (rvalue::set_scope): New function.
2363 (rvalue::get_scope): New function.
2364 (rvalue::dyn_cast_param): New function.
2365 (rvalue::m_scope): New field.
2366 (param::visit_children): New empty function.
2367 (param::dyn_cast_param): New function.
2368 (function::get_loc): New function.
2369 (block::add_eval): Return the new statement.
2370 (block::add_assignment): Likewise.
2371 (block::add_assignment_op): Likewise.
2372 (block::add_comment): Likewise.
2373 (block::end_with_conditional): Likewise.
2374 (block::end_with_jump): Likewise.
2375 (block::end_with_return): Likewise.
2376 (global::visit_children): New function.
2377 (memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children):
2378 New function.
2379 (memento_of_new_string_literal::visit_children): New function.
2380 (unary_op::visit_children): New function.
2381 (binary_op::visit_children): New function.
2382 (comparison::visit_children): New function.
2383 (cast::visit_children): New function.
2384 (call::visit_children): New function.
2385 (call_through_ptr::visit_children): New function.
2386 (array_access::visit_children): New function.
2387 (access_field_of_lvalue::visit_children): New function.
2388 (access_field_rvalue::visit_children): New function.
2389 (dereference_field_rvalue::visit_children): New function.
2390 (dereference_rvalue::visit_children): New function.
2391 (get_address_of_lvalue::visit_children): New function.
2392 (local::local): Call set_scope.
2393 (local::visit_children): New function.
2394 (statement::get_block): Make public.
2395 * libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro.
2396 (RETURN_NULL_IF_FAIL_PRINTF5): New macro.
2397 (gcc_jit_context_new_function): Verify that each param has
2398 not yet been used for creating another function.
2399 (gcc_jit_block_add_eval): After creating the stmt, verify
2400 that the rvalue expression tree is valid to use within it.
2401 (gcc_jit_block_add_assignment): Likewise for the lvalue and
2402 rvalue expression trees.
2403 (gcc_jit_block_add_assignment_op): Likewise.
2404 (gcc_jit_block_end_with_conditional): Likewise for the boolval
2405 expression tree.
2406 (gcc_jit_block_end_with_return): Likewise for the rvalue
2407 expression tree.
2408 (gcc_jit_block_end_with_void_return): Remove return of "void",
2409 now that block::end_with_return is now non-void.
2410
1c35cc2c
DM
24112015-01-12 David Malcolm <dmalcolm@redhat.com>
2412
2413 * jit-playback.c (gcc::jit::playback::context::read_dump_file):
2414 Add missing fclose on error-handling path.
2415
791cfef8
DM
24162015-01-12 David Malcolm <dmalcolm@redhat.com>
2417
2418 * docs/cp/topics/expressions.rst (Global variables): Add
2419 enum gcc_jit_global_kind param to gccjit::context::new_global.
2420 * docs/topics/expressions.rst (Global variables): Likewise.
2421 Document the new enum.
2422 * docs/topics/results.rst (Compilation results): Document
2423 globals-handling.
2424 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2425 * dummy-frontend.c (jit_langhook_write_globals): Call into the
2426 playback context's write_global_decls_1 and write_global_decls_2
2427 before and after calling symtab->finalize_compilation_unit ().
2428 * jit-playback.c: Include "debug.h".
2429 (gcc::jit::playback::context::new_global): Add "kind" param and
2430 use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the
2431 underlying VAR_DECL. Call varpool_node::get_create on the
2432 VAR_DECL, and add it to m_globals.
2433 (gcc::jit::playback::context::write_global_decls_1): New function.
2434 (gcc::jit::playback::context::write_global_decls_2): New function.
2435 * jit-playback.h (gcc::jit::playback::context::context): Call
2436 create on m_globals.
2437 (gcc::jit::playback::context::new_global): Add "kind" param.
2438 (gcc::jit::playback::context::write_global_decls_1): New function.
2439 (gcc::jit::playback::context::write_global_decls_2): New function.
2440 (gcc::jit::playback::context::m_globals): New field.
2441 * jit-recording.c (gcc::jit::recording::context::context):
2442 Initialize m_globals.
2443 (gcc::jit::recording::context::new_global): Add param "kind".
2444 Add the new global to m_globals.
2445 (gcc::jit::recording::context::dump_to_file): Dump the globals.
2446 (gcc::jit::recording::global::replay_into): Add field m_kind.
2447 (gcc::jit::recording::global::write_to_dump): New override.
2448 * jit-recording.h (gcc::jit::recording::context::new_global): Add
2449 param "kind".
2450 (gcc::jit::recording::context::m_globals): New field.
2451 (gcc::jit::recording::global::global): Add param kind.
2452 (gcc::jit::recording::global::write_to_dump): New override.
2453 (gcc::jit::recording::global::m_kind): New field.
2454 * jit-result.c (gcc::jit::result::get_global): New function.
2455 * jit-result.h (gcc::jit::result::get_global): New function.
2456 * libgccjit++.h (gccjit::context::new_global): Add "kind" param.
2457 * libgccjit.c (gcc_jit_context_new_global): Likewise.
2458 (gcc_jit_result_get_global): New API entrypoint.
2459 * libgccjit.h (gcc_jit_result_get_global): New API entrypoint.
2460 (enum gcc_jit_global_kind): New enum.
2461 (gcc_jit_context_new_global): API change: add "kind" param.
2462 * libgccjit.map (gcc_jit_result_get_global): New symbol.
2463
860e981c
DM
24642015-01-09 David Malcolm <dmalcolm@redhat.com>
2465
2466 * dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h",
2467 "symtab.h", "inchash.h". Move include of "hash-set.h" much
2468 earlier.
2469 * jit-builtins.c: Remove redundant includes of "opts.h" and
2470 "tree.h".
2471 * jit-common.h: Include "hash-set.h", "input.h", "vec.h",
2472 "double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h".
2473 * jit-playback.c: Include "hashtab.h", "machmode.h", "input.h",
2474 "statistics.h", "vec.h", "double-int.h", "real.h",
2475 "fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h",
2476 "inchash.h", "fold-const.h". Move include of "hash-set.h" to
2477 earlier.
2478 * jit-recording.c: Remove redundant includes of "opts.h" and
2479 "tree.h".
2480
ccce3b2a
DM
24812015-01-09 David Malcolm <dmalcolm@redhat.com>
2482
2483 * docs/cp/topics/expressions.rst (Simple expressions): Use
2484 ":c:type:" for C types. Document new overload of
2485 gcc::jit::context::new_rvalue.
2486 * docs/topics/expressions.rst (Simple expressions): Use
2487 ":c:type:" for C types. Document new entrypoint
2488 gcc_jit_context_new_rvalue_from_long.
2489 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2490 * jit-playback.c: Within namespace gcc::jit::playback...
2491 (context::new_rvalue_from_int): Eliminate in favor of...
2492 (context::new_rvalue_from_const <int>): ...this.
2493 (context::new_rvalue_from_double): Eliminate in favor of...
2494 (context::new_rvalue_from_const <double>): ...this.
2495 (context::new_rvalue_from_const <long>): New.
2496 (context::new_rvalue_from_ptr): Eliminate in favor of...
2497 (context::new_rvalue_from_const <void *>): ...this.
2498 * jit-playback.h: Within namespace gcc::jit::playback...
2499 (context::new_rvalue_from_int): Eliminate in favor of...
2500 (context::new_rvalue_from_const <HOST_TYPE>): ...this.
2501 (context::new_rvalue_from_double): Likewise.
2502 (context::new_rvalue_from_ptr): Likewise.
2503 * jit-recording.c: Within namespace gcc::jit::recording...
2504 (context::new_rvalue_from_int): Eliminate.
2505 (context::new_rvalue_from_double): Likewise.
2506 (context::new_rvalue_from_ptr): Likewise.
2507 (class memento_of_new_rvalue_from_const <int>):
2508 Add explicit specialization.
2509 (class memento_of_new_rvalue_from_const <long>):
2510 Likewise.
2511 (class memento_of_new_rvalue_from_const <double>):
2512 Likewise.
2513 (class memento_of_new_rvalue_from_const <void *>):
2514 Likewise.
2515 (memento_of_new_rvalue_from_int::replay_into):
2516 Generalize into...
2517 (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into):
2518 ...this...
2519 (memento_of_new_rvalue_from_double::replay_into):
2520 ...allowing this...
2521 (memento_of_new_rvalue_from_ptr::replay_into):
2522 ...and this to be deleted.
2523 (memento_of_new_rvalue_from_int::make_debug_string):
2524 Convert to...
2525 (memento_of_new_rvalue_from_const <int>::make_debug_string):
2526 ...this.
2527 (memento_of_new_rvalue_from_double::make_debug_string):
2528 Convert to...
2529 (memento_of_new_rvalue_from_const <double>::make_debug_string):
2530 ...this.
2531 (memento_of_new_rvalue_from_ptr::make_debug_string)
2532 Convert to...
2533 (memento_of_new_rvalue_from_const <void *>::make_debug_string):
2534 ...this.
2535 (memento_of_new_rvalue_from_const <long>::make_debug_string):
2536 New function.
2537 * jit-recording.h: Within namespace gcc::jit::recording...
2538 (context::new_rvalue_from_int): Eliminate.
2539 (context::new_rvalue_from_double): Likewise.
2540 (context::new_rvalue_from_ptr): Likewise, all in favor of...
2541 (context::new_rvalue_from_const <HOST_TYPE>): New family of
2542 methods.
2543 (class memento_of_new_rvalue_from_int): Eliminate.
2544 (class memento_of_new_rvalue_from_double): Likewise.
2545 (class memento_of_new_rvalue_from_ptr): Likewise.
2546 (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family
2547 of rvalue subclasses.
2548 * libgccjit++.h (gccjit::context::new_rvalue): New overload, for
2549 "long".
2550 * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for
2551 rewriting of recording::context::new_rvalue_from_int to
2552 recording::context::new_rvalue_from_const <int>.
2553 (gcc_jit_context_new_rvalue_from_long): New API entrypoint.
2554 (gcc_jit_context_new_rvalue_from_double): Update for
2555 rewriting of recording::context::new_rvalue_from_double to
2556 recording::context::new_rvalue_from_const <double>.
2557 (gcc_jit_context_new_rvalue_from_ptr): Update for
2558 rewriting of recording::context::new_rvalue_from_ptr to
2559 recording::context::new_rvalue_from_const <void *>.
2560 * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API
2561 entrypoint.
2562 * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise.
2563
d2286af3
DM
25642015-01-09 David Malcolm <dmalcolm@redhat.com>
2565
2566 PR jit/64206
2567 * docs/internals/test-hello-world.exe.log.txt: Update, the log now
2568 shows tempdir creation/cleanup.
2569 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2570 * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir
2571 to the list of subclasses in the comment.
2572 * jit-playback.c (gcc::jit::playback::context::context): Add a
2573 comment clarifying when the tempdir gets cleaned up.
2574 (gcc::jit::playback::context::compile): Pass the context's logger,
2575 if any, to the tempdir.
2576 (gcc::jit::playback::context::dlopen_built_dso): When creating the
2577 gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand
2578 over ownership of the tempdir to it.
2579 * jit-result.c: Include "jit-tempdir.h".
2580 (gcc::jit::result::result): Add tempdir param, saving it as
2581 m_tempdir.
2582 (gcc::jit::result::~result): Delete m_tempdir.
2583 * jit-result.h (gcc::jit::result::result): Add tempdir param.
2584 (gcc::jit::result::m_tempdir): New field.
2585 * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param;
2586 add JIT_LOG_SCOPE.
2587 (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit,
2588 and log m_path_template and m_path_tempdir.
2589 (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log
2590 entry/exit, and log the unlink and rmdir calls.
2591 * jit-tempdir.h: Include "jit-logging.h".
2592 (class gcc::jit::tempdir): Make this be a subclass of log_user.
2593 (gcc::jit::tempdir::tempdir): Add logger param.
2594 * notes.txt: Update to show the two possible places where the
2595 tempdir can be cleaned up.
2596
7c8db13e
DM
25972015-01-08 David Malcolm <dmalcolm@redhat.com>
2598
2599 * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive
2600 comment.
2601
303e1d56
DM
26022015-01-08 David Malcolm <dmalcolm@redhat.com>
2603
2604 * docs/topics/contexts.rst (Error-handling): Document new
2605 entrypoint gcc_jit_context_get_last_error.
2606 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2607 * jit-recording.c (gcc::jit::recording::context::context):
2608 Initialize new fields "m_last_error_str" and
2609 "m_owns_last_error_str".
2610 (gcc::jit::recording::context::~context): Clean up
2611 m_last_error_str, if needed.
2612 (gcc::jit::recording::context::add_error_va): Update
2613 m_last_error_str and m_owns_last_error_str, freeing the old
2614 value if appropriate.
2615 (gcc::jit::recording::context::get_last_error): New function.
2616 * jit-recording.h (gcc::jit::recording::context::get_last_error):
2617 New function.
2618 (gcc::jit::recording::context): New fields m_last_error_str and
2619 m_owns_last_error_str.
2620 * libgccjit.c (gcc_jit_context_get_last_error): New function.
2621 * libgccjit.h (gcc_jit_context_get_last_error): New declaration.
2622 * libgccjit.map (gcc_jit_context_get_last_error): New function.
2623
eb4c16eb
DM
26242015-01-08 David Malcolm <dmalcolm@redhat.com>
2625
2626 * Make-lang.in (jit_OBJS): Add jit/jit-logging.o.
2627 * docs/internals/index.rst (Overview of code structure): Mention
2628 gcc_jit_context_set_logfile, and embed the example logfile.
2629 * docs/internals/test-hello-world.exe.log.txt: New file: example
2630 of a logfile.
2631 * docs/topics/contexts.rst (Debugging): Add documentation
2632 for gcc_jit_context_set_logfile.
2633 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2634 * dummy-frontend.c: Include "jit-logging.h".
2635 (jit_langhook_init): Assert that there is an active playback
2636 context. If it has a logger, log entry/exit to this function.
2637 (jit_langhook_write_globals): Likewise.
2638 * jit-common.h (gcc::jit::logger): New forward declaration.
2639 * jit-logging.c: New file.
2640 * jit-logging.h: New file.
2641 * jit-playback.c: Include "jit-logging.h".
2642 (gcc::jit::playback::context::context): Initialize the log_user
2643 base class from the recording context's logger (if any). Use
2644 JIT_LOG_SCOPE to log entry/exit from the function body.
2645 (gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to
2646 log entry/exit from the function body.
2647 (gcc::jit::playback::build_stmt_list): Likewise.
2648 (gcc::jit::playback::function::postprocess): Likewise.
2649 (gcc::jit::playback::context::compile): Likewise. Log the
2650 entry/exit to toplev::main and toplev::finalize. Log the
2651 fake argv passed to toplev::main.
2652 (gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to
2653 log entry/exit from the function body.
2654 (gcc::jit::playback::context::release_mutex): Likewise.
2655 (gcc::jit::playback::context::make_fake_args): Likewise.
2656 (gcc::jit::playback::context::extract_any_requested_dumps):
2657 Likewise.
2658 (gcc::jit::playback::context::convert_to_dso): Likewise. Also,
2659 log the arguments that the driver is invoked with.
2660 (gcc::jit::playback::context::dlopen_built_dso): Likewise. Pass
2661 the logger to the result object.
2662 (gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to
2663 log entry/exit from the function body.
2664 (gcc::jit::playback::context::dump_generated_code): Likewise.
2665 (gcc::jit::playback::context::handle_locations): Likewise.
2666 * jit-playback.h (gcc::jit::playback::context): Make this be
2667 a subclass of gcc::jit::log_user.
2668 * jit-recording.c: Include "jit-logging.h".
2669 (gcc::jit::recording::context::context: Initialize the logger to
2670 NULL for root contexts, or to the parent's logger for child
2671 contexts.
2672 (gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to
2673 log entry/exit from the function body.
2674 (gcc::jit::recording::context::replay_into): Likewise.
2675 (gcc::jit::recording::context::disassociate_from_playback):
2676 Likewise.
2677 (gcc::jit::recording::context::compile): Likewise.
2678 (recording::context::add_error_va): Likewise. Also, log the
2679 error.
2680 (gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to
2681 log entry/exit from the function body.
2682 * jit-recording.h: Include "jit-logging.h".
2683 (gcc::jit::recording::context): Make this be a subclass of
2684 gcc::jit::log_user.
2685 * jit-result.c: Include "jit-common.h" and "jit-logging.h".
2686 (gcc::jit::result::result): Add logger param, recording it.
2687 Use JIT_LOG_SCOPE to log entry/exit from the function body.
2688 (gcc::jit::result::~result(): Use JIT_LOG_SCOPE to
2689 log entry/exit from the function body.
2690 (gcc::jit::result::get_code): Likewise.
2691 * jit-result.h (gcc::jit::result): Make this be a subclass of
2692 gcc::jit::log_user.
2693 (gcc::jit::result::result): Add logger parameter.
2694 * libgccjit++.h (gccjit::context::set_logfile): New function.
2695 * libgccjit.c: Include "jit-logging.h".
2696 (gcc_jit_context_acquire): Log the context.
2697 (gcc_jit_context_release): Use JIT_LOG_FUNC to
2698 log entry/exit from the function body, and log the context.
2699 (gcc_jit_context_new_child_context): Likewise, logging both
2700 contexts.
2701 (gcc_jit_context_new_location): Use JIT_LOG_FUNC to
2702 log entry/exit from the function body.
2703 (gcc_jit_context_get_type): Likewise.
2704 (gcc_jit_context_get_int_type): Likewise.
2705 (gcc_jit_context_new_array_type): Likewise.
2706 (gcc_jit_context_new_field): Likewise.
2707 (gcc_jit_context_new_struct_type): Likewise.
2708 (gcc_jit_context_new_opaque_struct): Likewise.
2709 (gcc_jit_struct_set_fields): Likewise.
2710 (gcc_jit_context_new_union_type): Likewise.
2711 (gcc_jit_context_new_function_ptr_type): Likewise.
2712 (gcc_jit_context_new_param): Likewise.
2713 (gcc_jit_context_new_function): Likewise.
2714 (gcc_jit_context_get_builtin_function): Likewise.
2715 (gcc_jit_function_get_param): Likewise.
2716 (gcc_jit_function_dump_to_dot): Likewise.
2717 (gcc_jit_function_new_block): Likewise.
2718 (gcc_jit_context_new_global): Likewise.
2719 (gcc_jit_context_new_rvalue_from_int): Likewise.
2720 (gcc_jit_context_zero): Likewise.
2721 (gcc_jit_context_one): Likewise.
2722 (gcc_jit_context_new_rvalue_from_double): Likewise.
2723 (gcc_jit_context_new_rvalue_from_ptr): Likewise.
2724 (gcc_jit_context_null): Likewise.
2725 (gcc_jit_context_new_string_literal): Likewise.
2726 (gcc_jit_context_new_unary_op): Likewise.
2727 (gcc_jit_context_new_binary_op): Likewise.
2728 (gcc_jit_context_new_comparison): Likewise.
2729 (gcc_jit_context_new_call): Likewise.
2730 (gcc_jit_context_new_call_through_ptr): Likewise.
2731 (gcc_jit_context_new_cast): Likewise.
2732 (gcc_jit_context_new_array_access): Likewise.
2733 (gcc_jit_lvalue_access_field): Likewise.
2734 (gcc_jit_rvalue_access_field): Likewise.
2735 (gcc_jit_rvalue_dereference_field): Likewise.
2736 (gcc_jit_rvalue_dereference): Likewise.
2737 (gcc_jit_lvalue_get_address): Likewise.
2738 (gcc_jit_function_new_local): Likewise.
2739 (gcc_jit_block_add_eval): Likewise.
2740 (gcc_jit_block_add_assignment): Likewise.
2741 (gcc_jit_block_add_assignment_op): Likewise.
2742 (gcc_jit_block_end_with_conditional): Likewise.
2743 (gcc_jit_block_add_comment): Likewise.
2744 (gcc_jit_block_end_with_jump): Likewise.
2745 (gcc_jit_block_end_with_return): Likewise.
2746 (gcc_jit_block_end_with_void_return): Likewise.
2747 (gcc_jit_context_set_str_option): Likewise.
2748 (gcc_jit_context_set_int_option): Likewise.
2749 (gcc_jit_context_set_bool_option): Likewise.
2750 (gcc_jit_context_enable_dump): Likewise.
2751 (gcc_jit_context_compile): Likewise. Also log the context,
2752 and the result.
2753 (gcc_jit_context_dump_to_file): Likewise.
2754 (gcc_jit_context_set_logfile): New function.
2755 (gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to
2756 log entry/exit from the function body.
2757 (gcc_jit_result_get_code): Likewise. Also log the fnname)
2758 and the ptr to be returned.
2759 (gcc_jit_result_release): Likewise. Also log the result.
2760 * libgccjit.h: Include <stdio.h>, since we need FILE *.
2761 (gcc_jit_context_set_logfile): New declaration.
2762 * libgccjit.map (gcc_jit_context_set_logfile): New.
2763
c211cd23
DM
27642015-01-07 David Malcolm <dmalcolm@redhat.com>
2765
2766 * jit-recording.h (gcc::jit::recording::type::is_void): New
2767 virtual function.
2768 (gcc::jit::recording::memento_of_get_type::is_void): New
2769 function, overriding default implementation.
2770 * libgccjit.c (gcc_jit_rvalue_dereference): Verify that
2771 the underlying type is not "void".
2772
18146f45
DM
27732015-01-07 David Malcolm <dmalcolm@redhat.com>
2774
2775 * docs/topics/expressions.rst (Unary Operations): Add
2776 GCC_JIT_UNARY_OP_ABS.
2777 * jit-playback.c (gcc::jit::playback::context::new_unary_op):
2778 Likewise.
2779 * jit-recording.c (unary_op_strings): Likewise.
2780 * libgccjit.c (gcc_jit_context_new_unary_op): Update checking
2781 of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS.
2782 * libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS.
2783 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2784
11af98ff
DM
27852015-01-07 David Malcolm <dmalcolm@redhat.com>
2786
2787 * jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix
2788 typo in comment.
2789
433d16df
DM
27902015-01-07 David Malcolm <dmalcolm@redhat.com>
2791
2792 * TODO.rst (Test suite): Remove item about running C++ testcases.
2793 * docs/internals/index.rst (Working on the JIT library): Add
2794 "c++" to the enabled languages in the suggested "configure"
2795 invocation, and add a description of why this is necessary.
2796 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2797
50bb6c8e
DM
27982015-01-07 David Malcolm <dmalcolm@redhat.com>
2799
2800 * docs/internals/index.rst: Update to reflect that built
2801 testcases are now test-foo.c.exe, rather than test-foo.exe.
2802 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2803
1e3b6a3d
JJ
28042015-01-05 Jakub Jelinek <jakub@redhat.com>
2805
2806 Update copyright years.
2807
e8af59bc
DM
28082014-12-19 David Malcolm <dmalcolm@redhat.com>
2809
2810 * jit-playback.c (gcc::jit::playback::context::build_cast): In
2811 case BOOLEAN_TYPE, don't assume that the source expression is
2812 of type "int".
2813
5afd44e3
DM
28142014-12-19 David Malcolm <dmalcolm@redhat.com>
2815
2816 * jit-recording.c (gcc::jit::recording::context::context): When
2817 copying string options from a parent context, take a copy of the
2818 underlying buffers, rather than simply copying the pointer.
2819
1f0858d7
DM
28202014-12-19 David Malcolm <dmalcolm@redhat.com>
2821
2822 * jit-recording.c (gcc::jit::recording::context::set_str_option):
2823 Handle NULL.
2824
35291c7d
DM
28252014-12-11 David Malcolm <dmalcolm@redhat.com>
2826
2827 * docs/cp/topics/contexts.rst (gccjit::context::set_str_option):
2828 Document new function.
2829 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2830
7b31ff5e
DM
28312014-12-10 Ulrich Drepper <drepper@gmail.com>
2832
2833 Minor interface cleanups of libgccjit
2834 * jit-playback.c (convert_to_dso): Use auto_vec instead
2835 of automatic array to build up command line.
2836 * jit-recording.c (recording::context::set_str_option):
2837 Make copy of the string.
2838 (recording::context::~context): Free string options.
2839 * jit-recording.h (recording::context): Adjust type
2840 of m_str_options member.
2841 * libgccjit.h: Adjust comment about
2842 gcc_jit_context_set_str_option parameter being used after
2843 the call.
2844 Update comment now that all interfaces are copy strings
2845 if necessary.
2846 * libgccjit++.h (gccjit::context): Add set_str_option
2847 member function.
2848
29df5715
DM
28492014-12-10 David Malcolm <dmalcolm@redhat.com>
2850
2851 * docs/cp/index.rst: New file.
2852 * docs/cp/intro/index.rst: New file.
2853 * docs/cp/intro/tutorial01.rst: New file.
2854 * docs/cp/intro/tutorial02.rst: New file.
2855 * docs/cp/intro/tutorial03.rst: New file.
2856 * docs/cp/intro/tutorial04.rst: New file.
2857 * docs/cp/topics/contexts.rst: New file.
2858 * docs/cp/topics/expressions.rst: New file.
2859 * docs/cp/topics/functions.rst: New file.
2860 * docs/cp/topics/index.rst: New file.
2861 * docs/cp/topics/locations.rst: New file.
2862 * docs/cp/topics/objects.rst: New file.
2863 * docs/cp/topics/results.rst: New file.
2864 * docs/cp/topics/types.rst: New file.
2865 * docs/examples/tut01-hello-world.cc: New file.
2866 * docs/examples/tut02-square.c: Fix missing newline in output.
2867 * docs/examples/tut02-square.cc: New file.
2868 * docs/examples/tut03-sum-of-squares.cc: New file.
2869 * docs/examples/tut04-toyvm/toyvm.cc: New file.
2870 * docs/index.rst: Move summary to above the table of contents.
2871 Add text about the C vs C++ APIs.
2872 * docs/topics/contexts.rst: Fix a typo.
2873
2874 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2875 * docs/_build/texinfo/factorial1.png: New file.
2876 * docs/_build/texinfo/sum-of-squares1.png: New file.
2877
5cd614ce
DM
28782014-12-09 David Malcolm <dmalcolm@redhat.com>
2879
2880 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move
2881 logic for determine "funcname" to new function...
2882 (get_function_name): ...here, adding logic to skip any leading
2883 path from the filename.
2884 (toyvm_function_parse): Use the filename for fn_filename, rather
2885 than "name", so that the debugger can locate the source .toy
2886 file.
2887 (toyvm_function_parse): Don't fclose a NULL FILE *.
2888
2712de78
DM
28892014-12-09 David Malcolm <dmalcolm@redhat.com>
2890
2891 PR jit/63854
2892 * docs/internals/index.rst (Running under valgrind): New
2893 subsection.
2894 (docs/_build/texinfo/libgccjit.texi): Regenerate.
2895
d1e5f2c7
DM
28962014-12-09 David Malcolm <dmalcolm@redhat.com>
2897
92a285c1 2898 PR jit/64206
d1e5f2c7
DM
2899 * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o.
2900 * jit-common.h (gcc::jit::tempdir): New forward decl.
2901 * jit-playback.c: Include jit-tempdir.h.
2902 (gcc::jit::playback::context::context): Initialize m_tempdir.
2903 (gcc::jit::playback::context::~context): Move tempdir
2904 cleanup to new file jit-tempdir.c
2905 (make_tempdir_path_template): Move to new file jit-tempdir.c.
2906 (gcc::jit::playback::context::compile): Move tempdir creation
2907 to new tempdir object in new file jit-tempdir.c.
2908 (gcc::jit::playback::context::make_fake_args): Get path from
2909 tempdir object rather than from member data.
2910 (gcc::jit::playback::context::convert_to_dso): Likewise.
2911 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
2912 (gcc::jit::playback::context::dump_generated_code): Likewise.
2913 (gcc::jit::playback::context::get_path_c_file): New function.
2914 (gcc::jit::playback::context::get_path_s_file): New function.
2915 (gcc::jit::playback::context::get_path_so_file): New function.
2916 * jit-playback.h (gcc::jit::playback::context::get_path_c_file):
2917 New function.
2918 (gcc::jit::playback::context::get_path_s_file): New function.
2919 (gcc::jit::playback::context::get_path_so_file): New function.
2920 (gcc::jit::playback::context): Move fields "m_path_template",
2921 "m_path_tempdir", "m_path_c_file", "m_path_s_file",
2922 "m_path_so_file" to new jit::tempdir class; add field "m_tempdir".
2923 * jit-tempdir.c: New file.
2924 * jit-tempdir.h: New file.
2925
38771e4e
DM
29262014-12-09 David Malcolm <dmalcolm@redhat.com>
2927
2928 * jit-playback.c (gcc::jit::playback::context::compile): Acquire the
2929 mutex here, immediately before using toplev, and release it here, on
2930 each exit path after acquisition.
2931 (jit_mutex): Move this variable here, from jit-recording.c.
2932 (gcc::jit::playback::context::acquire_mutex): New function, based on
2933 code in jit-recording.c.
2934 (gcc::jit::playback::context::release_mutex): Likewise.
2935 * jit-playback.h (gcc::jit::playback::context::acquire_mutex): New
2936 function.
2937 (gcc::jit::playback::context::release_mutex): New function.
2938 * jit-recording.c (jit_mutex): Move this variable to jit-playback.c.
2939 (gcc::jit::recording::context::compile): Move mutex-handling from
2940 here into jit-playback.c's gcc::jit::playback::context::compile.
2941 * notes.txt: Update to show the new locations of ACQUIRE_MUTEX
2942 and RELEASE_MUTEX.
2943
38f4f641
DM
29442014-12-09 David Malcolm <dmalcolm@redhat.com>
2945
2946 * jit-playback.c (gcc::jit::playback::context::compile): Move the
2947 dlopen code into...
2948 (gcc::jit::playback::context::dlopen_built_dso): ...this new
2949 function.
2950 * jit-playback.h (gcc::jit::playback::context::dlopen_built_dso):
2951 New function.
2952
82e0c914
DM
29532014-12-09 David Malcolm <dmalcolm@redhat.com>
2954
2955 PR jit/64166
2956 * docs/topics/contexts.rst (Debugging): Add description of
2957 gcc_jit_context_enable_dump.
2958 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2959 * jit-playback.c: Include context.h.
2960 (class auto_argvec): New class.
2961 (auto_argvec::~auto_argvec): New function.
2962 (gcc::jit::playback::context::compile): Convert fake_args to be
2963 an auto_argvec, so that it can contain dynamically-allocated
2964 strings. Construct a vec of all requested dumps, and pass it to
2965 make_fake_args. Extract requested dumps between the calls to
2966 toplev::main and toplev::finalize.
2967 (gcc::jit::playback::context::make_fake_args): Convert param
2968 "argvec" to be a vec <char *>, and gain a "requested_dumps"
2969 param. Convert to dynamically-allocated arg strings by converting
2970 ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP
2971 for args that are already a copy. Add args for all requested dumps.
2972 (gcc::jit::playback::context::extract_any_requested_dumps): New
2973 function.
2974 (gcc::jit::playback::context::read_dump_file): New function.
2975 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
2976 Convert param "argvec" to be a vec <char *>, and gain a
2977 "requested_dumps" param.
2978 (gcc::jit::playback::context::extract_any_requested_dumps): New
2979 function.
2980 (gcc::jit::playback::context::read_dump_file): New function.
2981 * jit-recording.c (gcc::jit::recording::context::enable_dump): New
2982 function.
2983 (gcc::jit::recording::context::get_all_requested_dumps): New
2984 function.
2985 * jit-recording.h (gcc::jit::recording::requested_dump): New
2986 struct.
2987 (gcc::jit::recording::context::enable_dump): New function.
2988 (gcc::jit::recording::context::get_all_requested_dumps): New
2989 function.
2990 (gcc::jit::recording::context::m_requested_dumps): New field.
2991 * libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint.
2992 * libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint.
2993 * libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint.
2994
53b730ff
DM
29952014-12-08 David Malcolm <dmalcolm@redhat.com>
2996
2997 * libgccjit++.h: Indent the forward declarations of the classes to
2998 show the inheritance hierarchy.
2999
0f379445
DM
30002014-12-08 David Malcolm <dmalcolm@redhat.com>
3001
3002 * notes.txt: Show the beginning and ending of
3003 recording::context::compile vs playback::context::compile. Show
3004 the creation and unlinking of the tempdir. Show toplev::finalize.
3005 Move "RELEASE MUTEX" to the correct location. Show
3006 gcc_jit_result_release, and indicate where the
3007 dlopen/dlsym/dlclose occur.
3008
81ba15f1
DM
30092014-12-01 David Malcolm <dmalcolm@redhat.com>
3010
3011 * docs/examples/tut02-square.c (main): Release the context
3012 earlier, to show that this is possible. Update error-handling
3013 to avoid a double-release of the context, and to avoid
3014 releasing a NULL result.
3015 * docs/intro/tutorial02.rst: Discuss gcc_jit_context_release.
3016 * docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize
3017 * docs/topics/results.rst (gcc_jit_result): Mention that this
3018 controls the lifetimes of machine code functions.
3019 (gcc_jit_result_get_code): Spell out the requirements for this
3020 to succeed, and the lifetime of the result.
3021 (gcc_jit_result_release): Mention that this invalidates any code
3022 that was obtained from the result.
3023 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3024
e250f0dc
DM
30252014-12-01 David Malcolm <dmalcolm@redhat.com>
3026
3027 PR jit/64018
3028 * docs/intro/tutorial02.rst: Spell out lifetime of generated code.
3029 Add description of error-handling, taken in part from...
3030 * docs/topics/contexts.rst (Error-handling): Expand, and move some
3031 content to tutorial02.rst.
3032 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3033
eeafb319
DM
30342014-12-01 David Malcolm <dmalcolm@redhat.com>
3035
3036 PR jit/64020
3037 * docs/topics/types.rst (Standard types) Add new enum values to
3038 the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT,
3039 GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
3040 Widen the left-hand column so that
3041 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit.
3042 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3043
3044 * jit-builtins.c: Include stringpool.h and jit-playback.h.
3045 Move everything out of the gcc::jit::recording namespace into
3046 just gcc::jit.
3047 (struct builtin_data): Add fields "fnclass", "attr", and
3048 "implicit_p".
3049 (DEF_BUILTIN): Update macro so populate the new fields.
3050 (builtins_manager::builtins_manager): Update for move out of
3051 recording namespace. Initialize the m_attributes array.
3052 (builtins_manager::get_builtin_function): Likewise.
3053 (builtins_manager::get_builtin_function_by_id): New function.
3054 (builtins_manager::make_builtin_function): Update for move out of
3055 recording namespace. Add fix for PR jit/64020 by detecting
3056 specific builtin ids and having them ensure that builtins for
3057 other ids are created as necessary.
3058 (builtins_manager::get_type): Update for move out of recording
3059 namespace.
3060 (builtins_manager::make_type): Likewise. Add some missing
3061 #undefs.
3062 (builtins_manager::make_primitive_type): Update for move out of
3063 recording namespace. Implement the three BT_COMPLEX_ cases and
3064 BT_DOUBLE_PTR.
3065 (builtins_manager::make_fn_type): Update for move out of recording
3066 namespace.
3067 (builtins_manager::make_ptr_type): Likewise.
3068 (builtins_manager::finish_playback): New function.
3069 (builtins_manager::get_class): New function.
3070 (builtins_manager::implicit_p): New function.
3071 (builtins_manager::get_attrs_tree): Two new functions.
3072 (builtins_manager::make_attrs_tree): New function.
3073
3074 * jit-builtins.h: Move everything out of the gcc::jit::recording
3075 namespace into just gcc::jit.
3076 (enum built_in_attribute): New.
3077 (builtins_manager::builtins_manager): Update decl for namespace
3078 change.
3079 (builtins_manager::get_builtin_function): Likewise.
3080 (builtins_manager::get_class): New.
3081 (builtins_manager::implicit_p): New.
3082 (builtins_manager::get_attrs_tree): Two new functions.
3083 (builtins_manager::make_attrs_tree): New function.
3084 (builtins_manager::finish_playback): New.
3085 (builtins_manager::get_builtin_function_by_id): New.
3086 (builtins_manager::make_builtin_function): Update decl for
3087 namespace change.
3088 (builtins_manager::get_type): Likewise.
3089 (builtins_manager::make_type): Likewise.
3090 (builtins_manager::make_primitive_type): Likewise.
3091 (builtins_manager::make_fn_type): Likewise.
3092 (builtins_manager::make_ptr_type): Likewise.
3093 (builtins_manager): Likewise for fields. Add new field
3094 "m_attributes".
3095
3096 * jit-common.h (NUM_GCC_JIT_TYPES): Update.
3097 (builtins_manager): Update forward decl to reflect namespace
3098 change.
3099
3100 * jit-playback.c: Include attribs.h and jit-builtins.h.
3101 (gcc::jit::playback::context::get_tree_node_for_type): Add cases
3102 for the new COMPLEX_ types.
3103 (gcc::jit::playback::context::new_function): If creating a
3104 builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl,
3105 and call set_builtin_decl.
3106 (gcc::jit::playback::context::replay): If we have a
3107 builtins_manager, call its finish_playback method when we're done.
3108
3109 * jit-playback.h:
3110 (gcc::jit::playback::context::get_builtins_manager): New function.
3111
3112 * jit-recording.c
3113 (gcc::jit::recording::context::get_builtins_manager): New function.
3114 (gcc::jit::recording::get_builtin_function): Use
3115 get_builtins_manager, in case we're a child context.
3116 (gcc::jit::recording::memento_of_get_type::dereference): Add the
3117 COMPLEX_ types.
3118 (gcc::jit::recording::memento_of_get_type::is_int): Likewise.
3119 (gcc::jit::recording::memento_of_get_type::is_float): Likewise.
3120 (gcc::jit::recording::memento_of_get_type::is_bool): Likewise.
3121 (get_type_strings): Likewise.
3122
3123 * jit-recording.h
3124 (gcc::jit::recording::context::get_builtins_manager): New.
3125
3126 * libgccjit.h (enum gcc_jit_types): Add
3127 GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE,
3128 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
3129
23844fd7
DM
31302014-12-01 David Malcolm <dmalcolm@redhat.com>
3131
3132 * jit-builtins.c
3133 (gcc::jit::recording::builtins_manager::get_builtin_function):
3134 Check for NULL return from make_builtin_function.
3135 (gcc::jit::recording::builtins_manager::make_builtin_function):
3136 Check for NULL return from get_type.
3137
c6760a13
DM
31382014-12-01 David Malcolm <dmalcolm@redhat.com>
3139
3140 * jit-playback.c (gcc::jit::playback::context::compile): Move DSO
3141 creation code into...
3142 (gcc::jit::playback::context::convert_to_dso): New function.
3143 * jit-playback.h (gcc::jit::playback::context::convert_to_dso):
3144 New function.
3145
8f50ee3c
DM
31462014-12-01 David Malcolm <dmalcolm@redhat.com>
3147
3148 * jit-playback.c (gcc::jit::playback::context::compile): Use an
3149 auto_vec<const char *> rather than a const char *[20] for the
3150 top-level argv, and move the logic to build it to...
3151 (gcc::jit::playback::context::make_fake_args): New function.
3152 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
3153 New function.
3154
56dea35f
DM
31552014-12-01 David Malcolm <dmalcolm@redhat.com>
3156
3157 * Make-lang.in (jit_OBJS): Add jit/jit-result.o.
3158 * jit-playback.c: Include new header jit-result.h.
3159 (gcc::jit::result::result): Move to new file jit-result.c.
3160 (gcc::jit::result::~result): Likewise.
3161 (gcc::jit::playback::result): Likewise.
3162 * jit-recording.h (class gcc::jit::result): Move to new
3163 header jit-result.h.
3164 * jit-result.c: New file, to contain...
3165 (gcc::jit::result::result): Move here from jit-playback.c,
3166 removing erroneous "playback" namespace from comment.
3167 (gcc::jit::result::~result): Likewise.
3168 (gcc::jit::playback::result): Likewise.
3169 * jit-result.h: New file, to contain...
3170 (class gcc::jit::result): Move from jit-recording.h.
3171 * libgccjit.c: Include jit-result.h.
3172 (gcc_jit_result_get_code): Update comment to reflect move
3173 of implementation.
3174 (gcc_jit_result_release): Likewise.
3175
52b9468f
DM
31762014-12-01 David Malcolm <dmalcolm@redhat.com>
3177
3178 PR jit/63854
3179 * docs/examples/tut04-toyvm/toyvm.c
3180 (toyvm_compiled_function): New typedef.
3181 (toyvm_compiled_func) Rename to...
3182 (toyvm_compiled_code) ...this.
3183 (struct toyvm_compiled_function): New struct.
3184 (toyvm_function_compile): Return a toyvm_compiled_function *
3185 rather than a toyvm_compiled_func, so that the caller can fully
3186 clean things up. Free "funcname".
3187 (test_script): Update for change to toyvm_function_compile.
3188 Clean up the toyvm_compiled_function.
3189 (main): Likewise.
3190 (docs/intro/tutorial04.rst): Update to reflect the above changes,
3191 and to better spell out the lifetime of the compiled code.
3192
c8d19a69
DM
31932014-12-01 David Malcolm <dmalcolm@redhat.com>
3194
3195 PR jit/63854
3196 * jit-builtins.c
3197 (gcc::jit::recording::builtins_manager::make_fn_type): Call the
3198 context's new_function_type method, rather than directly creating
3199 a function_type instance.
3200 * jit-recording.c
3201 (gcc::jit::recording::context::new_function_type): New method,
3202 adapted from part of...
3203 (gcc::jit::recording::context::new_function_ptr_type): ...this.
3204 Update to call new_function_type.
3205 * jit-recording.h
3206 (gcc::jit::recording::context::new_function_type): New method.
3207
c985705a
DM
32082014-12-01 David Malcolm <dmalcolm@redhat.com>
3209
3210 PR jit/63969
3211 * jit-playback.c: Ensure that ctxt_progname is non-NULL.
3212
b957b2e0
DM
32132014-11-19 David Malcolm <dmalcolm@redhat.com>
3214
3215 PR jit/63854
3216 * jit-playback.c (gcc::jit::playback::compound_type::set_fields):
3217 Convert param from const vec<playback::field *> & to
3218 const auto_vec<playback::field *> *.
3219 (gcc::jit::playback::context::new_function_type): Convert param
3220 "param_types" from vec<type *> * to const auto_vec<type *> *.
3221 (gcc::jit::playback::context::new_function): Convert param
3222 "params" from vec<param *> * to const auto_vec<param *> *.
3223 (gcc::jit::playback::context::build_call): Convert param "args"
3224 from vec<rvalue *> to const auto_vec<rvalue *> *.
3225 (gcc::jit::playback::context::new_call): Likewise.
3226 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
3227 (wrapper_finalizer): New function.
3228 (gcc::jit::playback::wrapper::operator new): Call the finalizer
3229 variant of ggc_internal_cleared_alloc, supplying
3230 wrapper_finalizer.
3231 (gcc::jit::playback::function::finalizer): New.
3232 (gcc::jit::playback::block::finalizer): New.
3233 (gcc::jit::playback::source_file::finalizer): New.
3234 (gcc::jit::playback::source_line::finalizer): New.
3235
3236 * jit-playback.h
3237 (gcc::jit::playback::context::new_function_type): Convert param
3238 "param_types" from vec<type *> * to const auto_vec<type *> *.
3239 (gcc::jit::playback::context::new_function): Convert param
3240 "params" from vec<param *> * to const auto_vec<param *> *.
3241 (gcc::jit::playback::context::new_call): Convert param
3242 "args" from vec<rvalue *> to const auto_vec<rvalue *> *.
3243 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
3244 (gcc::jit::playback::context::build_call): Likewise.
3245 (gcc::jit::playback::context): Convert fields "m_functions",
3246 "m_source_files", "m_cached_locations" from vec to auto_vec.
3247 (gcc::jit::playback::wrapper::finalizer): New virtual function.
3248 (gcc::jit::playback::compound_type::set_fields): Convert param fro
3249 const vec<playback::field *> & to
3250 const auto_vec<playback::field *> *.
3251 (gcc::jit::playback::function::finalizer): New.
3252 (gcc::jit::playback::block::finalizer): New.
3253 (gcc::jit::playback::source_file::finalizer): New.
3254 (gcc::jit::playback::source_line::finalizer): New.
3255
3256 * jit-recording.c
3257 (gcc::jit::recording::function_type::replay_into): Convert local
3258 from a vec into an auto_vec.
3259 (gcc::jit::recording::fields::replay_into): Likewise.
3260 (gcc::jit::recording::function::replay_into): Likewise.
3261 (gcc::jit::recording::call::replay_into): Likewise.
3262 (gcc::jit::recording::call_through_ptr::replay_into): Likewise.
3263
3264 * jit-recording.h (gcc::jit::recording::context): Convert fields
3265 "m_mementos", "m_compound_types", "m_functions" from vec<> to
3266 auto_vec <>.
3267 (gcc::jit::recording::function_type::get_param_types): Convert
3268 return type from vec<type *> to const vec<type *> &.
3269 (gcc::jit::recording::function_type): Convert field
3270 "m_param_types" from a vec<> to an auto_vec<>.
3271 (gcc::jit::recording::fields): Likewise for field "m_fields".
3272 (gcc::jit::recording::function::get_params): Convert return type
3273 from vec <param *> to const vec<param *> &.
3274 (gcc::jit::recording::function): Convert fields "m_params",
3275 "m_locals", "m_blocks" from vec<> to auto_vec<>.
3276 (gcc::jit::recording::block): Likewise for field "m_statements".
3277 vec<> to auto_vec<>.
3278 (gcc::jit::recording::call): Likewise for field "m_args".
3279 (gcc::jit::recording::call_through_ptr): Likewise.
3280
79cafc7a
DM
32812014-11-19 David Malcolm <dmalcolm@redhat.com>
3282
3283 PR jit/63854
3284 * jit-recording.c (recording::function::validate): Convert
3285 "worklist" from vec<> to autovec<> to fix a leak.
3286
35485da9
DM
32872014-11-11 David Malcolm <dmalcolm@redhat.com>
3288
3289 * ChangeLog.jit: New.
3290 * ChangeLog: New.
3291 * Make-lang.in: New.
3292 * TODO.rst: New.
3293 * config-lang.in: New.
3294 * docs/Makefile: New.
3295 * docs/_build/texinfo/Makefile: New.
3296 * docs/_build/texinfo/factorial.png: New.
3297 * docs/_build/texinfo/libgccjit.texi: New.
3298 * docs/_build/texinfo/sum-of-squares.png: New.
3299 * docs/conf.py: New.
3300 * docs/examples/tut01-hello-world.c: New.
3301 * docs/examples/tut02-square.c: New.
3302 * docs/examples/tut03-sum-of-squares.c: New.
3303 * docs/examples/tut04-toyvm/Makefile: New.
3304 * docs/examples/tut04-toyvm/factorial.toy: New.
3305 * docs/examples/tut04-toyvm/fibonacci.toy: New.
3306 * docs/examples/tut04-toyvm/toyvm.c: New.
3307 * docs/index.rst: New.
3308 * docs/internals/index.rst: New.
3309 * docs/intro/factorial.png: New.
3310 * docs/intro/index.rst: New.
3311 * docs/intro/sum-of-squares.png: New.
3312 * docs/intro/tutorial01.rst: New.
3313 * docs/intro/tutorial02.rst: New.
3314 * docs/intro/tutorial03.rst: New.
3315 * docs/intro/tutorial04.rst: New.
3316 * docs/topics/contexts.rst: New.
3317 * docs/topics/expressions.rst: New.
3318 * docs/topics/functions.rst: New.
3319 * docs/topics/index.rst: New.
3320 * docs/topics/locations.rst: New.
3321 * docs/topics/objects.rst: New.
3322 * docs/topics/results.rst: New.
3323 * docs/topics/types.rst: New.
3324 * dummy-frontend.c: New.
3325 * jit-builtins.c: New.
3326 * jit-builtins.h: New.
3327 * jit-common.h: New.
3328 * jit-playback.c: New.
3329 * jit-playback.h: New.
3330 * jit-recording.c: New.
3331 * jit-recording.h: New.
3332 * libgccjit++.h: New.
3333 * libgccjit.c: New.
3334 * libgccjit.h: New.
3335 * libgccjit.map: New.
3336 * notes.txt: New.
3337
33382013-07-26 David Malcolm <dmalcolm@redhat.com>
3339
3340 * Initial creation
818ab71a 3341\f
877e3c2a 3342Copyright (C) 2013-2022 Free Software Foundation, Inc.
35485da9
DM
3343
3344Copying and distribution of this file, with or without modification,
3345are permitted in any medium without royalty provided the copyright
3346notice and this notice are preserved.