gh-103865: add monitoring support to LOAD_SUPER_ATTR (#103866)

This commit is contained in:
Carl Meyer 2023-05-16 10:29:00 -06:00 committed by GitHub
parent febcc6ccfb
commit f40890b124
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 535 additions and 236 deletions

View file

@ -4846,6 +4846,8 @@ maybe_optimize_method_call(struct compiler *c, expr_ty e)
int opcode = asdl_seq_LEN(meth->v.Attribute.value->v.Call.args) ?
LOAD_SUPER_METHOD : LOAD_ZERO_SUPER_METHOD;
ADDOP_NAME(c, loc, opcode, meth->v.Attribute.attr, names);
loc = update_start_location_to_match_attr(c, loc, meth);
ADDOP(c, loc, NOP);
} else {
VISIT(c, expr, meth->v.Attribute.value);
loc = update_start_location_to_match_attr(c, loc, meth);
@ -6079,6 +6081,8 @@ compiler_visit_expr1(struct compiler *c, expr_ty e)
int opcode = asdl_seq_LEN(e->v.Attribute.value->v.Call.args) ?
LOAD_SUPER_ATTR : LOAD_ZERO_SUPER_ATTR;
ADDOP_NAME(c, loc, opcode, e->v.Attribute.attr, names);
loc = update_start_location_to_match_attr(c, loc, e);
ADDOP(c, loc, NOP);
return SUCCESS;
}
VISIT(c, expr, e->v.Attribute.value);