-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
sysimg: reduce the number of special cases (essentially NFC) #31948
Conversation
bffbe40
to
cca9892
Compare
src/datatype.c
Outdated
@@ -624,7 +624,7 @@ void jl_assign_bits(void *dest, jl_value_t *bits) | |||
#define PERMBOXN_FUNC(nb,nw) \ | |||
jl_value_t *jl_permbox##nb(jl_datatype_t *t, int##nb##_t x) \ | |||
{ \ | |||
assert(jl_isbits(t)); \ | |||
/*assert(jl_isbits(t));*/ \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just remove this?
&jl_builtin_apply_type, &jl_builtin_applicable, &jl_builtin_invoke, | ||
&jl_builtin__expr, &jl_builtin_ifelse, | ||
NULL }; | ||
static jl_value_t **const*const tags = (jl_value_t**const*const)_tags; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A classic C type declaration 😂
src/staticdata.c
Outdated
for (i = 0; i < builtin_typenames.len; i++) { | ||
jl_write_value(&s, ((jl_typename_t*)builtin_typenames.items[i])->cache); | ||
jl_write_value(&s, ((jl_typename_t*)builtin_typenames.items[i])->linearcache); | ||
// save module initialization order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this comment?
src/staticdata.c
Outdated
@@ -1098,100 +1191,52 @@ static void jl_finalize_serializer(jl_serializer_state *s) | |||
|
|||
|
|||
void jl_typemap_rehash(jl_typemap_t *ml, int8_t offs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed.
assert(jl_is_mtable(mt)); | ||
jl_typemap_rehash(mt->defs, 0); | ||
// TODO: consider reverting this when we can split on Type{...} better | ||
jl_typemap_rehash(mt->cache, 1); //(mt == jl_type_typename->mt) ? 0 : 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Why were we doing this before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably got moved over from dump.c when this file split off, but this didn't get used.
Put the entire image(*) into our pre-constructed data image, instead of attempting to leave out a couple of items. This saves us a couple lines of code, and should makes it simpler to keep the list of builtin objects (gc.c "tags") up-to-date. (*) The remaining special objects are ptls->root_task, since I was unsure the best way to handle it as no other Task object is allowed to be referenced, and the small integer caches.
a4a98d5
to
ea47a13
Compare
Put the entire image(*) into our pre-constructed data image,
instead of attempting to leave out a couple of items.
This saves us a couple lines of code, and should makes it
simpler to keep the list of builtin objects (gc.c "tags") up-to-date.
(*) The remaining special objects are ptls->root_task,
since I was unsure the best way to handle it as no other Task
object is allowed to be referenced, and the small integer caches.