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