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

Unified Diff: runtime/vm/object.cc

Issue 23102006: Skip over unfinalized interface types during a compile-time subtype check in (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | tests/utils/utils.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 26330)
+++ runtime/vm/object.cc (working copy)
@@ -2511,6 +2511,11 @@
Error& args_malformed_error = Error::Handle();
for (intptr_t i = 0; i < interfaces.Length(); i++) {
interface ^= interfaces.At(i);
+ if (!interface.IsFinalized()) {
+ // We may be checking bounds at finalization time. Skipping this
+ // unfinalized interface will postpone bound checking to run time.
+ continue;
+ }
interface_class = interface.type_class();
interface_args = interface.arguments();
if (!interface_args.IsNull() && !interface_args.IsInstantiated()) {
@@ -2522,7 +2527,6 @@
// parameters of the interface are at the end of the type vector,
// after the type arguments of the super type of this type.
// The index of the type parameters is adjusted upon finalization.
- ASSERT(interface.IsFinalized());
args_malformed_error = Error::null();
interface_args = interface_args.InstantiateFrom(type_arguments,
&args_malformed_error);
« no previous file with comments | « no previous file | tests/utils/utils.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698