You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a cell references lst[1], we need to include both the slice the defines lst[1], as well as the slice that defines the symbol lst. This is hard because lst could have multiple aliases and we need to pick the right one, and the code is not currently structured in a way that makes it easy to do so.
The text was updated successfully, but these errors were encountered:
Actually, I think this could be done in attrsub_tracer without too much difficulty. Whenever the obj_name parameter is non-null, then we can lookup the corresponding symbol in the tracer's current active scope and mark it as a dynamic usage. This is true regardless of whether the final object in the chain ends up being loaded, stored, or deleted. When obj_name is null, typically the actual obj is being returned from somewhere else and we don't need to worry about marking its corresponding symbol as dynamically used since that will happen at that same somewhere else.
We do, however, need to mark methods as used, and this might require some extra work since we can't just use obj_name for these.
This is untested though and there may be more to do there. For example, If we have
obj.foo()['bar']
I don't know whether it will correctly identify the usage of obj.foo (whose usage is not captured by the code snippet above; obj_name will be None since the object being subscripted is the thing that gets retuned from obj.foo(), not obj.foo).
Also it's worth testing on various aliasing scenarios.
If a cell references
lst[1]
, we need to include both the slice the defineslst[1]
, as well as the slice that defines the symbollst
. This is hard becauselst
could have multiple aliases and we need to pick the right one, and the code is not currently structured in a way that makes it easy to do so.The text was updated successfully, but these errors were encountered: