Skip to content

Commit

Permalink
Merge pull request #22340 from JuliaLang/jn/incremental-better-backedges
Browse files Browse the repository at this point in the history
better, simpler incremental backedges
  • Loading branch information
vtjnash authored Jun 16, 2017
2 parents e84f0e5 + 0e19311 commit 9e563ba
Show file tree
Hide file tree
Showing 7 changed files with 211 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 9e563ba

Please sign in to comment.