]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/jit/ChangeLog
PowerPC: rename some functions.
[thirdparty/gcc.git] / gcc / jit / ChangeLog
CommitLineData
8f7ea26a
GA
12020-08-28 Martin Sebor <msebor@redhat.com>
2
3 * jit-recording.c (recording::switch_::make_debug_string): Add argument
4 to a call.
5
e769f970
GA
62020-08-22 Andrea Corallo <andrea.corallo@arm.com>
7
8 * libgccjit.c:
9 (gcc_jit_context_new_rvalue_from_int)
10 (gcc_jit_context_new_rvalue_from_long)
11 (gcc_jit_context_new_rvalue_from_double)
12 (gcc_jit_context_new_rvalue_from_ptr): Update function heading
13 comments.
14
6fb94d67
GA
152020-06-16 Nicolas Bértolo <nicolasbertolo@gmail.com>
16
17 * Make-lang.in: Always define version, minor and release
18 numbers. Create the Windows shared library as
19 libgccjit-$(LIBGCCJIT_VERSION_NUM).dll.
20
9a5b7438
GA
212020-06-03 David Malcolm <dmalcolm@redhat.com>
22
23 PR jit/95306
24 * jit-builtins.c (builtins_manager::make_primitive_type):
25 Implement BT_CONST_VOLATILE_PTR.
26
a9312a79
GA
272020-06-02 David Malcolm <dmalcolm@redhat.com>
28
29 PR jit/95426
30 * dummy-frontend.c: Include "options.h", "stringpool.h", and
31 "attribs.h".
32 (ATTR_EXCL): New, copied from lto/lto-lang.c.
33 (attr_noreturn_exclusions): Likewise.
34 (attr_returns_twice_exclusions): Likewise.
35 (attr_const_pure_exclusions): Likewise.
36 (jit_attribute_table): Likewise, copied from lto_attribute_table.
37 (jit_format_attribute_table): Likewise, copied from
38 lto_format_attribute_table.
39 (handle_noreturn_attribute): New, copied from lto/lto-lang.c.
40 (handle_leaf_attribute): Likewise.
41 (handle_const_attribute): Likewise.
42 (handle_malloc_attribute): Likewise.
43 (handle_pure_attribute): Likewise.
44 (handle_novops_attribute): Likewise.
45 (get_nonnull_operand): Likewise.
46 (handle_nonnull_attribute): Likewise.
47 (handle_nothrow_attribute): Likewise.
48 (handle_sentinel_attribute): Likewise.
49 (handle_type_generic_attribute): Likewise.
50 (handle_transaction_pure_attribute): Likewise.
51 (handle_returns_twice_attribute): Likewise.
52 (handle_patchable_function_entry_attribute): Likewise.
53 (ignore_attribute): Likewise.
54 (handle_format_attribute): Likewise.
55 (handle_format_arg_attribute): Likewise.
56 (handle_fnspec_attribute): Likewise.
57 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
58 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
59
53ffb43a
GA
602020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
61
62 * Make-lang.in: Remove extra slash. Build libgccjit.dll and its
63 import library in Windows.
64 * config-lang.in: Update comment about --enable-host-shared.
65 * jit-w32.h: New file.
66 * jit-w32.c: New file.
67 (print_last_error): New function that prints the error
68 string corresponding to GetLastError().
69 (get_TOKEN_USER_current_user): Helper function used for getting
70 the SID belonging to the current user.
71 (create_directory_for_current_user): Helper function to create
72 a directory with permissions such that only the current user can
73 access it.
74 (win_mkdtemp): Create a temporary directory using Windows APIs.
75 * jit-playback.c: Do not chmod files in Windows. Use LoadLibrary,
76 FreeLibrary and GetProcAddress instead of libdl.
77 * jit-result.h, jit-result.c: Introduce result::handle_t to
78 abstract over the types used for dynamic library handles.
79 * jit-tempdir.c: Do not use mkdtemp() in Windows, use
80 win_mkdtemp().
81
61f3b605
GA
822020-05-27 David Malcolm <dmalcolm@redhat.com>
83
84 PR jit/95314
85 * dummy-frontend.c (LANG_HOOKS_DEEP_UNSHARING): Define to be true.
86 * jit-playback.h (gcc::jit::playback::rvalue): Mark tree node with
87 TREE_VISITED.
88
892020-05-27 Tom Tromey <tromey@gcc.gnu.org>
90
91 PR jit/91330
92 * docs/conf.py (texinfo_documents): Set description.
93 * docs/_build/texinfo/libgccjit.texi: Regenerate.
94
c3a4169b
GA
952020-05-26 David Malcolm <dmalcolm@redhat.com>
96
97 PR jit/95306
98 * docs/topics/functions.rst
99 (gcc_jit_context_get_builtin_function): Document.
100 * docs/_build/texinfo/libgccjit.texi: Regenerate.
101 * dummy-frontend.c (jit_langhook_global_bindings_p): Remove
102 gcc_unreachable.
103 * jit-builtins.c (type_names): New array.
104 (get_string_for_type_id): New function.
105 (gcc::jit::builtins_manager::make_primitive_type): Show name of
106 type in error messages. Update cases to reflect the order in
107 builtin-types.def. Implement cases for BT_INT8, BT_INT16,
108 BT_UINT8, BT_CONST_PTR, BT_VOLATILE_PTR, BT_INT_PTR, BT_FLOAT_PTR,
109 BT_CONST_DOUBLE_PTR, BT_SIZE, BT_CONST_SIZE.
110
1112020-05-26 David Malcolm <dmalcolm@redhat.com>
112
113 * docs/topics/compatibility.rst: Fix underline.
114 Fix missing labels.
115 * docs/topics/types.rst: Fix missing blank line.
116 * docs/_build/texinfo/libgccjit.texi: Regenerate.
117
1182020-05-26 David Malcolm <dmalcolm@redhat.com>
119
120 PR jit/95296
121 * docs/topics/expressions.rst (Unary Operations): Document that
122 result_type of gcc_jit_context_new_unary_op must be a numeric type.
123 (Binary Operations): Likewise for gcc_jit_context_new_binary_op.
124 (Global variables): Document that "type" of
125 gcc_jit_context_new_global must be non-`void`.
126 * docs/topics/function-pointers.rst
127 (gcc_jit_context_new_function_ptr_type): Document that the
128 param_types must be non-void, but that return_type may be.
129 * docs/topics/functions.rst (Params): Document that
130 gcc_jit_context_new_param's type must be non-void.
131 (Functions): Likewise for gcc_jit_function_new_local.
132 * docs/topics/types.rst (gcc_jit_context_new_array_type): Document
133 that the type must be non-void.
134 (gcc_jit_context_new_field): Likewise.
135 * docs/_build/texinfo/Makefile: Regenerate.
136 * docs/_build/texinfo/libgccjit.texi: Regenerate.
137 * libgccjit.c (gcc_jit_context_new_array_type): Fail if
138 element_type is void.
139 (gcc_jit_context_new_field): Likewise for "type".
140 (gcc_jit_context_new_function_ptr_type): Likewise for each
141 element of param_types.
142 (gcc_jit_context_new_param): Likewise for "type".
143 (gcc_jit_context_new_global): Likewise.
144 (gcc_jit_function_new_local): Likewise.
145 (gcc_jit_type_get_aligned): Likewise.
146
63b2923d
A
1472020-03-31 Andrea Corallo <andrea.corallo@arm.com>
148 David Malcolm <dmalcolm@redhat.com>
149
150 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_13): New ABI tag
151 plus add version paragraph.
152 * libgccjit++.h (namespace gccjit::version): Add new namespace.
153 * libgccjit.c (gcc_jit_version_major, gcc_jit_version_minor)
154 (gcc_jit_version_patchlevel): New functions.
155 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_version): New macro.
156 (gcc_jit_version_major, gcc_jit_version_minor)
157 (gcc_jit_version_patchlevel): New functions.
158 * libgccjit.map (LIBGCCJIT_ABI_13) New ABI tag.
159
0cd55f9d
A
1602020-03-23 Andrea Corallo <andrea.corallo@arm.com>
161
162 * jit-playback.h
163 (gcc::jit::playback::context m_recording_ctxt): Remove
164 m_char_array_type_node field.
165 * jit-playback.c
166 (playback::context::context) Remove m_char_array_type_node from member
167 initializer list.
168 (playback::context::new_string_literal) Fix logic to handle string
169 length > 200.
170
8d9254fc
JJ
1712020-01-01 Jakub Jelinek <jakub@redhat.com>
172
173 Update copyright years.
174
70ce1ab9
JB
1752019-11-29 Julian Brown <julian@codesourcery.com>
176
177 * jit-builtins.c (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR):
178 Remove commented-out cases.
179
56e04525
DM
1802019-11-20 David Malcolm <dmalcolm@redhat.com>
181
182 PR jit/92483
183 * jit-playback.c (gcc::jit::playback::context::make_fake_args):
184 Update GCC_JIT_BOOL_OPTION_SELFCHECK_GC for new --param syntax.
185
4d732405
RS
1862019-08-13 Richard Sandiford <richard.sandiford@arm.com>
187
188 PR middle-end/91421
189 * jit-playback.c (new_function): Use set_decl_built_in_function.
190
ab20d992 1912019-07-22 Andrea Corallo <andrea.corallo@arm.com>
9afb91b2
AC
192
193 * jit-recording.c (unary_op_reproducer_strings): Make it extern.
194 (binary_op_reproducer_strings): Likewise.
195 * jit-recording.h (unary_op_reproducer_strings): Likewise.
196 (binary_op_reproducer_strings): Likewise.
197 * libgccjit.c (gcc_jit_context_new_unary_op): Check result_type to be a
198 numeric type.
199 * libgccjit.c (gcc_jit_context_new_binary_op): Improve error message.
200
ab20d992 2012019-07-04 Andrea Corallo <andrea.corallo@arm.com>
2b442504
AC
202
203 * libgccjit.c (gcc_jit_context_new_binary_op): Check result_type to be a
204 numeric type.
205
ab20d992 2062019-07-04 Andrea Corallo <andrea.corallo@arm.com>
ee118c14
AC
207
208 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_12): New ABI tag.
209 * docs/topics/types.rst: Add gcc_jit_context_new_bitfield.
210 * jit-common.h (namespace recording): Add class bitfield.
211 * jit-playback.c:
212 (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): Add macros.
213 (playback::context::new_bitfield): New method.
214 (playback::compound_type::set_fields): Add bitfield support.
215 (playback::lvalue::mark_addressable): Was jit_mark_addressable make this
216 a method of lvalue plus return a bool to communicate success.
217 (playback::lvalue::get_address): Check for jit_mark_addressable return
218 value.
219 * jit-playback.h (new_bitfield): New method.
220 (class bitfield): New class.
221 (class lvalue): Add jit_mark_addressable method.
222 * jit-recording.c (recording::context::new_bitfield): New method.
223 (recording::bitfield::replay_into): New method.
224 (recording::bitfield::write_to_dump): Likewise.
225 (recording::bitfield::make_debug_string): Likewise.
226 (recording::bitfield::write_reproducer): Likewise.
227 * jit-recording.h (class context): Add new_bitfield method.
228 (class field): Make it derivable by class bitfield.
229 (class bitfield): Add new class.
230 * libgccjit++.h (class context): Add new_bitfield method.
231 * libgccjit.c (struct gcc_jit_bitfield): New structure.
232 (gcc_jit_context_new_bitfield): New function.
233 * libgccjit.h
234 (LIBGCCJIT_HAVE_gcc_jit_context_new_bitfield) New macro.
235 (gcc_jit_context_new_bitfield): New function.
236 * libgccjit.map (LIBGCCJIT_ABI_12) New ABI tag.
237
36a3a7a3
JJ
2382019-03-21 Jakub Jelinek <jakub@redhat.com>
239
240 * jit-recording.c (reproducer::m_set_identifiers): Use false as Lazy
241 in hash_set template param.
242
ab20d992 2432019-02-05 Andrea Corallo <andrea.corallo@arm.com>
216090cc
AC
244
245 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_11): New ABI tag.
246 * docs/topics/contexts.rst (Additional driver options): New
247 section.
248 * jit-playback.c (invoke_driver): Add call to append_driver_options.
249 * jit-recording.c: Within namespace gcc::jit...
250 (recording::context::~context): Free the optnames within
251 m_driver_options.
252 (recording::context::add_driver_option): New method.
253 (recording::context::append_driver_options): New method.
254 (recording::context::dump_reproducer_to_file): Add driver
255 options.
256 * jit-recording.h: Within namespace gcc::jit...
257 (recording::context::add_driver_option): New method.
258 (recording::context::append_driver_options): New method.
259 (recording::context::m_driver_options): New field.
260 * libgccjit++.h (gccjit::context::add_driver_option): New
261 method.
262 * libgccjit.c (gcc_jit_context_add_driver_option): New API
263 entrypoint.
264 * libgccjit.h (gcc_jit_context_add_driver_option): New API
265 entrypoint.
266 (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option): New
267 macro.
268 * libgccjit.map (LIBGCCJIT_ABI_11): New ABI tag.
269
a5544970
JJ
2702019-01-01 Jakub Jelinek <jakub@redhat.com>
271
272 Update copyright years.
273
478dd60d
DM
2742018-11-15 David Malcolm <dmalcolm@redhat.com>
275
276 PR other/19165
277 * dummy-frontend.c (jit_begin_diagnostic): Add diagnostic_t param.
278
620e594b
DM
2792018-11-13 David Malcolm <dmalcolm@redhat.com>
280
281 * jit-playback.c: Replace "source_location" with "location_t".
282
033eb567
DM
2832018-10-17 David Malcolm <dmalcolm@redhat.com>
284
285 * Make-lang.in (selftest-jit): New.
286
98086b2b
ML
2872018-06-28 Martin Liska <mliska@suse.cz>
288
289 * jit-playback.c: Include opt-suggestions.h.
290
3de37a5d
ML
2912018-06-28 Martin Liska <mliska@suse.cz>
292
293 * jit-playback.c (class auto_argvec): Moved to vec.h.
294 (auto_argvec::~auto_argvec): Likewise.
295 (compile): Use the renamed name.
296 (invoke_driver): Likewise.
297
ea143da7
RO
2982018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
299
300 PR jit/84288
301 * Make-lang.in ($(LIBGCCJIT_FILENAME)): Add $(EXTRA_GCC_LIBS).
302
deb3da39
DM
3032018-03-09 David Malcolm <dmalcolm@redhat.com>
304 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
305
306 PR jit/64089
307 PR jit/84288
308 * Make-lang.in (COMMA): New.
309 (LIBGCCJIT_VERSION_SCRIPT_OPTION): New.
310 (LIBGCCJIT_SONAME_OPTION): New.
311 (jit): Move --version-script and -soname linker options to the
312 above.
313
9aba6f77
DM
3142018-01-25 David Malcolm <dmalcolm@redhat.com>
315
316 PR jit/81672
317 * jit-recording.h (gcc::jit::recording::union_): Remove fields
318 "m_loc" and "m_name".
319
85ec4feb
JJ
3202018-01-03 Jakub Jelinek <jakub@redhat.com>
321
322 Update copyright years.
323
01512446
JJ
3242017-12-19 Jakub Jelinek <jakub@redhat.com>
325
326 * jit-playback.c (get_type, playback::compile_to_file::copy_file,
327 playback::context::acquire_mutex): Replace Yoda conditions with
328 typical order conditions.
329 * libgccjit.c (gcc_jit_context_new_struct_type,
330 gcc_jit_struct_set_fields, gcc_jit_context_new_union_type,
331 gcc_jit_context_new_function, gcc_jit_timer_pop): Likewise.
332 * jit-builtins.c (matches_builtin): Likewise.
333 * jit-recording.c (recording::compound_type::set_fields,
334 recording::fields::write_reproducer, recording::rvalue::set_scope,
335 recording::function::validate): Likewise.
336 * jit-logging.c (logger::decref): Likewise.
337
5de73c05
JJ
3382017-11-30 Jakub Jelinek <jakub@redhat.com>
339
340 * jit-recording.c
341 (recording::memento_of_new_rvalue_from_const <long>::write_reproducer):
342 Use ; instead of ;;.
343
9e851845
JJ
3442017-11-28 Jakub Jelinek <jakub@redhat.com>
345
346 * jit-playback.c (add_switch): Build SWITCH_EXPR using build2 instead
347 of build3. Formatting fixes. Adjust funciton comment.
348
120e92fc
TV
3492017-11-23 Tom de Vries <tom@codesourcery.com>
350
351 * libgccjit.c (RETURN_NULL_IF_FAIL_NONNULL_NUMERIC_TYPE): Wrap in
352 JIT_{BEGIN,END}_STMT.
353
77f4ead7
DM
3542017-10-31 David Malcolm <dmalcolm@redhat.com>
355
356 * docs/internals/index.rst (Running the test suite): Document
357 PRESERVE_EXECUTABLES.
358 (Running under valgrind): Add markup to RUN_UNDER_VALGRIND.
359 * docs/_build/texinfo/libgccjit.texi: Regenerate.
360
6069fe72
DM
3612017-10-04 David Malcolm <dmalcolm@redhat.com>
362
363 * docs/cp/topics/expressions.rst (Vector expressions): New
364 section.
365 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_10): New ABI tag.
366 * docs/topics/expressions.rst (Vector expressions): New section.
367 * docs/topics/types.rst (gcc_jit_type_get_vector): Add link to
368 gcc_jit_context_new_rvalue_from_vector.
369 * docs/_build/texinfo/libgccjit.texi: Regenerate.
370 * jit-common.h (gcc::jit:recording::vector_type): New forward
371 decl.
372 * jit-playback.c
373 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
374 * jit-playback.h
375 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
376 * jit-recording.c: In namespace gcc::jit::
377 (class comma_separated_string): New class.
378 (comma_separated_string::comma_separated_string): New ctor,
379 adapted from recording::call::make_debug_string.
380 (comma_separated_string::~comma_separated_string): New dtor.
381 In namespace gcc::jit::recording::
382 (context::new_rvalue_from_vector): New method.
383 (type::get_vector): Update for renaming of memento_of_get_vector.
384 (class memento_of_get_vector): Rename to...
385 (class vector_type): ..this.
386 (memento_of_new_rvalue_from_vector::memento_of_new_rvalue_from_vector):
387 New ctor.
388 (memento_of_new_rvalue_from_vector::replay_into): New method.
389 (memento_of_new_rvalue_from_vector::visit_children): New method.
390 (memento_of_new_rvalue_from_vector::make_debug_string): New
391 method.
392 (memento_of_new_rvalue_from_vector::write_reproducer): New method.
393 (call::make_debug_string): Split out arg-printing code into ctor
394 for comma_separated_string.
395 * jit-recording.h: In namespace gcc::jit::recording::
396 (context::new_rvalue_from_vector): New method.
397 (type::dyn_cast_vector_type): New virtual function.
398 (class memento_of_get_vector): Rename to...
399 (class vector_type): ...this.
400 (vector_type::unqualified): Remove this vfunc override in favor
401 of...
402 (vector_type::get_element_type): ...this new method.
403 (vector_type::get_num_units): New method.
404 (vector_type::dyn_cast_vector_type): New vfunc override.
405 (class memento_of_new_rvalue_from_vector): New class.
406 * libgccjit++.h (gccjit::context::new_rvalue): Add overload for
407 vector of rvalue.
408 * libgccjit.c (gcc_jit_context_new_binary_op): Strip off type
409 qualifications when checking that both operands have same type.
410 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
411 * libgccjit.h
412 (LIBGCCJIT_HAVE_gcc_jit_context_new_rvalue_from_vector): New
413 macro.
414 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
415 * libgccjit.map (LIBGCCJIT_ABI_10): New ABI tag.
416
ecd5156d
DM
4172017-09-28 David Malcolm <dmalcolm@redhat.com>
418
419 * docs/topics/expressions.rst (Function calls): Add link to
420 gcc_jit_context_new_function_ptr_type.
421 (Function pointers): Convert to cross-references to
422 function-pointers.rst, moving material there.
423 * docs/topics/function-pointers.rst: New page.
424 * docs/topics/index.rst: Add function-pointers.rst.
425 * docs/topics/types.rst (Function pointer types): New section.
426 * docs/_build/texinfo/libgccjit.texi: Regenerate.
427
5a47aa2c
DM
4282017-09-28 David Malcolm <dmalcolm@redhat.com>
429
430 * jit-recording.c
431 (gcc::jit::recording::function_type::is_same_type_as): New function.
432 * jit-recording.h: In namespace gcc::jit::recording::
433 (type::accepts_writes_from): Use is_same_type_as rather than pointer
434 equality.
435 (type::is_same_type_as): New virtual function.
436 (function_type::is_same_type_as): New override.
437
15a65e63
DM
4382017-09-27 David Malcolm <dmalcolm@redhat.com>
439
440 * docs/cp/topics/expressions.rst (Function pointers): New section.
441 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_9): New tag.
442 * docs/topics/expressions.rst (Function pointers): New section.
443 * docs/_build/texinfo/libgccjit.texi: Regenerate.
444 * jit-common.h (class gcc::jit::recording::function_pointer): New
445 forward decl.
446 * jit-playback.c (gcc::jit::playback::function::get_address): New
447 method.
448 * jit-playback.h (gcc::jit::playback::function::get_address): New
449 method decl.
450 * jit-recording.c: Within namespace gcc::jit::recording...
451 (function::function): Initialize new field "m_fn_ptr_type".
452 (function::get_address): New method.
453 (function_pointer::replay_into): New method.
454 (function_pointer::visit_children): New method.
455 (function_pointer::make_debug_string): New method.
456 (function_pointer::write_reproducer): New method.
457 * jit-recording.h: Within namespace gcc::jit::recording...
458 (function::get_address): New method.
459 (function): Add field "m_fn_ptr_type".
460 (class function_pointer): New subclass of rvalue.
461 * libgccjit++.h (gccjit::function::get_address): New method.
462 * libgccjit.c (gcc_jit_function_get_address): New function.
463 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_function_get_address): New
464 macro.
465 (gcc_jit_function_get_address): New API entrypoint.
466 * libgccjit.map (LIBGCCJIT_ABI_9): New tag.
467
595ced60
DM
4682017-09-14 David Malcolm <dmalcolm@redhat.com>
469
470 PR jit/82174
471 * jit-builtins.c (matches_builtin): Ignore entries with a NULL
472 name.
473
953e520d
DM
4742017-08-18 David Malcolm <dmalcolm@redhat.com>
475
476 PR tree-optimization/46805
477 * dummy-frontend.c (jit_langhook_parse_file): Handle vector types.
478
519d0798
DM
4792017-08-18 David Malcolm <dmalcolm@redhat.com>
480
481 * jit-recording.c (class gcc::jit::reproducer): Rename field
482 "m_identifiers" to "m_map_memento_to_identifier". Add field
483 "m_set_identifiers" and struct hash_traits for it.
484 (gcc::jit::reproducer::reproducer): Update for above.
485 (convert_to_identifier): New function.
486 (gcc::jit::reproducer::ensure_identifier_is_unique): New method.
487 (gcc::jit::reproducer::make_identifier): Avoid appending the %p
488 unless necessary for uniqueness. Update for field renaming.
489 (gcc::jit::reproducer::get_identifier): Update for field renaming.
490
47ee1b7c
DM
4912017-08-09 David Malcolm <dmalcolm@redhat.com>
492
493 * docs/cp/topics/types.rst (Vector types): New section.
494 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_8): New tag.
495 * docs/topics/types.rst (gcc_jit_context_get_type): Fix typo in
496 example.
497 (Vector types): New section.
498 * docs/_build/texinfo/libgccjit.texi: Regenerate.
499 * jit-playback.c (gcc::jit::playback::type::get_vector): New
500 method.
501 * jit-playback.h (gcc::jit::playback::type::get_vector): New
502 method.
503 * jit-recording.c: In namespace gcc::jit::recording::
504 (type::get_vector): New method.
505 (memento_of_get_aligned::write_reproducer): Fix typo
506 in leading comment.
507 (memento_of_get_vector::replay_into): New method.
508 (memento_of_get_vector::make_debug_string): New method.
509 (memento_of_get_vector::write_reproducer): New method.
510 * jit-recording.h: In namespace gcc::jit::recording::
511 (type::get_vector): New
512 method.
513 (class memento_of_get_vector): New class.
514 * libgccjit++.h (gccjit::type::get_vector): New method.
515 * libgccjit.c (gcc_jit_type_get_vector): New public entrypoint.
516 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_type_get_vector): New
517 define.
518 (gcc_jit_type_get_vector): New decl.
519 * libgccjit.map (LIBGCCJIT_ABI_8): New ABI tag.
520
b8506a8a
RS
5212017-07-05 Richard Sandiford <richard.sandiford@linaro.org>
522 Alan Hayward <alan.hayward@arm.com>
523 David Sherwood <david.sherwood@arm.com>
524
525 * dummy-frontend.c (jit_langhook_type_for_mode): Remove "enum" before
526 "machine_mode".
527
0ebd1f00
DM
5282017-04-24 David Malcolm <dmalcolm@redhat.com>
529
530 * docs/cp/topics/types.rst (gccjit::type::get_const): Remove
531 comment.
532 (gccjit::type::get_aligned): Add.
533 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_7.
534 * docs/topics/types.rst: Add gcc_jit_type_get_aligned.
535 * docs/_build/texinfo/libgccjit.texi: Regenerate.
536 * jit-playback.c (gcc::jit::playback::type::get_aligned): New
537 method.
538 * jit-playback.h (gcc::jit::playback::type::get_aligned): New
539 method.
540 * jit-recording.c: Within namespace gcc::jit::recording...
541 (type::get_aligned): New method.
542 (memento_of_get_aligned::replay_into): New method.
543 (memento_of_get_aligned::make_debug_string): New method.
544 (memento_of_get_aligned::write_reproducer): New method.
545 * jit-recording.h: Within namespace gcc::jit::recording...
546 (type::get_aligned): New method.
547 (type::accepts_writes_from): Strip off qualifications from
548 this when comparing pointer equality.
549 (decorated_type): New subclass of type, subsuming the
550 commonality between memento_of_get_const and
551 memento_of_get_volatile.
552 (memento_of_get_const): Make a subclass of decorated_type,
553 rather than type.
554 (memento_of_get_volatile): Likewise.
555 (memento_of_get_aligned): Likewise.
556 * libgccjit++.h: Within namespace gccjit...
557 (type::get_const): New method.
558 (type::get_aligned): New method.
559 * libgccjit.c (gcc_jit_type_get_aligned): New function.
560 * libgccjit.h (gcc_jit_type_get_aligned): New decl.
561 * libgccjit.map (LIBGCCJIT_ABI_7): New
562 (gcc_jit_type_get_aligned): Add.
563
8a3a6ab4
DM
5642017-01-19 David Malcolm <dmalcolm@redhat.com>
565
566 * dummy-frontend.c (jit_langhook_type_for_size): Delete.
567 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
568
b37589b0
DM
5692017-01-18 David Malcolm <dmalcolm@redhat.com>
570
571 * dummy-frontend.c (jit_langhook_type_for_size): Implement, using
572 lto's lto_type_for_size.
573
cbe34bb5
JJ
5742017-01-01 Jakub Jelinek <jakub@redhat.com>
575
576 Update copyright years.
577
15c671a7
DM
5782016-05-20 David Malcolm <dmalcolm@redhat.com>
579
580 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_6.
581 * docs/topics/expressions.rst (Function calls): Add documentation
582 of gcc_jit_rvalue_set_bool_require_tail_call.
583 * docs/_build/texinfo/libgccjit.texi: Regenerate.
584 * jit-common.h (gcc::jit::recording::base_call): Add forward decl.
585 * jit-playback.c: Within namespace gcc::jit::playback...
586 (context::build_call) Add "require_tail_call" param and use it
587 to set CALL_EXPR_MUST_TAIL_CALL.
588 (context::new_call): Add "require_tail_call" param.
589 (context::new_call_through_ptr): Likewise.
590 * jit-playback.h: Within namespace gcc::jit::playback...
591 (context::new_call: Add "require_tail_call" param.
592 (context::new_call_through_ptr): Likewise.
593 (context::build_call): Likewise.
594 * jit-recording.c: Within namespace gcc::jit::recording...
595 (base_call::base_call): New constructor.
596 (base_call::write_reproducer_tail_call): New method.
597 (call::call): Update for inheritance from base_call.
598 (call::replay_into): Provide m_require_tail_call to call
599 to new_call.
600 (call::write_reproducer): Call write_reproducer_tail_call.
601 (call_through_ptr::call_through_ptr): Update for inheritance from
602 base_call.
603 (call_through_ptr::replay_into): Provide m_require_tail_call to call
604 to new_call_through_ptr.
605 (recording::call_through_ptr::write_reproducer): Call
606 write_reproducer_tail_call.
607 * jit-recording.h: Within namespace gcc::jit::recording...
608 (rvalue::dyn_cast_base_call): New virtual function.
609 (class base_call): New subclass of class rvalue.
610 (class call): Inherit from base_call rather than directly from
611 rvalue, moving get_precedence and m_args to base_call.
612 (class call_through_ptr): Likewise.
613 * libgccjit.c (gcc_jit_rvalue_set_bool_require_tail_call): New
614 function.
615 * libgccjit.h
616 (LIBGCCJIT_HAVE_gcc_jit_rvalue_set_bool_require_tail_call): New
617 macro.
618 (gcc_jit_rvalue_set_bool_require_tail_call): New function.
619 * libgccjit.map (LIBGCCJIT_ABI_6): New.
620 (gcc_jit_rvalue_set_bool_require_tail_call): Add.
621
6b5423a5
DM
6222016-05-17 David Malcolm <dmalcolm@redhat.com>
623
624 * dummy-frontend.c: Include diagnostic.h.
625 (jit_begin_diagnostic): New function.
626 (jit_end_diagnostic): New function.
627 (jit_langhook_init): Register jit_begin_diagnostic
628 and jit_end_diagnostic with the global_dc.
629 * jit-playback.c: Include diagnostic.h.
630 (gcc::jit::playback::context::add_diagnostic): New method.
631 * jit-playback.h (struct diagnostic_context): Add forward
632 declaration.
633 (gcc::jit::playback::context::add_diagnostic): New method.
634
f51703a8
DM
6352016-05-17 David Malcolm <dmalcolm@redhat.com>
636
637 * docs/topics/expressions.rst (Function calls): Document
638 gcc_jit_context_new_call_through_ptr.
639 * docs/_build/texinfo/libgccjit.texi: Regenerate.
640
54ece5e2
DM
6412016-05-13 David Malcolm <dmalcolm@redhat.com>
642
643 * jit-playback.h: Within namespace gcc:jit::playback...
644 (compile_to_memory::postprocess): Mark with FINAL OVERRIDE.
645 (compile_to_file::postprocess): Likewise.
646 (function::finalizer): Likewise.
647 (block::finalizer): Likewise.
648 (source_file::finalizer): Likewise.
649 (source_line::finalizer): Likewise.
650 * jit-recording.c (gcc::jit::rvalue_usage_validator):: Likewise.
651 * jit-recording.h: Within namespace gcc::jit::recording...
652 (string::replay_into): Mark with FINAL OVERRIDE.
653 (string::make_debug_string): Likewise.
654 (string::write_reproducer): Likewise.
655 (location::replay_into): Likewise.
656 (location::dyn_cast_location): Likewise.
657 (location::make_debug_string): Likewise.
658 (location::write_reproducer): Likewise.
659 (memento_of_get_type::dereference): Likewise.
660 (memento_of_get_type::accepts_writes_from): Likewise.
661 (memento_of_get_type::is_int): Likewise.
662 (memento_of_get_type::is_float): Likewise.
663 (memento_of_get_type::is_bool): Likewise.
664 (memento_of_get_type::is_pointer): Likewise.
665 (memento_of_get_type::is_array): Likewise.
666 (memento_of_get_type::is_void): Likewise.
667 (memento_of_get_type::replay_into): Likewise.
668 (memento_of_get_type::make_debug_string): Likewise.
669 (memento_of_get_type::write_reproducer): Likewise.
670 (memento_of_get_pointer::dereference): Likewise.
671 (memento_of_get_pointer::accepts_writes_from): Likewise.
672 (memento_of_get_pointer::replay_into): Likewise.
673 (memento_of_get_pointer::is_int): Likewise.
674 (memento_of_get_pointer::is_float): Likewise.
675 (memento_of_get_pointer::is_bool): Likewise.
676 (memento_of_get_pointer::is_pointer): Likewise.
677 (memento_of_get_pointer::is_array): Likewise.
678 (memento_of_get_pointer::make_debug_string): Likewise.
679 (memento_of_get_pointer::write_reproducer): Likewise.
680 (memento_of_get_const::dereference): Likewise.
681 (memento_of_get_const::accepts_writes_from): Likewise.
682 (memento_of_get_const::unqualified): Likewise.
683 (memento_of_get_const::is_int): Likewise.
684 (memento_of_get_const::is_float): Likewise.
685 (memento_of_get_const::is_bool): Likewise.
686 (memento_of_get_const::is_pointer): Likewise.
687 (memento_of_get_const::is_array): Likewise.
688 (memento_of_get_const::void replay_into): Likewise;
689 (memento_of_get_const::make_debug_string): Likewise.
690 (memento_of_get_const::write_reproducer): Likewise.
691 (memento_of_get_volatile::dereference): Likewise.
692 (memento_of_get_volatile::unqualified): Likewise.
693 (memento_of_get_volatile::is_int): Likewise.
694 (memento_of_get_volatile::is_float): Likewise.
695 (memento_of_get_volatile::is_bool): Likewise.
696 (memento_of_get_volatile::is_pointer): Likewise.
697 (memento_of_get_volatile::is_array): Likewise.
698 (memento_of_get_volatile::replay_into): Likewise;
699 (memento_of_get_volatile::make_debug_string): Likewise.
700 (memento_of_get_volatile::write_reproducer): Likewise.
701 (array_type::dereference): Likewise.
702 (array_type::is_int): Likewise.
703 (array_type::is_float): Likewise.
704 (array_type::is_bool): Likewise.
705 (array_type::is_pointer): Likewise.
706 (array_type::is_array): Likewise.
707 (array_type::replay_into): Likewise;
708 (array_type::make_debug_string): Likewise.
709 (array_type::write_reproducer): Likewise.
710 (function_type::dereference): Likewise.
711 (function_type::function_dyn_cast_function_type): Likewise.
712 (function_type::function_as_a_function_type): Likewise.
713 (function_type::is_int): Likewise.
714 (function_type::is_float): Likewise.
715 (function_type::is_bool): Likewise.
716 (function_type::is_pointer): Likewise.
717 (function_type::is_array): Likewise.
718 (function_type::replay_into): Likewise;
719 (function_type::make_debug_string): Likewise.
720 (function_type::write_reproducer): Likewise.
721 (field::replay_into): Likewise;
722 (field::write_to_dump): Likewise.
723 (field::make_debug_string): Likewise.
724 (field::write_reproducer): Likewise.
725 (compound_type::dereference): Likewise.
726 (compound_type::is_int): Likewise.
727 (compound_type::is_float): Likewise.
728 (compound_type::is_bool): Likewise.
729 (compound_type::is_pointer): Likewise.
730 (compound_type::is_array): Likewise.
731 (compound_type::has_known_size): Likewise.
732 (struct_::dyn_cast_struct): Likewise.
733 (struct_::replay_into): Likewise.
734 (struct_::access_as_type): Likewise.
735 (struct_::make_debug_string): Likewise.
736 (struct_::write_reproducer): Likewise.
737 (fields::replay_into): Likewise.
738 (fields::write_to_dump): Likewise.
739 (fields::make_debug_string): Likewise.
740 (fields::write_reproducer): Likewise.
741 (union_::replay_into): Likewise.
742 (union_::make_debug_string): Likewise.
743 (union_::write_reproducer): Likewise.
744 (lvalue::access_as_rvalue): Mark with OVERRIDE.
745 (param::replay_into): Mark with FINAL OVERRIDE.
746 (param::visit_children): Likewise.
747 (param::dyn_cast_param): Likewise.
748 (param::access_as_rvalue): Likewise.
749 (param::access_as_lvalue): Likewise.
750 (param::make_debug_string): Likewise.
751 (param::write_reproducer): Likewise.
752 (param::get_precedence): Likewise.
753 (function::replay_into): Likewise.
754 (function::write_to_dump): Likewise.
755 (function::make_debug_string): Likewise.
756 (function::write_reproducer): Likewise.
757 (block::write_to_dump): Likewise.
758 (block::make_debug_string): Likewise.
759 (block::write_reproducer): Likewise.
760 (block::replay_into): Likewise.
761 (global::replay_into): Likewise;
762 (global::visit_children): Likewise.
763 (global::write_to_dump): Likewise.
764 (global::make_debug_string): Likewise.
765 (global::write_reproducer): Likewise.
766 (global::get_precedence): Likewise.
767 (memento_of_new_rvalue_from_const::replay_into): Likewise.
768 (memento_of_new_rvalue_from_const::visit_children): Likewise.
769 (memento_of_new_rvalue_from_const::is_constant): Likewise.
770 (memento_of_new_rvalue_from_const::get_wide_int): Likewise.
771 (memento_of_new_rvalue_from_const::make_debug_string): Likewise.
772 (memento_of_new_rvalue_from_const::write_reproducer): Likewise.
773 (memento_of_new_rvalue_from_const::get_precedence): Likewise.
774 (memento_of_new_string_literal::replay_into): Likewise.
775 (memento_of_new_string_literal::visit_children): Likewise.
776 (memento_of_new_string_literal::make_debug_string): Likewise.
777 (memento_of_new_string_literal::write_reproducer): Likewise.
778 (memento_of_new_string_literal::get_precedence): Likewise.
779 (unary_op::replay_into): Likewise.
780 (unary_op::visit_children): Likewise.
781 (unary_op::make_debug_string): Likewise.
782 (unary_op::write_reproducer): Likewise.
783 (unary_op::get_precedence): Likewise.
784 (binary_op::replay_into): Likewise.
785 (binary_op::visit_children): Likewise.
786 (binary_op::make_debug_string): Likewise.
787 (binary_op::write_reproducer): Likewise.
788 (binary_op::get_precedence): Likewise.
789 (comparison::replay_into): Likewise.
790 (comparison::visit_children): Likewise.
791 (comparison::make_debug_string): Likewise.
792 (comparison::write_reproducer): Likewise.
793 (comparison::get_precedence): Likewise.
794 (cast::replay_into): Likewise.
795 (cast::visit_children): Likewise.
796 (cast::make_debug_string): Likewise.
797 (cast::write_reproducer): Likewise.
798 (cast::get_precedence): Likewise.
799 (call::replay_into): Likewise.
800 (call::visit_children): Likewise.
801 (call::make_debug_string): Likewise.
802 (call::write_reproducer): Likewise.
803 (call::get_precedence): Likewise.
804 (call_through_ptr::replay_into): Likewise.
805 (call_through_ptr::visit_children): Likewise.
806 (call_through_ptr::make_debug_string): Likewise.
807 (call_through_ptr::write_reproducer): Likewise.
808 (call_through_ptr::get_precedence): Likewise.
809 (array_access::replay_into): Likewise.
810 (array_access::visit_children): Likewise.
811 (array_access::make_debug_string): Likewise.
812 (array_access::write_reproducer): Likewise.
813 (array_access::get_precedence): Likewise.
814 (access_field_of_lvalue::replay_into): Likewise.
815 (access_field_of_lvalue::visit_children): Likewise.
816 (access_field_of_lvalue::make_debug_string): Likewise.
817 (access_field_of_lvalue::write_reproducer): Likewise.
818 (access_field_of_lvalue::get_precedence): Likewise.
819 (access_field_rvalue::replay_into): Likewise.
820 (access_field_rvalue::visit_children): Likewise.
821 (access_field_rvalue::make_debug_string): Likewise.
822 (access_field_rvalue::write_reproducer): Likewise.
823 (access_field_rvalue::get_precedence): Likewise.
824 (dereference_field_rvalue::replay_into): Likewise.
825 (dereference_field_rvalue::visit_children): Likewise.
826 (dereference_field_rvalue::make_debug_string): Likewise.
827 (dereference_field_rvalue::write_reproducer): Likewise.
828 (dereference_field_rvalue::get_precedence): Likewise.
829 (dereference_rvalue::replay_into): Likewise.
830 (dereference_rvalue::visit_children): Likewise.
831 (dereference_rvalue::make_debug_string): Likewise.
832 (dereference_rvalue::write_reproducer): Likewise.
833 (dereference_rvalue::get_precedence): Likewise.
834 (get_address_of_lvalue::replay_into): Likewise.
835 (get_address_of_lvalue::visit_children): Likewise.
836 (get_address_of_lvalue::make_debug_string): Likewise.
837 (get_address_of_lvalue::write_reproducer): Likewise.
838 (get_address_of_lvalue::get_precedence): Likewise.
839 (local::replay_into): Likewise.
840 (local::visit_children): Likewise.
841 (local::write_to_dump): Likewise.
842 (local::make_debug_string): Likewise.
843 (local::write_reproducer): Likewise.
844 (local::get_precedence): Likewise.
845 (statement::write_to_dump): Likewise.
846 (eval::replay_into): Likewise.
847 (eval::make_debug_string): Likewise.
848 (eval::write_reproducer): Likewise.
849 (assignment::replay_into): Likewise.
850 (assignment::make_debug_string): Likewise.
851 (assignment::write_reproducer): Likewise.
852 (assignment_op::replay_into): Likewise.
853 (assignment_op::make_debug_string): Likewise.
854 (assignment_op::write_reproducer): Likewise.
855 (comment::replay_into): Likewise.
856 (comment::make_debug_string): Likewise.
857 (comment::write_reproducer): Likewise.
858 (conditional::replay_into): Likewise.
859 (conditional::get_successor_blocks): Likewise.
860 (conditional::make_debug_string): Likewise.
861 (conditional::write_reproducer): Likewise.
862 (jump::replay_into): Likewise.
863 (jump::get_successor_blocks): Likewise.
864 (jump::make_debug_string): Likewise.
865 (jump::write_reproducer): Likewise.
866 (return_::replay_into): Likewise.
867 (return_::get_successor_blocks): Likewise.
868 (return_::make_debug_string): Likewise.
869 (return_::write_reproducer): Likewise.
870 (case_::replay_into): Likewise.
871 (case_::write_reproducer): Likewise.
872 (case_::make_debug_string): Likewise.
873 (switch_::replay_into): Likewise.
874 (switch_::get_successor_blocks): Likewise.
875 (switch_::make_debug_string): Likewise.
876 (switch_::write_reproducer): Likewise.
877
f258ad62
DM
8782016-02-08 David Malcolm <dmalcolm@redhat.com>
879
880 * dummy-frontend.c (jit_langhook_init): Remove
881 second argument to build_common_tree_nodes to
882 track r233218.
883
1c652ccb
IB
8842016-01-23 Iain Buclaw <ibuclaw@gdcproject.org>
885
886 * jit-playback.c: Include pthread.h.
887
199501ea
DM
8882016-01-19 David Malcolm <dmalcolm@redhat.com>
889
890 PR jit/69144
891 * jit-playback.c (gcc::jit::playback::compile_to_file::postprocess):
892 Potentially add the temporary artifact to the tempdir's list of
893 tempfiles needing additional cleanup.
894 (gcc::jit::playback::context::extract_any_requested_dumps): Likewise
895 for the dumpfile.
896 * jit-tempdir.c (gcc::jit::tempdir::~tempdir): Clean up additional
897 tempfiles.
898 * jit-tempdir.h (gcc::jit::tempdir::add_temp_file): New method.
899 (gcc::jit::tempdir::m_tempfiles): New field.
900 * docs/cp/intro/tutorial04.rst: Update for changes to toyvm.cc.
901 * docs/examples/tut04-toyvm/toyvm.cc (class compilation_result):
902 New.
903 (toyvm_function::compile): Change return type from function ptr
904 to a compilation_result.
905 (toyvm_function::get_function_name): New accessor.
906 (toyvm_function::m_funcname): New field.
907 (get_function_name): Convert to...
908 (toyvm_function::make_function_name): ...this new method.
909 (toyvm_function::parse): Call make_function_name.
910 (toyvm_function::compile): Convert return type from function ptr
911 to a compilation_result. Use get_function_name.
912 (compilation_state::compile): Convert return type from
913 gcc_jit_result * to a compilation_result.
914 (test_script): Update for above changes, extracting the code from
915 the compilation_result.
916 (main): Likewise.
917 * docs/_build/texinfo/libgccjit.texi: Regenerate.
918
818ab71a
JJ
9192016-01-04 Jakub Jelinek <jakub@redhat.com>
920
921 Update copyright years.
922
69f293c9
AM
9232015-11-11 Andrew MacLeod <amacleod@redhat.com>
924
925 * dummy-frontend.c: Remove unused header files.
926 * jit-builtins.c: Likewise.
927 * jit-playback.c: Likewise.
928 * jit-recording.c: Likewise.
929 * jit-spec.c: Likewise.
930 * libgccjit.c: Likewise.
931
0aad0198
RS
9322015-11-07 Richard Sandiford <richard.sandiford@arm.com>
933
934 * jit-builtins.c: Don't undef DEF_BUILTIN.
935
2adfab87
AM
9362015-10-29 Andrew MacLeod <amacleod@redhat.com>
937
938 * dummy-frontend.c: Reorder #include's and remove duplicates.
939 * jit-builtins.c: Likewise.
940 * jit-playback.c: Likewise.
941 * jit-recording.c: Likewise.
942 * libgccjit.c: Likewise.
943
d9a6bd32
JJ
9442015-10-13 Jakub Jelinek <jakub@redhat.com>
945
946 * jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
947 DEF_FUNCTION_TYPE_11): Define.
948 * jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
949 DEF_FUNCTION_TYPE_11): Define.
950
fa83660d
TS
9512015-09-30 Thomas Schwinge <thomas@codesourcery.com>
952 Ulrich Drepper <drepper@gmail.com>
953
954 * jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use.
955
20a44562
MK
9562015-09-30 Matthias Klose <doko@ubuntu.com>
957
958 * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,
959 remove DEF_FUNCTION_TYPE_VAR_11.
960 * jit-builtins.c (builtins_manager::make_type): Define and handle
961 DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.
962
9376dd63
DM
9632015-08-25 David Malcolm <dmalcolm@redhat.com>
964
965 * docs/cp/topics/contexts.rst
966 (gccjit::context::set_bool_use_external_driver): New.
967 * docs/internals/test-hello-world.exe.log.txt: Update.
968 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_5): New.
969 * docs/topics/contexts.rst
970 (gcc_jit_context_set_bool_use_external_driver): New.
971 * jit-common.h (enum inner_bool_option): Add
972 INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
973 * jit-playback.c (gcc_driver_name): New global.
974 (gcc:jit::playback::context::invoke_driver): Split out second
975 half into...
976 (gcc::jit::playback::context::invoke_embedded_driver): ...this new
977 function, and...
978 (gcc::jit::playback::context::invoke_external_driver): ...this new
979 function.
980 * jit-playback.h
981 (gcc::jit::playback::context::get_inner_bool_option): New.
982 (gcc::jit::playback::context::invoke_embedded_driver): New.
983 (gcc::jit::playback::context::invoke_external_driver): New.
984 * jit-recording.c (inner_bool_option_reproducer_strings):
985 Add entry for INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
986 * libgccjit++.h
987 (gccjit::context::set_bool_use_external_driver): New.
988 * libgccjit.c (gcc_jit_context_set_bool_use_external_driver): New.
989 * libgccjit.h (gcc_jit_context_set_bool_use_external_driver): New.
990 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_use_external_driver):
991 New.
992 * libgccjit.map (LIBGCCJIT_ABI_5): New.
993 * notes.txt: Show invocation of embedded copy of driver.
994 * docs/internals/test-hello-world.exe.log.txt: Update
995
baf3fbad
DM
9962015-08-13 David Malcolm <dmalcolm@redhat.com>
997
998 * jit-playback.c (invoke_driver): On OS X, add
999 "-Wl,-undefined,dynamic_lookup" to the driver arguments.
1000
afed3459
DM
10012015-08-03 David Malcolm <dmalcolm@redhat.com>
1002
1003 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
1004 * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY):
1005 We no longer show a profile.
1006 * docs/topics/index.rst (Topic Reference): Add performance.rst.
1007 * docs/topics/performance.rst: New file.
1008 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1009 * jit-playback.c (gcc::jit::playback::context::compile): Add timer
1010 param when constructing the "toplev" instance.
1011 (gcc::jit::playback::context::acquire_mutex): Add timer param when
1012 constructing auto_timevar instance.
1013 (gcc::jit::playback::context::make_fake_args): If we have a timer,
1014 add "-ftime-report".
1015 (gcc::jit::playback::context::invoke_driver): Add timer param when
1016 constructing auto_timevar instance.
1017 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
1018 * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor.
1019 * jit-recording.c: Include timevar.h.
1020 (gcc::jit::recording::context::context): Initialize field "m_timer".
1021 * jit-recording.h: Add forward declaration of class timer.
1022 (gcc::jit::recording::context::set_timer): New method.
1023 (gcc::jit::recording::context::get_timer): New method.
1024 (gcc::jit::recording::context::m_timer): New field.
1025 * libgccjit++.h (gccjit::timer): New class.
1026 (gccjit::auto_time): New class.
1027 (gccjit::context::set_timer): New method.
1028 (gccjit::context::get_timer): New.
1029 (gccjit::timer::timer): New.
1030 (gccjit::timer::push): New.
1031 (gccjit::timer::pop): New.
1032 (timer::print): New.
1033 (timer::get_inner_timer): New.
1034 (timer::release): New.
1035 (auto_time::auto_time): New.
1036 (auto_time::~auto_time): New.
1037 * libgccjit.c: Include timevar.h.
1038 (struct gcc_jit_timer): New.
1039 (gcc_jit_timer_new): New function.
1040 (gcc_jit_timer_release): New function.
1041 (gcc_jit_context_set_timer): New function.
1042 (gcc_jit_context_get_timer): New function.
1043 (gcc_jit_timer_push): New function.
1044 (gcc_jit_timer_pop): New function.
1045 (gcc_jit_timer_print): New function.
1046 * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro.
1047 (gcc_jit_timer): New typedef.
1048 (gcc_jit_timer_new): New function.
1049 (gcc_jit_timer_release): New function.
1050 (gcc_jit_context_set_timer): New function.
1051 (gcc_jit_context_get_timer): New function.
1052 (gcc_jit_timer_push): New function.
1053 (gcc_jit_timer_pop): New function.
1054 (gcc_jit_timer_print): New function.
1055 * libgccjit.map (LIBGCCJIT_ABI_4): New.
1056 (gcc_jit_timer_new): New function.
1057 (gcc_jit_timer_release): New function.
1058 (gcc_jit_context_set_timer): New function.
1059 (gcc_jit_context_get_timer): New function.
1060 (gcc_jit_timer_push): New function.
1061 (gcc_jit_timer_pop): New function.
1062 (gcc_jit_timer_print): New function.
1063
eb3982c1
DM
10642015-07-23 David Malcolm <dmalcolm@redhat.com>
1065
1066 * jit-playback.c (invoke_driver): Convert local "argvec"
1067 to an auto_argvec, so that it owns copies of the strings,
1068 rather than borrows them, updating ADD_ARG to use xstrdup
1069 and special-casing the NULL terminator to avoid
1070 xstrdup (NULL). Call add_multilib_driver_arguments at the front
1071 of the arguments.
1072 (MULTILIB_DEFAULTS): Provide a default definition.
1073 (multilib_defaults_raw): New constant array.
1074 (gcc::jit::playback::context::add_multilib_driver_arguments): New
1075 method.
1076 * jit-playback.h
1077 (gcc::jit::playback::context::add_multilib_driver_arguments): New
1078 method.
1079 * docs/internals/test-hello-world.exe.log.txt: Update.
1080 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1081
1470e75f
DM
10822015-07-16 David Malcolm <dmalcolm@redhat.com>
1083
1084 * docs/internals/index.rst (Overview of code structure): Add note
1085 that the implementation is in C++, despite the .c extension.
1086 (Submitting patches): New subsection.
1087 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1088
1916bcb5
AM
10892015-07-09 Andrew MacLeod <amacleod@redhat.com>
1090
1091 * dummy-frontend.c: Adjust includes for flags.h changes.
1092 * jit-common.h: Likewise.
1093 * jit-playback.c: Likewise.
1094
58c5ad40
DM
10952015-07-08 David Malcolm <dmalcolm@redhat.com>
1096
1097 PR jit/66783
1098 * libgccjit.c (gcc_jit_context_new_field): Show name of field in
1099 "unknown size" error message.
1100 (gcc_jit_struct_set_fields): Show name of struct in error message.
1101 (gcc_jit_context_new_global): Show name of global in
1102 "unknown size" error message.
1103 (gcc_jit_function_new_local): Likewise for local.
1104
c7131fb2
AM
11052015-07-07 Andrew MacLeod <amacleod@redhat.com>
1106
1107 * dummy-frontend.c: Adjust includes.
1108 * jit-common.h: Likewise.
1109 * jit-playback.c: Likewise.
1110
3457d39e
DM
11112015-07-07 David Malcolm <dmalcolm@redhat.com>
1112
1113 PR jit/66783
1114 * jit-recording.h: Within namespace gcc:jit::recording...
1115 (type::has_known_size): New virtual function.
1116 (struct_has_known_size): New function.
1117 * libgccjit.c (gcc_jit_context_new_field): Verify that the type
1118 has a known size.
1119 (gcc_jit_context_new_global): Likewise.
1120 (gcc_jit_function_new_local): Likewise.
1121
bada4bed
DM
11222015-07-07 David Malcolm <dmalcolm@redhat.com>
1123
1124 PR jit/66779
1125 * dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we
1126 handle modes QI, HI, SI, DI, TI.
1127
e09abfa4
DM
11282015-07-01 David Malcolm <dmalcolm@redhat.com>
1129
1130 PR jit/66700
1131 * jit-playback.c (jit_mark_addressable): New function.
1132 (gcc::jit::playback::lvalue::get_address): Call
1133 jit_mark_addressable on the underlying tree.
1134
e807aeaa
DM
11352015-07-01 David Malcolm <dmalcolm@redhat.com>
1136
1137 * docs/topics/types.rst (gcc_jit_context_new_union_type): Add
1138 documentation.
1139 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1140
c575221a
DM
11412015-07-01 David Malcolm <dmalcolm@redhat.com>
1142
1143 * docs/topics/contexts.rst (gcc_jit_context_set_bool_option):
1144 Clarify lack of lifetime requirements on (const char *) parameter.
1145 * docs/topics/expressions.rst
1146 (gcc_jit_context_new_string_literal): Likewise.
1147 (gcc_jit_context_new_global): Likewise.
1148 * docs/topics/functions.rst (gcc_jit_context_new_param): Likewise.
1149 (gcc_jit_context_new_function): Likewise.
1150 (gcc_jit_function_new_block): Likewise.
1151 (gcc_jit_block_add_comment): Likewise.
1152 * docs/topics/locations.rst (gcc_jit_context_new_location):
1153 Likewise.
1154 * docs/topics/types.rst (gcc_jit_context_new_field): Likewise.
1155 (gcc_jit_context_new_struct_type): Likewise.
1156 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1157
ec5d0088
DM
11582015-06-30 David Malcolm <dmalcolm@redhat.com>
1159
1160 * docs/cp/topics/functions.rst (Blocks): Add switch statements to
1161 list of ways to terminate a block.
1162 (gccjit::block::end_with_switch): Add function description.
1163 (gccjit::case_): Add class.
1164 (gccjit::context::new_case): Add function description.
1165 * docs/cp/topics/objects.rst: Add "case_" to class hierarchy.
1166 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New.
1167 * docs/topics/functions.rst (Blocks): Add switch statements to
1168 list of ways to terminate a block.
1169 (gcc_jit_block_end_with_switch): Add function description.
1170 (gcc_jit_case): Add type.
1171 (gcc_jit_context_new_case): Add function description.
1172 (gcc_jit_case_as_object): Add function description.
1173 * docs/topics/objects.rst: Add gcc_jit_case to class hierarchy.
1174 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1175 * jit-common.h (gcc::jit::recording::case_): Add forward decl.
1176 (gcc::jit::playback::case_): Add forward decl.
1177 * jit-playback.c (add_case): New function.
1178 (gcc::jit::playback::block::add_switch): New function.
1179 * jit-playback.h (gcc::jit::playback::case_): New struct.
1180 (gcc::jit::playback::block::get_function): New method.
1181 (gcc::jit::playback::block::add_switch): New method.
1182 * jit-recording.c: Within namespace gcc::jit...
1183 (recording::context::new_case): New method.
1184 (recording::function::validate): Update for change to
1185 get_successor_blocks.
1186 (recording::block::end_with_switch): New method.
1187 (recording::block::get_successor_blocks): Update to support an
1188 arbitrary number of successor blocks.
1189 (recording::block::dump_edges_to_dot): Likewise.
1190 (memento_of_new_rvalue_from_const <int>::get_wide_int): New.
1191 (memento_of_new_rvalue_from_const <long>::get_wide_int): New.
1192 (memento_of_new_rvalue_from_const <double>::get_wide_int): New.
1193 (memento_of_new_rvalue_from_const <void *>::get_wide_int): New.
1194 (recording::statement::get_successor_blocks): Update to support an
1195 arbitrary number of successor blocks.
1196 (recording::conditional::get_successor_blocks): Likewise.
1197 (recording::jump::get_successor_blocks): Likewise.
1198 (recording::return_::get_successor_blocks): Likewise.
1199 (recording::case_::write_reproducer): New.
1200 (recording::case_::make_debug_string): New.
1201 (recording::switch_::switch_): New.
1202 (recording::switch_::replay_into): New.
1203 (recording::switch_::get_successor_blocks): New.
1204 (recording::switch_::make_debug_string): New.
1205 (recording::switch_::write_reproducer): New.
1206 * jit-recording.h: Within namespace gcc::jit::recording...
1207 (context::new_case): New.
1208 (rvalue::is_constant): New.
1209 (rvalue::get_wide_int): New.
1210 (block::end_with_switch): New.
1211 (block::get_successor_blocks): Update to support an arbitrary
1212 number of successor blocks.
1213 (memento_of_new_rvalue_from_const::is_constant): New.
1214 (memento_of_new_rvalue_from_const::get_wide_int): New.
1215 (statement::get_successor_blocks): Update to support an arbitrary
1216 number of successor blocks.
1217 (conditional::get_successor_blocks): Likewise.
1218 (jump::get_successor_blocks): Likewise.
1219 (return_::get_successor_blocks): Likewise.
1220 (case_): New subclass of memento.
1221 (switch_): New subclass of statement.
1222 * libgccjit++.h (gccjit::case_): New subclass of gccjit::object.
1223 (gccjit::context::new_case): New method.
1224 (gccjit::block::end_with_switch): New method.
1225 (gccjit::case_::case): New ctors.
1226 (gccjit::case_::get_inner_case): New method.
1227 * libgccjit.c: Include "typed-splay-tree.h"
1228 (struct gcc_jit_case): New.
1229 (gcc_jit_context_new_case): New function.
1230 (gcc_jit_case_as_object): New function.
1231 (valid_dest_for_switch): New function.
1232 (valid_case_for_switch): New function.
1233 (class api_call_validator): New class.
1234 (class case_range_validator): New class.
1235 (case_range_validator::case_range_validator): New.
1236 (case_range_validator::validate): New.
1237 (case_range_validator::case_compare): New.
1238 (case_range_validator::get_wide_int): new.
1239 (gcc_jit_block_end_with_switch): New.
1240 * libgccjit.h: Add gcc_jit_case to class hierarchy comment.
1241 (gcc_jit_case): New typedef.
1242 (gcc_jit_context_new_case): New function.
1243 (gcc_jit_case_as_object): New function.
1244 (gcc_jit_block_end_with_switch): New function.
1245 (LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New.
1246 * libgccjit.map: Add gcc_jit_block_end_with_switch,
1247 gcc_jit_case_as_object and gcc_jit_context_new_case.
1248
6a3603e3
DM
12492015-06-30 David Malcolm <dmalcolm@redhat.com>
1250
1251 PR jit/66546
1252 * docs/cp/topics/contexts.rst
1253 (gccjit::context::set_bool_allow_unreachable_blocks): New.
1254 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New.
1255 * docs/topics/contexts.rst (Options): Add notes discussing the
1256 transition from enums to entrypoints for new options.
1257 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
1258 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1259 * jit-common.h (gcc::jit::inner_bool_option): New enum.
1260 * jit-recording.c: Within namespace gcc::jit...
1261 (recording::context::context): Handle m_inner_bool_options.
1262 (recording::context::set_inner_bool_option): New.
1263 (inner_bool_option_reproducer_strings): New.
1264 (recording::context::log_all_options): Log the "inner" bool
1265 options.
1266 (recording::context::log_inner_bool_option): New.
1267 (recording::context::dump_reproducer_to_file): Write initializers
1268 for "inner" bool options.
1269 (recording::function::validate): Don't check for block
1270 reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set.
1271 * jit-recording.h: Within namespace gcc::jit...
1272 (recording::context::set_inner_bool_option): New.
1273 (recording::context::get_inner_bool_option): New.
1274 (recording::context::log_inner_bool_option): New.
1275 (recording::context::m_inner_bool_options): New.
1276 * libgccjit++.h
1277 (gccjit::context::set_bool_allow_unreachable_blocks): New.
1278 * libgccjit.c
1279 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
1280 * libgccjit.h: Add note about options present in the
1281 initial release of libgccjit.
1282 (gcc_jit_context_set_bool_allow_unreachable_blocks): New API
1283 entrypoint.
1284 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks):
1285 New macro.
1286 * libgccjit.map (LIBGCCJIT_ABI_2): New, containing...
1287 (gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new
1288 entrypoint.
1289
fa22c20d
DM
12902015-06-30 David Malcolm <dmalcolm@redhat.com>
1291
1292 PR jit/66628
1293 * docs/cp/topics/contexts.rst (Additional command-line options):
1294 New section.
1295 * docs/topics/compatibility.rst: New file.
1296 * docs/topics/contexts.rst (Additional command-line options): New
1297 section.
1298 * docs/topics/index.rst: Add compatibility.rst.
1299 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1300 * jit-playback.c (make_fake_args): Add call to
1301 append_command_line_options.
1302 * jit-recording.c: Within namespace gcc::jit...
1303 (recording::context::~context): Free the optnames within
1304 m_command_line_options.
1305 (recording::context::set_bool_option): Likewise.
1306 (recording::context::add_command_line_option): New method.
1307 (recording::context::append_command_line_options): New method.
1308 (recording::context::dump_reproducer_to_file): Add command-line
1309 options.
1310 * jit-recording.h: Within namespace gcc::jit...
1311 (recording::context::add_command_line_option): New method.
1312 (recording::context::append_command_line_options): New method.
1313 (recording::context::m_command_line_options): New field.
1314 * libgccjit++.h (gccjit::context::add_command_line_option): New
1315 method.
1316 * libgccjit.c (gcc_jit_context_add_command_line_option): New API
1317 entrypoint.
1318 * libgccjit.h (gcc_jit_context_add_command_line_option): New API
1319 entrypoint.
1320 (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New
1321 macro.
1322 * libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add
1323 LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option.
1324
a6314e15
DM
13252015-06-30 David Malcolm <dmalcolm@redhat.com>
1326
1327 * jit-recording.c
1328 (gcc::jit::recording::context::dump_reproducer_to_file):
1329 Add pragma to generated reproducers to disable -Wunused-variable.
1330 Fix handling of NULL string options.
1331
adb6d84b
DM
13322015-06-30 David Malcolm <dmalcolm@redhat.com>
1333
1334 * docs/cp/topics/expressions.rst: Remove stray semicolon.
1335 * docs/cp/topics/functions.rst: Remove stray backslash.
1336 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1337
f0889939
AM
13382015-06-25 Andrew MacLeod <amacleod@redhat.com>
1339
1340 * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
1341 * jit-playback.c: Likewise.
1342
9cad7a76
AM
13432015-06-25 Andrew Macleod <amacleod@redhat.com>
1344
1345 * jit-common.h: Don't include alias.h.
1346
41571b55
DM
13472015-06-17 David Malcolm <dmalcolm@redhat.com>
1348
1349 * libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field
1350 is for the correct struct.
1351 (gcc_jit_rvalue_access_field): Likewise.
1352
abb226c9
AM
13532015-06-17 Andrew MacLeod <amacleod@redhat.com>
1354
1355 * dummy-frontend.c: Do not include input.h, line-map.h or is-a.h.
1356 * jit-common.h: Likewise.
1357 * jit-playback.c: Likewise.
1358
bd93aa1a
DM
13592015-06-16 David Malcolm <dmalcolm@redhat.com>
1360
1361 PR jit/66539
1362 * jit-recording.c: Within namespace gcc::jit::recording::
1363 (rvalue::get_debug_string_parens): New function.
1364 (binary_op::make_debug_string): Update to mimic C precedence
1365 rules.
1366 (binary_op_precedence): New array.
1367 (binary_op::get_precedence): New function.
1368 (comparison::make_debug_string): Update to mimic C precedence
1369 rules.
1370 (comparison_precedence): New array.
1371 (comparison::get_precedence): New function.
1372 (cast::make_debug_string): Update to mimic C precedence rules.
1373 (call::make_debug_string): Likewise.
1374 (call_through_ptr::make_debug_string): Likewise.
1375 (array_access::make_debug_string): Likewise.
1376 (access_field_of_lvalue::make_debug_string): Likewise.
1377 (access_field_rvalue::make_debug_string): Likewise.
1378 (dereference_field_rvalue::make_debug_string): Likewise.
1379 (dereference_rvalue::make_debug_string): Likewise.
1380 (get_address_of_lvalue::make_debug_string): Likewise.
1381 * jit-recording.h: Within namespace gcc::jit::recording::
1382 (precedence): New enum.
1383 (rvalue::rvalue): Initialize field "m_parenthesized_string".
1384 (rvalue::get_debug_string_parens): New method.
1385 (rvalue::get_precedence): New pure virtual function.
1386 (rvalue::m_parenthesized_string): New field.
1387 (param::get_precedence): New function.
1388 (global::get_precedence): New function.
1389 (memento_of_new_rvalue_from_const::get_precedence): New function.
1390 (memento_of_new_string_literal::get_precedence): New function.
1391 (unary_op::get_precedence): New function.
1392 (binary_op::get_precedence): New function.
1393 (comparison::get_precedence): New function.
1394 (cast::get_precedence): New function.
1395 (call::get_precedence): New function.
1396 (call_through_ptr::get_precedence): New function.
1397 (array_access::get_precedence): New function.
1398 (access_field_of_lvalue::get_precedence): New function.
1399 (access_field_rvalue::get_precedence): New function.
1400 (dereference_field_rvalue::get_precedence): New function.
1401 (dereference_rvalue::get_precedence): New function.
1402 (get_address_of_lvalue::get_precedence): New function.
1403 (local::get_precedence): New function.
1404
83c1b80e
MK
14052015-06-09 Matthias Klose <doko@ubuntu.com>
1406
1407 * Make-lang.in (jit.install-common): Install headers using INSTALL_DATA.
1408
13fdf2e2
AM
14092015-06-08 Andrew MacLeod <amacleod@redhat.com>
1410
1411 * dummy-frontend.c : Adjust include files.
1412 * jit-common.h : Likewise.
1413 * jit-playback.c : Likewise.
1414
e4753451
DM
14152015-06-05 David Malcolm <dmalcolm@redhat.com>
1416
1417 * dummy-frontend.c
1418 (jit_langhook_post_compilation_parsing_cleanups): Remove.
1419 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
1420 * jit-playback.c (gcc::jit::playback::context::new_global): Add
1421 call to varpool_node::finalize_decl.
1422 (gcc::jit::playback::context::finalize_global_decls): Remove.
1423 * jit-playback.h
1424 (gcc::jit::playback::context::finalize_global_decls): Remove.
1425
e7547bc6
DM
14262015-06-05 David Malcolm <dmalcolm@redhat.com>
1427
1428 * dummy-frontend.c (jit_langhook_write_globals): Rename to...
1429 (jit_langhook_post_compilation_parsing_cleanups): ...this, and
1430 eliminate calls to finalize_compilation_unit and
1431 write_global_decls_2.
1432 (LANG_HOOKS_WRITE_GLOBALS): Rename to...
1433 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
1434 redirect from jit_langhook_write_globals to
1435 jit_langhook_post_compilation_parsing_cleanups.
1436 * jit-playback.c
1437 (gcc::jit::playback::context::write_global_decls_1): Rename to...
1438 (gcc::jit::playback::context::finalize_global_decls): ...this.
1439 (gcc::jit::playback::context::write_global_decls_1): Delete.
1440 * jit-playback.h
1441 (gcc::jit::playback::context::write_global_decls_1): Rename to...
1442 (gcc::jit::playback::context::finalize_global_decls): ...this.
1443 (gcc::jit::playback::context::write_global_decls_1): Delete.
1444
ecb9f223
AM
14452015-06-04 Andrew MacLeod <amacleod@redhat.com>
1446
1447 * dummy-frontend.c: Adjust includes for restructured coretypes.h.
1448 * jit-common.h: Likewise.
1449 * jit-playback.c: Likewise.
1450
2637afb7
DM
14512015-05-12 David Malcolm <dmalcolm@redhat.com>
1452
1453 * jit-builtins.c: Include vec.h before target.h.
1454
46bf0b0a
JW
14552015-04-27 Jim Wilson <jim.wilson@linaro.org>
1456
1457 * Make-lang.in (jit.mostlyclean): Remove shared libraries and object
1458 files.
1459
51c5c6b5
DM
14602015-04-09 David Malcolm <dmalcolm@redhat.com>
1461
1462 PR jit/65691
1463 * docs/cp/topics/expressions.rst (Simple expressions): Fix copy
1464 and paste error in description of gccjit::context::one.
1465 * docs/topics/expressions.rst (Simple expressions): Likewise in
1466 description of gcc_jit_context_one.
1467 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1468
f40fd895
UB
14692015-03-13 Uros Bizjak <ubizjak@gmail.com>
1470
1471 * jit-recording.c (dump::write): Also check vasprintf return value.
1472 (recording::context::add_error_va): Ditto.
1473 (recording::string::from_printf): Ditto.
1474
18eb0d13
DM
14752015-03-13 David Malcolm <dmalcolm@redhat.com>
1476
1477 * docs/internals/index.rst (Packaging notes): New section.
1478 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1479
7ef96183
DM
14802015-03-05 David Malcolm <dmalcolm@redhat.com>
1481
1482 * docs/cp/intro/tutorial03.rst: Add missing arguments to
1483 gccjit::block::end_with_conditional call. Add on_true/on_false
1484 comments. Tweak the wording.
1485 * docs/intro/tutorial03.rst: Add missing arguments to
1486 gcc_jit_block_end_with_conditional call. Add some clarifying
1487 comments.
1488 * docs/topics/compilation.rst: Tweak the wording to avoid an
1489 ambiguous use of "this".
1490 * docs/topics/contexts.rst: Fix a typo.
1491 * docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
1492 a stray backtick.
1493 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1494
56a9f6bc
TS
14952015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1496
1497 PR libgomp/64625
1498 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8)
1499 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
1500 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1501 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8)
1502 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
1503 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1504
a4be4e91
DM
15052015-02-04 David Malcolm <dmalcolm@redhat.com>
1506
1507 PR jit/64257
1508 * docs/conf.py (html_theme): Change from 'pyramid'
1509 to 'sphinxdoc'.
1510
f435bff3
DM
15112015-02-04 David Malcolm <dmalcolm@redhat.com>
1512
1513 * docs/topics/contexts.rst (gcc_jit_context_acquire): Fix
1514 typo.
1515 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1516
0ed4f017
DM
15172015-02-03 David Malcolm <dmalcolm@redhat.com>
1518
1519 * jit-logging.h (gcc::jit::log_user::log): Make const.
1520 * jit-recording.c (gcc::jit::recording::context::set_str_option):
1521 Log the new value of the option.
1522 (gcc::jit::recording::context::set_int_option): Likewise.
1523 (gcc::jit::recording::context::set_bool_option): Likewise.
1524 (gcc::jit::recording::context::compile): Log the value of all
1525 options.
1526 (gcc::jit::recording::context::compile_to_file): Likewise.
1527 (gcc::jit::recording::context::log_all_options): New function.
1528 (gcc::jit::recording::context::log_str_option): New function.
1529 (gcc::jit::recording::context::log_int_option): New function.
1530 (gcc::jit::recording::context::log_bool_option): New function.
1531 * jit-recording.h (gcc::jit::recording::context::log_all_options):
1532 New function.
1533 (gcc::jit::recording::context::log_str_option): New function.
1534 (gcc::jit::recording::context::log_int_option): New function.
1535 (gcc::jit::recording::context::log_bool_option): New function.
1536 * docs/internals/test-hello-world.exe.log.txt: Update for above
1537 changes.
1538 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1539
2cb844ce
DM
15402015-02-03 David Malcolm <dmalcolm@redhat.com>
1541
1542 PR jit/64810
1543 * Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o.
1544 (LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS.
1545 * jit-playback.c: Include gcc.h.
1546 (gcc::jit::playback::context::compile): Move mutex acquisition
1547 to before the call to make_fake_args.
1548 (append_arg_from_driver): New function.
1549 (gcc::jit::playback::context::make_fake_args): On the first call,
1550 call into driver_get_configure_time_options to get configure-time
1551 default options and cache them. Add them to the args for
1552 toplev::main.
1553 * jit-spec.c: New source file.
1554 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
1555 above changes.
1556 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1557
16a71c50
DM
15582015-02-02 David Malcolm <dmalcolm@redhat.com>
1559
1560 PR jit/64810
1561 * dummy-frontend.c (jit_langhook_type_for_mode): Support
1562 TYPE_MODE (long_long_integer_type_node).
1563
53c04ec9
DM
15642015-01-27 David Malcolm <dmalcolm@redhat.com>
1565
1566 * docs/internals/test-hello-world.exe.log.txt: Add example version
1567 lines.
1568 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1569 * jit-common.h (gcc::jit::dump::get_file): New accessor.
1570 * jit-logging.c: Include toplev.h.
1571 (gcc::jit::logger::logger): Log the GCC version.
1572 * jit-recording.c: Include toplev.h.
1573 (gcc:jit::recording::context::dump_reproducer_to_file): Log the
1574 GCC version.
1575
dc44ee3a
DM
15762015-01-26 David Malcolm <dmalcolm@redhat.com>
1577
1578 * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo.
1579 * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The
1580 error buffer is only valid until the next call to the context.
1581 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1582 * libgccjit.h (gcc_jit_context_get_first_error): Reword the
1583 comment to omit mention of compiling.
1584 (gcc_jit_context_get_last_error): The error buffer is only valid
1585 until the next call to the context.
1586
3349605d
DM
15872015-01-26 David Malcolm <dmalcolm@redhat.com>
1588
1589 PR jit/64708
1590 * config-lang.in (compilers): Drop "libgccjit.so".
1591
6fc2d0f3
DM
15922015-01-23 David Malcolm <dmalcolm@redhat.com>
1593
1594 PR jit/64721
1595 * jit-playback.c (gcc::jit::playback::context::compile): Construct
1596 toplev instances with init_signals=false.
1597
fdce7209
DM
15982015-01-19 David Malcolm <dmalcolm@redhat.com>
1599
1600 * docs/cp/topics/results.rst: Rename to...
1601 * docs/cp/topics/compilation.rst: ...this, and add section on
1602 ahead-of-time compilation.
1603 * docs/cp/topics/index.rst: Update for renaming of results.rst
1604 to compilation.rst.
1605 * docs/examples/emit-alphabet.bf: New file, a sample "brainf"
1606 script.
1607 * docs/examples/tut05-bf.c: New file, implementing a compiler
1608 for "brainf".
1609 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
1610 changes to logger output.
1611 * docs/intro/index.rst: Add tutorial05.rst
1612 * docs/intro/tutorial05.rst: New file.
1613 * docs/topics/results.rst: Rename to...
1614 * docs/topics/compilation.rst: ...this, and add section on
1615 ahead-of-time compilation.
1616 * docs/topics/index.rst: Update for renaming of results.rst to
1617 compilation.rst.
1618 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1619 * jit-playback.c (gcc::jit::playback::context::compile): Convert
1620 return type from result * to void. Move the code to convert to
1621 dso and dlopen the result to a new pure virtual "postprocess"
1622 method.
1623 (gcc::jit::playback::compile_to_memory::compile_to_memory): New
1624 function.
1625 (gcc::jit::playback::compile_to_memory::postprocess): New
1626 function, based on playback::context::compile.
1627 (gcc::jit::playback::compile_to_file::compile_to_file): New
1628 function.
1629 (gcc::jit::playback::compile_to_file::postprocess): New function.
1630 (gcc::jit::playback::compile_to_file::copy_file): New function.
1631 (gcc::jit::playback::context::convert_to_dso): Move internals
1632 to...
1633 (gcc::jit::playback::context::invoke_driver): New method. Add
1634 "-shared" and "-c" options to driver's argv as needed.
1635 * jit-playback.h: Include "timevar.h".
1636 (gcc::jit::playback::context::compile): Convert return type from
1637 result * to void.
1638 (gcc::jit::playback::context::postprocess): New pure virtual
1639 function, making this an abstract base class.
1640 (gcc::jit::playback::context::get_tempdir): New accessor.
1641 (gcc::jit::playback::context::invoke_driver): New function.
1642 (class gcc::jit::playback::compile_to_memory): New subclass of
1643 playback::context.
1644 (class gcc::jit::playback::compile_to_file): Likewise.
1645 * jit-recording.c (gcc::jit::recording::context::compile): Use a
1646 playback::compile_to_memory, and extract its result.
1647 (gcc::jit::recording::context::compile_to_file): New function.
1648 * jit-recording.h (gcc::jit::recording::context::compile_to_file):
1649 New function.
1650 * libgccjit++.h (gccjit::context::compile_to_file): New method.
1651 * libgccjit.c (gcc_jit_context_compile): Update log message to
1652 clarify that this is an in-memory compile.
1653 (gcc_jit_context_compile_to_file): New function.
1654 * libgccjit.h (gcc_jit_context): Clarify that you can compile
1655 a context more than once, and that you can compile to a file
1656 as well as to memory.
1657 (gcc_jit_result): Clarify that this is the result of an
1658 in-memory compilation.
1659 (gcc_jit_context_compile): Clarify that you can compile, and that
1660 this is an in-memory compilation.
1661 (enum gcc_jit_output_kind): New enum.
1662 (gcc_jit_context_compile_to_file): New function.
1663 (gcc_jit_context_enable_dump): Clarify comment to cover both forms
1664 of compilation.
1665 * libgccjit.map (gcc_jit_context_compile_to_file): New API
1666 entrypoint.
1667 * notes.txt: Update to show the playback::context::postprocess
1668 virtual function.
1669
450e225b
DM
16702015-01-19 David Malcolm <dmalcolm@redhat.com>
1671
1672 * jit-recording.c
1673 (gcc::jit::recording::memento_of_new_string_literal::make_debug_string):
1674 Add missing format string.
1675
499de348
DM
16762015-01-16 David Malcolm <dmalcolm@redhat.com>
1677
1678 * Make-lang.in (lang_checks_parallelized): Add "check-jit".
1679 (check_jit_parallelize): Set this to an arbitrary value (10).
1680
e989e68d
JJ
16812015-01-16 Jakub Jelinek <jakub@redhat.com>
1682
1683 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of
1684 last argument.
1685 (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and
1686 undef afterwards.
1687 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1688 Likewise.
1689
179ed8f5
RS
16902015-01-15 Richard Sandiford <richard.sandiford@arm.com>
1691
1692 Update copyright years in docs/.
1693
96a87981
DM
16942015-01-15 David Malcolm <dmalcolm@redhat.com>
1695
1696 * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the
1697 lvalue and the rvalue are of compatible type.
1698
86d0ac88
DM
16992015-01-13 David Malcolm <dmalcolm@redhat.com>
1700
1701 * docs/cp/topics/contexts.rst (Debugging): Add
1702 gccjit::context::dump_reproducer_to_file.
1703 * docs/internals/index.rst (Design notes): New section,
1704 discussing input validation and
1705 gcc_jit_context_dump_reproducer_to_file.
1706 * docs/topics/contexts.rst (Debugging): Add
1707 gcc_jit_context_dump_reproducer_to_file.
1708 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1709 * jit-common.h (gcc::jit::dump::get_context): New accessor.
1710 * jit-recording.c: Include "hash-map.h".
1711 Within namespace ::gcc::jit...
1712 (dump::write): Flush each line.
1713 (dump::make_location): Pass false for new param "created_by_user".
1714 (class allocator): New class.
1715 (allocator::~allocator): New function.
1716 (allocator::xstrdup_printf): New function.
1717 (allocator::xstrdup_printf_va): New function.
1718 (class reproducer): New subclass of dump.
1719 (reproducer::reproducer): New function.
1720 (reproducer::write_params): New function.
1721 (reproducer::write_args): New function.
1722 (reproducer::make_identifier): New function.
1723 (reproducer::make_tmp_identifier): New function.
1724 (reproducer::get_identifier): New pair of functions.
1725 (reproducer::get_identifier_as_rvalue): New function.
1726 (reproducer::get_identifier_as_lvalue): New function.
1727 (reproducer::get_identifier_as_type): New function.
1728 (reproducer::xstrdup_printf): New function.
1729 (recording::context::context): Initialize m_toplevel_ctxt.
1730 (recording::context::new_location): Add param created_by_user.
1731 (str_option_reproducer_strings): New table of strings.
1732 (int_option_reproducer_strings): Likewise.
1733 (bool_option_reproducer_strings): Likewise.
1734 (get_type_enum_strings): Likewise.
1735 (names_of_function_kinds): Likewise.
1736 (global_kind_reproducer_strings): Likewise.
1737 (unary_op_reproducer_strings): Likewise.
1738 (binary_op_reproducer_strings): Likewise.
1739 (comparison_reproducer_strings): Likewise.
1740 Within namespace ::gcc::jit::recording::...
1741 (context::dump_reproducer_to_file): New function.
1742 (string::write_reproducer): Likewise.
1743 (location::write_reproducer): Likewise.
1744 (type::access_as_type): Likewise.
1745 (memento_of_get_type::write_reproducer): Likewise.
1746 (memento_of_get_pointer::write_reproducer): Likewise.
1747 (memento_of_get_const::write_reproducer): Likewise.
1748 (memento_of_get_volatile::write_reproducer): Likewise.
1749 (array_type::write_reproducer): Likewise.
1750 (function_type::write_reproducer): Likewise.
1751 (function_type::write_deferred_reproducer): Likewise.
1752 (field::write_reproducer): Likewise.
1753 (struct_::access_as_type): Likewise.
1754 (struct_::write_reproducer): Likewise.
1755 (union_::write_reproducer): Likewise.
1756 (fields::write_reproducer): Likewise.
1757 (rvalue::access_as_rvalue): Likewise.
1758 (lvalue::access_as_rvalue): Likewise.
1759 (lvalue::access_as_lvalue): Likewise.
1760 (param::access_as_rvalue): Likewise.
1761 (param::access_as_lvalue): Likewise.
1762 (param::write_reproducer): Likewise.
1763 (function::write_reproducer): Likewise.
1764 (block::write_reproducer): Likewise.
1765 (global::write_reproducer): Likewise.
1766 (memento_of_new_rvalue_from_const <int>::write_reproducer):
1767 Likewise.
1768 (memento_of_new_rvalue_from_const <long>::write_reproducer):
1769 Likewise.
1770 (memento_of_new_rvalue_from_const <double>::write_reproducer):
1771 Likewise.
1772 (memento_of_new_rvalue_from_const <void *>::write_reproducer):
1773 Likewise.
1774 (memento_of_new_string_literal::write_reproducer): Likewise.
1775 (unary_op::write_reproducer): Likewise.
1776 (binary_op::write_reproducer): Likewise.
1777 (comparison::write_reproducer): Likewise.
1778 (cast::write_reproducer): Likewise.
1779 (call::write_reproducer): Likewise.
1780 (call_through_ptr::write_reproducer): Likewise.
1781 (array_access::write_reproducer): Likewise.
1782 (access_field_of_lvalue::write_reproducer): Likewise.
1783 (access_field_rvalue::write_reproducer): Likewise.
1784 (dereference_field_rvalue::write_reproducer): Likewise.
1785 (dereference_rvalue::write_reproducer): Likewise.
1786 (get_address_of_lvalue::write_reproducer): Likewise.
1787 (local::write_reproducer): Likewise.
1788 (eval::write_reproducer): Likewise.
1789 (assignment::write_reproducer): Likewise.
1790 (assignment_op::write_reproducer): Likewise.
1791 (comment::write_reproducer): Likewise.
1792 (conditional::write_reproducer): Likewise.
1793 (jump::write_reproducer): Likewise.
1794 (return_::write_reproducer): Likewise.
1795 * jit-recording.h (gcc::jit::reproducer): New forward declararion.
1796 Within namespace ::gcc::jit::recording::...
1797 (context::new_location): Add "created_by_user" param.
1798 (context::dump_reproducer_to_file): New method.
1799 (context::m_toplevel_ctxt): New field.
1800 (memento::write_reproducer): New pure virtual function.
1801 (memento::dyn_cast_location): New virtual function.
1802 (string::write_reproducer):
1803 (location::location): Add "created_by_user" param.
1804 (location::dyn_cast_location): New function.
1805 (location::created_by_user): New accessor.
1806 (location::write_reproducer): New function.
1807 (location::m_created_by_user): New field.
1808 (type::access_as_type): New virtual function.
1809 (location::write_reproducer): Likewise.
1810 (type::access_as_type): Likewise.
1811 (memento_of_get_type::write_reproducer): Likewise.
1812 (memento_of_get_pointer::write_reproducer): Likewise.
1813 (memento_of_get_const::write_reproducer): Likewise.
1814 (memento_of_get_volatile::write_reproducer): Likewise.
1815 (array_type::write_reproducer): Likewise.
1816 (function_type::write_reproducer): Likewise.
1817 (function_type::write_deferred_reproducer): Likewise.
1818 (field::write_reproducer): Likewise.
1819 (struct_::access_as_type): Likewise.
1820 (struct_::write_reproducer): Likewise.
1821 (union_::write_reproducer): Likewise.
1822 (union_::m_fields): Remove stray unused field.
1823 (fields::length): New accessor.
1824 (fields::get_field): New accessor.
1825 (fields::write_reproducer): New function.
1826 (rvalue::access_as_rvalue): Likewise.
1827 (lvalue::access_as_rvalue): Likewise.
1828 (lvalue::access_as_lvalue): Likewise.
1829 (param::access_as_rvalue): Likewise.
1830 (param::access_as_lvalue): Likewise.
1831 (param::write_reproducer): Likewise.
1832 (function::write_reproducer): Likewise.
1833 (block::write_reproducer): Likewise.
1834 (global::write_reproducer): Likewise.
1835 (memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer):
1836 Likewise.
1837 (memento_of_new_string_literal::write_reproducer): Likewise.
1838 (unary_op::write_reproducer): Likewise.
1839 (binary_op::write_reproducer): Likewise.
1840 (comparison::write_reproducer): Likewise.
1841 (cast::write_reproducer): Likewise.
1842 (call::write_reproducer): Likewise.
1843 (call_through_ptr::write_reproducer): Likewise.
1844 (array_access::write_reproducer): Likewise.
1845 (access_field_of_lvalue::write_reproducer): Likewise.
1846 (access_field_rvalue::write_reproducer): Likewise.
1847 (dereference_field_rvalue::write_reproducer): Likewise.
1848 (dereference_rvalue::write_reproducer): Likewise.
1849 (get_address_of_lvalue::write_reproducer): Likewise.
1850 (local::write_reproducer): Likewise.
1851 (eval::write_reproducer): Likewise.
1852 (assignment::write_reproducer): Likewise.
1853 (assignment_op::write_reproducer): Likewise.
1854 (comment::write_reproducer): Likewise.
1855 (conditional::write_reproducer): Likewise.
1856 (jump::write_reproducer): Likewise.
1857 (return_::write_reproducer): Likewise.
1858 * libgccjit++.h (gccjit::context::dump_reproducer_to_file): New.
1859 * libgccjit.c (gcc_jit_context_new_location): Pass "true" as
1860 param "created_by_user".
1861 (gcc_jit_context_dump_reproducer_to_file): New API entrypoint.
1862 * libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API
1863 entrypoint.
1864 * libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API
1865 entrypoint.
1866
f6f2b019
DM
18672015-01-12 David Malcolm <dmalcolm@redhat.com>
1868
1869 * jit-recording.c (class gcc::jit::rvalue_usage_validator): New.
1870 (gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New
1871 ctor.
1872 (gcc::jit::rvalue_usage_validator::visit): New function.
1873 (gcc::jit::recording::rvalue::verify_valid_within_stmt): New
1874 function.
1875 (gcc::jit::recording::rvalue::set_scope): New function.
1876 (gcc::jit::recording::function::function): Call set_scope on each
1877 param, issuing errors for any params that already have a function.
1878 (gcc::jit::recording::block::add_eval): Return the new statement;
1879 update the comment given that some error-checking now happens after
1880 this returns.
1881 (gcc::jit::recording::block::add_assignment): Likewise.
1882 (gcc::jit::recording::block::add_assignment_op): Likewise.
1883 (gcc::jit::recording::block::add_comment): Likewise.
1884 (gcc::jit::recording::block::end_with_conditional): Likewise.
1885 (gcc::jit::recording::block::end_with_jump): Likewise.
1886 (gcc::jit::recording::block::end_with_return): Likewise.
1887 (gcc::jit::recording::block::validate): Add a comment.
1888 (gcc::jit::recording::unary_op::visit_children): New function.
1889 (gcc::jit::recording::binary_op::visit_children): New function.
1890 (gcc::jit::recording::comparison::visit_children): New function.
1891 (gcc::jit::recording::cast::visit_children): New function.
1892 (gcc::jit::recording::call::visit_children): New function.
1893 (gcc::jit::recording::call_through_ptr::visit_children): New function.
1894 (gcc::jit::recording::array_access::visit_children): New function.
1895 (gcc::jit::recording::access_field_of_lvalue::visit_children): New
1896 function.
1897 (gcc::jit::recording::access_field_rvalue::visit_children): New
1898 function.
1899 (gcc::jit::recording::dereference_field_rvalue::visit_children):
1900 New function.
1901 (gcc::jit::recording::dereference_rvalue::visit_children): New
1902 function.
1903 (gcc::jit::recording::get_address_of_lvalue::visit_children): New
1904 function.
1905 * jit-recording.h: Within namespace gcc::jit::recording...
1906 (class rvalue_visitor): New.
1907 (rvalue::rvalue): Initialize m_scope.
1908 (rvalue::get_loc): New accessor.
1909 (rvalue::verify_valid_within_stmt): New function.
1910 (rvalue::visit_children): New pure virtual function.
1911 (rvalue::set_scope): New function.
1912 (rvalue::get_scope): New function.
1913 (rvalue::dyn_cast_param): New function.
1914 (rvalue::m_scope): New field.
1915 (param::visit_children): New empty function.
1916 (param::dyn_cast_param): New function.
1917 (function::get_loc): New function.
1918 (block::add_eval): Return the new statement.
1919 (block::add_assignment): Likewise.
1920 (block::add_assignment_op): Likewise.
1921 (block::add_comment): Likewise.
1922 (block::end_with_conditional): Likewise.
1923 (block::end_with_jump): Likewise.
1924 (block::end_with_return): Likewise.
1925 (global::visit_children): New function.
1926 (memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children):
1927 New function.
1928 (memento_of_new_string_literal::visit_children): New function.
1929 (unary_op::visit_children): New function.
1930 (binary_op::visit_children): New function.
1931 (comparison::visit_children): New function.
1932 (cast::visit_children): New function.
1933 (call::visit_children): New function.
1934 (call_through_ptr::visit_children): New function.
1935 (array_access::visit_children): New function.
1936 (access_field_of_lvalue::visit_children): New function.
1937 (access_field_rvalue::visit_children): New function.
1938 (dereference_field_rvalue::visit_children): New function.
1939 (dereference_rvalue::visit_children): New function.
1940 (get_address_of_lvalue::visit_children): New function.
1941 (local::local): Call set_scope.
1942 (local::visit_children): New function.
1943 (statement::get_block): Make public.
1944 * libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro.
1945 (RETURN_NULL_IF_FAIL_PRINTF5): New macro.
1946 (gcc_jit_context_new_function): Verify that each param has
1947 not yet been used for creating another function.
1948 (gcc_jit_block_add_eval): After creating the stmt, verify
1949 that the rvalue expression tree is valid to use within it.
1950 (gcc_jit_block_add_assignment): Likewise for the lvalue and
1951 rvalue expression trees.
1952 (gcc_jit_block_add_assignment_op): Likewise.
1953 (gcc_jit_block_end_with_conditional): Likewise for the boolval
1954 expression tree.
1955 (gcc_jit_block_end_with_return): Likewise for the rvalue
1956 expression tree.
1957 (gcc_jit_block_end_with_void_return): Remove return of "void",
1958 now that block::end_with_return is now non-void.
1959
1c35cc2c
DM
19602015-01-12 David Malcolm <dmalcolm@redhat.com>
1961
1962 * jit-playback.c (gcc::jit::playback::context::read_dump_file):
1963 Add missing fclose on error-handling path.
1964
791cfef8
DM
19652015-01-12 David Malcolm <dmalcolm@redhat.com>
1966
1967 * docs/cp/topics/expressions.rst (Global variables): Add
1968 enum gcc_jit_global_kind param to gccjit::context::new_global.
1969 * docs/topics/expressions.rst (Global variables): Likewise.
1970 Document the new enum.
1971 * docs/topics/results.rst (Compilation results): Document
1972 globals-handling.
1973 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1974 * dummy-frontend.c (jit_langhook_write_globals): Call into the
1975 playback context's write_global_decls_1 and write_global_decls_2
1976 before and after calling symtab->finalize_compilation_unit ().
1977 * jit-playback.c: Include "debug.h".
1978 (gcc::jit::playback::context::new_global): Add "kind" param and
1979 use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the
1980 underlying VAR_DECL. Call varpool_node::get_create on the
1981 VAR_DECL, and add it to m_globals.
1982 (gcc::jit::playback::context::write_global_decls_1): New function.
1983 (gcc::jit::playback::context::write_global_decls_2): New function.
1984 * jit-playback.h (gcc::jit::playback::context::context): Call
1985 create on m_globals.
1986 (gcc::jit::playback::context::new_global): Add "kind" param.
1987 (gcc::jit::playback::context::write_global_decls_1): New function.
1988 (gcc::jit::playback::context::write_global_decls_2): New function.
1989 (gcc::jit::playback::context::m_globals): New field.
1990 * jit-recording.c (gcc::jit::recording::context::context):
1991 Initialize m_globals.
1992 (gcc::jit::recording::context::new_global): Add param "kind".
1993 Add the new global to m_globals.
1994 (gcc::jit::recording::context::dump_to_file): Dump the globals.
1995 (gcc::jit::recording::global::replay_into): Add field m_kind.
1996 (gcc::jit::recording::global::write_to_dump): New override.
1997 * jit-recording.h (gcc::jit::recording::context::new_global): Add
1998 param "kind".
1999 (gcc::jit::recording::context::m_globals): New field.
2000 (gcc::jit::recording::global::global): Add param kind.
2001 (gcc::jit::recording::global::write_to_dump): New override.
2002 (gcc::jit::recording::global::m_kind): New field.
2003 * jit-result.c (gcc::jit::result::get_global): New function.
2004 * jit-result.h (gcc::jit::result::get_global): New function.
2005 * libgccjit++.h (gccjit::context::new_global): Add "kind" param.
2006 * libgccjit.c (gcc_jit_context_new_global): Likewise.
2007 (gcc_jit_result_get_global): New API entrypoint.
2008 * libgccjit.h (gcc_jit_result_get_global): New API entrypoint.
2009 (enum gcc_jit_global_kind): New enum.
2010 (gcc_jit_context_new_global): API change: add "kind" param.
2011 * libgccjit.map (gcc_jit_result_get_global): New symbol.
2012
860e981c
DM
20132015-01-09 David Malcolm <dmalcolm@redhat.com>
2014
2015 * dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h",
2016 "symtab.h", "inchash.h". Move include of "hash-set.h" much
2017 earlier.
2018 * jit-builtins.c: Remove redundant includes of "opts.h" and
2019 "tree.h".
2020 * jit-common.h: Include "hash-set.h", "input.h", "vec.h",
2021 "double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h".
2022 * jit-playback.c: Include "hashtab.h", "machmode.h", "input.h",
2023 "statistics.h", "vec.h", "double-int.h", "real.h",
2024 "fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h",
2025 "inchash.h", "fold-const.h". Move include of "hash-set.h" to
2026 earlier.
2027 * jit-recording.c: Remove redundant includes of "opts.h" and
2028 "tree.h".
2029
ccce3b2a
DM
20302015-01-09 David Malcolm <dmalcolm@redhat.com>
2031
2032 * docs/cp/topics/expressions.rst (Simple expressions): Use
2033 ":c:type:" for C types. Document new overload of
2034 gcc::jit::context::new_rvalue.
2035 * docs/topics/expressions.rst (Simple expressions): Use
2036 ":c:type:" for C types. Document new entrypoint
2037 gcc_jit_context_new_rvalue_from_long.
2038 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2039 * jit-playback.c: Within namespace gcc::jit::playback...
2040 (context::new_rvalue_from_int): Eliminate in favor of...
2041 (context::new_rvalue_from_const <int>): ...this.
2042 (context::new_rvalue_from_double): Eliminate in favor of...
2043 (context::new_rvalue_from_const <double>): ...this.
2044 (context::new_rvalue_from_const <long>): New.
2045 (context::new_rvalue_from_ptr): Eliminate in favor of...
2046 (context::new_rvalue_from_const <void *>): ...this.
2047 * jit-playback.h: Within namespace gcc::jit::playback...
2048 (context::new_rvalue_from_int): Eliminate in favor of...
2049 (context::new_rvalue_from_const <HOST_TYPE>): ...this.
2050 (context::new_rvalue_from_double): Likewise.
2051 (context::new_rvalue_from_ptr): Likewise.
2052 * jit-recording.c: Within namespace gcc::jit::recording...
2053 (context::new_rvalue_from_int): Eliminate.
2054 (context::new_rvalue_from_double): Likewise.
2055 (context::new_rvalue_from_ptr): Likewise.
2056 (class memento_of_new_rvalue_from_const <int>):
2057 Add explicit specialization.
2058 (class memento_of_new_rvalue_from_const <long>):
2059 Likewise.
2060 (class memento_of_new_rvalue_from_const <double>):
2061 Likewise.
2062 (class memento_of_new_rvalue_from_const <void *>):
2063 Likewise.
2064 (memento_of_new_rvalue_from_int::replay_into):
2065 Generalize into...
2066 (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into):
2067 ...this...
2068 (memento_of_new_rvalue_from_double::replay_into):
2069 ...allowing this...
2070 (memento_of_new_rvalue_from_ptr::replay_into):
2071 ...and this to be deleted.
2072 (memento_of_new_rvalue_from_int::make_debug_string):
2073 Convert to...
2074 (memento_of_new_rvalue_from_const <int>::make_debug_string):
2075 ...this.
2076 (memento_of_new_rvalue_from_double::make_debug_string):
2077 Convert to...
2078 (memento_of_new_rvalue_from_const <double>::make_debug_string):
2079 ...this.
2080 (memento_of_new_rvalue_from_ptr::make_debug_string)
2081 Convert to...
2082 (memento_of_new_rvalue_from_const <void *>::make_debug_string):
2083 ...this.
2084 (memento_of_new_rvalue_from_const <long>::make_debug_string):
2085 New function.
2086 * jit-recording.h: Within namespace gcc::jit::recording...
2087 (context::new_rvalue_from_int): Eliminate.
2088 (context::new_rvalue_from_double): Likewise.
2089 (context::new_rvalue_from_ptr): Likewise, all in favor of...
2090 (context::new_rvalue_from_const <HOST_TYPE>): New family of
2091 methods.
2092 (class memento_of_new_rvalue_from_int): Eliminate.
2093 (class memento_of_new_rvalue_from_double): Likewise.
2094 (class memento_of_new_rvalue_from_ptr): Likewise.
2095 (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family
2096 of rvalue subclasses.
2097 * libgccjit++.h (gccjit::context::new_rvalue): New overload, for
2098 "long".
2099 * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for
2100 rewriting of recording::context::new_rvalue_from_int to
2101 recording::context::new_rvalue_from_const <int>.
2102 (gcc_jit_context_new_rvalue_from_long): New API entrypoint.
2103 (gcc_jit_context_new_rvalue_from_double): Update for
2104 rewriting of recording::context::new_rvalue_from_double to
2105 recording::context::new_rvalue_from_const <double>.
2106 (gcc_jit_context_new_rvalue_from_ptr): Update for
2107 rewriting of recording::context::new_rvalue_from_ptr to
2108 recording::context::new_rvalue_from_const <void *>.
2109 * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API
2110 entrypoint.
2111 * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise.
2112
d2286af3
DM
21132015-01-09 David Malcolm <dmalcolm@redhat.com>
2114
2115 PR jit/64206
2116 * docs/internals/test-hello-world.exe.log.txt: Update, the log now
2117 shows tempdir creation/cleanup.
2118 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2119 * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir
2120 to the list of subclasses in the comment.
2121 * jit-playback.c (gcc::jit::playback::context::context): Add a
2122 comment clarifying when the tempdir gets cleaned up.
2123 (gcc::jit::playback::context::compile): Pass the context's logger,
2124 if any, to the tempdir.
2125 (gcc::jit::playback::context::dlopen_built_dso): When creating the
2126 gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand
2127 over ownership of the tempdir to it.
2128 * jit-result.c: Include "jit-tempdir.h".
2129 (gcc::jit::result::result): Add tempdir param, saving it as
2130 m_tempdir.
2131 (gcc::jit::result::~result): Delete m_tempdir.
2132 * jit-result.h (gcc::jit::result::result): Add tempdir param.
2133 (gcc::jit::result::m_tempdir): New field.
2134 * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param;
2135 add JIT_LOG_SCOPE.
2136 (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit,
2137 and log m_path_template and m_path_tempdir.
2138 (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log
2139 entry/exit, and log the unlink and rmdir calls.
2140 * jit-tempdir.h: Include "jit-logging.h".
2141 (class gcc::jit::tempdir): Make this be a subclass of log_user.
2142 (gcc::jit::tempdir::tempdir): Add logger param.
2143 * notes.txt: Update to show the two possible places where the
2144 tempdir can be cleaned up.
2145
7c8db13e
DM
21462015-01-08 David Malcolm <dmalcolm@redhat.com>
2147
2148 * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive
2149 comment.
2150
303e1d56
DM
21512015-01-08 David Malcolm <dmalcolm@redhat.com>
2152
2153 * docs/topics/contexts.rst (Error-handling): Document new
2154 entrypoint gcc_jit_context_get_last_error.
2155 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2156 * jit-recording.c (gcc::jit::recording::context::context):
2157 Initialize new fields "m_last_error_str" and
2158 "m_owns_last_error_str".
2159 (gcc::jit::recording::context::~context): Clean up
2160 m_last_error_str, if needed.
2161 (gcc::jit::recording::context::add_error_va): Update
2162 m_last_error_str and m_owns_last_error_str, freeing the old
2163 value if appropriate.
2164 (gcc::jit::recording::context::get_last_error): New function.
2165 * jit-recording.h (gcc::jit::recording::context::get_last_error):
2166 New function.
2167 (gcc::jit::recording::context): New fields m_last_error_str and
2168 m_owns_last_error_str.
2169 * libgccjit.c (gcc_jit_context_get_last_error): New function.
2170 * libgccjit.h (gcc_jit_context_get_last_error): New declaration.
2171 * libgccjit.map (gcc_jit_context_get_last_error): New function.
2172
eb4c16eb
DM
21732015-01-08 David Malcolm <dmalcolm@redhat.com>
2174
2175 * Make-lang.in (jit_OBJS): Add jit/jit-logging.o.
2176 * docs/internals/index.rst (Overview of code structure): Mention
2177 gcc_jit_context_set_logfile, and embed the example logfile.
2178 * docs/internals/test-hello-world.exe.log.txt: New file: example
2179 of a logfile.
2180 * docs/topics/contexts.rst (Debugging): Add documentation
2181 for gcc_jit_context_set_logfile.
2182 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2183 * dummy-frontend.c: Include "jit-logging.h".
2184 (jit_langhook_init): Assert that there is an active playback
2185 context. If it has a logger, log entry/exit to this function.
2186 (jit_langhook_write_globals): Likewise.
2187 * jit-common.h (gcc::jit::logger): New forward declaration.
2188 * jit-logging.c: New file.
2189 * jit-logging.h: New file.
2190 * jit-playback.c: Include "jit-logging.h".
2191 (gcc::jit::playback::context::context): Initialize the log_user
2192 base class from the recording context's logger (if any). Use
2193 JIT_LOG_SCOPE to log entry/exit from the function body.
2194 (gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to
2195 log entry/exit from the function body.
2196 (gcc::jit::playback::build_stmt_list): Likewise.
2197 (gcc::jit::playback::function::postprocess): Likewise.
2198 (gcc::jit::playback::context::compile): Likewise. Log the
2199 entry/exit to toplev::main and toplev::finalize. Log the
2200 fake argv passed to toplev::main.
2201 (gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to
2202 log entry/exit from the function body.
2203 (gcc::jit::playback::context::release_mutex): Likewise.
2204 (gcc::jit::playback::context::make_fake_args): Likewise.
2205 (gcc::jit::playback::context::extract_any_requested_dumps):
2206 Likewise.
2207 (gcc::jit::playback::context::convert_to_dso): Likewise. Also,
2208 log the arguments that the driver is invoked with.
2209 (gcc::jit::playback::context::dlopen_built_dso): Likewise. Pass
2210 the logger to the result object.
2211 (gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to
2212 log entry/exit from the function body.
2213 (gcc::jit::playback::context::dump_generated_code): Likewise.
2214 (gcc::jit::playback::context::handle_locations): Likewise.
2215 * jit-playback.h (gcc::jit::playback::context): Make this be
2216 a subclass of gcc::jit::log_user.
2217 * jit-recording.c: Include "jit-logging.h".
2218 (gcc::jit::recording::context::context: Initialize the logger to
2219 NULL for root contexts, or to the parent's logger for child
2220 contexts.
2221 (gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to
2222 log entry/exit from the function body.
2223 (gcc::jit::recording::context::replay_into): Likewise.
2224 (gcc::jit::recording::context::disassociate_from_playback):
2225 Likewise.
2226 (gcc::jit::recording::context::compile): Likewise.
2227 (recording::context::add_error_va): Likewise. Also, log the
2228 error.
2229 (gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to
2230 log entry/exit from the function body.
2231 * jit-recording.h: Include "jit-logging.h".
2232 (gcc::jit::recording::context): Make this be a subclass of
2233 gcc::jit::log_user.
2234 * jit-result.c: Include "jit-common.h" and "jit-logging.h".
2235 (gcc::jit::result::result): Add logger param, recording it.
2236 Use JIT_LOG_SCOPE to log entry/exit from the function body.
2237 (gcc::jit::result::~result(): Use JIT_LOG_SCOPE to
2238 log entry/exit from the function body.
2239 (gcc::jit::result::get_code): Likewise.
2240 * jit-result.h (gcc::jit::result): Make this be a subclass of
2241 gcc::jit::log_user.
2242 (gcc::jit::result::result): Add logger parameter.
2243 * libgccjit++.h (gccjit::context::set_logfile): New function.
2244 * libgccjit.c: Include "jit-logging.h".
2245 (gcc_jit_context_acquire): Log the context.
2246 (gcc_jit_context_release): Use JIT_LOG_FUNC to
2247 log entry/exit from the function body, and log the context.
2248 (gcc_jit_context_new_child_context): Likewise, logging both
2249 contexts.
2250 (gcc_jit_context_new_location): Use JIT_LOG_FUNC to
2251 log entry/exit from the function body.
2252 (gcc_jit_context_get_type): Likewise.
2253 (gcc_jit_context_get_int_type): Likewise.
2254 (gcc_jit_context_new_array_type): Likewise.
2255 (gcc_jit_context_new_field): Likewise.
2256 (gcc_jit_context_new_struct_type): Likewise.
2257 (gcc_jit_context_new_opaque_struct): Likewise.
2258 (gcc_jit_struct_set_fields): Likewise.
2259 (gcc_jit_context_new_union_type): Likewise.
2260 (gcc_jit_context_new_function_ptr_type): Likewise.
2261 (gcc_jit_context_new_param): Likewise.
2262 (gcc_jit_context_new_function): Likewise.
2263 (gcc_jit_context_get_builtin_function): Likewise.
2264 (gcc_jit_function_get_param): Likewise.
2265 (gcc_jit_function_dump_to_dot): Likewise.
2266 (gcc_jit_function_new_block): Likewise.
2267 (gcc_jit_context_new_global): Likewise.
2268 (gcc_jit_context_new_rvalue_from_int): Likewise.
2269 (gcc_jit_context_zero): Likewise.
2270 (gcc_jit_context_one): Likewise.
2271 (gcc_jit_context_new_rvalue_from_double): Likewise.
2272 (gcc_jit_context_new_rvalue_from_ptr): Likewise.
2273 (gcc_jit_context_null): Likewise.
2274 (gcc_jit_context_new_string_literal): Likewise.
2275 (gcc_jit_context_new_unary_op): Likewise.
2276 (gcc_jit_context_new_binary_op): Likewise.
2277 (gcc_jit_context_new_comparison): Likewise.
2278 (gcc_jit_context_new_call): Likewise.
2279 (gcc_jit_context_new_call_through_ptr): Likewise.
2280 (gcc_jit_context_new_cast): Likewise.
2281 (gcc_jit_context_new_array_access): Likewise.
2282 (gcc_jit_lvalue_access_field): Likewise.
2283 (gcc_jit_rvalue_access_field): Likewise.
2284 (gcc_jit_rvalue_dereference_field): Likewise.
2285 (gcc_jit_rvalue_dereference): Likewise.
2286 (gcc_jit_lvalue_get_address): Likewise.
2287 (gcc_jit_function_new_local): Likewise.
2288 (gcc_jit_block_add_eval): Likewise.
2289 (gcc_jit_block_add_assignment): Likewise.
2290 (gcc_jit_block_add_assignment_op): Likewise.
2291 (gcc_jit_block_end_with_conditional): Likewise.
2292 (gcc_jit_block_add_comment): Likewise.
2293 (gcc_jit_block_end_with_jump): Likewise.
2294 (gcc_jit_block_end_with_return): Likewise.
2295 (gcc_jit_block_end_with_void_return): Likewise.
2296 (gcc_jit_context_set_str_option): Likewise.
2297 (gcc_jit_context_set_int_option): Likewise.
2298 (gcc_jit_context_set_bool_option): Likewise.
2299 (gcc_jit_context_enable_dump): Likewise.
2300 (gcc_jit_context_compile): Likewise. Also log the context,
2301 and the result.
2302 (gcc_jit_context_dump_to_file): Likewise.
2303 (gcc_jit_context_set_logfile): New function.
2304 (gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to
2305 log entry/exit from the function body.
2306 (gcc_jit_result_get_code): Likewise. Also log the fnname)
2307 and the ptr to be returned.
2308 (gcc_jit_result_release): Likewise. Also log the result.
2309 * libgccjit.h: Include <stdio.h>, since we need FILE *.
2310 (gcc_jit_context_set_logfile): New declaration.
2311 * libgccjit.map (gcc_jit_context_set_logfile): New.
2312
c211cd23
DM
23132015-01-07 David Malcolm <dmalcolm@redhat.com>
2314
2315 * jit-recording.h (gcc::jit::recording::type::is_void): New
2316 virtual function.
2317 (gcc::jit::recording::memento_of_get_type::is_void): New
2318 function, overriding default implementation.
2319 * libgccjit.c (gcc_jit_rvalue_dereference): Verify that
2320 the underlying type is not "void".
2321
18146f45
DM
23222015-01-07 David Malcolm <dmalcolm@redhat.com>
2323
2324 * docs/topics/expressions.rst (Unary Operations): Add
2325 GCC_JIT_UNARY_OP_ABS.
2326 * jit-playback.c (gcc::jit::playback::context::new_unary_op):
2327 Likewise.
2328 * jit-recording.c (unary_op_strings): Likewise.
2329 * libgccjit.c (gcc_jit_context_new_unary_op): Update checking
2330 of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS.
2331 * libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS.
2332 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2333
11af98ff
DM
23342015-01-07 David Malcolm <dmalcolm@redhat.com>
2335
2336 * jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix
2337 typo in comment.
2338
433d16df
DM
23392015-01-07 David Malcolm <dmalcolm@redhat.com>
2340
2341 * TODO.rst (Test suite): Remove item about running C++ testcases.
2342 * docs/internals/index.rst (Working on the JIT library): Add
2343 "c++" to the enabled languages in the suggested "configure"
2344 invocation, and add a description of why this is necessary.
2345 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2346
50bb6c8e
DM
23472015-01-07 David Malcolm <dmalcolm@redhat.com>
2348
2349 * docs/internals/index.rst: Update to reflect that built
2350 testcases are now test-foo.c.exe, rather than test-foo.exe.
2351 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2352
1e3b6a3d
JJ
23532015-01-05 Jakub Jelinek <jakub@redhat.com>
2354
2355 Update copyright years.
2356
e8af59bc
DM
23572014-12-19 David Malcolm <dmalcolm@redhat.com>
2358
2359 * jit-playback.c (gcc::jit::playback::context::build_cast): In
2360 case BOOLEAN_TYPE, don't assume that the source expression is
2361 of type "int".
2362
5afd44e3
DM
23632014-12-19 David Malcolm <dmalcolm@redhat.com>
2364
2365 * jit-recording.c (gcc::jit::recording::context::context): When
2366 copying string options from a parent context, take a copy of the
2367 underlying buffers, rather than simply copying the pointer.
2368
1f0858d7
DM
23692014-12-19 David Malcolm <dmalcolm@redhat.com>
2370
2371 * jit-recording.c (gcc::jit::recording::context::set_str_option):
2372 Handle NULL.
2373
35291c7d
DM
23742014-12-11 David Malcolm <dmalcolm@redhat.com>
2375
2376 * docs/cp/topics/contexts.rst (gccjit::context::set_str_option):
2377 Document new function.
2378 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2379
7b31ff5e
DM
23802014-12-10 Ulrich Drepper <drepper@gmail.com>
2381
2382 Minor interface cleanups of libgccjit
2383 * jit-playback.c (convert_to_dso): Use auto_vec instead
2384 of automatic array to build up command line.
2385 * jit-recording.c (recording::context::set_str_option):
2386 Make copy of the string.
2387 (recording::context::~context): Free string options.
2388 * jit-recording.h (recording::context): Adjust type
2389 of m_str_options member.
2390 * libgccjit.h: Adjust comment about
2391 gcc_jit_context_set_str_option parameter being used after
2392 the call.
2393 Update comment now that all interfaces are copy strings
2394 if necessary.
2395 * libgccjit++.h (gccjit::context): Add set_str_option
2396 member function.
2397
29df5715
DM
23982014-12-10 David Malcolm <dmalcolm@redhat.com>
2399
2400 * docs/cp/index.rst: New file.
2401 * docs/cp/intro/index.rst: New file.
2402 * docs/cp/intro/tutorial01.rst: New file.
2403 * docs/cp/intro/tutorial02.rst: New file.
2404 * docs/cp/intro/tutorial03.rst: New file.
2405 * docs/cp/intro/tutorial04.rst: New file.
2406 * docs/cp/topics/contexts.rst: New file.
2407 * docs/cp/topics/expressions.rst: New file.
2408 * docs/cp/topics/functions.rst: New file.
2409 * docs/cp/topics/index.rst: New file.
2410 * docs/cp/topics/locations.rst: New file.
2411 * docs/cp/topics/objects.rst: New file.
2412 * docs/cp/topics/results.rst: New file.
2413 * docs/cp/topics/types.rst: New file.
2414 * docs/examples/tut01-hello-world.cc: New file.
2415 * docs/examples/tut02-square.c: Fix missing newline in output.
2416 * docs/examples/tut02-square.cc: New file.
2417 * docs/examples/tut03-sum-of-squares.cc: New file.
2418 * docs/examples/tut04-toyvm/toyvm.cc: New file.
2419 * docs/index.rst: Move summary to above the table of contents.
2420 Add text about the C vs C++ APIs.
2421 * docs/topics/contexts.rst: Fix a typo.
2422
2423 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2424 * docs/_build/texinfo/factorial1.png: New file.
2425 * docs/_build/texinfo/sum-of-squares1.png: New file.
2426
5cd614ce
DM
24272014-12-09 David Malcolm <dmalcolm@redhat.com>
2428
2429 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move
2430 logic for determine "funcname" to new function...
2431 (get_function_name): ...here, adding logic to skip any leading
2432 path from the filename.
2433 (toyvm_function_parse): Use the filename for fn_filename, rather
2434 than "name", so that the debugger can locate the source .toy
2435 file.
2436 (toyvm_function_parse): Don't fclose a NULL FILE *.
2437
2712de78
DM
24382014-12-09 David Malcolm <dmalcolm@redhat.com>
2439
2440 PR jit/63854
2441 * docs/internals/index.rst (Running under valgrind): New
2442 subsection.
2443 (docs/_build/texinfo/libgccjit.texi): Regenerate.
2444
d1e5f2c7
DM
24452014-12-09 David Malcolm <dmalcolm@redhat.com>
2446
92a285c1 2447 PR jit/64206
d1e5f2c7
DM
2448 * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o.
2449 * jit-common.h (gcc::jit::tempdir): New forward decl.
2450 * jit-playback.c: Include jit-tempdir.h.
2451 (gcc::jit::playback::context::context): Initialize m_tempdir.
2452 (gcc::jit::playback::context::~context): Move tempdir
2453 cleanup to new file jit-tempdir.c
2454 (make_tempdir_path_template): Move to new file jit-tempdir.c.
2455 (gcc::jit::playback::context::compile): Move tempdir creation
2456 to new tempdir object in new file jit-tempdir.c.
2457 (gcc::jit::playback::context::make_fake_args): Get path from
2458 tempdir object rather than from member data.
2459 (gcc::jit::playback::context::convert_to_dso): Likewise.
2460 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
2461 (gcc::jit::playback::context::dump_generated_code): Likewise.
2462 (gcc::jit::playback::context::get_path_c_file): New function.
2463 (gcc::jit::playback::context::get_path_s_file): New function.
2464 (gcc::jit::playback::context::get_path_so_file): New function.
2465 * jit-playback.h (gcc::jit::playback::context::get_path_c_file):
2466 New function.
2467 (gcc::jit::playback::context::get_path_s_file): New function.
2468 (gcc::jit::playback::context::get_path_so_file): New function.
2469 (gcc::jit::playback::context): Move fields "m_path_template",
2470 "m_path_tempdir", "m_path_c_file", "m_path_s_file",
2471 "m_path_so_file" to new jit::tempdir class; add field "m_tempdir".
2472 * jit-tempdir.c: New file.
2473 * jit-tempdir.h: New file.
2474
38771e4e
DM
24752014-12-09 David Malcolm <dmalcolm@redhat.com>
2476
2477 * jit-playback.c (gcc::jit::playback::context::compile): Acquire the
2478 mutex here, immediately before using toplev, and release it here, on
2479 each exit path after acquisition.
2480 (jit_mutex): Move this variable here, from jit-recording.c.
2481 (gcc::jit::playback::context::acquire_mutex): New function, based on
2482 code in jit-recording.c.
2483 (gcc::jit::playback::context::release_mutex): Likewise.
2484 * jit-playback.h (gcc::jit::playback::context::acquire_mutex): New
2485 function.
2486 (gcc::jit::playback::context::release_mutex): New function.
2487 * jit-recording.c (jit_mutex): Move this variable to jit-playback.c.
2488 (gcc::jit::recording::context::compile): Move mutex-handling from
2489 here into jit-playback.c's gcc::jit::playback::context::compile.
2490 * notes.txt: Update to show the new locations of ACQUIRE_MUTEX
2491 and RELEASE_MUTEX.
2492
38f4f641
DM
24932014-12-09 David Malcolm <dmalcolm@redhat.com>
2494
2495 * jit-playback.c (gcc::jit::playback::context::compile): Move the
2496 dlopen code into...
2497 (gcc::jit::playback::context::dlopen_built_dso): ...this new
2498 function.
2499 * jit-playback.h (gcc::jit::playback::context::dlopen_built_dso):
2500 New function.
2501
82e0c914
DM
25022014-12-09 David Malcolm <dmalcolm@redhat.com>
2503
2504 PR jit/64166
2505 * docs/topics/contexts.rst (Debugging): Add description of
2506 gcc_jit_context_enable_dump.
2507 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2508 * jit-playback.c: Include context.h.
2509 (class auto_argvec): New class.
2510 (auto_argvec::~auto_argvec): New function.
2511 (gcc::jit::playback::context::compile): Convert fake_args to be
2512 an auto_argvec, so that it can contain dynamically-allocated
2513 strings. Construct a vec of all requested dumps, and pass it to
2514 make_fake_args. Extract requested dumps between the calls to
2515 toplev::main and toplev::finalize.
2516 (gcc::jit::playback::context::make_fake_args): Convert param
2517 "argvec" to be a vec <char *>, and gain a "requested_dumps"
2518 param. Convert to dynamically-allocated arg strings by converting
2519 ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP
2520 for args that are already a copy. Add args for all requested dumps.
2521 (gcc::jit::playback::context::extract_any_requested_dumps): New
2522 function.
2523 (gcc::jit::playback::context::read_dump_file): New function.
2524 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
2525 Convert param "argvec" to be a vec <char *>, and gain a
2526 "requested_dumps" param.
2527 (gcc::jit::playback::context::extract_any_requested_dumps): New
2528 function.
2529 (gcc::jit::playback::context::read_dump_file): New function.
2530 * jit-recording.c (gcc::jit::recording::context::enable_dump): New
2531 function.
2532 (gcc::jit::recording::context::get_all_requested_dumps): New
2533 function.
2534 * jit-recording.h (gcc::jit::recording::requested_dump): New
2535 struct.
2536 (gcc::jit::recording::context::enable_dump): New function.
2537 (gcc::jit::recording::context::get_all_requested_dumps): New
2538 function.
2539 (gcc::jit::recording::context::m_requested_dumps): New field.
2540 * libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint.
2541 * libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint.
2542 * libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint.
2543
53b730ff
DM
25442014-12-08 David Malcolm <dmalcolm@redhat.com>
2545
2546 * libgccjit++.h: Indent the forward declarations of the classes to
2547 show the inheritance hierarchy.
2548
0f379445
DM
25492014-12-08 David Malcolm <dmalcolm@redhat.com>
2550
2551 * notes.txt: Show the beginning and ending of
2552 recording::context::compile vs playback::context::compile. Show
2553 the creation and unlinking of the tempdir. Show toplev::finalize.
2554 Move "RELEASE MUTEX" to the correct location. Show
2555 gcc_jit_result_release, and indicate where the
2556 dlopen/dlsym/dlclose occur.
2557
81ba15f1
DM
25582014-12-01 David Malcolm <dmalcolm@redhat.com>
2559
2560 * docs/examples/tut02-square.c (main): Release the context
2561 earlier, to show that this is possible. Update error-handling
2562 to avoid a double-release of the context, and to avoid
2563 releasing a NULL result.
2564 * docs/intro/tutorial02.rst: Discuss gcc_jit_context_release.
2565 * docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize
2566 * docs/topics/results.rst (gcc_jit_result): Mention that this
2567 controls the lifetimes of machine code functions.
2568 (gcc_jit_result_get_code): Spell out the requirements for this
2569 to succeed, and the lifetime of the result.
2570 (gcc_jit_result_release): Mention that this invalidates any code
2571 that was obtained from the result.
2572 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2573
e250f0dc
DM
25742014-12-01 David Malcolm <dmalcolm@redhat.com>
2575
2576 PR jit/64018
2577 * docs/intro/tutorial02.rst: Spell out lifetime of generated code.
2578 Add description of error-handling, taken in part from...
2579 * docs/topics/contexts.rst (Error-handling): Expand, and move some
2580 content to tutorial02.rst.
2581 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2582
eeafb319
DM
25832014-12-01 David Malcolm <dmalcolm@redhat.com>
2584
2585 PR jit/64020
2586 * docs/topics/types.rst (Standard types) Add new enum values to
2587 the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT,
2588 GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
2589 Widen the left-hand column so that
2590 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit.
2591 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2592
2593 * jit-builtins.c: Include stringpool.h and jit-playback.h.
2594 Move everything out of the gcc::jit::recording namespace into
2595 just gcc::jit.
2596 (struct builtin_data): Add fields "fnclass", "attr", and
2597 "implicit_p".
2598 (DEF_BUILTIN): Update macro so populate the new fields.
2599 (builtins_manager::builtins_manager): Update for move out of
2600 recording namespace. Initialize the m_attributes array.
2601 (builtins_manager::get_builtin_function): Likewise.
2602 (builtins_manager::get_builtin_function_by_id): New function.
2603 (builtins_manager::make_builtin_function): Update for move out of
2604 recording namespace. Add fix for PR jit/64020 by detecting
2605 specific builtin ids and having them ensure that builtins for
2606 other ids are created as necessary.
2607 (builtins_manager::get_type): Update for move out of recording
2608 namespace.
2609 (builtins_manager::make_type): Likewise. Add some missing
2610 #undefs.
2611 (builtins_manager::make_primitive_type): Update for move out of
2612 recording namespace. Implement the three BT_COMPLEX_ cases and
2613 BT_DOUBLE_PTR.
2614 (builtins_manager::make_fn_type): Update for move out of recording
2615 namespace.
2616 (builtins_manager::make_ptr_type): Likewise.
2617 (builtins_manager::finish_playback): New function.
2618 (builtins_manager::get_class): New function.
2619 (builtins_manager::implicit_p): New function.
2620 (builtins_manager::get_attrs_tree): Two new functions.
2621 (builtins_manager::make_attrs_tree): New function.
2622
2623 * jit-builtins.h: Move everything out of the gcc::jit::recording
2624 namespace into just gcc::jit.
2625 (enum built_in_attribute): New.
2626 (builtins_manager::builtins_manager): Update decl for namespace
2627 change.
2628 (builtins_manager::get_builtin_function): Likewise.
2629 (builtins_manager::get_class): New.
2630 (builtins_manager::implicit_p): New.
2631 (builtins_manager::get_attrs_tree): Two new functions.
2632 (builtins_manager::make_attrs_tree): New function.
2633 (builtins_manager::finish_playback): New.
2634 (builtins_manager::get_builtin_function_by_id): New.
2635 (builtins_manager::make_builtin_function): Update decl for
2636 namespace change.
2637 (builtins_manager::get_type): Likewise.
2638 (builtins_manager::make_type): Likewise.
2639 (builtins_manager::make_primitive_type): Likewise.
2640 (builtins_manager::make_fn_type): Likewise.
2641 (builtins_manager::make_ptr_type): Likewise.
2642 (builtins_manager): Likewise for fields. Add new field
2643 "m_attributes".
2644
2645 * jit-common.h (NUM_GCC_JIT_TYPES): Update.
2646 (builtins_manager): Update forward decl to reflect namespace
2647 change.
2648
2649 * jit-playback.c: Include attribs.h and jit-builtins.h.
2650 (gcc::jit::playback::context::get_tree_node_for_type): Add cases
2651 for the new COMPLEX_ types.
2652 (gcc::jit::playback::context::new_function): If creating a
2653 builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl,
2654 and call set_builtin_decl.
2655 (gcc::jit::playback::context::replay): If we have a
2656 builtins_manager, call its finish_playback method when we're done.
2657
2658 * jit-playback.h:
2659 (gcc::jit::playback::context::get_builtins_manager): New function.
2660
2661 * jit-recording.c
2662 (gcc::jit::recording::context::get_builtins_manager): New function.
2663 (gcc::jit::recording::get_builtin_function): Use
2664 get_builtins_manager, in case we're a child context.
2665 (gcc::jit::recording::memento_of_get_type::dereference): Add the
2666 COMPLEX_ types.
2667 (gcc::jit::recording::memento_of_get_type::is_int): Likewise.
2668 (gcc::jit::recording::memento_of_get_type::is_float): Likewise.
2669 (gcc::jit::recording::memento_of_get_type::is_bool): Likewise.
2670 (get_type_strings): Likewise.
2671
2672 * jit-recording.h
2673 (gcc::jit::recording::context::get_builtins_manager): New.
2674
2675 * libgccjit.h (enum gcc_jit_types): Add
2676 GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE,
2677 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
2678
23844fd7
DM
26792014-12-01 David Malcolm <dmalcolm@redhat.com>
2680
2681 * jit-builtins.c
2682 (gcc::jit::recording::builtins_manager::get_builtin_function):
2683 Check for NULL return from make_builtin_function.
2684 (gcc::jit::recording::builtins_manager::make_builtin_function):
2685 Check for NULL return from get_type.
2686
c6760a13
DM
26872014-12-01 David Malcolm <dmalcolm@redhat.com>
2688
2689 * jit-playback.c (gcc::jit::playback::context::compile): Move DSO
2690 creation code into...
2691 (gcc::jit::playback::context::convert_to_dso): New function.
2692 * jit-playback.h (gcc::jit::playback::context::convert_to_dso):
2693 New function.
2694
8f50ee3c
DM
26952014-12-01 David Malcolm <dmalcolm@redhat.com>
2696
2697 * jit-playback.c (gcc::jit::playback::context::compile): Use an
2698 auto_vec<const char *> rather than a const char *[20] for the
2699 top-level argv, and move the logic to build it to...
2700 (gcc::jit::playback::context::make_fake_args): New function.
2701 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
2702 New function.
2703
56dea35f
DM
27042014-12-01 David Malcolm <dmalcolm@redhat.com>
2705
2706 * Make-lang.in (jit_OBJS): Add jit/jit-result.o.
2707 * jit-playback.c: Include new header jit-result.h.
2708 (gcc::jit::result::result): Move to new file jit-result.c.
2709 (gcc::jit::result::~result): Likewise.
2710 (gcc::jit::playback::result): Likewise.
2711 * jit-recording.h (class gcc::jit::result): Move to new
2712 header jit-result.h.
2713 * jit-result.c: New file, to contain...
2714 (gcc::jit::result::result): Move here from jit-playback.c,
2715 removing erroneous "playback" namespace from comment.
2716 (gcc::jit::result::~result): Likewise.
2717 (gcc::jit::playback::result): Likewise.
2718 * jit-result.h: New file, to contain...
2719 (class gcc::jit::result): Move from jit-recording.h.
2720 * libgccjit.c: Include jit-result.h.
2721 (gcc_jit_result_get_code): Update comment to reflect move
2722 of implementation.
2723 (gcc_jit_result_release): Likewise.
2724
52b9468f
DM
27252014-12-01 David Malcolm <dmalcolm@redhat.com>
2726
2727 PR jit/63854
2728 * docs/examples/tut04-toyvm/toyvm.c
2729 (toyvm_compiled_function): New typedef.
2730 (toyvm_compiled_func) Rename to...
2731 (toyvm_compiled_code) ...this.
2732 (struct toyvm_compiled_function): New struct.
2733 (toyvm_function_compile): Return a toyvm_compiled_function *
2734 rather than a toyvm_compiled_func, so that the caller can fully
2735 clean things up. Free "funcname".
2736 (test_script): Update for change to toyvm_function_compile.
2737 Clean up the toyvm_compiled_function.
2738 (main): Likewise.
2739 (docs/intro/tutorial04.rst): Update to reflect the above changes,
2740 and to better spell out the lifetime of the compiled code.
2741
c8d19a69
DM
27422014-12-01 David Malcolm <dmalcolm@redhat.com>
2743
2744 PR jit/63854
2745 * jit-builtins.c
2746 (gcc::jit::recording::builtins_manager::make_fn_type): Call the
2747 context's new_function_type method, rather than directly creating
2748 a function_type instance.
2749 * jit-recording.c
2750 (gcc::jit::recording::context::new_function_type): New method,
2751 adapted from part of...
2752 (gcc::jit::recording::context::new_function_ptr_type): ...this.
2753 Update to call new_function_type.
2754 * jit-recording.h
2755 (gcc::jit::recording::context::new_function_type): New method.
2756
c985705a
DM
27572014-12-01 David Malcolm <dmalcolm@redhat.com>
2758
2759 PR jit/63969
2760 * jit-playback.c: Ensure that ctxt_progname is non-NULL.
2761
b957b2e0
DM
27622014-11-19 David Malcolm <dmalcolm@redhat.com>
2763
2764 PR jit/63854
2765 * jit-playback.c (gcc::jit::playback::compound_type::set_fields):
2766 Convert param from const vec<playback::field *> & to
2767 const auto_vec<playback::field *> *.
2768 (gcc::jit::playback::context::new_function_type): Convert param
2769 "param_types" from vec<type *> * to const auto_vec<type *> *.
2770 (gcc::jit::playback::context::new_function): Convert param
2771 "params" from vec<param *> * to const auto_vec<param *> *.
2772 (gcc::jit::playback::context::build_call): Convert param "args"
2773 from vec<rvalue *> to const auto_vec<rvalue *> *.
2774 (gcc::jit::playback::context::new_call): Likewise.
2775 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
2776 (wrapper_finalizer): New function.
2777 (gcc::jit::playback::wrapper::operator new): Call the finalizer
2778 variant of ggc_internal_cleared_alloc, supplying
2779 wrapper_finalizer.
2780 (gcc::jit::playback::function::finalizer): New.
2781 (gcc::jit::playback::block::finalizer): New.
2782 (gcc::jit::playback::source_file::finalizer): New.
2783 (gcc::jit::playback::source_line::finalizer): New.
2784
2785 * jit-playback.h
2786 (gcc::jit::playback::context::new_function_type): Convert param
2787 "param_types" from vec<type *> * to const auto_vec<type *> *.
2788 (gcc::jit::playback::context::new_function): Convert param
2789 "params" from vec<param *> * to const auto_vec<param *> *.
2790 (gcc::jit::playback::context::new_call): Convert param
2791 "args" from vec<rvalue *> to const auto_vec<rvalue *> *.
2792 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
2793 (gcc::jit::playback::context::build_call): Likewise.
2794 (gcc::jit::playback::context): Convert fields "m_functions",
2795 "m_source_files", "m_cached_locations" from vec to auto_vec.
2796 (gcc::jit::playback::wrapper::finalizer): New virtual function.
2797 (gcc::jit::playback::compound_type::set_fields): Convert param fro
2798 const vec<playback::field *> & to
2799 const auto_vec<playback::field *> *.
2800 (gcc::jit::playback::function::finalizer): New.
2801 (gcc::jit::playback::block::finalizer): New.
2802 (gcc::jit::playback::source_file::finalizer): New.
2803 (gcc::jit::playback::source_line::finalizer): New.
2804
2805 * jit-recording.c
2806 (gcc::jit::recording::function_type::replay_into): Convert local
2807 from a vec into an auto_vec.
2808 (gcc::jit::recording::fields::replay_into): Likewise.
2809 (gcc::jit::recording::function::replay_into): Likewise.
2810 (gcc::jit::recording::call::replay_into): Likewise.
2811 (gcc::jit::recording::call_through_ptr::replay_into): Likewise.
2812
2813 * jit-recording.h (gcc::jit::recording::context): Convert fields
2814 "m_mementos", "m_compound_types", "m_functions" from vec<> to
2815 auto_vec <>.
2816 (gcc::jit::recording::function_type::get_param_types): Convert
2817 return type from vec<type *> to const vec<type *> &.
2818 (gcc::jit::recording::function_type): Convert field
2819 "m_param_types" from a vec<> to an auto_vec<>.
2820 (gcc::jit::recording::fields): Likewise for field "m_fields".
2821 (gcc::jit::recording::function::get_params): Convert return type
2822 from vec <param *> to const vec<param *> &.
2823 (gcc::jit::recording::function): Convert fields "m_params",
2824 "m_locals", "m_blocks" from vec<> to auto_vec<>.
2825 (gcc::jit::recording::block): Likewise for field "m_statements".
2826 vec<> to auto_vec<>.
2827 (gcc::jit::recording::call): Likewise for field "m_args".
2828 (gcc::jit::recording::call_through_ptr): Likewise.
2829
79cafc7a
DM
28302014-11-19 David Malcolm <dmalcolm@redhat.com>
2831
2832 PR jit/63854
2833 * jit-recording.c (recording::function::validate): Convert
2834 "worklist" from vec<> to autovec<> to fix a leak.
2835
35485da9
DM
28362014-11-11 David Malcolm <dmalcolm@redhat.com>
2837
2838 * ChangeLog.jit: New.
2839 * ChangeLog: New.
2840 * Make-lang.in: New.
2841 * TODO.rst: New.
2842 * config-lang.in: New.
2843 * docs/Makefile: New.
2844 * docs/_build/texinfo/Makefile: New.
2845 * docs/_build/texinfo/factorial.png: New.
2846 * docs/_build/texinfo/libgccjit.texi: New.
2847 * docs/_build/texinfo/sum-of-squares.png: New.
2848 * docs/conf.py: New.
2849 * docs/examples/tut01-hello-world.c: New.
2850 * docs/examples/tut02-square.c: New.
2851 * docs/examples/tut03-sum-of-squares.c: New.
2852 * docs/examples/tut04-toyvm/Makefile: New.
2853 * docs/examples/tut04-toyvm/factorial.toy: New.
2854 * docs/examples/tut04-toyvm/fibonacci.toy: New.
2855 * docs/examples/tut04-toyvm/toyvm.c: New.
2856 * docs/index.rst: New.
2857 * docs/internals/index.rst: New.
2858 * docs/intro/factorial.png: New.
2859 * docs/intro/index.rst: New.
2860 * docs/intro/sum-of-squares.png: New.
2861 * docs/intro/tutorial01.rst: New.
2862 * docs/intro/tutorial02.rst: New.
2863 * docs/intro/tutorial03.rst: New.
2864 * docs/intro/tutorial04.rst: New.
2865 * docs/topics/contexts.rst: New.
2866 * docs/topics/expressions.rst: New.
2867 * docs/topics/functions.rst: New.
2868 * docs/topics/index.rst: New.
2869 * docs/topics/locations.rst: New.
2870 * docs/topics/objects.rst: New.
2871 * docs/topics/results.rst: New.
2872 * docs/topics/types.rst: New.
2873 * dummy-frontend.c: New.
2874 * jit-builtins.c: New.
2875 * jit-builtins.h: New.
2876 * jit-common.h: New.
2877 * jit-playback.c: New.
2878 * jit-playback.h: New.
2879 * jit-recording.c: New.
2880 * jit-recording.h: New.
2881 * libgccjit++.h: New.
2882 * libgccjit.c: New.
2883 * libgccjit.h: New.
2884 * libgccjit.map: New.
2885 * notes.txt: New.
2886
28872013-07-26 David Malcolm <dmalcolm@redhat.com>
2888
2889 * Initial creation
818ab71a 2890\f
8d9254fc 2891Copyright (C) 2013-2020 Free Software Foundation, Inc.
35485da9
DM
2892
2893Copying and distribution of this file, with or without modification,
2894are permitted in any medium without royalty provided the copyright
2895notice and this notice are preserved.