Skip to content

Commit

Permalink
Merge pull request #21145 from JuliaLang/jb/cppcompile
Browse files Browse the repository at this point in the history
some fixes for compiling the runtime code as c++
  • Loading branch information
JeffBezanson authored Mar 24, 2017
2 parents ae18dae + 9736ab9 commit d6088fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,10 @@ STATIC_INLINE void gc_setmark(jl_ptls_t ptls, jl_taggedvalue_t *o,
}
}

inline void gc_setmark_buf(jl_ptls_t ptls, void *o,
uint8_t mark_mode, size_t minsz)
#ifndef __cplusplus
inline
#endif
void gc_setmark_buf(jl_ptls_t ptls, void *o, uint8_t mark_mode, size_t minsz)
{
jl_taggedvalue_t *buf = jl_astaggedvalue(o);
uintptr_t tag = buf->header;
Expand Down
4 changes: 2 additions & 2 deletions src/interpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,13 @@ static int equiv_type(jl_datatype_t *dta, jl_datatype_t *dtb)
jl_field_count(dta) == jl_field_count(dtb)))
return 0;
jl_value_t *a=NULL, *b=NULL;
int ok = 1;
size_t i, nf = jl_field_count(dta);
JL_GC_PUSH2(&a, &b);
a = jl_rewrap_unionall((jl_value_t*)dta->super, dta->name->wrapper);
b = jl_rewrap_unionall((jl_value_t*)dtb->super, dtb->name->wrapper);
if (!jl_types_equal(a, b))
goto no;
int ok = 1;
JL_TRY {
a = jl_apply_type(dtb->name->wrapper, jl_svec_data(dta->parameters), jl_nparams(dta));
}
Expand All @@ -142,7 +143,6 @@ static int equiv_type(jl_datatype_t *dta, jl_datatype_t *dtb)
b = ub->body;
}
assert(jl_is_datatype(a) && jl_is_datatype(b));
size_t i, nf = jl_field_count(dta);
for (i=0; i < nf; i++) {
jl_value_t *ta = jl_svecref(((jl_datatype_t*)a)->types, i);
jl_value_t *tb = jl_svecref(((jl_datatype_t*)b)->types, i);
Expand Down

0 comments on commit d6088fc

Please sign in to comment.