Skip to content

Commit

Permalink
NFC: Remove implicit parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed Aug 4, 2020
1 parent fc9a502 commit e3a4916
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 117 deletions.
8 changes: 4 additions & 4 deletions src/ccall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ static Value *julia_to_native(
// We're passing Any
if (toboxed) {
assert(!byRef); // don't expect any ABI to pass pointers by pointer
return maybe_decay_untracked(boxed(ctx, jvinfo));
return maybe_decay_untracked(ctx, boxed(ctx, jvinfo));
}
assert(jl_is_datatype(jlto) && julia_struct_has_layout((jl_datatype_t*)jlto, jlto_env));

Expand Down Expand Up @@ -1278,7 +1278,7 @@ static bool verify_ref_type(jl_codectx_t &ctx, jl_value_t* ref, jl_unionall_t *u
else {
Value *notany = ctx.builder.CreateICmpNE(
boxed(ctx, runtime_sp),
maybe_decay_untracked(literal_pointer_val(ctx, (jl_value_t*)jl_any_type)));
maybe_decay_untracked(ctx, literal_pointer_val(ctx, (jl_value_t*)jl_any_type)));
error_unless(ctx, notany, make_errmsg(fname, n, rt_err_msg_notany));
always_error = false;
}
Expand Down Expand Up @@ -1729,7 +1729,7 @@ static jl_cgval_t emit_ccall(jl_codectx_t &ctx, jl_value_t **args, size_t nargs)
emit_typeof_boxed(ctx, val),
val.isghost ? ConstantPointerNull::get(T_pint8_derived) :
ctx.builder.CreateBitCast(
decay_derived(data_pointer(ctx, val)),
decay_derived(ctx, data_pointer(ctx, val)),
T_pint8_derived)
};
Value *ret = ctx.builder.CreateCall(prepare_call(jl_object_id__func), makeArrayRef(args));
Expand Down Expand Up @@ -1795,7 +1795,7 @@ jl_cgval_t function_sig_t::emit_a_ccall(
v = julia_to_native(ctx, largty, toboxed, jargty_in_env, unionall_env, arg, byRef, ai);
bool issigned = jl_signed_type && jl_subtype(jargty, (jl_value_t*)jl_signed_type);
if (byRef) {
v = decay_derived(v);
v = decay_derived(ctx, v);
// julia_to_native should already have done the alloca and store
assert(v->getType() == pargty);
}
Expand Down
Loading

0 comments on commit e3a4916

Please sign in to comment.