Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I heard you like inferring types but don't like global state... #21677

Merged
merged 21 commits into from
May 15, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unused global_sv
  • Loading branch information
jrevels authored and vtjnash committed May 9, 2017
commit 0089f54500b7d7abd4202d55ec81467649e35f76
6 changes: 0 additions & 6 deletions base/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2526,9 +2526,6 @@ end
#### do the work of inference ####

function typeinf_work(frame::InferenceState)
global global_sv # TODO: actually pass this to all functions that need it
last_global_sv = global_sv
global_sv = frame
@assert !frame.inferred
W = frame.ip
s = frame.stmt_types
Expand Down Expand Up @@ -2673,8 +2670,6 @@ function typeinf_work(frame::InferenceState)
end
end

global_sv = nothing

function typeinf(frame::InferenceState)
while have_next_callee(frame)
typeinf_work(frame)
Expand All @@ -2689,7 +2684,6 @@ function typeinf(frame::InferenceState)
finish(frame)
finalize_backedges(frame)
end
global_sv = last_global_sv
nothing
end

Expand Down