1
0
forked from VimPlug/jedi

optimize call_def stuff with multiple flows, may help #20

This commit is contained in:
David Halter
2012-11-29 14:42:45 +01:00
parent d08c12bb06
commit 125262275d
2 changed files with 24 additions and 6 deletions

View File

@@ -318,6 +318,10 @@ class Script(object):
return call, index
def check_cache():
""" Do the parsing with a part parser, therefore reduce ressource
costs.
TODO this is not working with multi-line docstrings, improve.
"""
if self.source_path is None:
return None, 0
@@ -352,11 +356,13 @@ class Script(object):
debug.speed('func_call parsed')
if call is None:
# This is a backup, if the above is not successful.
user_stmt = self.parser.user_stmt
call, index = check_user_stmt(user_stmt)
if call is None:
return None
debug.speed('func_call user_stmt')
with helpers.scale_speed_settings(settings.scale_get_in_function_call):
origins = evaluate.follow_call(call)
debug.speed('func_call followed')