]>
Commit | Line | Data |
---|---|---|
adb6d84b DM |
1 | 2015-06-30 David Malcolm <dmalcolm@redhat.com> |
2 | ||
3 | * docs/cp/topics/expressions.rst: Remove stray semicolon. | |
4 | * docs/cp/topics/functions.rst: Remove stray backslash. | |
5 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
6 | ||
f0889939 AM |
7 | 2015-06-25 Andrew MacLeod <amacleod@redhat.com> |
8 | ||
9 | * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list. | |
10 | * jit-playback.c: Likewise. | |
11 | ||
9cad7a76 AM |
12 | 2015-06-25 Andrew Macleod <amacleod@redhat.com> |
13 | ||
14 | * jit-common.h: Don't include alias.h. | |
15 | ||
41571b55 DM |
16 | 2015-06-17 David Malcolm <dmalcolm@redhat.com> |
17 | ||
18 | * libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field | |
19 | is for the correct struct. | |
20 | (gcc_jit_rvalue_access_field): Likewise. | |
21 | ||
abb226c9 AM |
22 | 2015-06-17 Andrew MacLeod <amacleod@redhat.com> |
23 | ||
24 | * dummy-frontend.c: Do not include input.h, line-map.h or is-a.h. | |
25 | * jit-common.h: Likewise. | |
26 | * jit-playback.c: Likewise. | |
27 | ||
bd93aa1a DM |
28 | 2015-06-16 David Malcolm <dmalcolm@redhat.com> |
29 | ||
30 | PR jit/66539 | |
31 | * jit-recording.c: Within namespace gcc::jit::recording:: | |
32 | (rvalue::get_debug_string_parens): New function. | |
33 | (binary_op::make_debug_string): Update to mimic C precedence | |
34 | rules. | |
35 | (binary_op_precedence): New array. | |
36 | (binary_op::get_precedence): New function. | |
37 | (comparison::make_debug_string): Update to mimic C precedence | |
38 | rules. | |
39 | (comparison_precedence): New array. | |
40 | (comparison::get_precedence): New function. | |
41 | (cast::make_debug_string): Update to mimic C precedence rules. | |
42 | (call::make_debug_string): Likewise. | |
43 | (call_through_ptr::make_debug_string): Likewise. | |
44 | (array_access::make_debug_string): Likewise. | |
45 | (access_field_of_lvalue::make_debug_string): Likewise. | |
46 | (access_field_rvalue::make_debug_string): Likewise. | |
47 | (dereference_field_rvalue::make_debug_string): Likewise. | |
48 | (dereference_rvalue::make_debug_string): Likewise. | |
49 | (get_address_of_lvalue::make_debug_string): Likewise. | |
50 | * jit-recording.h: Within namespace gcc::jit::recording:: | |
51 | (precedence): New enum. | |
52 | (rvalue::rvalue): Initialize field "m_parenthesized_string". | |
53 | (rvalue::get_debug_string_parens): New method. | |
54 | (rvalue::get_precedence): New pure virtual function. | |
55 | (rvalue::m_parenthesized_string): New field. | |
56 | (param::get_precedence): New function. | |
57 | (global::get_precedence): New function. | |
58 | (memento_of_new_rvalue_from_const::get_precedence): New function. | |
59 | (memento_of_new_string_literal::get_precedence): New function. | |
60 | (unary_op::get_precedence): New function. | |
61 | (binary_op::get_precedence): New function. | |
62 | (comparison::get_precedence): New function. | |
63 | (cast::get_precedence): New function. | |
64 | (call::get_precedence): New function. | |
65 | (call_through_ptr::get_precedence): New function. | |
66 | (array_access::get_precedence): New function. | |
67 | (access_field_of_lvalue::get_precedence): New function. | |
68 | (access_field_rvalue::get_precedence): New function. | |
69 | (dereference_field_rvalue::get_precedence): New function. | |
70 | (dereference_rvalue::get_precedence): New function. | |
71 | (get_address_of_lvalue::get_precedence): New function. | |
72 | (local::get_precedence): New function. | |
73 | ||
83c1b80e MK |
74 | 2015-06-09 Matthias Klose <doko@ubuntu.com> |
75 | ||
76 | * Make-lang.in (jit.install-common): Install headers using INSTALL_DATA. | |
77 | ||
13fdf2e2 AM |
78 | 2015-06-08 Andrew MacLeod <amacleod@redhat.com> |
79 | ||
80 | * dummy-frontend.c : Adjust include files. | |
81 | * jit-common.h : Likewise. | |
82 | * jit-playback.c : Likewise. | |
83 | ||
e4753451 DM |
84 | 2015-06-05 David Malcolm <dmalcolm@redhat.com> |
85 | ||
86 | * dummy-frontend.c | |
87 | (jit_langhook_post_compilation_parsing_cleanups): Remove. | |
88 | (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove | |
89 | * jit-playback.c (gcc::jit::playback::context::new_global): Add | |
90 | call to varpool_node::finalize_decl. | |
91 | (gcc::jit::playback::context::finalize_global_decls): Remove. | |
92 | * jit-playback.h | |
93 | (gcc::jit::playback::context::finalize_global_decls): Remove. | |
94 | ||
e7547bc6 DM |
95 | 2015-06-05 David Malcolm <dmalcolm@redhat.com> |
96 | ||
97 | * dummy-frontend.c (jit_langhook_write_globals): Rename to... | |
98 | (jit_langhook_post_compilation_parsing_cleanups): ...this, and | |
99 | eliminate calls to finalize_compilation_unit and | |
100 | write_global_decls_2. | |
101 | (LANG_HOOKS_WRITE_GLOBALS): Rename to... | |
102 | (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and | |
103 | redirect from jit_langhook_write_globals to | |
104 | jit_langhook_post_compilation_parsing_cleanups. | |
105 | * jit-playback.c | |
106 | (gcc::jit::playback::context::write_global_decls_1): Rename to... | |
107 | (gcc::jit::playback::context::finalize_global_decls): ...this. | |
108 | (gcc::jit::playback::context::write_global_decls_1): Delete. | |
109 | * jit-playback.h | |
110 | (gcc::jit::playback::context::write_global_decls_1): Rename to... | |
111 | (gcc::jit::playback::context::finalize_global_decls): ...this. | |
112 | (gcc::jit::playback::context::write_global_decls_1): Delete. | |
113 | ||
ecb9f223 AM |
114 | 2015-06-04 Andrew MacLeod <amacleod@redhat.com> |
115 | ||
116 | * dummy-frontend.c: Adjust includes for restructured coretypes.h. | |
117 | * jit-common.h: Likewise. | |
118 | * jit-playback.c: Likewise. | |
119 | ||
2637afb7 DM |
120 | 2015-05-12 David Malcolm <dmalcolm@redhat.com> |
121 | ||
122 | * jit-builtins.c: Include vec.h before target.h. | |
123 | ||
46bf0b0a JW |
124 | 2015-04-27 Jim Wilson <jim.wilson@linaro.org> |
125 | ||
126 | * Make-lang.in (jit.mostlyclean): Remove shared libraries and object | |
127 | files. | |
128 | ||
51c5c6b5 DM |
129 | 2015-04-09 David Malcolm <dmalcolm@redhat.com> |
130 | ||
131 | PR jit/65691 | |
132 | * docs/cp/topics/expressions.rst (Simple expressions): Fix copy | |
133 | and paste error in description of gccjit::context::one. | |
134 | * docs/topics/expressions.rst (Simple expressions): Likewise in | |
135 | description of gcc_jit_context_one. | |
136 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
137 | ||
f40fd895 UB |
138 | 2015-03-13 Uros Bizjak <ubizjak@gmail.com> |
139 | ||
140 | * jit-recording.c (dump::write): Also check vasprintf return value. | |
141 | (recording::context::add_error_va): Ditto. | |
142 | (recording::string::from_printf): Ditto. | |
143 | ||
18eb0d13 DM |
144 | 2015-03-13 David Malcolm <dmalcolm@redhat.com> |
145 | ||
146 | * docs/internals/index.rst (Packaging notes): New section. | |
147 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
148 | ||
7ef96183 DM |
149 | 2015-03-05 David Malcolm <dmalcolm@redhat.com> |
150 | ||
151 | * docs/cp/intro/tutorial03.rst: Add missing arguments to | |
152 | gccjit::block::end_with_conditional call. Add on_true/on_false | |
153 | comments. Tweak the wording. | |
154 | * docs/intro/tutorial03.rst: Add missing arguments to | |
155 | gcc_jit_block_end_with_conditional call. Add some clarifying | |
156 | comments. | |
157 | * docs/topics/compilation.rst: Tweak the wording to avoid an | |
158 | ambiguous use of "this". | |
159 | * docs/topics/contexts.rst: Fix a typo. | |
160 | * docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove | |
161 | a stray backtick. | |
162 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
163 | ||
56a9f6bc TS |
164 | 2015-02-24 Thomas Schwinge <thomas@codesourcery.com> |
165 | ||
166 | PR libgomp/64625 | |
167 | * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8) | |
168 | (DEF_FUNCTION_TYPE_VAR_12): Remove macros. | |
169 | (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros. | |
170 | * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8) | |
171 | (DEF_FUNCTION_TYPE_VAR_12): Remove macros. | |
172 | (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros. | |
173 | ||
a4be4e91 DM |
174 | 2015-02-04 David Malcolm <dmalcolm@redhat.com> |
175 | ||
176 | PR jit/64257 | |
177 | * docs/conf.py (html_theme): Change from 'pyramid' | |
178 | to 'sphinxdoc'. | |
179 | ||
f435bff3 DM |
180 | 2015-02-04 David Malcolm <dmalcolm@redhat.com> |
181 | ||
182 | * docs/topics/contexts.rst (gcc_jit_context_acquire): Fix | |
183 | typo. | |
184 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
185 | ||
0ed4f017 DM |
186 | 2015-02-03 David Malcolm <dmalcolm@redhat.com> |
187 | ||
188 | * jit-logging.h (gcc::jit::log_user::log): Make const. | |
189 | * jit-recording.c (gcc::jit::recording::context::set_str_option): | |
190 | Log the new value of the option. | |
191 | (gcc::jit::recording::context::set_int_option): Likewise. | |
192 | (gcc::jit::recording::context::set_bool_option): Likewise. | |
193 | (gcc::jit::recording::context::compile): Log the value of all | |
194 | options. | |
195 | (gcc::jit::recording::context::compile_to_file): Likewise. | |
196 | (gcc::jit::recording::context::log_all_options): New function. | |
197 | (gcc::jit::recording::context::log_str_option): New function. | |
198 | (gcc::jit::recording::context::log_int_option): New function. | |
199 | (gcc::jit::recording::context::log_bool_option): New function. | |
200 | * jit-recording.h (gcc::jit::recording::context::log_all_options): | |
201 | New function. | |
202 | (gcc::jit::recording::context::log_str_option): New function. | |
203 | (gcc::jit::recording::context::log_int_option): New function. | |
204 | (gcc::jit::recording::context::log_bool_option): New function. | |
205 | * docs/internals/test-hello-world.exe.log.txt: Update for above | |
206 | changes. | |
207 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
208 | ||
2cb844ce DM |
209 | 2015-02-03 David Malcolm <dmalcolm@redhat.com> |
210 | ||
211 | PR jit/64810 | |
212 | * Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o. | |
213 | (LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS. | |
214 | * jit-playback.c: Include gcc.h. | |
215 | (gcc::jit::playback::context::compile): Move mutex acquisition | |
216 | to before the call to make_fake_args. | |
217 | (append_arg_from_driver): New function. | |
218 | (gcc::jit::playback::context::make_fake_args): On the first call, | |
219 | call into driver_get_configure_time_options to get configure-time | |
220 | default options and cache them. Add them to the args for | |
221 | toplev::main. | |
222 | * jit-spec.c: New source file. | |
223 | * docs/internals/test-hello-world.exe.log.txt: Update to reflect | |
224 | above changes. | |
225 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
226 | ||
16a71c50 DM |
227 | 2015-02-02 David Malcolm <dmalcolm@redhat.com> |
228 | ||
229 | PR jit/64810 | |
230 | * dummy-frontend.c (jit_langhook_type_for_mode): Support | |
231 | TYPE_MODE (long_long_integer_type_node). | |
232 | ||
53c04ec9 DM |
233 | 2015-01-27 David Malcolm <dmalcolm@redhat.com> |
234 | ||
235 | * docs/internals/test-hello-world.exe.log.txt: Add example version | |
236 | lines. | |
237 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
238 | * jit-common.h (gcc::jit::dump::get_file): New accessor. | |
239 | * jit-logging.c: Include toplev.h. | |
240 | (gcc::jit::logger::logger): Log the GCC version. | |
241 | * jit-recording.c: Include toplev.h. | |
242 | (gcc:jit::recording::context::dump_reproducer_to_file): Log the | |
243 | GCC version. | |
244 | ||
dc44ee3a DM |
245 | 2015-01-26 David Malcolm <dmalcolm@redhat.com> |
246 | ||
247 | * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo. | |
248 | * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The | |
249 | error buffer is only valid until the next call to the context. | |
250 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
251 | * libgccjit.h (gcc_jit_context_get_first_error): Reword the | |
252 | comment to omit mention of compiling. | |
253 | (gcc_jit_context_get_last_error): The error buffer is only valid | |
254 | until the next call to the context. | |
255 | ||
3349605d DM |
256 | 2015-01-26 David Malcolm <dmalcolm@redhat.com> |
257 | ||
258 | PR jit/64708 | |
259 | * config-lang.in (compilers): Drop "libgccjit.so". | |
260 | ||
6fc2d0f3 DM |
261 | 2015-01-23 David Malcolm <dmalcolm@redhat.com> |
262 | ||
263 | PR jit/64721 | |
264 | * jit-playback.c (gcc::jit::playback::context::compile): Construct | |
265 | toplev instances with init_signals=false. | |
266 | ||
fdce7209 DM |
267 | 2015-01-19 David Malcolm <dmalcolm@redhat.com> |
268 | ||
269 | * docs/cp/topics/results.rst: Rename to... | |
270 | * docs/cp/topics/compilation.rst: ...this, and add section on | |
271 | ahead-of-time compilation. | |
272 | * docs/cp/topics/index.rst: Update for renaming of results.rst | |
273 | to compilation.rst. | |
274 | * docs/examples/emit-alphabet.bf: New file, a sample "brainf" | |
275 | script. | |
276 | * docs/examples/tut05-bf.c: New file, implementing a compiler | |
277 | for "brainf". | |
278 | * docs/internals/test-hello-world.exe.log.txt: Update to reflect | |
279 | changes to logger output. | |
280 | * docs/intro/index.rst: Add tutorial05.rst | |
281 | * docs/intro/tutorial05.rst: New file. | |
282 | * docs/topics/results.rst: Rename to... | |
283 | * docs/topics/compilation.rst: ...this, and add section on | |
284 | ahead-of-time compilation. | |
285 | * docs/topics/index.rst: Update for renaming of results.rst to | |
286 | compilation.rst. | |
287 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
288 | * jit-playback.c (gcc::jit::playback::context::compile): Convert | |
289 | return type from result * to void. Move the code to convert to | |
290 | dso and dlopen the result to a new pure virtual "postprocess" | |
291 | method. | |
292 | (gcc::jit::playback::compile_to_memory::compile_to_memory): New | |
293 | function. | |
294 | (gcc::jit::playback::compile_to_memory::postprocess): New | |
295 | function, based on playback::context::compile. | |
296 | (gcc::jit::playback::compile_to_file::compile_to_file): New | |
297 | function. | |
298 | (gcc::jit::playback::compile_to_file::postprocess): New function. | |
299 | (gcc::jit::playback::compile_to_file::copy_file): New function. | |
300 | (gcc::jit::playback::context::convert_to_dso): Move internals | |
301 | to... | |
302 | (gcc::jit::playback::context::invoke_driver): New method. Add | |
303 | "-shared" and "-c" options to driver's argv as needed. | |
304 | * jit-playback.h: Include "timevar.h". | |
305 | (gcc::jit::playback::context::compile): Convert return type from | |
306 | result * to void. | |
307 | (gcc::jit::playback::context::postprocess): New pure virtual | |
308 | function, making this an abstract base class. | |
309 | (gcc::jit::playback::context::get_tempdir): New accessor. | |
310 | (gcc::jit::playback::context::invoke_driver): New function. | |
311 | (class gcc::jit::playback::compile_to_memory): New subclass of | |
312 | playback::context. | |
313 | (class gcc::jit::playback::compile_to_file): Likewise. | |
314 | * jit-recording.c (gcc::jit::recording::context::compile): Use a | |
315 | playback::compile_to_memory, and extract its result. | |
316 | (gcc::jit::recording::context::compile_to_file): New function. | |
317 | * jit-recording.h (gcc::jit::recording::context::compile_to_file): | |
318 | New function. | |
319 | * libgccjit++.h (gccjit::context::compile_to_file): New method. | |
320 | * libgccjit.c (gcc_jit_context_compile): Update log message to | |
321 | clarify that this is an in-memory compile. | |
322 | (gcc_jit_context_compile_to_file): New function. | |
323 | * libgccjit.h (gcc_jit_context): Clarify that you can compile | |
324 | a context more than once, and that you can compile to a file | |
325 | as well as to memory. | |
326 | (gcc_jit_result): Clarify that this is the result of an | |
327 | in-memory compilation. | |
328 | (gcc_jit_context_compile): Clarify that you can compile, and that | |
329 | this is an in-memory compilation. | |
330 | (enum gcc_jit_output_kind): New enum. | |
331 | (gcc_jit_context_compile_to_file): New function. | |
332 | (gcc_jit_context_enable_dump): Clarify comment to cover both forms | |
333 | of compilation. | |
334 | * libgccjit.map (gcc_jit_context_compile_to_file): New API | |
335 | entrypoint. | |
336 | * notes.txt: Update to show the playback::context::postprocess | |
337 | virtual function. | |
338 | ||
450e225b DM |
339 | 2015-01-19 David Malcolm <dmalcolm@redhat.com> |
340 | ||
341 | * jit-recording.c | |
342 | (gcc::jit::recording::memento_of_new_string_literal::make_debug_string): | |
343 | Add missing format string. | |
344 | ||
499de348 DM |
345 | 2015-01-16 David Malcolm <dmalcolm@redhat.com> |
346 | ||
347 | * Make-lang.in (lang_checks_parallelized): Add "check-jit". | |
348 | (check_jit_parallelize): Set this to an arbitrary value (10). | |
349 | ||
e989e68d JJ |
350 | 2015-01-16 Jakub Jelinek <jakub@redhat.com> |
351 | ||
352 | * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of | |
353 | last argument. | |
354 | (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and | |
355 | undef afterwards. | |
356 | * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): | |
357 | Likewise. | |
358 | ||
179ed8f5 RS |
359 | 2015-01-15 Richard Sandiford <richard.sandiford@arm.com> |
360 | ||
361 | Update copyright years in docs/. | |
362 | ||
96a87981 DM |
363 | 2015-01-15 David Malcolm <dmalcolm@redhat.com> |
364 | ||
365 | * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the | |
366 | lvalue and the rvalue are of compatible type. | |
367 | ||
86d0ac88 DM |
368 | 2015-01-13 David Malcolm <dmalcolm@redhat.com> |
369 | ||
370 | * docs/cp/topics/contexts.rst (Debugging): Add | |
371 | gccjit::context::dump_reproducer_to_file. | |
372 | * docs/internals/index.rst (Design notes): New section, | |
373 | discussing input validation and | |
374 | gcc_jit_context_dump_reproducer_to_file. | |
375 | * docs/topics/contexts.rst (Debugging): Add | |
376 | gcc_jit_context_dump_reproducer_to_file. | |
377 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
378 | * jit-common.h (gcc::jit::dump::get_context): New accessor. | |
379 | * jit-recording.c: Include "hash-map.h". | |
380 | Within namespace ::gcc::jit... | |
381 | (dump::write): Flush each line. | |
382 | (dump::make_location): Pass false for new param "created_by_user". | |
383 | (class allocator): New class. | |
384 | (allocator::~allocator): New function. | |
385 | (allocator::xstrdup_printf): New function. | |
386 | (allocator::xstrdup_printf_va): New function. | |
387 | (class reproducer): New subclass of dump. | |
388 | (reproducer::reproducer): New function. | |
389 | (reproducer::write_params): New function. | |
390 | (reproducer::write_args): New function. | |
391 | (reproducer::make_identifier): New function. | |
392 | (reproducer::make_tmp_identifier): New function. | |
393 | (reproducer::get_identifier): New pair of functions. | |
394 | (reproducer::get_identifier_as_rvalue): New function. | |
395 | (reproducer::get_identifier_as_lvalue): New function. | |
396 | (reproducer::get_identifier_as_type): New function. | |
397 | (reproducer::xstrdup_printf): New function. | |
398 | (recording::context::context): Initialize m_toplevel_ctxt. | |
399 | (recording::context::new_location): Add param created_by_user. | |
400 | (str_option_reproducer_strings): New table of strings. | |
401 | (int_option_reproducer_strings): Likewise. | |
402 | (bool_option_reproducer_strings): Likewise. | |
403 | (get_type_enum_strings): Likewise. | |
404 | (names_of_function_kinds): Likewise. | |
405 | (global_kind_reproducer_strings): Likewise. | |
406 | (unary_op_reproducer_strings): Likewise. | |
407 | (binary_op_reproducer_strings): Likewise. | |
408 | (comparison_reproducer_strings): Likewise. | |
409 | Within namespace ::gcc::jit::recording::... | |
410 | (context::dump_reproducer_to_file): New function. | |
411 | (string::write_reproducer): Likewise. | |
412 | (location::write_reproducer): Likewise. | |
413 | (type::access_as_type): Likewise. | |
414 | (memento_of_get_type::write_reproducer): Likewise. | |
415 | (memento_of_get_pointer::write_reproducer): Likewise. | |
416 | (memento_of_get_const::write_reproducer): Likewise. | |
417 | (memento_of_get_volatile::write_reproducer): Likewise. | |
418 | (array_type::write_reproducer): Likewise. | |
419 | (function_type::write_reproducer): Likewise. | |
420 | (function_type::write_deferred_reproducer): Likewise. | |
421 | (field::write_reproducer): Likewise. | |
422 | (struct_::access_as_type): Likewise. | |
423 | (struct_::write_reproducer): Likewise. | |
424 | (union_::write_reproducer): Likewise. | |
425 | (fields::write_reproducer): Likewise. | |
426 | (rvalue::access_as_rvalue): Likewise. | |
427 | (lvalue::access_as_rvalue): Likewise. | |
428 | (lvalue::access_as_lvalue): Likewise. | |
429 | (param::access_as_rvalue): Likewise. | |
430 | (param::access_as_lvalue): Likewise. | |
431 | (param::write_reproducer): Likewise. | |
432 | (function::write_reproducer): Likewise. | |
433 | (block::write_reproducer): Likewise. | |
434 | (global::write_reproducer): Likewise. | |
435 | (memento_of_new_rvalue_from_const <int>::write_reproducer): | |
436 | Likewise. | |
437 | (memento_of_new_rvalue_from_const <long>::write_reproducer): | |
438 | Likewise. | |
439 | (memento_of_new_rvalue_from_const <double>::write_reproducer): | |
440 | Likewise. | |
441 | (memento_of_new_rvalue_from_const <void *>::write_reproducer): | |
442 | Likewise. | |
443 | (memento_of_new_string_literal::write_reproducer): Likewise. | |
444 | (unary_op::write_reproducer): Likewise. | |
445 | (binary_op::write_reproducer): Likewise. | |
446 | (comparison::write_reproducer): Likewise. | |
447 | (cast::write_reproducer): Likewise. | |
448 | (call::write_reproducer): Likewise. | |
449 | (call_through_ptr::write_reproducer): Likewise. | |
450 | (array_access::write_reproducer): Likewise. | |
451 | (access_field_of_lvalue::write_reproducer): Likewise. | |
452 | (access_field_rvalue::write_reproducer): Likewise. | |
453 | (dereference_field_rvalue::write_reproducer): Likewise. | |
454 | (dereference_rvalue::write_reproducer): Likewise. | |
455 | (get_address_of_lvalue::write_reproducer): Likewise. | |
456 | (local::write_reproducer): Likewise. | |
457 | (eval::write_reproducer): Likewise. | |
458 | (assignment::write_reproducer): Likewise. | |
459 | (assignment_op::write_reproducer): Likewise. | |
460 | (comment::write_reproducer): Likewise. | |
461 | (conditional::write_reproducer): Likewise. | |
462 | (jump::write_reproducer): Likewise. | |
463 | (return_::write_reproducer): Likewise. | |
464 | * jit-recording.h (gcc::jit::reproducer): New forward declararion. | |
465 | Within namespace ::gcc::jit::recording::... | |
466 | (context::new_location): Add "created_by_user" param. | |
467 | (context::dump_reproducer_to_file): New method. | |
468 | (context::m_toplevel_ctxt): New field. | |
469 | (memento::write_reproducer): New pure virtual function. | |
470 | (memento::dyn_cast_location): New virtual function. | |
471 | (string::write_reproducer): | |
472 | (location::location): Add "created_by_user" param. | |
473 | (location::dyn_cast_location): New function. | |
474 | (location::created_by_user): New accessor. | |
475 | (location::write_reproducer): New function. | |
476 | (location::m_created_by_user): New field. | |
477 | (type::access_as_type): New virtual function. | |
478 | (location::write_reproducer): Likewise. | |
479 | (type::access_as_type): Likewise. | |
480 | (memento_of_get_type::write_reproducer): Likewise. | |
481 | (memento_of_get_pointer::write_reproducer): Likewise. | |
482 | (memento_of_get_const::write_reproducer): Likewise. | |
483 | (memento_of_get_volatile::write_reproducer): Likewise. | |
484 | (array_type::write_reproducer): Likewise. | |
485 | (function_type::write_reproducer): Likewise. | |
486 | (function_type::write_deferred_reproducer): Likewise. | |
487 | (field::write_reproducer): Likewise. | |
488 | (struct_::access_as_type): Likewise. | |
489 | (struct_::write_reproducer): Likewise. | |
490 | (union_::write_reproducer): Likewise. | |
491 | (union_::m_fields): Remove stray unused field. | |
492 | (fields::length): New accessor. | |
493 | (fields::get_field): New accessor. | |
494 | (fields::write_reproducer): New function. | |
495 | (rvalue::access_as_rvalue): Likewise. | |
496 | (lvalue::access_as_rvalue): Likewise. | |
497 | (lvalue::access_as_lvalue): Likewise. | |
498 | (param::access_as_rvalue): Likewise. | |
499 | (param::access_as_lvalue): Likewise. | |
500 | (param::write_reproducer): Likewise. | |
501 | (function::write_reproducer): Likewise. | |
502 | (block::write_reproducer): Likewise. | |
503 | (global::write_reproducer): Likewise. | |
504 | (memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer): | |
505 | Likewise. | |
506 | (memento_of_new_string_literal::write_reproducer): Likewise. | |
507 | (unary_op::write_reproducer): Likewise. | |
508 | (binary_op::write_reproducer): Likewise. | |
509 | (comparison::write_reproducer): Likewise. | |
510 | (cast::write_reproducer): Likewise. | |
511 | (call::write_reproducer): Likewise. | |
512 | (call_through_ptr::write_reproducer): Likewise. | |
513 | (array_access::write_reproducer): Likewise. | |
514 | (access_field_of_lvalue::write_reproducer): Likewise. | |
515 | (access_field_rvalue::write_reproducer): Likewise. | |
516 | (dereference_field_rvalue::write_reproducer): Likewise. | |
517 | (dereference_rvalue::write_reproducer): Likewise. | |
518 | (get_address_of_lvalue::write_reproducer): Likewise. | |
519 | (local::write_reproducer): Likewise. | |
520 | (eval::write_reproducer): Likewise. | |
521 | (assignment::write_reproducer): Likewise. | |
522 | (assignment_op::write_reproducer): Likewise. | |
523 | (comment::write_reproducer): Likewise. | |
524 | (conditional::write_reproducer): Likewise. | |
525 | (jump::write_reproducer): Likewise. | |
526 | (return_::write_reproducer): Likewise. | |
527 | * libgccjit++.h (gccjit::context::dump_reproducer_to_file): New. | |
528 | * libgccjit.c (gcc_jit_context_new_location): Pass "true" as | |
529 | param "created_by_user". | |
530 | (gcc_jit_context_dump_reproducer_to_file): New API entrypoint. | |
531 | * libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API | |
532 | entrypoint. | |
533 | * libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API | |
534 | entrypoint. | |
535 | ||
f6f2b019 DM |
536 | 2015-01-12 David Malcolm <dmalcolm@redhat.com> |
537 | ||
538 | * jit-recording.c (class gcc::jit::rvalue_usage_validator): New. | |
539 | (gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New | |
540 | ctor. | |
541 | (gcc::jit::rvalue_usage_validator::visit): New function. | |
542 | (gcc::jit::recording::rvalue::verify_valid_within_stmt): New | |
543 | function. | |
544 | (gcc::jit::recording::rvalue::set_scope): New function. | |
545 | (gcc::jit::recording::function::function): Call set_scope on each | |
546 | param, issuing errors for any params that already have a function. | |
547 | (gcc::jit::recording::block::add_eval): Return the new statement; | |
548 | update the comment given that some error-checking now happens after | |
549 | this returns. | |
550 | (gcc::jit::recording::block::add_assignment): Likewise. | |
551 | (gcc::jit::recording::block::add_assignment_op): Likewise. | |
552 | (gcc::jit::recording::block::add_comment): Likewise. | |
553 | (gcc::jit::recording::block::end_with_conditional): Likewise. | |
554 | (gcc::jit::recording::block::end_with_jump): Likewise. | |
555 | (gcc::jit::recording::block::end_with_return): Likewise. | |
556 | (gcc::jit::recording::block::validate): Add a comment. | |
557 | (gcc::jit::recording::unary_op::visit_children): New function. | |
558 | (gcc::jit::recording::binary_op::visit_children): New function. | |
559 | (gcc::jit::recording::comparison::visit_children): New function. | |
560 | (gcc::jit::recording::cast::visit_children): New function. | |
561 | (gcc::jit::recording::call::visit_children): New function. | |
562 | (gcc::jit::recording::call_through_ptr::visit_children): New function. | |
563 | (gcc::jit::recording::array_access::visit_children): New function. | |
564 | (gcc::jit::recording::access_field_of_lvalue::visit_children): New | |
565 | function. | |
566 | (gcc::jit::recording::access_field_rvalue::visit_children): New | |
567 | function. | |
568 | (gcc::jit::recording::dereference_field_rvalue::visit_children): | |
569 | New function. | |
570 | (gcc::jit::recording::dereference_rvalue::visit_children): New | |
571 | function. | |
572 | (gcc::jit::recording::get_address_of_lvalue::visit_children): New | |
573 | function. | |
574 | * jit-recording.h: Within namespace gcc::jit::recording... | |
575 | (class rvalue_visitor): New. | |
576 | (rvalue::rvalue): Initialize m_scope. | |
577 | (rvalue::get_loc): New accessor. | |
578 | (rvalue::verify_valid_within_stmt): New function. | |
579 | (rvalue::visit_children): New pure virtual function. | |
580 | (rvalue::set_scope): New function. | |
581 | (rvalue::get_scope): New function. | |
582 | (rvalue::dyn_cast_param): New function. | |
583 | (rvalue::m_scope): New field. | |
584 | (param::visit_children): New empty function. | |
585 | (param::dyn_cast_param): New function. | |
586 | (function::get_loc): New function. | |
587 | (block::add_eval): Return the new statement. | |
588 | (block::add_assignment): Likewise. | |
589 | (block::add_assignment_op): Likewise. | |
590 | (block::add_comment): Likewise. | |
591 | (block::end_with_conditional): Likewise. | |
592 | (block::end_with_jump): Likewise. | |
593 | (block::end_with_return): Likewise. | |
594 | (global::visit_children): New function. | |
595 | (memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children): | |
596 | New function. | |
597 | (memento_of_new_string_literal::visit_children): New function. | |
598 | (unary_op::visit_children): New function. | |
599 | (binary_op::visit_children): New function. | |
600 | (comparison::visit_children): New function. | |
601 | (cast::visit_children): New function. | |
602 | (call::visit_children): New function. | |
603 | (call_through_ptr::visit_children): New function. | |
604 | (array_access::visit_children): New function. | |
605 | (access_field_of_lvalue::visit_children): New function. | |
606 | (access_field_rvalue::visit_children): New function. | |
607 | (dereference_field_rvalue::visit_children): New function. | |
608 | (dereference_rvalue::visit_children): New function. | |
609 | (get_address_of_lvalue::visit_children): New function. | |
610 | (local::local): Call set_scope. | |
611 | (local::visit_children): New function. | |
612 | (statement::get_block): Make public. | |
613 | * libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro. | |
614 | (RETURN_NULL_IF_FAIL_PRINTF5): New macro. | |
615 | (gcc_jit_context_new_function): Verify that each param has | |
616 | not yet been used for creating another function. | |
617 | (gcc_jit_block_add_eval): After creating the stmt, verify | |
618 | that the rvalue expression tree is valid to use within it. | |
619 | (gcc_jit_block_add_assignment): Likewise for the lvalue and | |
620 | rvalue expression trees. | |
621 | (gcc_jit_block_add_assignment_op): Likewise. | |
622 | (gcc_jit_block_end_with_conditional): Likewise for the boolval | |
623 | expression tree. | |
624 | (gcc_jit_block_end_with_return): Likewise for the rvalue | |
625 | expression tree. | |
626 | (gcc_jit_block_end_with_void_return): Remove return of "void", | |
627 | now that block::end_with_return is now non-void. | |
628 | ||
1c35cc2c DM |
629 | 2015-01-12 David Malcolm <dmalcolm@redhat.com> |
630 | ||
631 | * jit-playback.c (gcc::jit::playback::context::read_dump_file): | |
632 | Add missing fclose on error-handling path. | |
633 | ||
791cfef8 DM |
634 | 2015-01-12 David Malcolm <dmalcolm@redhat.com> |
635 | ||
636 | * docs/cp/topics/expressions.rst (Global variables): Add | |
637 | enum gcc_jit_global_kind param to gccjit::context::new_global. | |
638 | * docs/topics/expressions.rst (Global variables): Likewise. | |
639 | Document the new enum. | |
640 | * docs/topics/results.rst (Compilation results): Document | |
641 | globals-handling. | |
642 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
643 | * dummy-frontend.c (jit_langhook_write_globals): Call into the | |
644 | playback context's write_global_decls_1 and write_global_decls_2 | |
645 | before and after calling symtab->finalize_compilation_unit (). | |
646 | * jit-playback.c: Include "debug.h". | |
647 | (gcc::jit::playback::context::new_global): Add "kind" param and | |
648 | use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the | |
649 | underlying VAR_DECL. Call varpool_node::get_create on the | |
650 | VAR_DECL, and add it to m_globals. | |
651 | (gcc::jit::playback::context::write_global_decls_1): New function. | |
652 | (gcc::jit::playback::context::write_global_decls_2): New function. | |
653 | * jit-playback.h (gcc::jit::playback::context::context): Call | |
654 | create on m_globals. | |
655 | (gcc::jit::playback::context::new_global): Add "kind" param. | |
656 | (gcc::jit::playback::context::write_global_decls_1): New function. | |
657 | (gcc::jit::playback::context::write_global_decls_2): New function. | |
658 | (gcc::jit::playback::context::m_globals): New field. | |
659 | * jit-recording.c (gcc::jit::recording::context::context): | |
660 | Initialize m_globals. | |
661 | (gcc::jit::recording::context::new_global): Add param "kind". | |
662 | Add the new global to m_globals. | |
663 | (gcc::jit::recording::context::dump_to_file): Dump the globals. | |
664 | (gcc::jit::recording::global::replay_into): Add field m_kind. | |
665 | (gcc::jit::recording::global::write_to_dump): New override. | |
666 | * jit-recording.h (gcc::jit::recording::context::new_global): Add | |
667 | param "kind". | |
668 | (gcc::jit::recording::context::m_globals): New field. | |
669 | (gcc::jit::recording::global::global): Add param kind. | |
670 | (gcc::jit::recording::global::write_to_dump): New override. | |
671 | (gcc::jit::recording::global::m_kind): New field. | |
672 | * jit-result.c (gcc::jit::result::get_global): New function. | |
673 | * jit-result.h (gcc::jit::result::get_global): New function. | |
674 | * libgccjit++.h (gccjit::context::new_global): Add "kind" param. | |
675 | * libgccjit.c (gcc_jit_context_new_global): Likewise. | |
676 | (gcc_jit_result_get_global): New API entrypoint. | |
677 | * libgccjit.h (gcc_jit_result_get_global): New API entrypoint. | |
678 | (enum gcc_jit_global_kind): New enum. | |
679 | (gcc_jit_context_new_global): API change: add "kind" param. | |
680 | * libgccjit.map (gcc_jit_result_get_global): New symbol. | |
681 | ||
860e981c DM |
682 | 2015-01-09 David Malcolm <dmalcolm@redhat.com> |
683 | ||
684 | * dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h", | |
685 | "symtab.h", "inchash.h". Move include of "hash-set.h" much | |
686 | earlier. | |
687 | * jit-builtins.c: Remove redundant includes of "opts.h" and | |
688 | "tree.h". | |
689 | * jit-common.h: Include "hash-set.h", "input.h", "vec.h", | |
690 | "double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h". | |
691 | * jit-playback.c: Include "hashtab.h", "machmode.h", "input.h", | |
692 | "statistics.h", "vec.h", "double-int.h", "real.h", | |
693 | "fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h", | |
694 | "inchash.h", "fold-const.h". Move include of "hash-set.h" to | |
695 | earlier. | |
696 | * jit-recording.c: Remove redundant includes of "opts.h" and | |
697 | "tree.h". | |
698 | ||
ccce3b2a DM |
699 | 2015-01-09 David Malcolm <dmalcolm@redhat.com> |
700 | ||
701 | * docs/cp/topics/expressions.rst (Simple expressions): Use | |
702 | ":c:type:" for C types. Document new overload of | |
703 | gcc::jit::context::new_rvalue. | |
704 | * docs/topics/expressions.rst (Simple expressions): Use | |
705 | ":c:type:" for C types. Document new entrypoint | |
706 | gcc_jit_context_new_rvalue_from_long. | |
707 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
708 | * jit-playback.c: Within namespace gcc::jit::playback... | |
709 | (context::new_rvalue_from_int): Eliminate in favor of... | |
710 | (context::new_rvalue_from_const <int>): ...this. | |
711 | (context::new_rvalue_from_double): Eliminate in favor of... | |
712 | (context::new_rvalue_from_const <double>): ...this. | |
713 | (context::new_rvalue_from_const <long>): New. | |
714 | (context::new_rvalue_from_ptr): Eliminate in favor of... | |
715 | (context::new_rvalue_from_const <void *>): ...this. | |
716 | * jit-playback.h: Within namespace gcc::jit::playback... | |
717 | (context::new_rvalue_from_int): Eliminate in favor of... | |
718 | (context::new_rvalue_from_const <HOST_TYPE>): ...this. | |
719 | (context::new_rvalue_from_double): Likewise. | |
720 | (context::new_rvalue_from_ptr): Likewise. | |
721 | * jit-recording.c: Within namespace gcc::jit::recording... | |
722 | (context::new_rvalue_from_int): Eliminate. | |
723 | (context::new_rvalue_from_double): Likewise. | |
724 | (context::new_rvalue_from_ptr): Likewise. | |
725 | (class memento_of_new_rvalue_from_const <int>): | |
726 | Add explicit specialization. | |
727 | (class memento_of_new_rvalue_from_const <long>): | |
728 | Likewise. | |
729 | (class memento_of_new_rvalue_from_const <double>): | |
730 | Likewise. | |
731 | (class memento_of_new_rvalue_from_const <void *>): | |
732 | Likewise. | |
733 | (memento_of_new_rvalue_from_int::replay_into): | |
734 | Generalize into... | |
735 | (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into): | |
736 | ...this... | |
737 | (memento_of_new_rvalue_from_double::replay_into): | |
738 | ...allowing this... | |
739 | (memento_of_new_rvalue_from_ptr::replay_into): | |
740 | ...and this to be deleted. | |
741 | (memento_of_new_rvalue_from_int::make_debug_string): | |
742 | Convert to... | |
743 | (memento_of_new_rvalue_from_const <int>::make_debug_string): | |
744 | ...this. | |
745 | (memento_of_new_rvalue_from_double::make_debug_string): | |
746 | Convert to... | |
747 | (memento_of_new_rvalue_from_const <double>::make_debug_string): | |
748 | ...this. | |
749 | (memento_of_new_rvalue_from_ptr::make_debug_string) | |
750 | Convert to... | |
751 | (memento_of_new_rvalue_from_const <void *>::make_debug_string): | |
752 | ...this. | |
753 | (memento_of_new_rvalue_from_const <long>::make_debug_string): | |
754 | New function. | |
755 | * jit-recording.h: Within namespace gcc::jit::recording... | |
756 | (context::new_rvalue_from_int): Eliminate. | |
757 | (context::new_rvalue_from_double): Likewise. | |
758 | (context::new_rvalue_from_ptr): Likewise, all in favor of... | |
759 | (context::new_rvalue_from_const <HOST_TYPE>): New family of | |
760 | methods. | |
761 | (class memento_of_new_rvalue_from_int): Eliminate. | |
762 | (class memento_of_new_rvalue_from_double): Likewise. | |
763 | (class memento_of_new_rvalue_from_ptr): Likewise. | |
764 | (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family | |
765 | of rvalue subclasses. | |
766 | * libgccjit++.h (gccjit::context::new_rvalue): New overload, for | |
767 | "long". | |
768 | * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for | |
769 | rewriting of recording::context::new_rvalue_from_int to | |
770 | recording::context::new_rvalue_from_const <int>. | |
771 | (gcc_jit_context_new_rvalue_from_long): New API entrypoint. | |
772 | (gcc_jit_context_new_rvalue_from_double): Update for | |
773 | rewriting of recording::context::new_rvalue_from_double to | |
774 | recording::context::new_rvalue_from_const <double>. | |
775 | (gcc_jit_context_new_rvalue_from_ptr): Update for | |
776 | rewriting of recording::context::new_rvalue_from_ptr to | |
777 | recording::context::new_rvalue_from_const <void *>. | |
778 | * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API | |
779 | entrypoint. | |
780 | * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise. | |
781 | ||
d2286af3 DM |
782 | 2015-01-09 David Malcolm <dmalcolm@redhat.com> |
783 | ||
784 | PR jit/64206 | |
785 | * docs/internals/test-hello-world.exe.log.txt: Update, the log now | |
786 | shows tempdir creation/cleanup. | |
787 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
788 | * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir | |
789 | to the list of subclasses in the comment. | |
790 | * jit-playback.c (gcc::jit::playback::context::context): Add a | |
791 | comment clarifying when the tempdir gets cleaned up. | |
792 | (gcc::jit::playback::context::compile): Pass the context's logger, | |
793 | if any, to the tempdir. | |
794 | (gcc::jit::playback::context::dlopen_built_dso): When creating the | |
795 | gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand | |
796 | over ownership of the tempdir to it. | |
797 | * jit-result.c: Include "jit-tempdir.h". | |
798 | (gcc::jit::result::result): Add tempdir param, saving it as | |
799 | m_tempdir. | |
800 | (gcc::jit::result::~result): Delete m_tempdir. | |
801 | * jit-result.h (gcc::jit::result::result): Add tempdir param. | |
802 | (gcc::jit::result::m_tempdir): New field. | |
803 | * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param; | |
804 | add JIT_LOG_SCOPE. | |
805 | (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit, | |
806 | and log m_path_template and m_path_tempdir. | |
807 | (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log | |
808 | entry/exit, and log the unlink and rmdir calls. | |
809 | * jit-tempdir.h: Include "jit-logging.h". | |
810 | (class gcc::jit::tempdir): Make this be a subclass of log_user. | |
811 | (gcc::jit::tempdir::tempdir): Add logger param. | |
812 | * notes.txt: Update to show the two possible places where the | |
813 | tempdir can be cleaned up. | |
814 | ||
7c8db13e DM |
815 | 2015-01-08 David Malcolm <dmalcolm@redhat.com> |
816 | ||
817 | * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive | |
818 | comment. | |
819 | ||
303e1d56 DM |
820 | 2015-01-08 David Malcolm <dmalcolm@redhat.com> |
821 | ||
822 | * docs/topics/contexts.rst (Error-handling): Document new | |
823 | entrypoint gcc_jit_context_get_last_error. | |
824 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
825 | * jit-recording.c (gcc::jit::recording::context::context): | |
826 | Initialize new fields "m_last_error_str" and | |
827 | "m_owns_last_error_str". | |
828 | (gcc::jit::recording::context::~context): Clean up | |
829 | m_last_error_str, if needed. | |
830 | (gcc::jit::recording::context::add_error_va): Update | |
831 | m_last_error_str and m_owns_last_error_str, freeing the old | |
832 | value if appropriate. | |
833 | (gcc::jit::recording::context::get_last_error): New function. | |
834 | * jit-recording.h (gcc::jit::recording::context::get_last_error): | |
835 | New function. | |
836 | (gcc::jit::recording::context): New fields m_last_error_str and | |
837 | m_owns_last_error_str. | |
838 | * libgccjit.c (gcc_jit_context_get_last_error): New function. | |
839 | * libgccjit.h (gcc_jit_context_get_last_error): New declaration. | |
840 | * libgccjit.map (gcc_jit_context_get_last_error): New function. | |
841 | ||
eb4c16eb DM |
842 | 2015-01-08 David Malcolm <dmalcolm@redhat.com> |
843 | ||
844 | * Make-lang.in (jit_OBJS): Add jit/jit-logging.o. | |
845 | * docs/internals/index.rst (Overview of code structure): Mention | |
846 | gcc_jit_context_set_logfile, and embed the example logfile. | |
847 | * docs/internals/test-hello-world.exe.log.txt: New file: example | |
848 | of a logfile. | |
849 | * docs/topics/contexts.rst (Debugging): Add documentation | |
850 | for gcc_jit_context_set_logfile. | |
851 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
852 | * dummy-frontend.c: Include "jit-logging.h". | |
853 | (jit_langhook_init): Assert that there is an active playback | |
854 | context. If it has a logger, log entry/exit to this function. | |
855 | (jit_langhook_write_globals): Likewise. | |
856 | * jit-common.h (gcc::jit::logger): New forward declaration. | |
857 | * jit-logging.c: New file. | |
858 | * jit-logging.h: New file. | |
859 | * jit-playback.c: Include "jit-logging.h". | |
860 | (gcc::jit::playback::context::context): Initialize the log_user | |
861 | base class from the recording context's logger (if any). Use | |
862 | JIT_LOG_SCOPE to log entry/exit from the function body. | |
863 | (gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to | |
864 | log entry/exit from the function body. | |
865 | (gcc::jit::playback::build_stmt_list): Likewise. | |
866 | (gcc::jit::playback::function::postprocess): Likewise. | |
867 | (gcc::jit::playback::context::compile): Likewise. Log the | |
868 | entry/exit to toplev::main and toplev::finalize. Log the | |
869 | fake argv passed to toplev::main. | |
870 | (gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to | |
871 | log entry/exit from the function body. | |
872 | (gcc::jit::playback::context::release_mutex): Likewise. | |
873 | (gcc::jit::playback::context::make_fake_args): Likewise. | |
874 | (gcc::jit::playback::context::extract_any_requested_dumps): | |
875 | Likewise. | |
876 | (gcc::jit::playback::context::convert_to_dso): Likewise. Also, | |
877 | log the arguments that the driver is invoked with. | |
878 | (gcc::jit::playback::context::dlopen_built_dso): Likewise. Pass | |
879 | the logger to the result object. | |
880 | (gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to | |
881 | log entry/exit from the function body. | |
882 | (gcc::jit::playback::context::dump_generated_code): Likewise. | |
883 | (gcc::jit::playback::context::handle_locations): Likewise. | |
884 | * jit-playback.h (gcc::jit::playback::context): Make this be | |
885 | a subclass of gcc::jit::log_user. | |
886 | * jit-recording.c: Include "jit-logging.h". | |
887 | (gcc::jit::recording::context::context: Initialize the logger to | |
888 | NULL for root contexts, or to the parent's logger for child | |
889 | contexts. | |
890 | (gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to | |
891 | log entry/exit from the function body. | |
892 | (gcc::jit::recording::context::replay_into): Likewise. | |
893 | (gcc::jit::recording::context::disassociate_from_playback): | |
894 | Likewise. | |
895 | (gcc::jit::recording::context::compile): Likewise. | |
896 | (recording::context::add_error_va): Likewise. Also, log the | |
897 | error. | |
898 | (gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to | |
899 | log entry/exit from the function body. | |
900 | * jit-recording.h: Include "jit-logging.h". | |
901 | (gcc::jit::recording::context): Make this be a subclass of | |
902 | gcc::jit::log_user. | |
903 | * jit-result.c: Include "jit-common.h" and "jit-logging.h". | |
904 | (gcc::jit::result::result): Add logger param, recording it. | |
905 | Use JIT_LOG_SCOPE to log entry/exit from the function body. | |
906 | (gcc::jit::result::~result(): Use JIT_LOG_SCOPE to | |
907 | log entry/exit from the function body. | |
908 | (gcc::jit::result::get_code): Likewise. | |
909 | * jit-result.h (gcc::jit::result): Make this be a subclass of | |
910 | gcc::jit::log_user. | |
911 | (gcc::jit::result::result): Add logger parameter. | |
912 | * libgccjit++.h (gccjit::context::set_logfile): New function. | |
913 | * libgccjit.c: Include "jit-logging.h". | |
914 | (gcc_jit_context_acquire): Log the context. | |
915 | (gcc_jit_context_release): Use JIT_LOG_FUNC to | |
916 | log entry/exit from the function body, and log the context. | |
917 | (gcc_jit_context_new_child_context): Likewise, logging both | |
918 | contexts. | |
919 | (gcc_jit_context_new_location): Use JIT_LOG_FUNC to | |
920 | log entry/exit from the function body. | |
921 | (gcc_jit_context_get_type): Likewise. | |
922 | (gcc_jit_context_get_int_type): Likewise. | |
923 | (gcc_jit_context_new_array_type): Likewise. | |
924 | (gcc_jit_context_new_field): Likewise. | |
925 | (gcc_jit_context_new_struct_type): Likewise. | |
926 | (gcc_jit_context_new_opaque_struct): Likewise. | |
927 | (gcc_jit_struct_set_fields): Likewise. | |
928 | (gcc_jit_context_new_union_type): Likewise. | |
929 | (gcc_jit_context_new_function_ptr_type): Likewise. | |
930 | (gcc_jit_context_new_param): Likewise. | |
931 | (gcc_jit_context_new_function): Likewise. | |
932 | (gcc_jit_context_get_builtin_function): Likewise. | |
933 | (gcc_jit_function_get_param): Likewise. | |
934 | (gcc_jit_function_dump_to_dot): Likewise. | |
935 | (gcc_jit_function_new_block): Likewise. | |
936 | (gcc_jit_context_new_global): Likewise. | |
937 | (gcc_jit_context_new_rvalue_from_int): Likewise. | |
938 | (gcc_jit_context_zero): Likewise. | |
939 | (gcc_jit_context_one): Likewise. | |
940 | (gcc_jit_context_new_rvalue_from_double): Likewise. | |
941 | (gcc_jit_context_new_rvalue_from_ptr): Likewise. | |
942 | (gcc_jit_context_null): Likewise. | |
943 | (gcc_jit_context_new_string_literal): Likewise. | |
944 | (gcc_jit_context_new_unary_op): Likewise. | |
945 | (gcc_jit_context_new_binary_op): Likewise. | |
946 | (gcc_jit_context_new_comparison): Likewise. | |
947 | (gcc_jit_context_new_call): Likewise. | |
948 | (gcc_jit_context_new_call_through_ptr): Likewise. | |
949 | (gcc_jit_context_new_cast): Likewise. | |
950 | (gcc_jit_context_new_array_access): Likewise. | |
951 | (gcc_jit_lvalue_access_field): Likewise. | |
952 | (gcc_jit_rvalue_access_field): Likewise. | |
953 | (gcc_jit_rvalue_dereference_field): Likewise. | |
954 | (gcc_jit_rvalue_dereference): Likewise. | |
955 | (gcc_jit_lvalue_get_address): Likewise. | |
956 | (gcc_jit_function_new_local): Likewise. | |
957 | (gcc_jit_block_add_eval): Likewise. | |
958 | (gcc_jit_block_add_assignment): Likewise. | |
959 | (gcc_jit_block_add_assignment_op): Likewise. | |
960 | (gcc_jit_block_end_with_conditional): Likewise. | |
961 | (gcc_jit_block_add_comment): Likewise. | |
962 | (gcc_jit_block_end_with_jump): Likewise. | |
963 | (gcc_jit_block_end_with_return): Likewise. | |
964 | (gcc_jit_block_end_with_void_return): Likewise. | |
965 | (gcc_jit_context_set_str_option): Likewise. | |
966 | (gcc_jit_context_set_int_option): Likewise. | |
967 | (gcc_jit_context_set_bool_option): Likewise. | |
968 | (gcc_jit_context_enable_dump): Likewise. | |
969 | (gcc_jit_context_compile): Likewise. Also log the context, | |
970 | and the result. | |
971 | (gcc_jit_context_dump_to_file): Likewise. | |
972 | (gcc_jit_context_set_logfile): New function. | |
973 | (gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to | |
974 | log entry/exit from the function body. | |
975 | (gcc_jit_result_get_code): Likewise. Also log the fnname) | |
976 | and the ptr to be returned. | |
977 | (gcc_jit_result_release): Likewise. Also log the result. | |
978 | * libgccjit.h: Include <stdio.h>, since we need FILE *. | |
979 | (gcc_jit_context_set_logfile): New declaration. | |
980 | * libgccjit.map (gcc_jit_context_set_logfile): New. | |
981 | ||
c211cd23 DM |
982 | 2015-01-07 David Malcolm <dmalcolm@redhat.com> |
983 | ||
984 | * jit-recording.h (gcc::jit::recording::type::is_void): New | |
985 | virtual function. | |
986 | (gcc::jit::recording::memento_of_get_type::is_void): New | |
987 | function, overriding default implementation. | |
988 | * libgccjit.c (gcc_jit_rvalue_dereference): Verify that | |
989 | the underlying type is not "void". | |
990 | ||
18146f45 DM |
991 | 2015-01-07 David Malcolm <dmalcolm@redhat.com> |
992 | ||
993 | * docs/topics/expressions.rst (Unary Operations): Add | |
994 | GCC_JIT_UNARY_OP_ABS. | |
995 | * jit-playback.c (gcc::jit::playback::context::new_unary_op): | |
996 | Likewise. | |
997 | * jit-recording.c (unary_op_strings): Likewise. | |
998 | * libgccjit.c (gcc_jit_context_new_unary_op): Update checking | |
999 | of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS. | |
1000 | * libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS. | |
1001 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1002 | ||
11af98ff DM |
1003 | 2015-01-07 David Malcolm <dmalcolm@redhat.com> |
1004 | ||
1005 | * jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix | |
1006 | typo in comment. | |
1007 | ||
433d16df DM |
1008 | 2015-01-07 David Malcolm <dmalcolm@redhat.com> |
1009 | ||
1010 | * TODO.rst (Test suite): Remove item about running C++ testcases. | |
1011 | * docs/internals/index.rst (Working on the JIT library): Add | |
1012 | "c++" to the enabled languages in the suggested "configure" | |
1013 | invocation, and add a description of why this is necessary. | |
1014 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1015 | ||
50bb6c8e DM |
1016 | 2015-01-07 David Malcolm <dmalcolm@redhat.com> |
1017 | ||
1018 | * docs/internals/index.rst: Update to reflect that built | |
1019 | testcases are now test-foo.c.exe, rather than test-foo.exe. | |
1020 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1021 | ||
1e3b6a3d JJ |
1022 | 2015-01-05 Jakub Jelinek <jakub@redhat.com> |
1023 | ||
1024 | Update copyright years. | |
1025 | ||
e8af59bc DM |
1026 | 2014-12-19 David Malcolm <dmalcolm@redhat.com> |
1027 | ||
1028 | * jit-playback.c (gcc::jit::playback::context::build_cast): In | |
1029 | case BOOLEAN_TYPE, don't assume that the source expression is | |
1030 | of type "int". | |
1031 | ||
5afd44e3 DM |
1032 | 2014-12-19 David Malcolm <dmalcolm@redhat.com> |
1033 | ||
1034 | * jit-recording.c (gcc::jit::recording::context::context): When | |
1035 | copying string options from a parent context, take a copy of the | |
1036 | underlying buffers, rather than simply copying the pointer. | |
1037 | ||
1f0858d7 DM |
1038 | 2014-12-19 David Malcolm <dmalcolm@redhat.com> |
1039 | ||
1040 | * jit-recording.c (gcc::jit::recording::context::set_str_option): | |
1041 | Handle NULL. | |
1042 | ||
35291c7d DM |
1043 | 2014-12-11 David Malcolm <dmalcolm@redhat.com> |
1044 | ||
1045 | * docs/cp/topics/contexts.rst (gccjit::context::set_str_option): | |
1046 | Document new function. | |
1047 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1048 | ||
7b31ff5e DM |
1049 | 2014-12-10 Ulrich Drepper <drepper@gmail.com> |
1050 | ||
1051 | Minor interface cleanups of libgccjit | |
1052 | * jit-playback.c (convert_to_dso): Use auto_vec instead | |
1053 | of automatic array to build up command line. | |
1054 | * jit-recording.c (recording::context::set_str_option): | |
1055 | Make copy of the string. | |
1056 | (recording::context::~context): Free string options. | |
1057 | * jit-recording.h (recording::context): Adjust type | |
1058 | of m_str_options member. | |
1059 | * libgccjit.h: Adjust comment about | |
1060 | gcc_jit_context_set_str_option parameter being used after | |
1061 | the call. | |
1062 | Update comment now that all interfaces are copy strings | |
1063 | if necessary. | |
1064 | * libgccjit++.h (gccjit::context): Add set_str_option | |
1065 | member function. | |
1066 | ||
29df5715 DM |
1067 | 2014-12-10 David Malcolm <dmalcolm@redhat.com> |
1068 | ||
1069 | * docs/cp/index.rst: New file. | |
1070 | * docs/cp/intro/index.rst: New file. | |
1071 | * docs/cp/intro/tutorial01.rst: New file. | |
1072 | * docs/cp/intro/tutorial02.rst: New file. | |
1073 | * docs/cp/intro/tutorial03.rst: New file. | |
1074 | * docs/cp/intro/tutorial04.rst: New file. | |
1075 | * docs/cp/topics/contexts.rst: New file. | |
1076 | * docs/cp/topics/expressions.rst: New file. | |
1077 | * docs/cp/topics/functions.rst: New file. | |
1078 | * docs/cp/topics/index.rst: New file. | |
1079 | * docs/cp/topics/locations.rst: New file. | |
1080 | * docs/cp/topics/objects.rst: New file. | |
1081 | * docs/cp/topics/results.rst: New file. | |
1082 | * docs/cp/topics/types.rst: New file. | |
1083 | * docs/examples/tut01-hello-world.cc: New file. | |
1084 | * docs/examples/tut02-square.c: Fix missing newline in output. | |
1085 | * docs/examples/tut02-square.cc: New file. | |
1086 | * docs/examples/tut03-sum-of-squares.cc: New file. | |
1087 | * docs/examples/tut04-toyvm/toyvm.cc: New file. | |
1088 | * docs/index.rst: Move summary to above the table of contents. | |
1089 | Add text about the C vs C++ APIs. | |
1090 | * docs/topics/contexts.rst: Fix a typo. | |
1091 | ||
1092 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1093 | * docs/_build/texinfo/factorial1.png: New file. | |
1094 | * docs/_build/texinfo/sum-of-squares1.png: New file. | |
1095 | ||
5cd614ce DM |
1096 | 2014-12-09 David Malcolm <dmalcolm@redhat.com> |
1097 | ||
1098 | * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move | |
1099 | logic for determine "funcname" to new function... | |
1100 | (get_function_name): ...here, adding logic to skip any leading | |
1101 | path from the filename. | |
1102 | (toyvm_function_parse): Use the filename for fn_filename, rather | |
1103 | than "name", so that the debugger can locate the source .toy | |
1104 | file. | |
1105 | (toyvm_function_parse): Don't fclose a NULL FILE *. | |
1106 | ||
2712de78 DM |
1107 | 2014-12-09 David Malcolm <dmalcolm@redhat.com> |
1108 | ||
1109 | PR jit/63854 | |
1110 | * docs/internals/index.rst (Running under valgrind): New | |
1111 | subsection. | |
1112 | (docs/_build/texinfo/libgccjit.texi): Regenerate. | |
1113 | ||
d1e5f2c7 DM |
1114 | 2014-12-09 David Malcolm <dmalcolm@redhat.com> |
1115 | ||
1116 | PR jit/64206 | |
1117 | * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o. | |
1118 | * jit-common.h (gcc::jit::tempdir): New forward decl. | |
1119 | * jit-playback.c: Include jit-tempdir.h. | |
1120 | (gcc::jit::playback::context::context): Initialize m_tempdir. | |
1121 | (gcc::jit::playback::context::~context): Move tempdir | |
1122 | cleanup to new file jit-tempdir.c | |
1123 | (make_tempdir_path_template): Move to new file jit-tempdir.c. | |
1124 | (gcc::jit::playback::context::compile): Move tempdir creation | |
1125 | to new tempdir object in new file jit-tempdir.c. | |
1126 | (gcc::jit::playback::context::make_fake_args): Get path from | |
1127 | tempdir object rather than from member data. | |
1128 | (gcc::jit::playback::context::convert_to_dso): Likewise. | |
1129 | (gcc::jit::playback::context::dlopen_built_dso): Likewise. | |
1130 | (gcc::jit::playback::context::dump_generated_code): Likewise. | |
1131 | (gcc::jit::playback::context::get_path_c_file): New function. | |
1132 | (gcc::jit::playback::context::get_path_s_file): New function. | |
1133 | (gcc::jit::playback::context::get_path_so_file): New function. | |
1134 | * jit-playback.h (gcc::jit::playback::context::get_path_c_file): | |
1135 | New function. | |
1136 | (gcc::jit::playback::context::get_path_s_file): New function. | |
1137 | (gcc::jit::playback::context::get_path_so_file): New function. | |
1138 | (gcc::jit::playback::context): Move fields "m_path_template", | |
1139 | "m_path_tempdir", "m_path_c_file", "m_path_s_file", | |
1140 | "m_path_so_file" to new jit::tempdir class; add field "m_tempdir". | |
1141 | * jit-tempdir.c: New file. | |
1142 | * jit-tempdir.h: New file. | |
1143 | ||
38771e4e DM |
1144 | 2014-12-09 David Malcolm <dmalcolm@redhat.com> |
1145 | ||
1146 | * jit-playback.c (gcc::jit::playback::context::compile): Acquire the | |
1147 | mutex here, immediately before using toplev, and release it here, on | |
1148 | each exit path after acquisition. | |
1149 | (jit_mutex): Move this variable here, from jit-recording.c. | |
1150 | (gcc::jit::playback::context::acquire_mutex): New function, based on | |
1151 | code in jit-recording.c. | |
1152 | (gcc::jit::playback::context::release_mutex): Likewise. | |
1153 | * jit-playback.h (gcc::jit::playback::context::acquire_mutex): New | |
1154 | function. | |
1155 | (gcc::jit::playback::context::release_mutex): New function. | |
1156 | * jit-recording.c (jit_mutex): Move this variable to jit-playback.c. | |
1157 | (gcc::jit::recording::context::compile): Move mutex-handling from | |
1158 | here into jit-playback.c's gcc::jit::playback::context::compile. | |
1159 | * notes.txt: Update to show the new locations of ACQUIRE_MUTEX | |
1160 | and RELEASE_MUTEX. | |
1161 | ||
38f4f641 DM |
1162 | 2014-12-09 David Malcolm <dmalcolm@redhat.com> |
1163 | ||
1164 | * jit-playback.c (gcc::jit::playback::context::compile): Move the | |
1165 | dlopen code into... | |
1166 | (gcc::jit::playback::context::dlopen_built_dso): ...this new | |
1167 | function. | |
1168 | * jit-playback.h (gcc::jit::playback::context::dlopen_built_dso): | |
1169 | New function. | |
1170 | ||
82e0c914 DM |
1171 | 2014-12-09 David Malcolm <dmalcolm@redhat.com> |
1172 | ||
1173 | PR jit/64166 | |
1174 | * docs/topics/contexts.rst (Debugging): Add description of | |
1175 | gcc_jit_context_enable_dump. | |
1176 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1177 | * jit-playback.c: Include context.h. | |
1178 | (class auto_argvec): New class. | |
1179 | (auto_argvec::~auto_argvec): New function. | |
1180 | (gcc::jit::playback::context::compile): Convert fake_args to be | |
1181 | an auto_argvec, so that it can contain dynamically-allocated | |
1182 | strings. Construct a vec of all requested dumps, and pass it to | |
1183 | make_fake_args. Extract requested dumps between the calls to | |
1184 | toplev::main and toplev::finalize. | |
1185 | (gcc::jit::playback::context::make_fake_args): Convert param | |
1186 | "argvec" to be a vec <char *>, and gain a "requested_dumps" | |
1187 | param. Convert to dynamically-allocated arg strings by converting | |
1188 | ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP | |
1189 | for args that are already a copy. Add args for all requested dumps. | |
1190 | (gcc::jit::playback::context::extract_any_requested_dumps): New | |
1191 | function. | |
1192 | (gcc::jit::playback::context::read_dump_file): New function. | |
1193 | * jit-playback.h (gcc::jit::playback::context::make_fake_args): | |
1194 | Convert param "argvec" to be a vec <char *>, and gain a | |
1195 | "requested_dumps" param. | |
1196 | (gcc::jit::playback::context::extract_any_requested_dumps): New | |
1197 | function. | |
1198 | (gcc::jit::playback::context::read_dump_file): New function. | |
1199 | * jit-recording.c (gcc::jit::recording::context::enable_dump): New | |
1200 | function. | |
1201 | (gcc::jit::recording::context::get_all_requested_dumps): New | |
1202 | function. | |
1203 | * jit-recording.h (gcc::jit::recording::requested_dump): New | |
1204 | struct. | |
1205 | (gcc::jit::recording::context::enable_dump): New function. | |
1206 | (gcc::jit::recording::context::get_all_requested_dumps): New | |
1207 | function. | |
1208 | (gcc::jit::recording::context::m_requested_dumps): New field. | |
1209 | * libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint. | |
1210 | * libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint. | |
1211 | * libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint. | |
1212 | ||
53b730ff DM |
1213 | 2014-12-08 David Malcolm <dmalcolm@redhat.com> |
1214 | ||
1215 | * libgccjit++.h: Indent the forward declarations of the classes to | |
1216 | show the inheritance hierarchy. | |
1217 | ||
0f379445 DM |
1218 | 2014-12-08 David Malcolm <dmalcolm@redhat.com> |
1219 | ||
1220 | * notes.txt: Show the beginning and ending of | |
1221 | recording::context::compile vs playback::context::compile. Show | |
1222 | the creation and unlinking of the tempdir. Show toplev::finalize. | |
1223 | Move "RELEASE MUTEX" to the correct location. Show | |
1224 | gcc_jit_result_release, and indicate where the | |
1225 | dlopen/dlsym/dlclose occur. | |
1226 | ||
81ba15f1 DM |
1227 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1228 | ||
1229 | * docs/examples/tut02-square.c (main): Release the context | |
1230 | earlier, to show that this is possible. Update error-handling | |
1231 | to avoid a double-release of the context, and to avoid | |
1232 | releasing a NULL result. | |
1233 | * docs/intro/tutorial02.rst: Discuss gcc_jit_context_release. | |
1234 | * docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize | |
1235 | * docs/topics/results.rst (gcc_jit_result): Mention that this | |
1236 | controls the lifetimes of machine code functions. | |
1237 | (gcc_jit_result_get_code): Spell out the requirements for this | |
1238 | to succeed, and the lifetime of the result. | |
1239 | (gcc_jit_result_release): Mention that this invalidates any code | |
1240 | that was obtained from the result. | |
1241 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1242 | ||
e250f0dc DM |
1243 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1244 | ||
1245 | PR jit/64018 | |
1246 | * docs/intro/tutorial02.rst: Spell out lifetime of generated code. | |
1247 | Add description of error-handling, taken in part from... | |
1248 | * docs/topics/contexts.rst (Error-handling): Expand, and move some | |
1249 | content to tutorial02.rst. | |
1250 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1251 | ||
eeafb319 DM |
1252 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1253 | ||
1254 | PR jit/64020 | |
1255 | * docs/topics/types.rst (Standard types) Add new enum values to | |
1256 | the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT, | |
1257 | GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE. | |
1258 | Widen the left-hand column so that | |
1259 | GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit. | |
1260 | * docs/_build/texinfo/libgccjit.texi: Regenerate. | |
1261 | ||
1262 | * jit-builtins.c: Include stringpool.h and jit-playback.h. | |
1263 | Move everything out of the gcc::jit::recording namespace into | |
1264 | just gcc::jit. | |
1265 | (struct builtin_data): Add fields "fnclass", "attr", and | |
1266 | "implicit_p". | |
1267 | (DEF_BUILTIN): Update macro so populate the new fields. | |
1268 | (builtins_manager::builtins_manager): Update for move out of | |
1269 | recording namespace. Initialize the m_attributes array. | |
1270 | (builtins_manager::get_builtin_function): Likewise. | |
1271 | (builtins_manager::get_builtin_function_by_id): New function. | |
1272 | (builtins_manager::make_builtin_function): Update for move out of | |
1273 | recording namespace. Add fix for PR jit/64020 by detecting | |
1274 | specific builtin ids and having them ensure that builtins for | |
1275 | other ids are created as necessary. | |
1276 | (builtins_manager::get_type): Update for move out of recording | |
1277 | namespace. | |
1278 | (builtins_manager::make_type): Likewise. Add some missing | |
1279 | #undefs. | |
1280 | (builtins_manager::make_primitive_type): Update for move out of | |
1281 | recording namespace. Implement the three BT_COMPLEX_ cases and | |
1282 | BT_DOUBLE_PTR. | |
1283 | (builtins_manager::make_fn_type): Update for move out of recording | |
1284 | namespace. | |
1285 | (builtins_manager::make_ptr_type): Likewise. | |
1286 | (builtins_manager::finish_playback): New function. | |
1287 | (builtins_manager::get_class): New function. | |
1288 | (builtins_manager::implicit_p): New function. | |
1289 | (builtins_manager::get_attrs_tree): Two new functions. | |
1290 | (builtins_manager::make_attrs_tree): New function. | |
1291 | ||
1292 | * jit-builtins.h: Move everything out of the gcc::jit::recording | |
1293 | namespace into just gcc::jit. | |
1294 | (enum built_in_attribute): New. | |
1295 | (builtins_manager::builtins_manager): Update decl for namespace | |
1296 | change. | |
1297 | (builtins_manager::get_builtin_function): Likewise. | |
1298 | (builtins_manager::get_class): New. | |
1299 | (builtins_manager::implicit_p): New. | |
1300 | (builtins_manager::get_attrs_tree): Two new functions. | |
1301 | (builtins_manager::make_attrs_tree): New function. | |
1302 | (builtins_manager::finish_playback): New. | |
1303 | (builtins_manager::get_builtin_function_by_id): New. | |
1304 | (builtins_manager::make_builtin_function): Update decl for | |
1305 | namespace change. | |
1306 | (builtins_manager::get_type): Likewise. | |
1307 | (builtins_manager::make_type): Likewise. | |
1308 | (builtins_manager::make_primitive_type): Likewise. | |
1309 | (builtins_manager::make_fn_type): Likewise. | |
1310 | (builtins_manager::make_ptr_type): Likewise. | |
1311 | (builtins_manager): Likewise for fields. Add new field | |
1312 | "m_attributes". | |
1313 | ||
1314 | * jit-common.h (NUM_GCC_JIT_TYPES): Update. | |
1315 | (builtins_manager): Update forward decl to reflect namespace | |
1316 | change. | |
1317 | ||
1318 | * jit-playback.c: Include attribs.h and jit-builtins.h. | |
1319 | (gcc::jit::playback::context::get_tree_node_for_type): Add cases | |
1320 | for the new COMPLEX_ types. | |
1321 | (gcc::jit::playback::context::new_function): If creating a | |
1322 | builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl, | |
1323 | and call set_builtin_decl. | |
1324 | (gcc::jit::playback::context::replay): If we have a | |
1325 | builtins_manager, call its finish_playback method when we're done. | |
1326 | ||
1327 | * jit-playback.h: | |
1328 | (gcc::jit::playback::context::get_builtins_manager): New function. | |
1329 | ||
1330 | * jit-recording.c | |
1331 | (gcc::jit::recording::context::get_builtins_manager): New function. | |
1332 | (gcc::jit::recording::get_builtin_function): Use | |
1333 | get_builtins_manager, in case we're a child context. | |
1334 | (gcc::jit::recording::memento_of_get_type::dereference): Add the | |
1335 | COMPLEX_ types. | |
1336 | (gcc::jit::recording::memento_of_get_type::is_int): Likewise. | |
1337 | (gcc::jit::recording::memento_of_get_type::is_float): Likewise. | |
1338 | (gcc::jit::recording::memento_of_get_type::is_bool): Likewise. | |
1339 | (get_type_strings): Likewise. | |
1340 | ||
1341 | * jit-recording.h | |
1342 | (gcc::jit::recording::context::get_builtins_manager): New. | |
1343 | ||
1344 | * libgccjit.h (enum gcc_jit_types): Add | |
1345 | GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE, | |
1346 | GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE. | |
1347 | ||
23844fd7 DM |
1348 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1349 | ||
1350 | * jit-builtins.c | |
1351 | (gcc::jit::recording::builtins_manager::get_builtin_function): | |
1352 | Check for NULL return from make_builtin_function. | |
1353 | (gcc::jit::recording::builtins_manager::make_builtin_function): | |
1354 | Check for NULL return from get_type. | |
1355 | ||
c6760a13 DM |
1356 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1357 | ||
1358 | * jit-playback.c (gcc::jit::playback::context::compile): Move DSO | |
1359 | creation code into... | |
1360 | (gcc::jit::playback::context::convert_to_dso): New function. | |
1361 | * jit-playback.h (gcc::jit::playback::context::convert_to_dso): | |
1362 | New function. | |
1363 | ||
8f50ee3c DM |
1364 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1365 | ||
1366 | * jit-playback.c (gcc::jit::playback::context::compile): Use an | |
1367 | auto_vec<const char *> rather than a const char *[20] for the | |
1368 | top-level argv, and move the logic to build it to... | |
1369 | (gcc::jit::playback::context::make_fake_args): New function. | |
1370 | * jit-playback.h (gcc::jit::playback::context::make_fake_args): | |
1371 | New function. | |
1372 | ||
56dea35f DM |
1373 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1374 | ||
1375 | * Make-lang.in (jit_OBJS): Add jit/jit-result.o. | |
1376 | * jit-playback.c: Include new header jit-result.h. | |
1377 | (gcc::jit::result::result): Move to new file jit-result.c. | |
1378 | (gcc::jit::result::~result): Likewise. | |
1379 | (gcc::jit::playback::result): Likewise. | |
1380 | * jit-recording.h (class gcc::jit::result): Move to new | |
1381 | header jit-result.h. | |
1382 | * jit-result.c: New file, to contain... | |
1383 | (gcc::jit::result::result): Move here from jit-playback.c, | |
1384 | removing erroneous "playback" namespace from comment. | |
1385 | (gcc::jit::result::~result): Likewise. | |
1386 | (gcc::jit::playback::result): Likewise. | |
1387 | * jit-result.h: New file, to contain... | |
1388 | (class gcc::jit::result): Move from jit-recording.h. | |
1389 | * libgccjit.c: Include jit-result.h. | |
1390 | (gcc_jit_result_get_code): Update comment to reflect move | |
1391 | of implementation. | |
1392 | (gcc_jit_result_release): Likewise. | |
1393 | ||
52b9468f DM |
1394 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1395 | ||
1396 | PR jit/63854 | |
1397 | * docs/examples/tut04-toyvm/toyvm.c | |
1398 | (toyvm_compiled_function): New typedef. | |
1399 | (toyvm_compiled_func) Rename to... | |
1400 | (toyvm_compiled_code) ...this. | |
1401 | (struct toyvm_compiled_function): New struct. | |
1402 | (toyvm_function_compile): Return a toyvm_compiled_function * | |
1403 | rather than a toyvm_compiled_func, so that the caller can fully | |
1404 | clean things up. Free "funcname". | |
1405 | (test_script): Update for change to toyvm_function_compile. | |
1406 | Clean up the toyvm_compiled_function. | |
1407 | (main): Likewise. | |
1408 | (docs/intro/tutorial04.rst): Update to reflect the above changes, | |
1409 | and to better spell out the lifetime of the compiled code. | |
1410 | ||
c8d19a69 DM |
1411 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1412 | ||
1413 | PR jit/63854 | |
1414 | * jit-builtins.c | |
1415 | (gcc::jit::recording::builtins_manager::make_fn_type): Call the | |
1416 | context's new_function_type method, rather than directly creating | |
1417 | a function_type instance. | |
1418 | * jit-recording.c | |
1419 | (gcc::jit::recording::context::new_function_type): New method, | |
1420 | adapted from part of... | |
1421 | (gcc::jit::recording::context::new_function_ptr_type): ...this. | |
1422 | Update to call new_function_type. | |
1423 | * jit-recording.h | |
1424 | (gcc::jit::recording::context::new_function_type): New method. | |
1425 | ||
c985705a DM |
1426 | 2014-12-01 David Malcolm <dmalcolm@redhat.com> |
1427 | ||
1428 | PR jit/63969 | |
1429 | * jit-playback.c: Ensure that ctxt_progname is non-NULL. | |
1430 | ||
b957b2e0 DM |
1431 | 2014-11-19 David Malcolm <dmalcolm@redhat.com> |
1432 | ||
1433 | PR jit/63854 | |
1434 | * jit-playback.c (gcc::jit::playback::compound_type::set_fields): | |
1435 | Convert param from const vec<playback::field *> & to | |
1436 | const auto_vec<playback::field *> *. | |
1437 | (gcc::jit::playback::context::new_function_type): Convert param | |
1438 | "param_types" from vec<type *> * to const auto_vec<type *> *. | |
1439 | (gcc::jit::playback::context::new_function): Convert param | |
1440 | "params" from vec<param *> * to const auto_vec<param *> *. | |
1441 | (gcc::jit::playback::context::build_call): Convert param "args" | |
1442 | from vec<rvalue *> to const auto_vec<rvalue *> *. | |
1443 | (gcc::jit::playback::context::new_call): Likewise. | |
1444 | (gcc::jit::playback::context::new_call_through_ptr): Likewise. | |
1445 | (wrapper_finalizer): New function. | |
1446 | (gcc::jit::playback::wrapper::operator new): Call the finalizer | |
1447 | variant of ggc_internal_cleared_alloc, supplying | |
1448 | wrapper_finalizer. | |
1449 | (gcc::jit::playback::function::finalizer): New. | |
1450 | (gcc::jit::playback::block::finalizer): New. | |
1451 | (gcc::jit::playback::source_file::finalizer): New. | |
1452 | (gcc::jit::playback::source_line::finalizer): New. | |
1453 | ||
1454 | * jit-playback.h | |
1455 | (gcc::jit::playback::context::new_function_type): Convert param | |
1456 | "param_types" from vec<type *> * to const auto_vec<type *> *. | |
1457 | (gcc::jit::playback::context::new_function): Convert param | |
1458 | "params" from vec<param *> * to const auto_vec<param *> *. | |
1459 | (gcc::jit::playback::context::new_call): Convert param | |
1460 | "args" from vec<rvalue *> to const auto_vec<rvalue *> *. | |
1461 | (gcc::jit::playback::context::new_call_through_ptr): Likewise. | |
1462 | (gcc::jit::playback::context::build_call): Likewise. | |
1463 | (gcc::jit::playback::context): Convert fields "m_functions", | |
1464 | "m_source_files", "m_cached_locations" from vec to auto_vec. | |
1465 | (gcc::jit::playback::wrapper::finalizer): New virtual function. | |
1466 | (gcc::jit::playback::compound_type::set_fields): Convert param fro | |
1467 | const vec<playback::field *> & to | |
1468 | const auto_vec<playback::field *> *. | |
1469 | (gcc::jit::playback::function::finalizer): New. | |
1470 | (gcc::jit::playback::block::finalizer): New. | |
1471 | (gcc::jit::playback::source_file::finalizer): New. | |
1472 | (gcc::jit::playback::source_line::finalizer): New. | |
1473 | ||
1474 | * jit-recording.c | |
1475 | (gcc::jit::recording::function_type::replay_into): Convert local | |
1476 | from a vec into an auto_vec. | |
1477 | (gcc::jit::recording::fields::replay_into): Likewise. | |
1478 | (gcc::jit::recording::function::replay_into): Likewise. | |
1479 | (gcc::jit::recording::call::replay_into): Likewise. | |
1480 | (gcc::jit::recording::call_through_ptr::replay_into): Likewise. | |
1481 | ||
1482 | * jit-recording.h (gcc::jit::recording::context): Convert fields | |
1483 | "m_mementos", "m_compound_types", "m_functions" from vec<> to | |
1484 | auto_vec <>. | |
1485 | (gcc::jit::recording::function_type::get_param_types): Convert | |
1486 | return type from vec<type *> to const vec<type *> &. | |
1487 | (gcc::jit::recording::function_type): Convert field | |
1488 | "m_param_types" from a vec<> to an auto_vec<>. | |
1489 | (gcc::jit::recording::fields): Likewise for field "m_fields". | |
1490 | (gcc::jit::recording::function::get_params): Convert return type | |
1491 | from vec <param *> to const vec<param *> &. | |
1492 | (gcc::jit::recording::function): Convert fields "m_params", | |
1493 | "m_locals", "m_blocks" from vec<> to auto_vec<>. | |
1494 | (gcc::jit::recording::block): Likewise for field "m_statements". | |
1495 | vec<> to auto_vec<>. | |
1496 | (gcc::jit::recording::call): Likewise for field "m_args". | |
1497 | (gcc::jit::recording::call_through_ptr): Likewise. | |
1498 | ||
79cafc7a DM |
1499 | 2014-11-19 David Malcolm <dmalcolm@redhat.com> |
1500 | ||
1501 | PR jit/63854 | |
1502 | * jit-recording.c (recording::function::validate): Convert | |
1503 | "worklist" from vec<> to autovec<> to fix a leak. | |
1504 | ||
35485da9 DM |
1505 | 2014-11-11 David Malcolm <dmalcolm@redhat.com> |
1506 | ||
1507 | * ChangeLog.jit: New. | |
1508 | * ChangeLog: New. | |
1509 | * Make-lang.in: New. | |
1510 | * TODO.rst: New. | |
1511 | * config-lang.in: New. | |
1512 | * docs/Makefile: New. | |
1513 | * docs/_build/texinfo/Makefile: New. | |
1514 | * docs/_build/texinfo/factorial.png: New. | |
1515 | * docs/_build/texinfo/libgccjit.texi: New. | |
1516 | * docs/_build/texinfo/sum-of-squares.png: New. | |
1517 | * docs/conf.py: New. | |
1518 | * docs/examples/tut01-hello-world.c: New. | |
1519 | * docs/examples/tut02-square.c: New. | |
1520 | * docs/examples/tut03-sum-of-squares.c: New. | |
1521 | * docs/examples/tut04-toyvm/Makefile: New. | |
1522 | * docs/examples/tut04-toyvm/factorial.toy: New. | |
1523 | * docs/examples/tut04-toyvm/fibonacci.toy: New. | |
1524 | * docs/examples/tut04-toyvm/toyvm.c: New. | |
1525 | * docs/index.rst: New. | |
1526 | * docs/internals/index.rst: New. | |
1527 | * docs/intro/factorial.png: New. | |
1528 | * docs/intro/index.rst: New. | |
1529 | * docs/intro/sum-of-squares.png: New. | |
1530 | * docs/intro/tutorial01.rst: New. | |
1531 | * docs/intro/tutorial02.rst: New. | |
1532 | * docs/intro/tutorial03.rst: New. | |
1533 | * docs/intro/tutorial04.rst: New. | |
1534 | * docs/topics/contexts.rst: New. | |
1535 | * docs/topics/expressions.rst: New. | |
1536 | * docs/topics/functions.rst: New. | |
1537 | * docs/topics/index.rst: New. | |
1538 | * docs/topics/locations.rst: New. | |
1539 | * docs/topics/objects.rst: New. | |
1540 | * docs/topics/results.rst: New. | |
1541 | * docs/topics/types.rst: New. | |
1542 | * dummy-frontend.c: New. | |
1543 | * jit-builtins.c: New. | |
1544 | * jit-builtins.h: New. | |
1545 | * jit-common.h: New. | |
1546 | * jit-playback.c: New. | |
1547 | * jit-playback.h: New. | |
1548 | * jit-recording.c: New. | |
1549 | * jit-recording.h: New. | |
1550 | * libgccjit++.h: New. | |
1551 | * libgccjit.c: New. | |
1552 | * libgccjit.h: New. | |
1553 | * libgccjit.map: New. | |
1554 | * notes.txt: New. | |
1555 | ||
1556 | 2013-07-26 David Malcolm <dmalcolm@redhat.com> | |
1557 | ||
1558 | * Initial creation | |
1559 | ||
1e3b6a3d | 1560 | Copyright (C) 2013-2015 Free Software Foundation, Inc. |
35485da9 DM |
1561 | |
1562 | Copying and distribution of this file, with or without modification, | |
1563 | are permitted in any medium without royalty provided the copyright | |
1564 | notice and this notice are preserved. |