Skip to content

Commit

Permalink
clean up imports
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Jul 12, 2023
1 parent 4359e29 commit 15d42eb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
22 changes: 7 additions & 15 deletions src/JET.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,10 @@ import .CC:
inlining_policy

# `ConcreteInterpreter`
import JuliaInterpreter:
#= interpreter.jl =#
evaluate_call_recurse!, handle_err, step_expr!
import JuliaInterpreter: evaluate_call_recurse!, handle_err, step_expr!

# Test.jl integration
import Test:
record
import Test: record

# usings
# ======
Expand All @@ -80,15 +77,11 @@ using .CC: ⊑,
istopfunction, may_invoke_generator, singleton_type, slot_id, specialize_method,
switchtupleunion, tmerge, widenconst

using Base:
@invoke, @invokelatest, IdSet, default_tt, destructure_callex, parse_input_line,
rewrap_unionall, uniontypes, unwrap_unionall
using Base: IdSet

using Base.Meta:
ParseError, _parse_string, isexpr, lower
using Base.Meta: ParseError, _parse_string, isexpr, lower

using Base.Experimental:
@MethodTable, @overlay
using Base.Experimental: @MethodTable, @overlay

using LoweredCodeUtils, JuliaInterpreter

Expand All @@ -101,8 +94,7 @@ using JuliaInterpreter:
@lookup, _INACTIVE_EXCEPTION, bypass_builtins, collect_args, #=finish!,=#
is_quotenode_egal, is_return, maybe_evaluate_builtin, moduleof

using MacroTools:
@capture, MacroTools, normalise, striplines
using MacroTools: @capture, MacroTools, normalise, striplines

using InteractiveUtils

Expand Down Expand Up @@ -718,7 +710,7 @@ Finally returns the analysis result as [`JETCallResult`](@ref).
Note that this is intended to be used by developers of `AbstractAnalyzer` only.
General users should use high-level entry points like [`report_call`](@ref) and [`report_opt`](@ref).
"""
function analyze_and_report_call!(analyzer::AbstractAnalyzer, @nospecialize(f), @nospecialize(types = default_tt(f));
function analyze_and_report_call!(analyzer::AbstractAnalyzer, @nospecialize(f), @nospecialize(types = Base.default_tt(f));
jetconfigs...)
tt = Base.signature_type(f, types)
return analyze_and_report_call!(analyzer, tt::Type{<:Tuple}; jetconfigs...)
Expand Down
2 changes: 1 addition & 1 deletion src/analyzers/jetanalyzer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ function report_fieldaccess!(analyzer::JETAnalyzer, sv::InferenceState, @nospeci
end

isa(name, Const) || return false
s = unwrap_unionall(s00)
s = Base.unwrap_unionall(s00)
if isType(s)
if f === fieldtype
# XXX this is a hack to share more code between `getfield`/`setfield!`/`fieldtype`
Expand Down
2 changes: 1 addition & 1 deletion src/toplevel/virtualprocess.jl
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ function _virtual_process!(res::VirtualProcessResult,
push!(res.files_stack, filename)

s = String(s)::String
toplevelex = parse_input_line(s; filename)
toplevelex = Base.parse_input_line(s; filename)

if isexpr(toplevelex, (:error, :incomplete))
# if there's any syntax error, try to identify all the syntax error location
Expand Down
2 changes: 1 addition & 1 deletion test/self_check.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ let target_modules = (JET,)
f === JET.copy_report ||
f === JET.handle_sig! ||
f === JET._which ||
f === JET.rewrap_unionall ||
f === Base.rewrap_unionall ||
f === JET.nameof ||
false)
return false
Expand Down

0 comments on commit 15d42eb

Please sign in to comment.