]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/jit/ChangeLog
Remove redundant variable from tree-call-cdce.c
[thirdparty/gcc.git] / gcc / jit / ChangeLog
CommitLineData
d9a6bd32
JJ
12015-10-13 Jakub Jelinek <jakub@redhat.com>
2
3 * jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
4 DEF_FUNCTION_TYPE_11): Define.
5 * jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
6 DEF_FUNCTION_TYPE_11): Define.
7
fa83660d
TS
82015-09-30 Thomas Schwinge <thomas@codesourcery.com>
9 Ulrich Drepper <drepper@gmail.com>
10
11 * jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use.
12
20a44562
MK
132015-09-30 Matthias Klose <doko@ubuntu.com>
14
15 * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,
16 remove DEF_FUNCTION_TYPE_VAR_11.
17 * jit-builtins.c (builtins_manager::make_type): Define and handle
18 DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.
19
9376dd63
DM
202015-08-25 David Malcolm <dmalcolm@redhat.com>
21
22 * docs/cp/topics/contexts.rst
23 (gccjit::context::set_bool_use_external_driver): New.
24 * docs/internals/test-hello-world.exe.log.txt: Update.
25 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_5): New.
26 * docs/topics/contexts.rst
27 (gcc_jit_context_set_bool_use_external_driver): New.
28 * jit-common.h (enum inner_bool_option): Add
29 INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
30 * jit-playback.c (gcc_driver_name): New global.
31 (gcc:jit::playback::context::invoke_driver): Split out second
32 half into...
33 (gcc::jit::playback::context::invoke_embedded_driver): ...this new
34 function, and...
35 (gcc::jit::playback::context::invoke_external_driver): ...this new
36 function.
37 * jit-playback.h
38 (gcc::jit::playback::context::get_inner_bool_option): New.
39 (gcc::jit::playback::context::invoke_embedded_driver): New.
40 (gcc::jit::playback::context::invoke_external_driver): New.
41 * jit-recording.c (inner_bool_option_reproducer_strings):
42 Add entry for INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
43 * libgccjit++.h
44 (gccjit::context::set_bool_use_external_driver): New.
45 * libgccjit.c (gcc_jit_context_set_bool_use_external_driver): New.
46 * libgccjit.h (gcc_jit_context_set_bool_use_external_driver): New.
47 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_use_external_driver):
48 New.
49 * libgccjit.map (LIBGCCJIT_ABI_5): New.
50 * notes.txt: Show invocation of embedded copy of driver.
51 * docs/internals/test-hello-world.exe.log.txt: Update
52
baf3fbad
DM
532015-08-13 David Malcolm <dmalcolm@redhat.com>
54
55 * jit-playback.c (invoke_driver): On OS X, add
56 "-Wl,-undefined,dynamic_lookup" to the driver arguments.
57
afed3459
DM
582015-08-03 David Malcolm <dmalcolm@redhat.com>
59
60 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
61 * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY):
62 We no longer show a profile.
63 * docs/topics/index.rst (Topic Reference): Add performance.rst.
64 * docs/topics/performance.rst: New file.
65 * docs/_build/texinfo/libgccjit.texi: Regenerate.
66 * jit-playback.c (gcc::jit::playback::context::compile): Add timer
67 param when constructing the "toplev" instance.
68 (gcc::jit::playback::context::acquire_mutex): Add timer param when
69 constructing auto_timevar instance.
70 (gcc::jit::playback::context::make_fake_args): If we have a timer,
71 add "-ftime-report".
72 (gcc::jit::playback::context::invoke_driver): Add timer param when
73 constructing auto_timevar instance.
74 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
75 * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor.
76 * jit-recording.c: Include timevar.h.
77 (gcc::jit::recording::context::context): Initialize field "m_timer".
78 * jit-recording.h: Add forward declaration of class timer.
79 (gcc::jit::recording::context::set_timer): New method.
80 (gcc::jit::recording::context::get_timer): New method.
81 (gcc::jit::recording::context::m_timer): New field.
82 * libgccjit++.h (gccjit::timer): New class.
83 (gccjit::auto_time): New class.
84 (gccjit::context::set_timer): New method.
85 (gccjit::context::get_timer): New.
86 (gccjit::timer::timer): New.
87 (gccjit::timer::push): New.
88 (gccjit::timer::pop): New.
89 (timer::print): New.
90 (timer::get_inner_timer): New.
91 (timer::release): New.
92 (auto_time::auto_time): New.
93 (auto_time::~auto_time): New.
94 * libgccjit.c: Include timevar.h.
95 (struct gcc_jit_timer): New.
96 (gcc_jit_timer_new): New function.
97 (gcc_jit_timer_release): New function.
98 (gcc_jit_context_set_timer): New function.
99 (gcc_jit_context_get_timer): New function.
100 (gcc_jit_timer_push): New function.
101 (gcc_jit_timer_pop): New function.
102 (gcc_jit_timer_print): New function.
103 * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro.
104 (gcc_jit_timer): New typedef.
105 (gcc_jit_timer_new): New function.
106 (gcc_jit_timer_release): New function.
107 (gcc_jit_context_set_timer): New function.
108 (gcc_jit_context_get_timer): New function.
109 (gcc_jit_timer_push): New function.
110 (gcc_jit_timer_pop): New function.
111 (gcc_jit_timer_print): New function.
112 * libgccjit.map (LIBGCCJIT_ABI_4): New.
113 (gcc_jit_timer_new): New function.
114 (gcc_jit_timer_release): New function.
115 (gcc_jit_context_set_timer): New function.
116 (gcc_jit_context_get_timer): New function.
117 (gcc_jit_timer_push): New function.
118 (gcc_jit_timer_pop): New function.
119 (gcc_jit_timer_print): New function.
120
eb3982c1
DM
1212015-07-23 David Malcolm <dmalcolm@redhat.com>
122
123 * jit-playback.c (invoke_driver): Convert local "argvec"
124 to an auto_argvec, so that it owns copies of the strings,
125 rather than borrows them, updating ADD_ARG to use xstrdup
126 and special-casing the NULL terminator to avoid
127 xstrdup (NULL). Call add_multilib_driver_arguments at the front
128 of the arguments.
129 (MULTILIB_DEFAULTS): Provide a default definition.
130 (multilib_defaults_raw): New constant array.
131 (gcc::jit::playback::context::add_multilib_driver_arguments): New
132 method.
133 * jit-playback.h
134 (gcc::jit::playback::context::add_multilib_driver_arguments): New
135 method.
136 * docs/internals/test-hello-world.exe.log.txt: Update.
137 * docs/_build/texinfo/libgccjit.texi: Regenerate.
138
1470e75f
DM
1392015-07-16 David Malcolm <dmalcolm@redhat.com>
140
141 * docs/internals/index.rst (Overview of code structure): Add note
142 that the implementation is in C++, despite the .c extension.
143 (Submitting patches): New subsection.
144 * docs/_build/texinfo/libgccjit.texi: Regenerate.
145
1916bcb5
AM
1462015-07-09 Andrew MacLeod <amacleod@redhat.com>
147
148 * dummy-frontend.c: Adjust includes for flags.h changes.
149 * jit-common.h: Likewise.
150 * jit-playback.c: Likewise.
151
58c5ad40
DM
1522015-07-08 David Malcolm <dmalcolm@redhat.com>
153
154 PR jit/66783
155 * libgccjit.c (gcc_jit_context_new_field): Show name of field in
156 "unknown size" error message.
157 (gcc_jit_struct_set_fields): Show name of struct in error message.
158 (gcc_jit_context_new_global): Show name of global in
159 "unknown size" error message.
160 (gcc_jit_function_new_local): Likewise for local.
161
c7131fb2
AM
1622015-07-07 Andrew MacLeod <amacleod@redhat.com>
163
164 * dummy-frontend.c: Adjust includes.
165 * jit-common.h: Likewise.
166 * jit-playback.c: Likewise.
167
3457d39e
DM
1682015-07-07 David Malcolm <dmalcolm@redhat.com>
169
170 PR jit/66783
171 * jit-recording.h: Within namespace gcc:jit::recording...
172 (type::has_known_size): New virtual function.
173 (struct_has_known_size): New function.
174 * libgccjit.c (gcc_jit_context_new_field): Verify that the type
175 has a known size.
176 (gcc_jit_context_new_global): Likewise.
177 (gcc_jit_function_new_local): Likewise.
178
bada4bed
DM
1792015-07-07 David Malcolm <dmalcolm@redhat.com>
180
181 PR jit/66779
182 * dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we
183 handle modes QI, HI, SI, DI, TI.
184
e09abfa4
DM
1852015-07-01 David Malcolm <dmalcolm@redhat.com>
186
187 PR jit/66700
188 * jit-playback.c (jit_mark_addressable): New function.
189 (gcc::jit::playback::lvalue::get_address): Call
190 jit_mark_addressable on the underlying tree.
191
e807aeaa
DM
1922015-07-01 David Malcolm <dmalcolm@redhat.com>
193
194 * docs/topics/types.rst (gcc_jit_context_new_union_type): Add
195 documentation.
196 * docs/_build/texinfo/libgccjit.texi: Regenerate.
197
c575221a
DM
1982015-07-01 David Malcolm <dmalcolm@redhat.com>
199
200 * docs/topics/contexts.rst (gcc_jit_context_set_bool_option):
201 Clarify lack of lifetime requirements on (const char *) parameter.
202 * docs/topics/expressions.rst
203 (gcc_jit_context_new_string_literal): Likewise.
204 (gcc_jit_context_new_global): Likewise.
205 * docs/topics/functions.rst (gcc_jit_context_new_param): Likewise.
206 (gcc_jit_context_new_function): Likewise.
207 (gcc_jit_function_new_block): Likewise.
208 (gcc_jit_block_add_comment): Likewise.
209 * docs/topics/locations.rst (gcc_jit_context_new_location):
210 Likewise.
211 * docs/topics/types.rst (gcc_jit_context_new_field): Likewise.
212 (gcc_jit_context_new_struct_type): Likewise.
213 * docs/_build/texinfo/libgccjit.texi: Regenerate.
214
ec5d0088
DM
2152015-06-30 David Malcolm <dmalcolm@redhat.com>
216
217 * docs/cp/topics/functions.rst (Blocks): Add switch statements to
218 list of ways to terminate a block.
219 (gccjit::block::end_with_switch): Add function description.
220 (gccjit::case_): Add class.
221 (gccjit::context::new_case): Add function description.
222 * docs/cp/topics/objects.rst: Add "case_" to class hierarchy.
223 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New.
224 * docs/topics/functions.rst (Blocks): Add switch statements to
225 list of ways to terminate a block.
226 (gcc_jit_block_end_with_switch): Add function description.
227 (gcc_jit_case): Add type.
228 (gcc_jit_context_new_case): Add function description.
229 (gcc_jit_case_as_object): Add function description.
230 * docs/topics/objects.rst: Add gcc_jit_case to class hierarchy.
231 * docs/_build/texinfo/libgccjit.texi: Regenerate.
232 * jit-common.h (gcc::jit::recording::case_): Add forward decl.
233 (gcc::jit::playback::case_): Add forward decl.
234 * jit-playback.c (add_case): New function.
235 (gcc::jit::playback::block::add_switch): New function.
236 * jit-playback.h (gcc::jit::playback::case_): New struct.
237 (gcc::jit::playback::block::get_function): New method.
238 (gcc::jit::playback::block::add_switch): New method.
239 * jit-recording.c: Within namespace gcc::jit...
240 (recording::context::new_case): New method.
241 (recording::function::validate): Update for change to
242 get_successor_blocks.
243 (recording::block::end_with_switch): New method.
244 (recording::block::get_successor_blocks): Update to support an
245 arbitrary number of successor blocks.
246 (recording::block::dump_edges_to_dot): Likewise.
247 (memento_of_new_rvalue_from_const <int>::get_wide_int): New.
248 (memento_of_new_rvalue_from_const <long>::get_wide_int): New.
249 (memento_of_new_rvalue_from_const <double>::get_wide_int): New.
250 (memento_of_new_rvalue_from_const <void *>::get_wide_int): New.
251 (recording::statement::get_successor_blocks): Update to support an
252 arbitrary number of successor blocks.
253 (recording::conditional::get_successor_blocks): Likewise.
254 (recording::jump::get_successor_blocks): Likewise.
255 (recording::return_::get_successor_blocks): Likewise.
256 (recording::case_::write_reproducer): New.
257 (recording::case_::make_debug_string): New.
258 (recording::switch_::switch_): New.
259 (recording::switch_::replay_into): New.
260 (recording::switch_::get_successor_blocks): New.
261 (recording::switch_::make_debug_string): New.
262 (recording::switch_::write_reproducer): New.
263 * jit-recording.h: Within namespace gcc::jit::recording...
264 (context::new_case): New.
265 (rvalue::is_constant): New.
266 (rvalue::get_wide_int): New.
267 (block::end_with_switch): New.
268 (block::get_successor_blocks): Update to support an arbitrary
269 number of successor blocks.
270 (memento_of_new_rvalue_from_const::is_constant): New.
271 (memento_of_new_rvalue_from_const::get_wide_int): New.
272 (statement::get_successor_blocks): Update to support an arbitrary
273 number of successor blocks.
274 (conditional::get_successor_blocks): Likewise.
275 (jump::get_successor_blocks): Likewise.
276 (return_::get_successor_blocks): Likewise.
277 (case_): New subclass of memento.
278 (switch_): New subclass of statement.
279 * libgccjit++.h (gccjit::case_): New subclass of gccjit::object.
280 (gccjit::context::new_case): New method.
281 (gccjit::block::end_with_switch): New method.
282 (gccjit::case_::case): New ctors.
283 (gccjit::case_::get_inner_case): New method.
284 * libgccjit.c: Include "typed-splay-tree.h"
285 (struct gcc_jit_case): New.
286 (gcc_jit_context_new_case): New function.
287 (gcc_jit_case_as_object): New function.
288 (valid_dest_for_switch): New function.
289 (valid_case_for_switch): New function.
290 (class api_call_validator): New class.
291 (class case_range_validator): New class.
292 (case_range_validator::case_range_validator): New.
293 (case_range_validator::validate): New.
294 (case_range_validator::case_compare): New.
295 (case_range_validator::get_wide_int): new.
296 (gcc_jit_block_end_with_switch): New.
297 * libgccjit.h: Add gcc_jit_case to class hierarchy comment.
298 (gcc_jit_case): New typedef.
299 (gcc_jit_context_new_case): New function.
300 (gcc_jit_case_as_object): New function.
301 (gcc_jit_block_end_with_switch): New function.
302 (LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New.
303 * libgccjit.map: Add gcc_jit_block_end_with_switch,
304 gcc_jit_case_as_object and gcc_jit_context_new_case.
305
6a3603e3
DM
3062015-06-30 David Malcolm <dmalcolm@redhat.com>
307
308 PR jit/66546
309 * docs/cp/topics/contexts.rst
310 (gccjit::context::set_bool_allow_unreachable_blocks): New.
311 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New.
312 * docs/topics/contexts.rst (Options): Add notes discussing the
313 transition from enums to entrypoints for new options.
314 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
315 * docs/_build/texinfo/libgccjit.texi: Regenerate.
316 * jit-common.h (gcc::jit::inner_bool_option): New enum.
317 * jit-recording.c: Within namespace gcc::jit...
318 (recording::context::context): Handle m_inner_bool_options.
319 (recording::context::set_inner_bool_option): New.
320 (inner_bool_option_reproducer_strings): New.
321 (recording::context::log_all_options): Log the "inner" bool
322 options.
323 (recording::context::log_inner_bool_option): New.
324 (recording::context::dump_reproducer_to_file): Write initializers
325 for "inner" bool options.
326 (recording::function::validate): Don't check for block
327 reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set.
328 * jit-recording.h: Within namespace gcc::jit...
329 (recording::context::set_inner_bool_option): New.
330 (recording::context::get_inner_bool_option): New.
331 (recording::context::log_inner_bool_option): New.
332 (recording::context::m_inner_bool_options): New.
333 * libgccjit++.h
334 (gccjit::context::set_bool_allow_unreachable_blocks): New.
335 * libgccjit.c
336 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
337 * libgccjit.h: Add note about options present in the
338 initial release of libgccjit.
339 (gcc_jit_context_set_bool_allow_unreachable_blocks): New API
340 entrypoint.
341 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks):
342 New macro.
343 * libgccjit.map (LIBGCCJIT_ABI_2): New, containing...
344 (gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new
345 entrypoint.
346
fa22c20d
DM
3472015-06-30 David Malcolm <dmalcolm@redhat.com>
348
349 PR jit/66628
350 * docs/cp/topics/contexts.rst (Additional command-line options):
351 New section.
352 * docs/topics/compatibility.rst: New file.
353 * docs/topics/contexts.rst (Additional command-line options): New
354 section.
355 * docs/topics/index.rst: Add compatibility.rst.
356 * docs/_build/texinfo/libgccjit.texi: Regenerate.
357 * jit-playback.c (make_fake_args): Add call to
358 append_command_line_options.
359 * jit-recording.c: Within namespace gcc::jit...
360 (recording::context::~context): Free the optnames within
361 m_command_line_options.
362 (recording::context::set_bool_option): Likewise.
363 (recording::context::add_command_line_option): New method.
364 (recording::context::append_command_line_options): New method.
365 (recording::context::dump_reproducer_to_file): Add command-line
366 options.
367 * jit-recording.h: Within namespace gcc::jit...
368 (recording::context::add_command_line_option): New method.
369 (recording::context::append_command_line_options): New method.
370 (recording::context::m_command_line_options): New field.
371 * libgccjit++.h (gccjit::context::add_command_line_option): New
372 method.
373 * libgccjit.c (gcc_jit_context_add_command_line_option): New API
374 entrypoint.
375 * libgccjit.h (gcc_jit_context_add_command_line_option): New API
376 entrypoint.
377 (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New
378 macro.
379 * libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add
380 LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option.
381
a6314e15
DM
3822015-06-30 David Malcolm <dmalcolm@redhat.com>
383
384 * jit-recording.c
385 (gcc::jit::recording::context::dump_reproducer_to_file):
386 Add pragma to generated reproducers to disable -Wunused-variable.
387 Fix handling of NULL string options.
388
adb6d84b
DM
3892015-06-30 David Malcolm <dmalcolm@redhat.com>
390
391 * docs/cp/topics/expressions.rst: Remove stray semicolon.
392 * docs/cp/topics/functions.rst: Remove stray backslash.
393 * docs/_build/texinfo/libgccjit.texi: Regenerate.
394
f0889939
AM
3952015-06-25 Andrew MacLeod <amacleod@redhat.com>
396
397 * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
398 * jit-playback.c: Likewise.
399
9cad7a76
AM
4002015-06-25 Andrew Macleod <amacleod@redhat.com>
401
402 * jit-common.h: Don't include alias.h.
403
41571b55
DM
4042015-06-17 David Malcolm <dmalcolm@redhat.com>
405
406 * libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field
407 is for the correct struct.
408 (gcc_jit_rvalue_access_field): Likewise.
409
abb226c9
AM
4102015-06-17 Andrew MacLeod <amacleod@redhat.com>
411
412 * dummy-frontend.c: Do not include input.h, line-map.h or is-a.h.
413 * jit-common.h: Likewise.
414 * jit-playback.c: Likewise.
415
bd93aa1a
DM
4162015-06-16 David Malcolm <dmalcolm@redhat.com>
417
418 PR jit/66539
419 * jit-recording.c: Within namespace gcc::jit::recording::
420 (rvalue::get_debug_string_parens): New function.
421 (binary_op::make_debug_string): Update to mimic C precedence
422 rules.
423 (binary_op_precedence): New array.
424 (binary_op::get_precedence): New function.
425 (comparison::make_debug_string): Update to mimic C precedence
426 rules.
427 (comparison_precedence): New array.
428 (comparison::get_precedence): New function.
429 (cast::make_debug_string): Update to mimic C precedence rules.
430 (call::make_debug_string): Likewise.
431 (call_through_ptr::make_debug_string): Likewise.
432 (array_access::make_debug_string): Likewise.
433 (access_field_of_lvalue::make_debug_string): Likewise.
434 (access_field_rvalue::make_debug_string): Likewise.
435 (dereference_field_rvalue::make_debug_string): Likewise.
436 (dereference_rvalue::make_debug_string): Likewise.
437 (get_address_of_lvalue::make_debug_string): Likewise.
438 * jit-recording.h: Within namespace gcc::jit::recording::
439 (precedence): New enum.
440 (rvalue::rvalue): Initialize field "m_parenthesized_string".
441 (rvalue::get_debug_string_parens): New method.
442 (rvalue::get_precedence): New pure virtual function.
443 (rvalue::m_parenthesized_string): New field.
444 (param::get_precedence): New function.
445 (global::get_precedence): New function.
446 (memento_of_new_rvalue_from_const::get_precedence): New function.
447 (memento_of_new_string_literal::get_precedence): New function.
448 (unary_op::get_precedence): New function.
449 (binary_op::get_precedence): New function.
450 (comparison::get_precedence): New function.
451 (cast::get_precedence): New function.
452 (call::get_precedence): New function.
453 (call_through_ptr::get_precedence): New function.
454 (array_access::get_precedence): New function.
455 (access_field_of_lvalue::get_precedence): New function.
456 (access_field_rvalue::get_precedence): New function.
457 (dereference_field_rvalue::get_precedence): New function.
458 (dereference_rvalue::get_precedence): New function.
459 (get_address_of_lvalue::get_precedence): New function.
460 (local::get_precedence): New function.
461
83c1b80e
MK
4622015-06-09 Matthias Klose <doko@ubuntu.com>
463
464 * Make-lang.in (jit.install-common): Install headers using INSTALL_DATA.
465
13fdf2e2
AM
4662015-06-08 Andrew MacLeod <amacleod@redhat.com>
467
468 * dummy-frontend.c : Adjust include files.
469 * jit-common.h : Likewise.
470 * jit-playback.c : Likewise.
471
e4753451
DM
4722015-06-05 David Malcolm <dmalcolm@redhat.com>
473
474 * dummy-frontend.c
475 (jit_langhook_post_compilation_parsing_cleanups): Remove.
476 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
477 * jit-playback.c (gcc::jit::playback::context::new_global): Add
478 call to varpool_node::finalize_decl.
479 (gcc::jit::playback::context::finalize_global_decls): Remove.
480 * jit-playback.h
481 (gcc::jit::playback::context::finalize_global_decls): Remove.
482
e7547bc6
DM
4832015-06-05 David Malcolm <dmalcolm@redhat.com>
484
485 * dummy-frontend.c (jit_langhook_write_globals): Rename to...
486 (jit_langhook_post_compilation_parsing_cleanups): ...this, and
487 eliminate calls to finalize_compilation_unit and
488 write_global_decls_2.
489 (LANG_HOOKS_WRITE_GLOBALS): Rename to...
490 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
491 redirect from jit_langhook_write_globals to
492 jit_langhook_post_compilation_parsing_cleanups.
493 * jit-playback.c
494 (gcc::jit::playback::context::write_global_decls_1): Rename to...
495 (gcc::jit::playback::context::finalize_global_decls): ...this.
496 (gcc::jit::playback::context::write_global_decls_1): Delete.
497 * jit-playback.h
498 (gcc::jit::playback::context::write_global_decls_1): Rename to...
499 (gcc::jit::playback::context::finalize_global_decls): ...this.
500 (gcc::jit::playback::context::write_global_decls_1): Delete.
501
ecb9f223
AM
5022015-06-04 Andrew MacLeod <amacleod@redhat.com>
503
504 * dummy-frontend.c: Adjust includes for restructured coretypes.h.
505 * jit-common.h: Likewise.
506 * jit-playback.c: Likewise.
507
2637afb7
DM
5082015-05-12 David Malcolm <dmalcolm@redhat.com>
509
510 * jit-builtins.c: Include vec.h before target.h.
511
46bf0b0a
JW
5122015-04-27 Jim Wilson <jim.wilson@linaro.org>
513
514 * Make-lang.in (jit.mostlyclean): Remove shared libraries and object
515 files.
516
51c5c6b5
DM
5172015-04-09 David Malcolm <dmalcolm@redhat.com>
518
519 PR jit/65691
520 * docs/cp/topics/expressions.rst (Simple expressions): Fix copy
521 and paste error in description of gccjit::context::one.
522 * docs/topics/expressions.rst (Simple expressions): Likewise in
523 description of gcc_jit_context_one.
524 * docs/_build/texinfo/libgccjit.texi: Regenerate.
525
f40fd895
UB
5262015-03-13 Uros Bizjak <ubizjak@gmail.com>
527
528 * jit-recording.c (dump::write): Also check vasprintf return value.
529 (recording::context::add_error_va): Ditto.
530 (recording::string::from_printf): Ditto.
531
18eb0d13
DM
5322015-03-13 David Malcolm <dmalcolm@redhat.com>
533
534 * docs/internals/index.rst (Packaging notes): New section.
535 * docs/_build/texinfo/libgccjit.texi: Regenerate.
536
7ef96183
DM
5372015-03-05 David Malcolm <dmalcolm@redhat.com>
538
539 * docs/cp/intro/tutorial03.rst: Add missing arguments to
540 gccjit::block::end_with_conditional call. Add on_true/on_false
541 comments. Tweak the wording.
542 * docs/intro/tutorial03.rst: Add missing arguments to
543 gcc_jit_block_end_with_conditional call. Add some clarifying
544 comments.
545 * docs/topics/compilation.rst: Tweak the wording to avoid an
546 ambiguous use of "this".
547 * docs/topics/contexts.rst: Fix a typo.
548 * docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
549 a stray backtick.
550 * docs/_build/texinfo/libgccjit.texi: Regenerate.
551
56a9f6bc
TS
5522015-02-24 Thomas Schwinge <thomas@codesourcery.com>
553
554 PR libgomp/64625
555 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8)
556 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
557 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
558 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8)
559 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
560 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
561
a4be4e91
DM
5622015-02-04 David Malcolm <dmalcolm@redhat.com>
563
564 PR jit/64257
565 * docs/conf.py (html_theme): Change from 'pyramid'
566 to 'sphinxdoc'.
567
f435bff3
DM
5682015-02-04 David Malcolm <dmalcolm@redhat.com>
569
570 * docs/topics/contexts.rst (gcc_jit_context_acquire): Fix
571 typo.
572 * docs/_build/texinfo/libgccjit.texi: Regenerate.
573
0ed4f017
DM
5742015-02-03 David Malcolm <dmalcolm@redhat.com>
575
576 * jit-logging.h (gcc::jit::log_user::log): Make const.
577 * jit-recording.c (gcc::jit::recording::context::set_str_option):
578 Log the new value of the option.
579 (gcc::jit::recording::context::set_int_option): Likewise.
580 (gcc::jit::recording::context::set_bool_option): Likewise.
581 (gcc::jit::recording::context::compile): Log the value of all
582 options.
583 (gcc::jit::recording::context::compile_to_file): Likewise.
584 (gcc::jit::recording::context::log_all_options): New function.
585 (gcc::jit::recording::context::log_str_option): New function.
586 (gcc::jit::recording::context::log_int_option): New function.
587 (gcc::jit::recording::context::log_bool_option): New function.
588 * jit-recording.h (gcc::jit::recording::context::log_all_options):
589 New function.
590 (gcc::jit::recording::context::log_str_option): New function.
591 (gcc::jit::recording::context::log_int_option): New function.
592 (gcc::jit::recording::context::log_bool_option): New function.
593 * docs/internals/test-hello-world.exe.log.txt: Update for above
594 changes.
595 * docs/_build/texinfo/libgccjit.texi: Regenerate.
596
2cb844ce
DM
5972015-02-03 David Malcolm <dmalcolm@redhat.com>
598
599 PR jit/64810
600 * Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o.
601 (LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS.
602 * jit-playback.c: Include gcc.h.
603 (gcc::jit::playback::context::compile): Move mutex acquisition
604 to before the call to make_fake_args.
605 (append_arg_from_driver): New function.
606 (gcc::jit::playback::context::make_fake_args): On the first call,
607 call into driver_get_configure_time_options to get configure-time
608 default options and cache them. Add them to the args for
609 toplev::main.
610 * jit-spec.c: New source file.
611 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
612 above changes.
613 * docs/_build/texinfo/libgccjit.texi: Regenerate.
614
16a71c50
DM
6152015-02-02 David Malcolm <dmalcolm@redhat.com>
616
617 PR jit/64810
618 * dummy-frontend.c (jit_langhook_type_for_mode): Support
619 TYPE_MODE (long_long_integer_type_node).
620
53c04ec9
DM
6212015-01-27 David Malcolm <dmalcolm@redhat.com>
622
623 * docs/internals/test-hello-world.exe.log.txt: Add example version
624 lines.
625 * docs/_build/texinfo/libgccjit.texi: Regenerate.
626 * jit-common.h (gcc::jit::dump::get_file): New accessor.
627 * jit-logging.c: Include toplev.h.
628 (gcc::jit::logger::logger): Log the GCC version.
629 * jit-recording.c: Include toplev.h.
630 (gcc:jit::recording::context::dump_reproducer_to_file): Log the
631 GCC version.
632
dc44ee3a
DM
6332015-01-26 David Malcolm <dmalcolm@redhat.com>
634
635 * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo.
636 * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The
637 error buffer is only valid until the next call to the context.
638 * docs/_build/texinfo/libgccjit.texi: Regenerate.
639 * libgccjit.h (gcc_jit_context_get_first_error): Reword the
640 comment to omit mention of compiling.
641 (gcc_jit_context_get_last_error): The error buffer is only valid
642 until the next call to the context.
643
3349605d
DM
6442015-01-26 David Malcolm <dmalcolm@redhat.com>
645
646 PR jit/64708
647 * config-lang.in (compilers): Drop "libgccjit.so".
648
6fc2d0f3
DM
6492015-01-23 David Malcolm <dmalcolm@redhat.com>
650
651 PR jit/64721
652 * jit-playback.c (gcc::jit::playback::context::compile): Construct
653 toplev instances with init_signals=false.
654
fdce7209
DM
6552015-01-19 David Malcolm <dmalcolm@redhat.com>
656
657 * docs/cp/topics/results.rst: Rename to...
658 * docs/cp/topics/compilation.rst: ...this, and add section on
659 ahead-of-time compilation.
660 * docs/cp/topics/index.rst: Update for renaming of results.rst
661 to compilation.rst.
662 * docs/examples/emit-alphabet.bf: New file, a sample "brainf"
663 script.
664 * docs/examples/tut05-bf.c: New file, implementing a compiler
665 for "brainf".
666 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
667 changes to logger output.
668 * docs/intro/index.rst: Add tutorial05.rst
669 * docs/intro/tutorial05.rst: New file.
670 * docs/topics/results.rst: Rename to...
671 * docs/topics/compilation.rst: ...this, and add section on
672 ahead-of-time compilation.
673 * docs/topics/index.rst: Update for renaming of results.rst to
674 compilation.rst.
675 * docs/_build/texinfo/libgccjit.texi: Regenerate.
676 * jit-playback.c (gcc::jit::playback::context::compile): Convert
677 return type from result * to void. Move the code to convert to
678 dso and dlopen the result to a new pure virtual "postprocess"
679 method.
680 (gcc::jit::playback::compile_to_memory::compile_to_memory): New
681 function.
682 (gcc::jit::playback::compile_to_memory::postprocess): New
683 function, based on playback::context::compile.
684 (gcc::jit::playback::compile_to_file::compile_to_file): New
685 function.
686 (gcc::jit::playback::compile_to_file::postprocess): New function.
687 (gcc::jit::playback::compile_to_file::copy_file): New function.
688 (gcc::jit::playback::context::convert_to_dso): Move internals
689 to...
690 (gcc::jit::playback::context::invoke_driver): New method. Add
691 "-shared" and "-c" options to driver's argv as needed.
692 * jit-playback.h: Include "timevar.h".
693 (gcc::jit::playback::context::compile): Convert return type from
694 result * to void.
695 (gcc::jit::playback::context::postprocess): New pure virtual
696 function, making this an abstract base class.
697 (gcc::jit::playback::context::get_tempdir): New accessor.
698 (gcc::jit::playback::context::invoke_driver): New function.
699 (class gcc::jit::playback::compile_to_memory): New subclass of
700 playback::context.
701 (class gcc::jit::playback::compile_to_file): Likewise.
702 * jit-recording.c (gcc::jit::recording::context::compile): Use a
703 playback::compile_to_memory, and extract its result.
704 (gcc::jit::recording::context::compile_to_file): New function.
705 * jit-recording.h (gcc::jit::recording::context::compile_to_file):
706 New function.
707 * libgccjit++.h (gccjit::context::compile_to_file): New method.
708 * libgccjit.c (gcc_jit_context_compile): Update log message to
709 clarify that this is an in-memory compile.
710 (gcc_jit_context_compile_to_file): New function.
711 * libgccjit.h (gcc_jit_context): Clarify that you can compile
712 a context more than once, and that you can compile to a file
713 as well as to memory.
714 (gcc_jit_result): Clarify that this is the result of an
715 in-memory compilation.
716 (gcc_jit_context_compile): Clarify that you can compile, and that
717 this is an in-memory compilation.
718 (enum gcc_jit_output_kind): New enum.
719 (gcc_jit_context_compile_to_file): New function.
720 (gcc_jit_context_enable_dump): Clarify comment to cover both forms
721 of compilation.
722 * libgccjit.map (gcc_jit_context_compile_to_file): New API
723 entrypoint.
724 * notes.txt: Update to show the playback::context::postprocess
725 virtual function.
726
450e225b
DM
7272015-01-19 David Malcolm <dmalcolm@redhat.com>
728
729 * jit-recording.c
730 (gcc::jit::recording::memento_of_new_string_literal::make_debug_string):
731 Add missing format string.
732
499de348
DM
7332015-01-16 David Malcolm <dmalcolm@redhat.com>
734
735 * Make-lang.in (lang_checks_parallelized): Add "check-jit".
736 (check_jit_parallelize): Set this to an arbitrary value (10).
737
e989e68d
JJ
7382015-01-16 Jakub Jelinek <jakub@redhat.com>
739
740 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of
741 last argument.
742 (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and
743 undef afterwards.
744 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
745 Likewise.
746
179ed8f5
RS
7472015-01-15 Richard Sandiford <richard.sandiford@arm.com>
748
749 Update copyright years in docs/.
750
96a87981
DM
7512015-01-15 David Malcolm <dmalcolm@redhat.com>
752
753 * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the
754 lvalue and the rvalue are of compatible type.
755
86d0ac88
DM
7562015-01-13 David Malcolm <dmalcolm@redhat.com>
757
758 * docs/cp/topics/contexts.rst (Debugging): Add
759 gccjit::context::dump_reproducer_to_file.
760 * docs/internals/index.rst (Design notes): New section,
761 discussing input validation and
762 gcc_jit_context_dump_reproducer_to_file.
763 * docs/topics/contexts.rst (Debugging): Add
764 gcc_jit_context_dump_reproducer_to_file.
765 * docs/_build/texinfo/libgccjit.texi: Regenerate.
766 * jit-common.h (gcc::jit::dump::get_context): New accessor.
767 * jit-recording.c: Include "hash-map.h".
768 Within namespace ::gcc::jit...
769 (dump::write): Flush each line.
770 (dump::make_location): Pass false for new param "created_by_user".
771 (class allocator): New class.
772 (allocator::~allocator): New function.
773 (allocator::xstrdup_printf): New function.
774 (allocator::xstrdup_printf_va): New function.
775 (class reproducer): New subclass of dump.
776 (reproducer::reproducer): New function.
777 (reproducer::write_params): New function.
778 (reproducer::write_args): New function.
779 (reproducer::make_identifier): New function.
780 (reproducer::make_tmp_identifier): New function.
781 (reproducer::get_identifier): New pair of functions.
782 (reproducer::get_identifier_as_rvalue): New function.
783 (reproducer::get_identifier_as_lvalue): New function.
784 (reproducer::get_identifier_as_type): New function.
785 (reproducer::xstrdup_printf): New function.
786 (recording::context::context): Initialize m_toplevel_ctxt.
787 (recording::context::new_location): Add param created_by_user.
788 (str_option_reproducer_strings): New table of strings.
789 (int_option_reproducer_strings): Likewise.
790 (bool_option_reproducer_strings): Likewise.
791 (get_type_enum_strings): Likewise.
792 (names_of_function_kinds): Likewise.
793 (global_kind_reproducer_strings): Likewise.
794 (unary_op_reproducer_strings): Likewise.
795 (binary_op_reproducer_strings): Likewise.
796 (comparison_reproducer_strings): Likewise.
797 Within namespace ::gcc::jit::recording::...
798 (context::dump_reproducer_to_file): New function.
799 (string::write_reproducer): Likewise.
800 (location::write_reproducer): Likewise.
801 (type::access_as_type): Likewise.
802 (memento_of_get_type::write_reproducer): Likewise.
803 (memento_of_get_pointer::write_reproducer): Likewise.
804 (memento_of_get_const::write_reproducer): Likewise.
805 (memento_of_get_volatile::write_reproducer): Likewise.
806 (array_type::write_reproducer): Likewise.
807 (function_type::write_reproducer): Likewise.
808 (function_type::write_deferred_reproducer): Likewise.
809 (field::write_reproducer): Likewise.
810 (struct_::access_as_type): Likewise.
811 (struct_::write_reproducer): Likewise.
812 (union_::write_reproducer): Likewise.
813 (fields::write_reproducer): Likewise.
814 (rvalue::access_as_rvalue): Likewise.
815 (lvalue::access_as_rvalue): Likewise.
816 (lvalue::access_as_lvalue): Likewise.
817 (param::access_as_rvalue): Likewise.
818 (param::access_as_lvalue): Likewise.
819 (param::write_reproducer): Likewise.
820 (function::write_reproducer): Likewise.
821 (block::write_reproducer): Likewise.
822 (global::write_reproducer): Likewise.
823 (memento_of_new_rvalue_from_const <int>::write_reproducer):
824 Likewise.
825 (memento_of_new_rvalue_from_const <long>::write_reproducer):
826 Likewise.
827 (memento_of_new_rvalue_from_const <double>::write_reproducer):
828 Likewise.
829 (memento_of_new_rvalue_from_const <void *>::write_reproducer):
830 Likewise.
831 (memento_of_new_string_literal::write_reproducer): Likewise.
832 (unary_op::write_reproducer): Likewise.
833 (binary_op::write_reproducer): Likewise.
834 (comparison::write_reproducer): Likewise.
835 (cast::write_reproducer): Likewise.
836 (call::write_reproducer): Likewise.
837 (call_through_ptr::write_reproducer): Likewise.
838 (array_access::write_reproducer): Likewise.
839 (access_field_of_lvalue::write_reproducer): Likewise.
840 (access_field_rvalue::write_reproducer): Likewise.
841 (dereference_field_rvalue::write_reproducer): Likewise.
842 (dereference_rvalue::write_reproducer): Likewise.
843 (get_address_of_lvalue::write_reproducer): Likewise.
844 (local::write_reproducer): Likewise.
845 (eval::write_reproducer): Likewise.
846 (assignment::write_reproducer): Likewise.
847 (assignment_op::write_reproducer): Likewise.
848 (comment::write_reproducer): Likewise.
849 (conditional::write_reproducer): Likewise.
850 (jump::write_reproducer): Likewise.
851 (return_::write_reproducer): Likewise.
852 * jit-recording.h (gcc::jit::reproducer): New forward declararion.
853 Within namespace ::gcc::jit::recording::...
854 (context::new_location): Add "created_by_user" param.
855 (context::dump_reproducer_to_file): New method.
856 (context::m_toplevel_ctxt): New field.
857 (memento::write_reproducer): New pure virtual function.
858 (memento::dyn_cast_location): New virtual function.
859 (string::write_reproducer):
860 (location::location): Add "created_by_user" param.
861 (location::dyn_cast_location): New function.
862 (location::created_by_user): New accessor.
863 (location::write_reproducer): New function.
864 (location::m_created_by_user): New field.
865 (type::access_as_type): New virtual function.
866 (location::write_reproducer): Likewise.
867 (type::access_as_type): Likewise.
868 (memento_of_get_type::write_reproducer): Likewise.
869 (memento_of_get_pointer::write_reproducer): Likewise.
870 (memento_of_get_const::write_reproducer): Likewise.
871 (memento_of_get_volatile::write_reproducer): Likewise.
872 (array_type::write_reproducer): Likewise.
873 (function_type::write_reproducer): Likewise.
874 (function_type::write_deferred_reproducer): Likewise.
875 (field::write_reproducer): Likewise.
876 (struct_::access_as_type): Likewise.
877 (struct_::write_reproducer): Likewise.
878 (union_::write_reproducer): Likewise.
879 (union_::m_fields): Remove stray unused field.
880 (fields::length): New accessor.
881 (fields::get_field): New accessor.
882 (fields::write_reproducer): New function.
883 (rvalue::access_as_rvalue): Likewise.
884 (lvalue::access_as_rvalue): Likewise.
885 (lvalue::access_as_lvalue): Likewise.
886 (param::access_as_rvalue): Likewise.
887 (param::access_as_lvalue): Likewise.
888 (param::write_reproducer): Likewise.
889 (function::write_reproducer): Likewise.
890 (block::write_reproducer): Likewise.
891 (global::write_reproducer): Likewise.
892 (memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer):
893 Likewise.
894 (memento_of_new_string_literal::write_reproducer): Likewise.
895 (unary_op::write_reproducer): Likewise.
896 (binary_op::write_reproducer): Likewise.
897 (comparison::write_reproducer): Likewise.
898 (cast::write_reproducer): Likewise.
899 (call::write_reproducer): Likewise.
900 (call_through_ptr::write_reproducer): Likewise.
901 (array_access::write_reproducer): Likewise.
902 (access_field_of_lvalue::write_reproducer): Likewise.
903 (access_field_rvalue::write_reproducer): Likewise.
904 (dereference_field_rvalue::write_reproducer): Likewise.
905 (dereference_rvalue::write_reproducer): Likewise.
906 (get_address_of_lvalue::write_reproducer): Likewise.
907 (local::write_reproducer): Likewise.
908 (eval::write_reproducer): Likewise.
909 (assignment::write_reproducer): Likewise.
910 (assignment_op::write_reproducer): Likewise.
911 (comment::write_reproducer): Likewise.
912 (conditional::write_reproducer): Likewise.
913 (jump::write_reproducer): Likewise.
914 (return_::write_reproducer): Likewise.
915 * libgccjit++.h (gccjit::context::dump_reproducer_to_file): New.
916 * libgccjit.c (gcc_jit_context_new_location): Pass "true" as
917 param "created_by_user".
918 (gcc_jit_context_dump_reproducer_to_file): New API entrypoint.
919 * libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API
920 entrypoint.
921 * libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API
922 entrypoint.
923
f6f2b019
DM
9242015-01-12 David Malcolm <dmalcolm@redhat.com>
925
926 * jit-recording.c (class gcc::jit::rvalue_usage_validator): New.
927 (gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New
928 ctor.
929 (gcc::jit::rvalue_usage_validator::visit): New function.
930 (gcc::jit::recording::rvalue::verify_valid_within_stmt): New
931 function.
932 (gcc::jit::recording::rvalue::set_scope): New function.
933 (gcc::jit::recording::function::function): Call set_scope on each
934 param, issuing errors for any params that already have a function.
935 (gcc::jit::recording::block::add_eval): Return the new statement;
936 update the comment given that some error-checking now happens after
937 this returns.
938 (gcc::jit::recording::block::add_assignment): Likewise.
939 (gcc::jit::recording::block::add_assignment_op): Likewise.
940 (gcc::jit::recording::block::add_comment): Likewise.
941 (gcc::jit::recording::block::end_with_conditional): Likewise.
942 (gcc::jit::recording::block::end_with_jump): Likewise.
943 (gcc::jit::recording::block::end_with_return): Likewise.
944 (gcc::jit::recording::block::validate): Add a comment.
945 (gcc::jit::recording::unary_op::visit_children): New function.
946 (gcc::jit::recording::binary_op::visit_children): New function.
947 (gcc::jit::recording::comparison::visit_children): New function.
948 (gcc::jit::recording::cast::visit_children): New function.
949 (gcc::jit::recording::call::visit_children): New function.
950 (gcc::jit::recording::call_through_ptr::visit_children): New function.
951 (gcc::jit::recording::array_access::visit_children): New function.
952 (gcc::jit::recording::access_field_of_lvalue::visit_children): New
953 function.
954 (gcc::jit::recording::access_field_rvalue::visit_children): New
955 function.
956 (gcc::jit::recording::dereference_field_rvalue::visit_children):
957 New function.
958 (gcc::jit::recording::dereference_rvalue::visit_children): New
959 function.
960 (gcc::jit::recording::get_address_of_lvalue::visit_children): New
961 function.
962 * jit-recording.h: Within namespace gcc::jit::recording...
963 (class rvalue_visitor): New.
964 (rvalue::rvalue): Initialize m_scope.
965 (rvalue::get_loc): New accessor.
966 (rvalue::verify_valid_within_stmt): New function.
967 (rvalue::visit_children): New pure virtual function.
968 (rvalue::set_scope): New function.
969 (rvalue::get_scope): New function.
970 (rvalue::dyn_cast_param): New function.
971 (rvalue::m_scope): New field.
972 (param::visit_children): New empty function.
973 (param::dyn_cast_param): New function.
974 (function::get_loc): New function.
975 (block::add_eval): Return the new statement.
976 (block::add_assignment): Likewise.
977 (block::add_assignment_op): Likewise.
978 (block::add_comment): Likewise.
979 (block::end_with_conditional): Likewise.
980 (block::end_with_jump): Likewise.
981 (block::end_with_return): Likewise.
982 (global::visit_children): New function.
983 (memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children):
984 New function.
985 (memento_of_new_string_literal::visit_children): New function.
986 (unary_op::visit_children): New function.
987 (binary_op::visit_children): New function.
988 (comparison::visit_children): New function.
989 (cast::visit_children): New function.
990 (call::visit_children): New function.
991 (call_through_ptr::visit_children): New function.
992 (array_access::visit_children): New function.
993 (access_field_of_lvalue::visit_children): New function.
994 (access_field_rvalue::visit_children): New function.
995 (dereference_field_rvalue::visit_children): New function.
996 (dereference_rvalue::visit_children): New function.
997 (get_address_of_lvalue::visit_children): New function.
998 (local::local): Call set_scope.
999 (local::visit_children): New function.
1000 (statement::get_block): Make public.
1001 * libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro.
1002 (RETURN_NULL_IF_FAIL_PRINTF5): New macro.
1003 (gcc_jit_context_new_function): Verify that each param has
1004 not yet been used for creating another function.
1005 (gcc_jit_block_add_eval): After creating the stmt, verify
1006 that the rvalue expression tree is valid to use within it.
1007 (gcc_jit_block_add_assignment): Likewise for the lvalue and
1008 rvalue expression trees.
1009 (gcc_jit_block_add_assignment_op): Likewise.
1010 (gcc_jit_block_end_with_conditional): Likewise for the boolval
1011 expression tree.
1012 (gcc_jit_block_end_with_return): Likewise for the rvalue
1013 expression tree.
1014 (gcc_jit_block_end_with_void_return): Remove return of "void",
1015 now that block::end_with_return is now non-void.
1016
1c35cc2c
DM
10172015-01-12 David Malcolm <dmalcolm@redhat.com>
1018
1019 * jit-playback.c (gcc::jit::playback::context::read_dump_file):
1020 Add missing fclose on error-handling path.
1021
791cfef8
DM
10222015-01-12 David Malcolm <dmalcolm@redhat.com>
1023
1024 * docs/cp/topics/expressions.rst (Global variables): Add
1025 enum gcc_jit_global_kind param to gccjit::context::new_global.
1026 * docs/topics/expressions.rst (Global variables): Likewise.
1027 Document the new enum.
1028 * docs/topics/results.rst (Compilation results): Document
1029 globals-handling.
1030 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1031 * dummy-frontend.c (jit_langhook_write_globals): Call into the
1032 playback context's write_global_decls_1 and write_global_decls_2
1033 before and after calling symtab->finalize_compilation_unit ().
1034 * jit-playback.c: Include "debug.h".
1035 (gcc::jit::playback::context::new_global): Add "kind" param and
1036 use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the
1037 underlying VAR_DECL. Call varpool_node::get_create on the
1038 VAR_DECL, and add it to m_globals.
1039 (gcc::jit::playback::context::write_global_decls_1): New function.
1040 (gcc::jit::playback::context::write_global_decls_2): New function.
1041 * jit-playback.h (gcc::jit::playback::context::context): Call
1042 create on m_globals.
1043 (gcc::jit::playback::context::new_global): Add "kind" param.
1044 (gcc::jit::playback::context::write_global_decls_1): New function.
1045 (gcc::jit::playback::context::write_global_decls_2): New function.
1046 (gcc::jit::playback::context::m_globals): New field.
1047 * jit-recording.c (gcc::jit::recording::context::context):
1048 Initialize m_globals.
1049 (gcc::jit::recording::context::new_global): Add param "kind".
1050 Add the new global to m_globals.
1051 (gcc::jit::recording::context::dump_to_file): Dump the globals.
1052 (gcc::jit::recording::global::replay_into): Add field m_kind.
1053 (gcc::jit::recording::global::write_to_dump): New override.
1054 * jit-recording.h (gcc::jit::recording::context::new_global): Add
1055 param "kind".
1056 (gcc::jit::recording::context::m_globals): New field.
1057 (gcc::jit::recording::global::global): Add param kind.
1058 (gcc::jit::recording::global::write_to_dump): New override.
1059 (gcc::jit::recording::global::m_kind): New field.
1060 * jit-result.c (gcc::jit::result::get_global): New function.
1061 * jit-result.h (gcc::jit::result::get_global): New function.
1062 * libgccjit++.h (gccjit::context::new_global): Add "kind" param.
1063 * libgccjit.c (gcc_jit_context_new_global): Likewise.
1064 (gcc_jit_result_get_global): New API entrypoint.
1065 * libgccjit.h (gcc_jit_result_get_global): New API entrypoint.
1066 (enum gcc_jit_global_kind): New enum.
1067 (gcc_jit_context_new_global): API change: add "kind" param.
1068 * libgccjit.map (gcc_jit_result_get_global): New symbol.
1069
860e981c
DM
10702015-01-09 David Malcolm <dmalcolm@redhat.com>
1071
1072 * dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h",
1073 "symtab.h", "inchash.h". Move include of "hash-set.h" much
1074 earlier.
1075 * jit-builtins.c: Remove redundant includes of "opts.h" and
1076 "tree.h".
1077 * jit-common.h: Include "hash-set.h", "input.h", "vec.h",
1078 "double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h".
1079 * jit-playback.c: Include "hashtab.h", "machmode.h", "input.h",
1080 "statistics.h", "vec.h", "double-int.h", "real.h",
1081 "fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h",
1082 "inchash.h", "fold-const.h". Move include of "hash-set.h" to
1083 earlier.
1084 * jit-recording.c: Remove redundant includes of "opts.h" and
1085 "tree.h".
1086
ccce3b2a
DM
10872015-01-09 David Malcolm <dmalcolm@redhat.com>
1088
1089 * docs/cp/topics/expressions.rst (Simple expressions): Use
1090 ":c:type:" for C types. Document new overload of
1091 gcc::jit::context::new_rvalue.
1092 * docs/topics/expressions.rst (Simple expressions): Use
1093 ":c:type:" for C types. Document new entrypoint
1094 gcc_jit_context_new_rvalue_from_long.
1095 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1096 * jit-playback.c: Within namespace gcc::jit::playback...
1097 (context::new_rvalue_from_int): Eliminate in favor of...
1098 (context::new_rvalue_from_const <int>): ...this.
1099 (context::new_rvalue_from_double): Eliminate in favor of...
1100 (context::new_rvalue_from_const <double>): ...this.
1101 (context::new_rvalue_from_const <long>): New.
1102 (context::new_rvalue_from_ptr): Eliminate in favor of...
1103 (context::new_rvalue_from_const <void *>): ...this.
1104 * jit-playback.h: Within namespace gcc::jit::playback...
1105 (context::new_rvalue_from_int): Eliminate in favor of...
1106 (context::new_rvalue_from_const <HOST_TYPE>): ...this.
1107 (context::new_rvalue_from_double): Likewise.
1108 (context::new_rvalue_from_ptr): Likewise.
1109 * jit-recording.c: Within namespace gcc::jit::recording...
1110 (context::new_rvalue_from_int): Eliminate.
1111 (context::new_rvalue_from_double): Likewise.
1112 (context::new_rvalue_from_ptr): Likewise.
1113 (class memento_of_new_rvalue_from_const <int>):
1114 Add explicit specialization.
1115 (class memento_of_new_rvalue_from_const <long>):
1116 Likewise.
1117 (class memento_of_new_rvalue_from_const <double>):
1118 Likewise.
1119 (class memento_of_new_rvalue_from_const <void *>):
1120 Likewise.
1121 (memento_of_new_rvalue_from_int::replay_into):
1122 Generalize into...
1123 (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into):
1124 ...this...
1125 (memento_of_new_rvalue_from_double::replay_into):
1126 ...allowing this...
1127 (memento_of_new_rvalue_from_ptr::replay_into):
1128 ...and this to be deleted.
1129 (memento_of_new_rvalue_from_int::make_debug_string):
1130 Convert to...
1131 (memento_of_new_rvalue_from_const <int>::make_debug_string):
1132 ...this.
1133 (memento_of_new_rvalue_from_double::make_debug_string):
1134 Convert to...
1135 (memento_of_new_rvalue_from_const <double>::make_debug_string):
1136 ...this.
1137 (memento_of_new_rvalue_from_ptr::make_debug_string)
1138 Convert to...
1139 (memento_of_new_rvalue_from_const <void *>::make_debug_string):
1140 ...this.
1141 (memento_of_new_rvalue_from_const <long>::make_debug_string):
1142 New function.
1143 * jit-recording.h: Within namespace gcc::jit::recording...
1144 (context::new_rvalue_from_int): Eliminate.
1145 (context::new_rvalue_from_double): Likewise.
1146 (context::new_rvalue_from_ptr): Likewise, all in favor of...
1147 (context::new_rvalue_from_const <HOST_TYPE>): New family of
1148 methods.
1149 (class memento_of_new_rvalue_from_int): Eliminate.
1150 (class memento_of_new_rvalue_from_double): Likewise.
1151 (class memento_of_new_rvalue_from_ptr): Likewise.
1152 (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family
1153 of rvalue subclasses.
1154 * libgccjit++.h (gccjit::context::new_rvalue): New overload, for
1155 "long".
1156 * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for
1157 rewriting of recording::context::new_rvalue_from_int to
1158 recording::context::new_rvalue_from_const <int>.
1159 (gcc_jit_context_new_rvalue_from_long): New API entrypoint.
1160 (gcc_jit_context_new_rvalue_from_double): Update for
1161 rewriting of recording::context::new_rvalue_from_double to
1162 recording::context::new_rvalue_from_const <double>.
1163 (gcc_jit_context_new_rvalue_from_ptr): Update for
1164 rewriting of recording::context::new_rvalue_from_ptr to
1165 recording::context::new_rvalue_from_const <void *>.
1166 * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API
1167 entrypoint.
1168 * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise.
1169
d2286af3
DM
11702015-01-09 David Malcolm <dmalcolm@redhat.com>
1171
1172 PR jit/64206
1173 * docs/internals/test-hello-world.exe.log.txt: Update, the log now
1174 shows tempdir creation/cleanup.
1175 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1176 * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir
1177 to the list of subclasses in the comment.
1178 * jit-playback.c (gcc::jit::playback::context::context): Add a
1179 comment clarifying when the tempdir gets cleaned up.
1180 (gcc::jit::playback::context::compile): Pass the context's logger,
1181 if any, to the tempdir.
1182 (gcc::jit::playback::context::dlopen_built_dso): When creating the
1183 gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand
1184 over ownership of the tempdir to it.
1185 * jit-result.c: Include "jit-tempdir.h".
1186 (gcc::jit::result::result): Add tempdir param, saving it as
1187 m_tempdir.
1188 (gcc::jit::result::~result): Delete m_tempdir.
1189 * jit-result.h (gcc::jit::result::result): Add tempdir param.
1190 (gcc::jit::result::m_tempdir): New field.
1191 * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param;
1192 add JIT_LOG_SCOPE.
1193 (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit,
1194 and log m_path_template and m_path_tempdir.
1195 (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log
1196 entry/exit, and log the unlink and rmdir calls.
1197 * jit-tempdir.h: Include "jit-logging.h".
1198 (class gcc::jit::tempdir): Make this be a subclass of log_user.
1199 (gcc::jit::tempdir::tempdir): Add logger param.
1200 * notes.txt: Update to show the two possible places where the
1201 tempdir can be cleaned up.
1202
7c8db13e
DM
12032015-01-08 David Malcolm <dmalcolm@redhat.com>
1204
1205 * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive
1206 comment.
1207
303e1d56
DM
12082015-01-08 David Malcolm <dmalcolm@redhat.com>
1209
1210 * docs/topics/contexts.rst (Error-handling): Document new
1211 entrypoint gcc_jit_context_get_last_error.
1212 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1213 * jit-recording.c (gcc::jit::recording::context::context):
1214 Initialize new fields "m_last_error_str" and
1215 "m_owns_last_error_str".
1216 (gcc::jit::recording::context::~context): Clean up
1217 m_last_error_str, if needed.
1218 (gcc::jit::recording::context::add_error_va): Update
1219 m_last_error_str and m_owns_last_error_str, freeing the old
1220 value if appropriate.
1221 (gcc::jit::recording::context::get_last_error): New function.
1222 * jit-recording.h (gcc::jit::recording::context::get_last_error):
1223 New function.
1224 (gcc::jit::recording::context): New fields m_last_error_str and
1225 m_owns_last_error_str.
1226 * libgccjit.c (gcc_jit_context_get_last_error): New function.
1227 * libgccjit.h (gcc_jit_context_get_last_error): New declaration.
1228 * libgccjit.map (gcc_jit_context_get_last_error): New function.
1229
eb4c16eb
DM
12302015-01-08 David Malcolm <dmalcolm@redhat.com>
1231
1232 * Make-lang.in (jit_OBJS): Add jit/jit-logging.o.
1233 * docs/internals/index.rst (Overview of code structure): Mention
1234 gcc_jit_context_set_logfile, and embed the example logfile.
1235 * docs/internals/test-hello-world.exe.log.txt: New file: example
1236 of a logfile.
1237 * docs/topics/contexts.rst (Debugging): Add documentation
1238 for gcc_jit_context_set_logfile.
1239 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1240 * dummy-frontend.c: Include "jit-logging.h".
1241 (jit_langhook_init): Assert that there is an active playback
1242 context. If it has a logger, log entry/exit to this function.
1243 (jit_langhook_write_globals): Likewise.
1244 * jit-common.h (gcc::jit::logger): New forward declaration.
1245 * jit-logging.c: New file.
1246 * jit-logging.h: New file.
1247 * jit-playback.c: Include "jit-logging.h".
1248 (gcc::jit::playback::context::context): Initialize the log_user
1249 base class from the recording context's logger (if any). Use
1250 JIT_LOG_SCOPE to log entry/exit from the function body.
1251 (gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to
1252 log entry/exit from the function body.
1253 (gcc::jit::playback::build_stmt_list): Likewise.
1254 (gcc::jit::playback::function::postprocess): Likewise.
1255 (gcc::jit::playback::context::compile): Likewise. Log the
1256 entry/exit to toplev::main and toplev::finalize. Log the
1257 fake argv passed to toplev::main.
1258 (gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to
1259 log entry/exit from the function body.
1260 (gcc::jit::playback::context::release_mutex): Likewise.
1261 (gcc::jit::playback::context::make_fake_args): Likewise.
1262 (gcc::jit::playback::context::extract_any_requested_dumps):
1263 Likewise.
1264 (gcc::jit::playback::context::convert_to_dso): Likewise. Also,
1265 log the arguments that the driver is invoked with.
1266 (gcc::jit::playback::context::dlopen_built_dso): Likewise. Pass
1267 the logger to the result object.
1268 (gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to
1269 log entry/exit from the function body.
1270 (gcc::jit::playback::context::dump_generated_code): Likewise.
1271 (gcc::jit::playback::context::handle_locations): Likewise.
1272 * jit-playback.h (gcc::jit::playback::context): Make this be
1273 a subclass of gcc::jit::log_user.
1274 * jit-recording.c: Include "jit-logging.h".
1275 (gcc::jit::recording::context::context: Initialize the logger to
1276 NULL for root contexts, or to the parent's logger for child
1277 contexts.
1278 (gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to
1279 log entry/exit from the function body.
1280 (gcc::jit::recording::context::replay_into): Likewise.
1281 (gcc::jit::recording::context::disassociate_from_playback):
1282 Likewise.
1283 (gcc::jit::recording::context::compile): Likewise.
1284 (recording::context::add_error_va): Likewise. Also, log the
1285 error.
1286 (gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to
1287 log entry/exit from the function body.
1288 * jit-recording.h: Include "jit-logging.h".
1289 (gcc::jit::recording::context): Make this be a subclass of
1290 gcc::jit::log_user.
1291 * jit-result.c: Include "jit-common.h" and "jit-logging.h".
1292 (gcc::jit::result::result): Add logger param, recording it.
1293 Use JIT_LOG_SCOPE to log entry/exit from the function body.
1294 (gcc::jit::result::~result(): Use JIT_LOG_SCOPE to
1295 log entry/exit from the function body.
1296 (gcc::jit::result::get_code): Likewise.
1297 * jit-result.h (gcc::jit::result): Make this be a subclass of
1298 gcc::jit::log_user.
1299 (gcc::jit::result::result): Add logger parameter.
1300 * libgccjit++.h (gccjit::context::set_logfile): New function.
1301 * libgccjit.c: Include "jit-logging.h".
1302 (gcc_jit_context_acquire): Log the context.
1303 (gcc_jit_context_release): Use JIT_LOG_FUNC to
1304 log entry/exit from the function body, and log the context.
1305 (gcc_jit_context_new_child_context): Likewise, logging both
1306 contexts.
1307 (gcc_jit_context_new_location): Use JIT_LOG_FUNC to
1308 log entry/exit from the function body.
1309 (gcc_jit_context_get_type): Likewise.
1310 (gcc_jit_context_get_int_type): Likewise.
1311 (gcc_jit_context_new_array_type): Likewise.
1312 (gcc_jit_context_new_field): Likewise.
1313 (gcc_jit_context_new_struct_type): Likewise.
1314 (gcc_jit_context_new_opaque_struct): Likewise.
1315 (gcc_jit_struct_set_fields): Likewise.
1316 (gcc_jit_context_new_union_type): Likewise.
1317 (gcc_jit_context_new_function_ptr_type): Likewise.
1318 (gcc_jit_context_new_param): Likewise.
1319 (gcc_jit_context_new_function): Likewise.
1320 (gcc_jit_context_get_builtin_function): Likewise.
1321 (gcc_jit_function_get_param): Likewise.
1322 (gcc_jit_function_dump_to_dot): Likewise.
1323 (gcc_jit_function_new_block): Likewise.
1324 (gcc_jit_context_new_global): Likewise.
1325 (gcc_jit_context_new_rvalue_from_int): Likewise.
1326 (gcc_jit_context_zero): Likewise.
1327 (gcc_jit_context_one): Likewise.
1328 (gcc_jit_context_new_rvalue_from_double): Likewise.
1329 (gcc_jit_context_new_rvalue_from_ptr): Likewise.
1330 (gcc_jit_context_null): Likewise.
1331 (gcc_jit_context_new_string_literal): Likewise.
1332 (gcc_jit_context_new_unary_op): Likewise.
1333 (gcc_jit_context_new_binary_op): Likewise.
1334 (gcc_jit_context_new_comparison): Likewise.
1335 (gcc_jit_context_new_call): Likewise.
1336 (gcc_jit_context_new_call_through_ptr): Likewise.
1337 (gcc_jit_context_new_cast): Likewise.
1338 (gcc_jit_context_new_array_access): Likewise.
1339 (gcc_jit_lvalue_access_field): Likewise.
1340 (gcc_jit_rvalue_access_field): Likewise.
1341 (gcc_jit_rvalue_dereference_field): Likewise.
1342 (gcc_jit_rvalue_dereference): Likewise.
1343 (gcc_jit_lvalue_get_address): Likewise.
1344 (gcc_jit_function_new_local): Likewise.
1345 (gcc_jit_block_add_eval): Likewise.
1346 (gcc_jit_block_add_assignment): Likewise.
1347 (gcc_jit_block_add_assignment_op): Likewise.
1348 (gcc_jit_block_end_with_conditional): Likewise.
1349 (gcc_jit_block_add_comment): Likewise.
1350 (gcc_jit_block_end_with_jump): Likewise.
1351 (gcc_jit_block_end_with_return): Likewise.
1352 (gcc_jit_block_end_with_void_return): Likewise.
1353 (gcc_jit_context_set_str_option): Likewise.
1354 (gcc_jit_context_set_int_option): Likewise.
1355 (gcc_jit_context_set_bool_option): Likewise.
1356 (gcc_jit_context_enable_dump): Likewise.
1357 (gcc_jit_context_compile): Likewise. Also log the context,
1358 and the result.
1359 (gcc_jit_context_dump_to_file): Likewise.
1360 (gcc_jit_context_set_logfile): New function.
1361 (gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to
1362 log entry/exit from the function body.
1363 (gcc_jit_result_get_code): Likewise. Also log the fnname)
1364 and the ptr to be returned.
1365 (gcc_jit_result_release): Likewise. Also log the result.
1366 * libgccjit.h: Include <stdio.h>, since we need FILE *.
1367 (gcc_jit_context_set_logfile): New declaration.
1368 * libgccjit.map (gcc_jit_context_set_logfile): New.
1369
c211cd23
DM
13702015-01-07 David Malcolm <dmalcolm@redhat.com>
1371
1372 * jit-recording.h (gcc::jit::recording::type::is_void): New
1373 virtual function.
1374 (gcc::jit::recording::memento_of_get_type::is_void): New
1375 function, overriding default implementation.
1376 * libgccjit.c (gcc_jit_rvalue_dereference): Verify that
1377 the underlying type is not "void".
1378
18146f45
DM
13792015-01-07 David Malcolm <dmalcolm@redhat.com>
1380
1381 * docs/topics/expressions.rst (Unary Operations): Add
1382 GCC_JIT_UNARY_OP_ABS.
1383 * jit-playback.c (gcc::jit::playback::context::new_unary_op):
1384 Likewise.
1385 * jit-recording.c (unary_op_strings): Likewise.
1386 * libgccjit.c (gcc_jit_context_new_unary_op): Update checking
1387 of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS.
1388 * libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS.
1389 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1390
11af98ff
DM
13912015-01-07 David Malcolm <dmalcolm@redhat.com>
1392
1393 * jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix
1394 typo in comment.
1395
433d16df
DM
13962015-01-07 David Malcolm <dmalcolm@redhat.com>
1397
1398 * TODO.rst (Test suite): Remove item about running C++ testcases.
1399 * docs/internals/index.rst (Working on the JIT library): Add
1400 "c++" to the enabled languages in the suggested "configure"
1401 invocation, and add a description of why this is necessary.
1402 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1403
50bb6c8e
DM
14042015-01-07 David Malcolm <dmalcolm@redhat.com>
1405
1406 * docs/internals/index.rst: Update to reflect that built
1407 testcases are now test-foo.c.exe, rather than test-foo.exe.
1408 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1409
1e3b6a3d
JJ
14102015-01-05 Jakub Jelinek <jakub@redhat.com>
1411
1412 Update copyright years.
1413
e8af59bc
DM
14142014-12-19 David Malcolm <dmalcolm@redhat.com>
1415
1416 * jit-playback.c (gcc::jit::playback::context::build_cast): In
1417 case BOOLEAN_TYPE, don't assume that the source expression is
1418 of type "int".
1419
5afd44e3
DM
14202014-12-19 David Malcolm <dmalcolm@redhat.com>
1421
1422 * jit-recording.c (gcc::jit::recording::context::context): When
1423 copying string options from a parent context, take a copy of the
1424 underlying buffers, rather than simply copying the pointer.
1425
1f0858d7
DM
14262014-12-19 David Malcolm <dmalcolm@redhat.com>
1427
1428 * jit-recording.c (gcc::jit::recording::context::set_str_option):
1429 Handle NULL.
1430
35291c7d
DM
14312014-12-11 David Malcolm <dmalcolm@redhat.com>
1432
1433 * docs/cp/topics/contexts.rst (gccjit::context::set_str_option):
1434 Document new function.
1435 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1436
7b31ff5e
DM
14372014-12-10 Ulrich Drepper <drepper@gmail.com>
1438
1439 Minor interface cleanups of libgccjit
1440 * jit-playback.c (convert_to_dso): Use auto_vec instead
1441 of automatic array to build up command line.
1442 * jit-recording.c (recording::context::set_str_option):
1443 Make copy of the string.
1444 (recording::context::~context): Free string options.
1445 * jit-recording.h (recording::context): Adjust type
1446 of m_str_options member.
1447 * libgccjit.h: Adjust comment about
1448 gcc_jit_context_set_str_option parameter being used after
1449 the call.
1450 Update comment now that all interfaces are copy strings
1451 if necessary.
1452 * libgccjit++.h (gccjit::context): Add set_str_option
1453 member function.
1454
29df5715
DM
14552014-12-10 David Malcolm <dmalcolm@redhat.com>
1456
1457 * docs/cp/index.rst: New file.
1458 * docs/cp/intro/index.rst: New file.
1459 * docs/cp/intro/tutorial01.rst: New file.
1460 * docs/cp/intro/tutorial02.rst: New file.
1461 * docs/cp/intro/tutorial03.rst: New file.
1462 * docs/cp/intro/tutorial04.rst: New file.
1463 * docs/cp/topics/contexts.rst: New file.
1464 * docs/cp/topics/expressions.rst: New file.
1465 * docs/cp/topics/functions.rst: New file.
1466 * docs/cp/topics/index.rst: New file.
1467 * docs/cp/topics/locations.rst: New file.
1468 * docs/cp/topics/objects.rst: New file.
1469 * docs/cp/topics/results.rst: New file.
1470 * docs/cp/topics/types.rst: New file.
1471 * docs/examples/tut01-hello-world.cc: New file.
1472 * docs/examples/tut02-square.c: Fix missing newline in output.
1473 * docs/examples/tut02-square.cc: New file.
1474 * docs/examples/tut03-sum-of-squares.cc: New file.
1475 * docs/examples/tut04-toyvm/toyvm.cc: New file.
1476 * docs/index.rst: Move summary to above the table of contents.
1477 Add text about the C vs C++ APIs.
1478 * docs/topics/contexts.rst: Fix a typo.
1479
1480 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1481 * docs/_build/texinfo/factorial1.png: New file.
1482 * docs/_build/texinfo/sum-of-squares1.png: New file.
1483
5cd614ce
DM
14842014-12-09 David Malcolm <dmalcolm@redhat.com>
1485
1486 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move
1487 logic for determine "funcname" to new function...
1488 (get_function_name): ...here, adding logic to skip any leading
1489 path from the filename.
1490 (toyvm_function_parse): Use the filename for fn_filename, rather
1491 than "name", so that the debugger can locate the source .toy
1492 file.
1493 (toyvm_function_parse): Don't fclose a NULL FILE *.
1494
2712de78
DM
14952014-12-09 David Malcolm <dmalcolm@redhat.com>
1496
1497 PR jit/63854
1498 * docs/internals/index.rst (Running under valgrind): New
1499 subsection.
1500 (docs/_build/texinfo/libgccjit.texi): Regenerate.
1501
d1e5f2c7
DM
15022014-12-09 David Malcolm <dmalcolm@redhat.com>
1503
1504 PR jit/64206
1505 * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o.
1506 * jit-common.h (gcc::jit::tempdir): New forward decl.
1507 * jit-playback.c: Include jit-tempdir.h.
1508 (gcc::jit::playback::context::context): Initialize m_tempdir.
1509 (gcc::jit::playback::context::~context): Move tempdir
1510 cleanup to new file jit-tempdir.c
1511 (make_tempdir_path_template): Move to new file jit-tempdir.c.
1512 (gcc::jit::playback::context::compile): Move tempdir creation
1513 to new tempdir object in new file jit-tempdir.c.
1514 (gcc::jit::playback::context::make_fake_args): Get path from
1515 tempdir object rather than from member data.
1516 (gcc::jit::playback::context::convert_to_dso): Likewise.
1517 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
1518 (gcc::jit::playback::context::dump_generated_code): Likewise.
1519 (gcc::jit::playback::context::get_path_c_file): New function.
1520 (gcc::jit::playback::context::get_path_s_file): New function.
1521 (gcc::jit::playback::context::get_path_so_file): New function.
1522 * jit-playback.h (gcc::jit::playback::context::get_path_c_file):
1523 New function.
1524 (gcc::jit::playback::context::get_path_s_file): New function.
1525 (gcc::jit::playback::context::get_path_so_file): New function.
1526 (gcc::jit::playback::context): Move fields "m_path_template",
1527 "m_path_tempdir", "m_path_c_file", "m_path_s_file",
1528 "m_path_so_file" to new jit::tempdir class; add field "m_tempdir".
1529 * jit-tempdir.c: New file.
1530 * jit-tempdir.h: New file.
1531
38771e4e
DM
15322014-12-09 David Malcolm <dmalcolm@redhat.com>
1533
1534 * jit-playback.c (gcc::jit::playback::context::compile): Acquire the
1535 mutex here, immediately before using toplev, and release it here, on
1536 each exit path after acquisition.
1537 (jit_mutex): Move this variable here, from jit-recording.c.
1538 (gcc::jit::playback::context::acquire_mutex): New function, based on
1539 code in jit-recording.c.
1540 (gcc::jit::playback::context::release_mutex): Likewise.
1541 * jit-playback.h (gcc::jit::playback::context::acquire_mutex): New
1542 function.
1543 (gcc::jit::playback::context::release_mutex): New function.
1544 * jit-recording.c (jit_mutex): Move this variable to jit-playback.c.
1545 (gcc::jit::recording::context::compile): Move mutex-handling from
1546 here into jit-playback.c's gcc::jit::playback::context::compile.
1547 * notes.txt: Update to show the new locations of ACQUIRE_MUTEX
1548 and RELEASE_MUTEX.
1549
38f4f641
DM
15502014-12-09 David Malcolm <dmalcolm@redhat.com>
1551
1552 * jit-playback.c (gcc::jit::playback::context::compile): Move the
1553 dlopen code into...
1554 (gcc::jit::playback::context::dlopen_built_dso): ...this new
1555 function.
1556 * jit-playback.h (gcc::jit::playback::context::dlopen_built_dso):
1557 New function.
1558
82e0c914
DM
15592014-12-09 David Malcolm <dmalcolm@redhat.com>
1560
1561 PR jit/64166
1562 * docs/topics/contexts.rst (Debugging): Add description of
1563 gcc_jit_context_enable_dump.
1564 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1565 * jit-playback.c: Include context.h.
1566 (class auto_argvec): New class.
1567 (auto_argvec::~auto_argvec): New function.
1568 (gcc::jit::playback::context::compile): Convert fake_args to be
1569 an auto_argvec, so that it can contain dynamically-allocated
1570 strings. Construct a vec of all requested dumps, and pass it to
1571 make_fake_args. Extract requested dumps between the calls to
1572 toplev::main and toplev::finalize.
1573 (gcc::jit::playback::context::make_fake_args): Convert param
1574 "argvec" to be a vec <char *>, and gain a "requested_dumps"
1575 param. Convert to dynamically-allocated arg strings by converting
1576 ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP
1577 for args that are already a copy. Add args for all requested dumps.
1578 (gcc::jit::playback::context::extract_any_requested_dumps): New
1579 function.
1580 (gcc::jit::playback::context::read_dump_file): New function.
1581 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
1582 Convert param "argvec" to be a vec <char *>, and gain a
1583 "requested_dumps" param.
1584 (gcc::jit::playback::context::extract_any_requested_dumps): New
1585 function.
1586 (gcc::jit::playback::context::read_dump_file): New function.
1587 * jit-recording.c (gcc::jit::recording::context::enable_dump): New
1588 function.
1589 (gcc::jit::recording::context::get_all_requested_dumps): New
1590 function.
1591 * jit-recording.h (gcc::jit::recording::requested_dump): New
1592 struct.
1593 (gcc::jit::recording::context::enable_dump): New function.
1594 (gcc::jit::recording::context::get_all_requested_dumps): New
1595 function.
1596 (gcc::jit::recording::context::m_requested_dumps): New field.
1597 * libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint.
1598 * libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint.
1599 * libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint.
1600
53b730ff
DM
16012014-12-08 David Malcolm <dmalcolm@redhat.com>
1602
1603 * libgccjit++.h: Indent the forward declarations of the classes to
1604 show the inheritance hierarchy.
1605
0f379445
DM
16062014-12-08 David Malcolm <dmalcolm@redhat.com>
1607
1608 * notes.txt: Show the beginning and ending of
1609 recording::context::compile vs playback::context::compile. Show
1610 the creation and unlinking of the tempdir. Show toplev::finalize.
1611 Move "RELEASE MUTEX" to the correct location. Show
1612 gcc_jit_result_release, and indicate where the
1613 dlopen/dlsym/dlclose occur.
1614
81ba15f1
DM
16152014-12-01 David Malcolm <dmalcolm@redhat.com>
1616
1617 * docs/examples/tut02-square.c (main): Release the context
1618 earlier, to show that this is possible. Update error-handling
1619 to avoid a double-release of the context, and to avoid
1620 releasing a NULL result.
1621 * docs/intro/tutorial02.rst: Discuss gcc_jit_context_release.
1622 * docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize
1623 * docs/topics/results.rst (gcc_jit_result): Mention that this
1624 controls the lifetimes of machine code functions.
1625 (gcc_jit_result_get_code): Spell out the requirements for this
1626 to succeed, and the lifetime of the result.
1627 (gcc_jit_result_release): Mention that this invalidates any code
1628 that was obtained from the result.
1629 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1630
e250f0dc
DM
16312014-12-01 David Malcolm <dmalcolm@redhat.com>
1632
1633 PR jit/64018
1634 * docs/intro/tutorial02.rst: Spell out lifetime of generated code.
1635 Add description of error-handling, taken in part from...
1636 * docs/topics/contexts.rst (Error-handling): Expand, and move some
1637 content to tutorial02.rst.
1638 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1639
eeafb319
DM
16402014-12-01 David Malcolm <dmalcolm@redhat.com>
1641
1642 PR jit/64020
1643 * docs/topics/types.rst (Standard types) Add new enum values to
1644 the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT,
1645 GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
1646 Widen the left-hand column so that
1647 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit.
1648 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1649
1650 * jit-builtins.c: Include stringpool.h and jit-playback.h.
1651 Move everything out of the gcc::jit::recording namespace into
1652 just gcc::jit.
1653 (struct builtin_data): Add fields "fnclass", "attr", and
1654 "implicit_p".
1655 (DEF_BUILTIN): Update macro so populate the new fields.
1656 (builtins_manager::builtins_manager): Update for move out of
1657 recording namespace. Initialize the m_attributes array.
1658 (builtins_manager::get_builtin_function): Likewise.
1659 (builtins_manager::get_builtin_function_by_id): New function.
1660 (builtins_manager::make_builtin_function): Update for move out of
1661 recording namespace. Add fix for PR jit/64020 by detecting
1662 specific builtin ids and having them ensure that builtins for
1663 other ids are created as necessary.
1664 (builtins_manager::get_type): Update for move out of recording
1665 namespace.
1666 (builtins_manager::make_type): Likewise. Add some missing
1667 #undefs.
1668 (builtins_manager::make_primitive_type): Update for move out of
1669 recording namespace. Implement the three BT_COMPLEX_ cases and
1670 BT_DOUBLE_PTR.
1671 (builtins_manager::make_fn_type): Update for move out of recording
1672 namespace.
1673 (builtins_manager::make_ptr_type): Likewise.
1674 (builtins_manager::finish_playback): New function.
1675 (builtins_manager::get_class): New function.
1676 (builtins_manager::implicit_p): New function.
1677 (builtins_manager::get_attrs_tree): Two new functions.
1678 (builtins_manager::make_attrs_tree): New function.
1679
1680 * jit-builtins.h: Move everything out of the gcc::jit::recording
1681 namespace into just gcc::jit.
1682 (enum built_in_attribute): New.
1683 (builtins_manager::builtins_manager): Update decl for namespace
1684 change.
1685 (builtins_manager::get_builtin_function): Likewise.
1686 (builtins_manager::get_class): New.
1687 (builtins_manager::implicit_p): New.
1688 (builtins_manager::get_attrs_tree): Two new functions.
1689 (builtins_manager::make_attrs_tree): New function.
1690 (builtins_manager::finish_playback): New.
1691 (builtins_manager::get_builtin_function_by_id): New.
1692 (builtins_manager::make_builtin_function): Update decl for
1693 namespace change.
1694 (builtins_manager::get_type): Likewise.
1695 (builtins_manager::make_type): Likewise.
1696 (builtins_manager::make_primitive_type): Likewise.
1697 (builtins_manager::make_fn_type): Likewise.
1698 (builtins_manager::make_ptr_type): Likewise.
1699 (builtins_manager): Likewise for fields. Add new field
1700 "m_attributes".
1701
1702 * jit-common.h (NUM_GCC_JIT_TYPES): Update.
1703 (builtins_manager): Update forward decl to reflect namespace
1704 change.
1705
1706 * jit-playback.c: Include attribs.h and jit-builtins.h.
1707 (gcc::jit::playback::context::get_tree_node_for_type): Add cases
1708 for the new COMPLEX_ types.
1709 (gcc::jit::playback::context::new_function): If creating a
1710 builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl,
1711 and call set_builtin_decl.
1712 (gcc::jit::playback::context::replay): If we have a
1713 builtins_manager, call its finish_playback method when we're done.
1714
1715 * jit-playback.h:
1716 (gcc::jit::playback::context::get_builtins_manager): New function.
1717
1718 * jit-recording.c
1719 (gcc::jit::recording::context::get_builtins_manager): New function.
1720 (gcc::jit::recording::get_builtin_function): Use
1721 get_builtins_manager, in case we're a child context.
1722 (gcc::jit::recording::memento_of_get_type::dereference): Add the
1723 COMPLEX_ types.
1724 (gcc::jit::recording::memento_of_get_type::is_int): Likewise.
1725 (gcc::jit::recording::memento_of_get_type::is_float): Likewise.
1726 (gcc::jit::recording::memento_of_get_type::is_bool): Likewise.
1727 (get_type_strings): Likewise.
1728
1729 * jit-recording.h
1730 (gcc::jit::recording::context::get_builtins_manager): New.
1731
1732 * libgccjit.h (enum gcc_jit_types): Add
1733 GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE,
1734 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
1735
23844fd7
DM
17362014-12-01 David Malcolm <dmalcolm@redhat.com>
1737
1738 * jit-builtins.c
1739 (gcc::jit::recording::builtins_manager::get_builtin_function):
1740 Check for NULL return from make_builtin_function.
1741 (gcc::jit::recording::builtins_manager::make_builtin_function):
1742 Check for NULL return from get_type.
1743
c6760a13
DM
17442014-12-01 David Malcolm <dmalcolm@redhat.com>
1745
1746 * jit-playback.c (gcc::jit::playback::context::compile): Move DSO
1747 creation code into...
1748 (gcc::jit::playback::context::convert_to_dso): New function.
1749 * jit-playback.h (gcc::jit::playback::context::convert_to_dso):
1750 New function.
1751
8f50ee3c
DM
17522014-12-01 David Malcolm <dmalcolm@redhat.com>
1753
1754 * jit-playback.c (gcc::jit::playback::context::compile): Use an
1755 auto_vec<const char *> rather than a const char *[20] for the
1756 top-level argv, and move the logic to build it to...
1757 (gcc::jit::playback::context::make_fake_args): New function.
1758 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
1759 New function.
1760
56dea35f
DM
17612014-12-01 David Malcolm <dmalcolm@redhat.com>
1762
1763 * Make-lang.in (jit_OBJS): Add jit/jit-result.o.
1764 * jit-playback.c: Include new header jit-result.h.
1765 (gcc::jit::result::result): Move to new file jit-result.c.
1766 (gcc::jit::result::~result): Likewise.
1767 (gcc::jit::playback::result): Likewise.
1768 * jit-recording.h (class gcc::jit::result): Move to new
1769 header jit-result.h.
1770 * jit-result.c: New file, to contain...
1771 (gcc::jit::result::result): Move here from jit-playback.c,
1772 removing erroneous "playback" namespace from comment.
1773 (gcc::jit::result::~result): Likewise.
1774 (gcc::jit::playback::result): Likewise.
1775 * jit-result.h: New file, to contain...
1776 (class gcc::jit::result): Move from jit-recording.h.
1777 * libgccjit.c: Include jit-result.h.
1778 (gcc_jit_result_get_code): Update comment to reflect move
1779 of implementation.
1780 (gcc_jit_result_release): Likewise.
1781
52b9468f
DM
17822014-12-01 David Malcolm <dmalcolm@redhat.com>
1783
1784 PR jit/63854
1785 * docs/examples/tut04-toyvm/toyvm.c
1786 (toyvm_compiled_function): New typedef.
1787 (toyvm_compiled_func) Rename to...
1788 (toyvm_compiled_code) ...this.
1789 (struct toyvm_compiled_function): New struct.
1790 (toyvm_function_compile): Return a toyvm_compiled_function *
1791 rather than a toyvm_compiled_func, so that the caller can fully
1792 clean things up. Free "funcname".
1793 (test_script): Update for change to toyvm_function_compile.
1794 Clean up the toyvm_compiled_function.
1795 (main): Likewise.
1796 (docs/intro/tutorial04.rst): Update to reflect the above changes,
1797 and to better spell out the lifetime of the compiled code.
1798
c8d19a69
DM
17992014-12-01 David Malcolm <dmalcolm@redhat.com>
1800
1801 PR jit/63854
1802 * jit-builtins.c
1803 (gcc::jit::recording::builtins_manager::make_fn_type): Call the
1804 context's new_function_type method, rather than directly creating
1805 a function_type instance.
1806 * jit-recording.c
1807 (gcc::jit::recording::context::new_function_type): New method,
1808 adapted from part of...
1809 (gcc::jit::recording::context::new_function_ptr_type): ...this.
1810 Update to call new_function_type.
1811 * jit-recording.h
1812 (gcc::jit::recording::context::new_function_type): New method.
1813
c985705a
DM
18142014-12-01 David Malcolm <dmalcolm@redhat.com>
1815
1816 PR jit/63969
1817 * jit-playback.c: Ensure that ctxt_progname is non-NULL.
1818
b957b2e0
DM
18192014-11-19 David Malcolm <dmalcolm@redhat.com>
1820
1821 PR jit/63854
1822 * jit-playback.c (gcc::jit::playback::compound_type::set_fields):
1823 Convert param from const vec<playback::field *> & to
1824 const auto_vec<playback::field *> *.
1825 (gcc::jit::playback::context::new_function_type): Convert param
1826 "param_types" from vec<type *> * to const auto_vec<type *> *.
1827 (gcc::jit::playback::context::new_function): Convert param
1828 "params" from vec<param *> * to const auto_vec<param *> *.
1829 (gcc::jit::playback::context::build_call): Convert param "args"
1830 from vec<rvalue *> to const auto_vec<rvalue *> *.
1831 (gcc::jit::playback::context::new_call): Likewise.
1832 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
1833 (wrapper_finalizer): New function.
1834 (gcc::jit::playback::wrapper::operator new): Call the finalizer
1835 variant of ggc_internal_cleared_alloc, supplying
1836 wrapper_finalizer.
1837 (gcc::jit::playback::function::finalizer): New.
1838 (gcc::jit::playback::block::finalizer): New.
1839 (gcc::jit::playback::source_file::finalizer): New.
1840 (gcc::jit::playback::source_line::finalizer): New.
1841
1842 * jit-playback.h
1843 (gcc::jit::playback::context::new_function_type): Convert param
1844 "param_types" from vec<type *> * to const auto_vec<type *> *.
1845 (gcc::jit::playback::context::new_function): Convert param
1846 "params" from vec<param *> * to const auto_vec<param *> *.
1847 (gcc::jit::playback::context::new_call): Convert param
1848 "args" from vec<rvalue *> to const auto_vec<rvalue *> *.
1849 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
1850 (gcc::jit::playback::context::build_call): Likewise.
1851 (gcc::jit::playback::context): Convert fields "m_functions",
1852 "m_source_files", "m_cached_locations" from vec to auto_vec.
1853 (gcc::jit::playback::wrapper::finalizer): New virtual function.
1854 (gcc::jit::playback::compound_type::set_fields): Convert param fro
1855 const vec<playback::field *> & to
1856 const auto_vec<playback::field *> *.
1857 (gcc::jit::playback::function::finalizer): New.
1858 (gcc::jit::playback::block::finalizer): New.
1859 (gcc::jit::playback::source_file::finalizer): New.
1860 (gcc::jit::playback::source_line::finalizer): New.
1861
1862 * jit-recording.c
1863 (gcc::jit::recording::function_type::replay_into): Convert local
1864 from a vec into an auto_vec.
1865 (gcc::jit::recording::fields::replay_into): Likewise.
1866 (gcc::jit::recording::function::replay_into): Likewise.
1867 (gcc::jit::recording::call::replay_into): Likewise.
1868 (gcc::jit::recording::call_through_ptr::replay_into): Likewise.
1869
1870 * jit-recording.h (gcc::jit::recording::context): Convert fields
1871 "m_mementos", "m_compound_types", "m_functions" from vec<> to
1872 auto_vec <>.
1873 (gcc::jit::recording::function_type::get_param_types): Convert
1874 return type from vec<type *> to const vec<type *> &.
1875 (gcc::jit::recording::function_type): Convert field
1876 "m_param_types" from a vec<> to an auto_vec<>.
1877 (gcc::jit::recording::fields): Likewise for field "m_fields".
1878 (gcc::jit::recording::function::get_params): Convert return type
1879 from vec <param *> to const vec<param *> &.
1880 (gcc::jit::recording::function): Convert fields "m_params",
1881 "m_locals", "m_blocks" from vec<> to auto_vec<>.
1882 (gcc::jit::recording::block): Likewise for field "m_statements".
1883 vec<> to auto_vec<>.
1884 (gcc::jit::recording::call): Likewise for field "m_args".
1885 (gcc::jit::recording::call_through_ptr): Likewise.
1886
79cafc7a
DM
18872014-11-19 David Malcolm <dmalcolm@redhat.com>
1888
1889 PR jit/63854
1890 * jit-recording.c (recording::function::validate): Convert
1891 "worklist" from vec<> to autovec<> to fix a leak.
1892
35485da9
DM
18932014-11-11 David Malcolm <dmalcolm@redhat.com>
1894
1895 * ChangeLog.jit: New.
1896 * ChangeLog: New.
1897 * Make-lang.in: New.
1898 * TODO.rst: New.
1899 * config-lang.in: New.
1900 * docs/Makefile: New.
1901 * docs/_build/texinfo/Makefile: New.
1902 * docs/_build/texinfo/factorial.png: New.
1903 * docs/_build/texinfo/libgccjit.texi: New.
1904 * docs/_build/texinfo/sum-of-squares.png: New.
1905 * docs/conf.py: New.
1906 * docs/examples/tut01-hello-world.c: New.
1907 * docs/examples/tut02-square.c: New.
1908 * docs/examples/tut03-sum-of-squares.c: New.
1909 * docs/examples/tut04-toyvm/Makefile: New.
1910 * docs/examples/tut04-toyvm/factorial.toy: New.
1911 * docs/examples/tut04-toyvm/fibonacci.toy: New.
1912 * docs/examples/tut04-toyvm/toyvm.c: New.
1913 * docs/index.rst: New.
1914 * docs/internals/index.rst: New.
1915 * docs/intro/factorial.png: New.
1916 * docs/intro/index.rst: New.
1917 * docs/intro/sum-of-squares.png: New.
1918 * docs/intro/tutorial01.rst: New.
1919 * docs/intro/tutorial02.rst: New.
1920 * docs/intro/tutorial03.rst: New.
1921 * docs/intro/tutorial04.rst: New.
1922 * docs/topics/contexts.rst: New.
1923 * docs/topics/expressions.rst: New.
1924 * docs/topics/functions.rst: New.
1925 * docs/topics/index.rst: New.
1926 * docs/topics/locations.rst: New.
1927 * docs/topics/objects.rst: New.
1928 * docs/topics/results.rst: New.
1929 * docs/topics/types.rst: New.
1930 * dummy-frontend.c: New.
1931 * jit-builtins.c: New.
1932 * jit-builtins.h: New.
1933 * jit-common.h: New.
1934 * jit-playback.c: New.
1935 * jit-playback.h: New.
1936 * jit-recording.c: New.
1937 * jit-recording.h: New.
1938 * libgccjit++.h: New.
1939 * libgccjit.c: New.
1940 * libgccjit.h: New.
1941 * libgccjit.map: New.
1942 * notes.txt: New.
1943
19442013-07-26 David Malcolm <dmalcolm@redhat.com>
1945
1946 * Initial creation
1947
1e3b6a3d 1948Copyright (C) 2013-2015 Free Software Foundation, Inc.
35485da9
DM
1949
1950Copying and distribution of this file, with or without modification,
1951are permitted in any medium without royalty provided the copyright
1952notice and this notice are preserved.