Skip to content

Commit

Permalink
Merge pull request JuliaLang#14321 from maleadt/pr_debug_bitrot
Browse files Browse the repository at this point in the history
Fix bitrot in commented or disabled code.
  • Loading branch information
jakebolewski committed Dec 9, 2015
2 parents 106ad4d + 88a4e7e commit 1a73bc5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/ccall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@ static jl_cgval_t emit_ccall(jl_value_t **args, size_t nargs, jl_codectx_t *ctx)
}

//llvmf->dump();
//for (std::vector<Value *>::iterator it = argvals.begin() ; it != argvals.end(); ++it)
// (*it)->dump();
//for (int i = 0; i < (nargs - 3) / 2 + sret; ++i)
// argvals[i]->dump();

// the actual call
Value *ret = builder.CreateCall(prepare_call(llvmf),
Expand Down
15 changes: 7 additions & 8 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2408,13 +2408,12 @@ static bool emit_known_call(jl_cgval_t *ret, jl_value_t *ff,
// attempt compile-time specialization for inferred types
if (aty != NULL) {
rt1 = (jl_value_t*)jl_apply_tuple_type(aty);
/*
if (trace) {
jl_printf(JL_STDOUT, "call %s%s\n",
jl_sprint(args[0]),
jl_sprint((jl_value_t*)aty));
}
*/
#ifdef JL_TRACE
jl_printf(JL_STDOUT, "call ");
jl_static_show(JL_STDOUT, args[0]);
jl_static_show(JL_STDOUT, (jl_value_t*)aty);
jl_printf(JL_STDOUT, "\n");
#endif
f = jl_get_specialization(f, (jl_tupletype_t*)rt1);
if (f != NULL) {
assert(f->linfo->functionObject != NULL);
Expand Down Expand Up @@ -4415,7 +4414,7 @@ static Function *emit_function(jl_lambda_info_t *lam)
}
assert(jl_is_expr(ast));
sparams = jl_svec_tvars_to_symbols(lam->sparams);
//jl_printf((jl_value_t*)ast);
//jl_static_show(JL_STDOUT, (jl_value_t*)ast);
//jl_printf(JL_STDOUT, "\n");
std::map<jl_sym_t*, jl_arrayvar_t> arrayvars;
std::map<int, BasicBlock*> labels;
Expand Down
8 changes: 4 additions & 4 deletions src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ void jl_type_infer(jl_lambda_info_t *li, jl_tupletype_t *argtypes, jl_lambda_inf
fargs[2] = (jl_value_t*)jl_emptysvec;
fargs[3] = (jl_value_t*)def;
#ifdef TRACE_INFERENCE
jl_printf(JL_STDERR,"inference on %s", li->name->name);
jl_printf(JL_STDERR,"inference on %s", jl_symbol_name(li->name));
jl_static_show_func_sig(JL_STDERR, (jl_value_t*)argtypes);
jl_printf(JL_STDERR, "\n");
#endif
Expand Down Expand Up @@ -1846,7 +1846,7 @@ static int error_en = 1;
static void __attribute__ ((unused)) enable_trace(int x) { trace_en=x; }
static void show_call(jl_value_t *F, jl_value_t **args, uint32_t nargs)
{
jl_printf(JL_STDOUT, "%s(", jl_gf_name(F)->name);
jl_printf(JL_STDOUT, "%s(", jl_symbol_name(jl_gf_name(F)));
for(size_t i=0; i < nargs; i++) {
if (i > 0) jl_printf(JL_STDOUT, ", ");
jl_static_show(JL_STDOUT, jl_typeof(args[i]));
Expand Down Expand Up @@ -1882,7 +1882,7 @@ JL_CALLABLE(jl_apply_generic)
if (mfunc != jl_bottom_func) {
#ifdef JL_TRACE
if (traceen)
jl_printf(JL_STDOUT, " at %s:%d\n", mfunc->linfo->file->name, mfunc->linfo->line);
jl_printf(JL_STDOUT, " at %s:%d\n", jl_symbol_name(mfunc->linfo->file), mfunc->linfo->line);
#endif
if (mfunc->linfo != NULL &&
(mfunc->linfo->inInference || mfunc->linfo->inCompile)) {
Expand Down Expand Up @@ -1919,7 +1919,7 @@ JL_CALLABLE(jl_apply_generic)
}
#ifdef JL_TRACE
if (traceen)
jl_printf(JL_STDOUT, " at %s:%d\n", mfunc->linfo->file->name, mfunc->linfo->line);
jl_printf(JL_STDOUT, " at %s:%d\n", jl_symbol_name(mfunc->linfo->file), mfunc->linfo->line);
#endif
assert(!mfunc->linfo || !mfunc->linfo->inInference);
jl_value_t *res = jl_apply(mfunc, args, nargs);
Expand Down

0 comments on commit 1a73bc5

Please sign in to comment.