Skip to content

Commit

Permalink
incremental deserialize: fix backedge insertion
Browse files Browse the repository at this point in the history
the previous attempt to preserve the backedge map was being too cute
it is more reliable to simply flatten the whole map into the new caller
also corrects the validation that the backedge is not already invalid

make sure internal backedges are only internal:
this preserves the expected invariant for jl_insert_backedges/jl_method_instance_delete
that any backedges encountered there are purely internal / new

enable GC slightly sooner when loading precompiled modules (part of #20671)
reverts 11a984b - but who needed that anyways
  • Loading branch information
vtjnash authored and quinnj committed Jun 19, 2017
1 parent 951be9b commit bc2d48d
Show file tree
Hide file tree
Showing 6 changed files with 210 additions and 206 deletions.
13 changes: 13 additions & 0 deletions src/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,19 @@ JL_DLLEXPORT void jl_array_ptr_1d_push(jl_array_t *a, jl_value_t *item)
jl_array_ptr_set(a, n - 1, item);
}

JL_DLLEXPORT void jl_array_ptr_1d_append(jl_array_t *a, jl_array_t *a2)
{
assert(jl_typeis(a, jl_array_any_type));
assert(jl_typeis(a2, jl_array_any_type));
size_t i;
size_t n = jl_array_nrows(a);
size_t n2 = jl_array_nrows(a2);
jl_array_grow_end(a, n2);
for (i = 0; i < n2; i++) {
jl_array_ptr_set(a, n + i, jl_array_ptr_ref(a2, i));
}
}

JL_DLLEXPORT void jl_array_ptr_1d_push2(jl_array_t *a, jl_value_t *b, jl_value_t *c)
{
assert(jl_typeis(a, jl_array_any_type));
Expand Down
Loading

0 comments on commit bc2d48d

Please sign in to comment.