[vm,dyn_modules] Record coverage for instantiated instance calls.

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try
Change-Id: Id8d84f131120b66984e9c9410b1f3aeeb4b41d83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507441
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
Tess Strickland
2026-06-01 10:35:58 -07:00
committed by dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent 34c4e4799d
commit 92a8cf7347
@@ -3535,6 +3535,8 @@ class BytecodeGenerator extends RecursiveVisitor {
invocationKind != InvocationKind.getter &&
_isUncheckedCall(node, interfaceTarget, receiver);
_recordCoverage(node);
bool generated = false;
if (invocationKind != InvocationKind.getter && !isDynamic && !isUnchecked) {
final staticReceiverType = getStaticType(receiver, staticTypeContext);
@@ -3557,7 +3559,6 @@ class BytecodeGenerator extends RecursiveVisitor {
targetName,
argDesc,
);
_recordCoverage(node);
if (isDynamic) {
assert(!isUnchecked);
asm.emitDynamicCall(callCpIndex, totalArgCount);