jit-playback: Move argv-creation to its own function
[platform/upstream/gcc.git] / gcc / jit / ChangeLog
index f0136b4..5035693 100644 (file)
@@ -1,3 +1,70 @@
+2014-12-01  David Malcolm  <dmalcolm@redhat.com>
+
+       * jit-playback.c (gcc::jit::playback::context::compile): Use an
+       auto_vec<const char *> rather than a const char *[20] for the
+       top-level argv, and move the logic to build it to...
+       (gcc::jit::playback::context::make_fake_args): New function.
+       * jit-playback.h (gcc::jit::playback::context::make_fake_args):
+       New function.
+
+2014-12-01  David Malcolm  <dmalcolm@redhat.com>
+
+       * Make-lang.in (jit_OBJS): Add jit/jit-result.o.
+       * jit-playback.c: Include new header jit-result.h.
+       (gcc::jit::result::result): Move to new file jit-result.c.
+       (gcc::jit::result::~result): Likewise.
+       (gcc::jit::playback::result): Likewise.
+       * jit-recording.h (class gcc::jit::result): Move to new
+       header jit-result.h.
+       * jit-result.c: New file, to contain...
+       (gcc::jit::result::result): Move here from jit-playback.c,
+       removing erroneous "playback" namespace from comment.
+       (gcc::jit::result::~result): Likewise.
+       (gcc::jit::playback::result): Likewise.
+       * jit-result.h: New file, to contain...
+       (class gcc::jit::result): Move from jit-recording.h.
+       * libgccjit.c: Include jit-result.h.
+       (gcc_jit_result_get_code): Update comment to reflect move
+       of implementation.
+       (gcc_jit_result_release): Likewise.
+
+2014-12-01  David Malcolm  <dmalcolm@redhat.com>
+
+       PR jit/63854
+       * docs/examples/tut04-toyvm/toyvm.c
+       (toyvm_compiled_function): New typedef.
+       (toyvm_compiled_func) Rename to...
+       (toyvm_compiled_code) ...this.
+       (struct toyvm_compiled_function): New struct.
+       (toyvm_function_compile): Return a toyvm_compiled_function *
+       rather than a toyvm_compiled_func, so that the caller can fully
+       clean things up.  Free "funcname".
+       (test_script): Update for change to toyvm_function_compile.
+       Clean up the toyvm_compiled_function.
+       (main): Likewise.
+       (docs/intro/tutorial04.rst): Update to reflect the above changes,
+       and to better spell out the lifetime of the compiled code.
+
+2014-12-01  David Malcolm  <dmalcolm@redhat.com>
+
+       PR jit/63854
+       * jit-builtins.c
+       (gcc::jit::recording::builtins_manager::make_fn_type): Call the
+       context's new_function_type method, rather than directly creating
+       a function_type instance.
+       * jit-recording.c
+       (gcc::jit::recording::context::new_function_type): New method,
+       adapted from part of...
+       (gcc::jit::recording::context::new_function_ptr_type): ...this.
+       Update to call new_function_type.
+       * jit-recording.h
+       (gcc::jit::recording::context::new_function_type): New method.
+
+2014-12-01  David Malcolm  <dmalcolm@redhat.com>
+
+       PR jit/63969
+       * jit-playback.c: Ensure that ctxt_progname is non-NULL.
+
 2014-11-19  David Malcolm  <dmalcolm@redhat.com>
 
        PR jit/63854