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