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

minor updates on old code #781

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/Revise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ using OrderedCollections, CodeTracking, JuliaInterpreter, LoweredCodeUtils
using CodeTracking: PkgFiles, basedir, srcfiles, line_is_decl, basepath
using JuliaInterpreter: whichtt, is_doc_expr, step_expr!, finish_and_return!, get_return,
@lookup, moduleof, scopeof, pc_expr, is_quotenode_egal,
linetable, codelocs, LineTypes, is_GotoIfNot, isassign, isidentical
linetable, codelocs, LineTypes, isassign, isidentical
using LoweredCodeUtils: next_or_nothing!, trackedheads, callee_matches

include("packagedef.jl")
Expand Down
3 changes: 1 addition & 2 deletions src/packagedef.jl
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,7 @@ pop_expr!(methodinfo::CodeTrackingMethodInfo) = (pop!(methodinfo.exprstack); met
function add_dependencies!(methodinfo::CodeTrackingMethodInfo, edges::CodeEdges, src, musteval)
isempty(src.code) && return methodinfo
stmt1 = first(src.code)
if (isexpr(stmt1, :gotoifnot) && (dep = (stmt1::Expr).args[1]; isa(dep, Union{GlobalRef,Symbol}))) ||
(is_GotoIfNot(stmt1) && (dep = stmt1.cond; isa(dep, Union{GlobalRef,Symbol})))
if isa(stmt1, Core.GotoIfNot) && (dep = stmt1.cond; isa(dep, Union{GlobalRef,Symbol}))
# This is basically a hack to look for symbols that control definition of methods via a conditional.
# It is aimed at solving #249, but this will have to be generalized for anything real.
for (stmt, me) in zip(src.code, musteval)
Expand Down
2 changes: 0 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ unwrap(rex::RelocatableExpr) = RelocatableExpr(unwrap(rex.ex))

istrivial(a) = a === nothing || isa(a, LineNumberNode)

isgoto(stmt) = isa(stmt, Core.GotoNode) | isexpr(stmt, :gotoifnot)

function unwrap_where(ex::Expr)
while isexpr(ex, :where)
ex = ex.args[1]
Expand Down
Loading