[vm/bytecode] Fix constant evaluation of factory constructors in bytecode

This change extends the fix
349adc5b1f
for bytecode pipeline.

Change-Id: Ib9e9d2f5c1790db33a16ff8d74951dd10edb0d0e
Reviewed-on: https://dart-review.googlesource.com/c/80266
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
This commit is contained in:
Alexander Markov 2018-10-16 17:31:07 +00:00 committed by commit-bot@chromium.org
parent 20f4349951
commit f921f203f4

View file

@ -1988,6 +1988,10 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
@override
visitStaticInvocation(StaticInvocation node) {
if (node.isConst) {
_genPushConstExpr(node);
return;
}
Arguments args = node.arguments;
final target = node.target;
if (target == unsafeCast) {