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

New variable tracking method for Much speed #48

Merged
merged 19 commits into from
May 11, 2019
Merged

Conversation

oxinabox
Copy link
Owner

@oxinabox oxinabox commented Apr 22, 2019

There is no need to track the value of variables.
As the variables themselves already do that.
What we do need to do though: is find out what variables are defined at any point in time.
Expr(:isdefined, slot) can do that for us, but we are not allowed to call that before the NewVarNode is created.
If we know that then we can build the variable name map, after we have decided if we are stopping or not.
This means moving that decision to be part of the pass as well

Combined with #47 this starts to become much more performant.
I want to get #47 in first (the current code in this branch just comments that check out)

The core of the idea is in this PR,
and it doesn't outright crash (though I've not tried actually hitting any breakpoint yet)

Todo

  • sortout setting stepping modes now that we only have 1 context
  • Tests (the old ones are broken and the new ones have not been written)
  • Docstrings, maybe a comment at the top of pass.jl describing the overall stratergy

The main thing we lose by doing this is that #25 becomes much harder, and the outlined stratergy in that issue can not be done anymore

@oxinabox
Copy link
Owner Author

@Keno it would be great if you could take a glance over this.
This is the code I was asking you about with Expr(:isdefined last weekend.

@oxinabox
Copy link
Owner Author

oxinabox commented May 5, 2019

All the remaining old tests are now passing.
though I had to move a function declaration out of a @testset for some reason.
So there might be something fishy with closures or something still that is not tested for.
Also integration tests need to be added as all the variable capture tests had to be removed.

  • Closure tests
  • Captured variable value tests via UI

Also I seem to have lost compatiblity with julia 1.0
It gets errors when optimising the code after it has been instrumented.

@oxinabox
Copy link
Owner Author

oxinabox commented May 8, 2019

I think I can simplify this massively by using whatever powers the @locals macro.

@oxinabox oxinabox mentioned this pull request May 11, 2019
@oxinabox oxinabox merged commit 244e0e7 into master May 11, 2019
@oxinabox oxinabox deleted the ox/nostorevars branch May 11, 2019 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant