Skip to content

Commit 64e8d13

Browse files
authored
Merge pull request #46 from oxinabox/ox/speed
Swap in LittleDict
2 parents adbd206 + a92fa21 commit 64e8d13

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
1212

1313
[compat]
1414
CodeTracking = "0.4.0"
15+
OrderedCollections = "1.1"
1516
Revise = "2"
16-
# Revise 1.1 works, except for setting breakpoints on files outside of packages
1717

1818
[extras]
1919
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

src/core_control.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ parent_stepping_mode(::StepOut) = StepNext() # This is what they want
2323

2424

2525
mutable struct HandEvalMeta
26-
variables::OrderedDict{Symbol, Any}
26+
variables::LittleDict{Symbol, Any}
2727
eval_module::Module
2828
stepping_mode::SteppingMode
2929
breakpoint_rules::BreakpointRules
@@ -34,7 +34,7 @@ const GLOBAL_BREAKPOINT_RULES = BreakpointRules()
3434

3535
function HandEvalMeta(eval_module, stepping_mode)
3636
return HandEvalMeta(
37-
OrderedDict{Symbol,Any}(),
37+
LittleDict{Symbol,Any}(),
3838
eval_module,
3939
stepping_mode,
4040
GLOBAL_BREAKPOINT_RULES
@@ -51,11 +51,10 @@ function Cassette.overdub(::typeof(HandEvalCtx()), args...)
5151
end
5252

5353

54-
function Cassette.overdub(ctx::HandEvalCtx, f, args...)
54+
function Cassette.overdub(ctx::HandEvalCtx, @nospecialize(f), @nospecialize(args...))
5555
# This is basically the epicenter of all the logic
5656
# We control the flow of stepping modes
5757
# and which methods are instrumented or not.
58-
@debug "overdubbing" f args
5958
method = methodof(f, args...)
6059
should_recurse =
6160
ctx.metadata.stepping_mode isa StepIn ||

src/method_utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ functiontypeof(m::Method) = parameter_typeof(m.sig)[1]
44
parameter_typeof(sig::UnionAll) = parameter_typeof(sig.body)
55
parameter_typeof(sig::DataType) = sig.parameters
66

7-
function methodof(f, args...)
7+
function methodof(@nospecialize(f), @nospecialize(args...))
88
try
99
@which(f(args...))
1010
catch

0 commit comments

Comments
 (0)