1.1 --- a/optimiser.py Tue Feb 14 00:17:39 2017 +0100
1.2 +++ b/optimiser.py Fri Feb 17 16:30:37 2017 +0100
1.3 @@ -535,15 +535,24 @@
1.4 if final_method == "static":
1.5 emit(("__load_static_replace", context_var, origin))
1.6
1.7 + # Omit the context update operation where the target is static
1.8 + # and the context is recorded separately.
1.9 +
1.10 + elif final_method == "static-invoke":
1.11 + pass
1.12 +
1.13 # Only update any context if no separate context is used.
1.14
1.15 - elif final_method not in ("access-invoke", "static-invoke"):
1.16 + elif final_method != "access-invoke":
1.17 emit(("__update_context", context_var, accessor))
1.18
1.19 else:
1.20 emit(accessor)
1.21
1.22 - elif final_method not in ("assign", "static-assign"):
1.23 + # Omit the accessor for assignments and for invocations of static
1.24 + # targets.
1.25 +
1.26 + elif final_method not in ("assign", "static-assign", "static-invoke"):
1.27 emit(accessor)
1.28
1.29 self.access_instructions[access_location] = instructions