Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more small fixes to the layout optimization PR #34177

Merged
merged 1 commit into from
Dec 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/c.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ and will be converted automatically at the call site to the appropriate type.

See [`@cfunction`](@ref).
"""
struct CFunction <: Ref{Cvoid}
mutable struct CFunction <: Ref{Cvoid}
ptr::Ptr{Cvoid}
f::Any
_1::Ptr{Cvoid}
Expand Down
2 changes: 1 addition & 1 deletion src/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ JL_DLLEXPORT void jl_arrayunset(jl_array_t *a, size_t i)
else if (a->flags.hasptr) {
size_t elsize = a->elsize;
jl_assume(elsize >= sizeof(void*) && elsize % sizeof(void*) == 0);
memset(&((jl_value_t**)a->data)[i], 0, elsize);
memset((char*)a->data + elsize * i, 0, elsize);
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1794,6 +1794,7 @@ STATIC_INLINE int gc_mark_scan_array8(jl_ptls_t ptls, jl_gc_mark_sp_t *sp,
if (elem_begin < elem_end) {
// Haven't done with this one yet. Update the content and push it back
ary8->elem.begin = elem_begin;
ary8->begin = begin;
gc_repush_markdata(sp, gc_mark_array8_t);
}
else {
Expand All @@ -1812,7 +1813,7 @@ STATIC_INLINE int gc_mark_scan_array8(jl_ptls_t ptls, jl_gc_mark_sp_t *sp,
}
return 1;
}
ary8->elem.begin = elem_begin = ary8->rebegin;
elem_begin = ary8->rebegin;
}
gc_mark_push_remset(ptls, ary8->elem.parent, ary8->elem.nptr);
return 0;
Expand Down