diff --git a/base/inference.jl b/base/inference.jl index 08adbcb5af2fc..855f54138efe0 100644 --- a/base/inference.jl +++ b/base/inference.jl @@ -63,7 +63,9 @@ function _iisconst(s::Symbol) isdefined(m,s) && (ccall(:jl_is_const, Int32, (Any, Any), m, s) != 0) end -_ieval(x::ANY) = eval((inference_stack::CallStack).mod, x) +_ieval(x::ANY) = + ccall(:jl_interpret_toplevel_expr_in, Any, (Any, Any, Ptr{Void}, Csize_t), + (inference_stack::CallStack).mod, x, C_NULL, 0) _iisdefined(x::ANY) = isdefined((inference_stack::CallStack).mod, x) _iisconst(s::SymbolNode) = _iisconst(s.name) diff --git a/src/interpreter.c b/src/interpreter.c index 4587803921c9e..be4e1c6d48c7b 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -31,8 +31,8 @@ jl_value_t *jl_interpret_toplevel_expr_with(jl_value_t *e, return eval(e, locals, nl); } -jl_value_t *jl_interpret_toplevel_expr_in(jl_module_t *m, jl_value_t *e, - jl_value_t **locals, size_t nl) +DLLEXPORT jl_value_t *jl_interpret_toplevel_expr_in(jl_module_t *m, jl_value_t *e, + jl_value_t **locals, size_t nl) { jl_value_t *v=NULL; jl_module_t *last_m = jl_current_module; diff --git a/src/julia.h b/src/julia.h index f8bf0d89b35bc..052906bfe2db7 100644 --- a/src/julia.h +++ b/src/julia.h @@ -912,8 +912,8 @@ jl_value_t *jl_interpret_toplevel_thunk_with(jl_lambda_info_t *lam, jl_value_t *jl_interpret_toplevel_expr(jl_value_t *e); jl_value_t *jl_interpret_toplevel_expr_with(jl_value_t *e, jl_value_t **locals, size_t nl); -jl_value_t *jl_interpret_toplevel_expr_in(jl_module_t *m, jl_value_t *e, - jl_value_t **locals, size_t nl); +DLLEXPORT jl_value_t *jl_interpret_toplevel_expr_in(jl_module_t *m, jl_value_t *e, + jl_value_t **locals, size_t nl); int jl_is_toplevel_only_expr(jl_value_t *e); jl_module_t *jl_base_relative_to(jl_module_t *m); void jl_type_infer(jl_lambda_info_t *li, jl_tuple_t *argtypes,