Skip to content

Commit

Permalink
iceil is not available to inference.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Jun 9, 2014
1 parent cd4666d commit e9e5606
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2401,12 +2401,12 @@ function inlineable(f, e::Expr, atypes, sv, enclosing_ast)
end

inline_worthy(body, cost::Real) = true
function inline_worthy(body::Expr, cost::Real=1) # 0 < occurrences <= 6
function inline_worthy(body::Expr, cost::Real=1) # precondition: 0<cost
# if isa(body.args[1],QuoteNode) && (body.args[1]::QuoteNode).value === :inline
# shift!(body.args)
# return true
# end
symlim = iceil(6/cost)
symlim = int(5/cost)+1
if length(body.args) < symlim
symlim *= 6
if occurs_more(body, e->true, symlim) < symlim
Expand Down

0 comments on commit e9e5606

Please sign in to comment.