[dart2wasm] Fix minor bug in set.

Change-Id: I127539ae7c99d9b5ef519ed10077f33f019504b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251502
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
This commit is contained in:
Joshua Litt 2022-07-25 21:20:46 +00:00 committed by Commit Bot
parent 911675b007
commit 9ac9025e48

View file

@ -1512,10 +1512,11 @@ class CodeGenerator extends ExpressionVisitor1<w.ValueType, w.ValueType>
} else {
w.BaseFunction targetFunction =
translator.functions.getFunction(target.reference);
wrap(node.value, targetFunction.type.inputs.single);
w.ValueType paramType = targetFunction.type.inputs.single;
wrap(node.value, paramType);
w.Local? temp;
if (preserved) {
temp = addLocal(translateType(dartTypeOf(node.value)));
temp = addLocal(paramType);
b.local_tee(temp);
}
call(target.reference);