File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -630,15 +630,15 @@ macro interpret(arg)
630
630
return :(throw ($ e))
631
631
end
632
632
quote
633
- theargs = $ (esc (args))
634
- frame = JuliaInterpreter. enter_call_expr (Expr (:call , theargs... ))
633
+ local theargs = $ (esc (args))
634
+ local frame = JuliaInterpreter. enter_call_expr (Expr (:call , theargs... ))
635
635
if frame === nothing
636
- return eval (Expr (:call , map (QuoteNode, theargs)... ))
637
- end
638
- if shouldbreak (frame, 1 )
639
- return frame, BreakpointRef (frame. framecode, 1 )
636
+ eval (Expr (:call , map (QuoteNode, theargs)... ))
637
+ elseif shouldbreak (frame, 1 )
638
+ frame, BreakpointRef (frame. framecode, 1 )
639
+ else
640
+ local ret = finish_and_return! (frame)
641
+ isa (ret, BreakpointRef) ? (frame, ret) : ret
640
642
end
641
- ret = finish_and_return! (frame)
642
- isa (ret, BreakpointRef) ? (frame, ret) : ret
643
643
end
644
644
end
Original file line number Diff line number Diff line change 81
81
disable (bp)
82
82
@test JuliaInterpreter. finish_stack! (frame) == loop_radius2 (10 )
83
83
84
+ # Return value with breakpoints
85
+ @breakpoint sum ([1 ,2 ]) any (x-> x> 4 , a)
86
+ val = @interpret sum ([1 ,2 ,3 ])
87
+ @test val == 6
88
+ frame, bp = @interpret sum ([1 ,2 ,5 ])
89
+ @test isa (frame, Frame) && isa (bp, JuliaInterpreter. BreakpointRef)
90
+
84
91
# Next line with breakpoints
85
92
function outer (x)
86
93
inner (x)
You can’t perform that action at this time.
0 commit comments