Skip to content

Commit

Permalink
Actually fix doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Jan 22, 2020
1 parent 0584a54 commit e420ebd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/src/devdocs/inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ tt = Tuple{Float64, Tuple{Int,Int}}
opt_params = Core.Compiler.OptimizationParams()
mi = Base.method_instances(f, tt)[1]
ci = code_typed(f, tt)[1][1]
opt = Core.Compiler.OptimizationState(mi, opt_params)
interp = Core.Compiler.NativeInterpreter()
opt = Core.Compiler.OptimizationState(mi, opt_params, interp)
# Calculate cost of each statement
cost(stmt::Expr) = Core.Compiler.statement_cost(stmt, -1, ci, opt.sptypes, opt.slottypes, opt.params)
cost(stmt) = 0
Expand Down

0 comments on commit e420ebd

Please sign in to comment.