Skip to content

Commit

Permalink
Merge pull request JuliaLang#9581 from JuliaLang/teh/user_code
Browse files Browse the repository at this point in the history
More robust detection of user code
  • Loading branch information
timholy committed Jan 4, 2015
2 parents d8a1363 + 0dcaba4 commit 6331ea3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3734,7 +3734,7 @@ static Function *emit_function(jl_lambda_info_t *lam, bool cstyle)
ctx.f = f;

// step 5. set up debug info context and create first basic block
bool in_user_code = lam->module != jl_base_module && lam->module != jl_core_module;
bool in_user_code = !is_submodule(jl_base_module, lam->module);
bool do_coverage = jl_compileropts.code_coverage == JL_LOG_ALL || (jl_compileropts.code_coverage == JL_LOG_USER && in_user_code);
bool do_malloc_log = jl_compileropts.malloc_log == JL_LOG_ALL || (jl_compileropts.malloc_log == JL_LOG_USER && in_user_code);
jl_value_t *stmt = jl_cellref(stmts,0);
Expand Down
2 changes: 1 addition & 1 deletion src/dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ static void jl_update_all_fptrs()
delayed_fptrs = NULL;
}

static int is_submodule(jl_module_t *parent, jl_module_t *child)
int is_submodule(jl_module_t *parent, jl_module_t *child)
{
while (1) {
if (parent == child)
Expand Down
1 change: 1 addition & 0 deletions src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ STATIC_INLINE jl_function_t *jl_get_function(jl_module_t *m, const char *name)
}
DLLEXPORT void jl_module_run_initializer(jl_module_t *m);
jl_function_t *jl_module_call_func(jl_module_t *m);
int is_submodule(jl_module_t *parent, jl_module_t *child);

// eq hash tables
DLLEXPORT jl_array_t *jl_eqtable_put(jl_array_t *h, void *key, void *val);
Expand Down

0 comments on commit 6331ea3

Please sign in to comment.