-
Notifications
You must be signed in to change notification settings - Fork 13
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
Expose functionality for eval in local scope #69
Labels
Comments
toivoh
added a commit
that referenced
this issue
Mar 28, 2015
* Add `code_analyzed_only` function to be used by macros that only make sense inside analyzed code * The code throws an error with custom message in the normal case * Make `decorate` recognize it and unwrap the payload instead * Add `@localscope` macro that evaluates to the local scope * Make it produce a new node type `GetLocalScope` wrapped in `code_analyzed_only` * Make `instrument_args` emit the local scope symbol for `GetLocalScope` * Add a `keys` method for `Scope`, returning its set of local variables * Add simple test Also change `Debug.Meta.quot` to produce a `QuoteNode`.
toivoh
added a commit
that referenced
this issue
Mar 28, 2015
toivoh
added a commit
that referenced
this issue
Mar 28, 2015
toivoh
added a commit
that referenced
this issue
Mar 28, 2015
toivoh
added a commit
that referenced
this issue
Mar 28, 2015
This seems to be working now |
toivoh
added a commit
that referenced
this issue
Mar 28, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Most of the code in
Debug.jl
is actually devoted to making it possible to evaluate code in a local scope (through instrumentation, analysis, etc). This is currently only used to evaluate expressions in debug sessions. It would be nice if this functionality could be exposed for wider use.Possible approach:
@localscope
, which evaluates to theScope
representing the local scope, when used inside of@debug
@debug_analyze
which works like@debug
and allows@localscope
but doesn't emit any traps@debug_analyze
not introduce any more instrumentation than necessaryThe text was updated successfully, but these errors were encountered: