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