@@ -1,3 +1,8 @@
+2014-03-06 David Malcolm <dmalcolm@redhat.com>
+
+ * internal-api.c (gcc::jit::recording::context::
+ disassociate_from_playback): Recursively visit parent contexts.
+
2014-03-05 David Malcolm <dmalcolm@redhat.com>
* libgccjit.h (gcc_jit_function_dump_to_dot): New.
@@ -243,6 +243,10 @@ recording::context::disassociate_from_playback ()
{
int i;
memento *m;
+
+ if (m_parent_ctxt)
+ m_parent_ctxt->disassociate_from_playback ();
+
FOR_EACH_VEC_ELT (m_mementos, i, m)
{
m->set_playback_obj (NULL);
@@ -1,3 +1,9 @@
+2014-03-06 David Malcolm <dmalcolm@redhat.com>
+
+ * jit.dg/test-nested-contexts.c (main): Dump the contexts to
+ files, setting up source locations, and adding test coverage for
+ gcc_jit_context_dump_to_file.
+
2014-03-04 David Malcolm <dmalcolm@redhat.com>
* jit.dg/test-error-mismatching-types-in-call.c: New test case,
@@ -552,6 +552,10 @@ main (int argc, char **argv)
/* No errors should have occurred. */
CHECK_VALUE (gcc_jit_context_get_first_error (top_level.ctxt), NULL);
+ gcc_jit_context_dump_to_file (top_level.ctxt,
+ "dump-of-test-nested-contexts-top.c",
+ 1);
+
for (j = 1; j <= NUM_MIDDLE_ITERATIONS; j++)
{
/* Create and populate the middle-level context, using
@@ -575,6 +579,10 @@ main (int argc, char **argv)
CHECK_VALUE (gcc_jit_context_get_first_error (middle_level.ctxt),
NULL);
+ gcc_jit_context_dump_to_file (middle_level.ctxt,
+ "dump-of-test-nested-contexts-middle.c",
+ 1);
+
gcc_jit_result *middle_result =
gcc_jit_context_compile (middle_level.ctxt);
CHECK_NON_NULL (middle_result);
@@ -607,6 +615,10 @@ main (int argc, char **argv)
CHECK_VALUE (gcc_jit_context_get_first_error (bottom_level.ctxt),
NULL);
+ gcc_jit_context_dump_to_file (bottom_level.ctxt,
+ "dump-of-test-nested-contexts-bottom.c",
+ 1);
+
gcc_jit_result *bottom_result =
gcc_jit_context_compile (bottom_level.ctxt);
verify_bottom_code (bottom_level.ctxt, bottom_result);