commit | 53343ceba0638dd13f35811d855ae59c8d290a5b | [log] [tgz] |
---|---|---|
author | Vyacheslav Egorov <vegorov@google.com> | Mon Jul 02 17:16:23 2018 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Mon Jul 02 17:16:23 2018 +0000 |
tree | 1080d03c7c1728008abd00916ff0db69dab1fff2 | |
parent | 15acc763c563b7ff08b3926129e2c16c71e1003a [diff] |
[vm/compiler] Fix CallSpecializer::AddReceiverCheck to use Receiver instead of ArgumentAt(0) ArgumentAt(0) might be pointing to type arguments instead of the actual receiver. Fixes #33717 Bug: https://github.com/dart-lang/sdk/issues/33717 Change-Id: I16f2aa442d67ceb2320b860f56c9e9443729092e Reviewed-on: https://dart-review.googlesource.com/63380 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
diff --git a/runtime/vm/compiler/call_specializer.h b/runtime/vm/compiler/call_specializer.h index 04bf617..12fd3e7 100644 --- a/runtime/vm/compiler/call_specializer.h +++ b/runtime/vm/compiler/call_specializer.h
@@ -88,7 +88,8 @@ // Add a class check for the call's first argument (receiver). void AddReceiverCheck(InstanceCallInstr* call) { - AddChecksForArgNr(call, call->ArgumentAt(0), /* argument_number = */ 0); + AddChecksForArgNr(call, call->Receiver()->definition(), + /* argument_number = */ 0); } // Insert a null check if needed.