Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Unified Diff: runtime/vm/simulator_dbc.cc

Issue 1926453002: Fixes assert assignable check for DBC (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_dbc.cc
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index 7329114a00f6fe899e2b76a7f240d0ef8362ae50..364df61f4e0a9ca0615be2d3a4bcc4c70444288d 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -1634,6 +1634,18 @@ RawObject* Simulator::Call(const Code& code,
BYTECODE(AssertAssignable, A_D); // Stack: instance, type args, type, name
RawObject** args = SP - 3;
if (args[0] != null_value) {
+ const AbstractType& dst_type =
+ AbstractType::Handle(static_cast<RawAbstractType*>(args[2]));
+ if (dst_type.IsMalformedOrMalbounded()) {
+ SP[1] = args[0]; // instance.
+ SP[2] = args[3]; // name.
+ SP[3] = args[2]; // type.
+ Exit(thread, FP, SP + 4, pc);
+ NativeArguments args(thread, 3, SP + 1, SP - 3);
+ INVOKE_RUNTIME(DRT_BadTypeError, args);
+ UNREACHABLE();
+ }
+
RawSubtypeTestCache* cache =
static_cast<RawSubtypeTestCache*>(LOAD_CONSTANT(rD));
if (cache != null_value) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698