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

Unified Diff: runtime/vm/object.cc

Issue 20503003: Delay resolution of redirecting factory targets in order to avoid class (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | « runtime/vm/dart_entry.cc ('k') | runtime/vm/parser.cc » ('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 25531)
+++ runtime/vm/object.cc (working copy)
@@ -1739,6 +1739,7 @@
if (super.IsNull()) {
offset = sizeof(RawObject);
} else {
+ ASSERT(super.is_finalized() || super.is_prefinalized());
type_args_field_offset = super.type_arguments_field_offset();
offset = super.next_field_offset();
ASSERT(offset > 0);
@@ -1747,7 +1748,9 @@
ASSERT(num_native_fields() == 0);
set_num_native_fields(super.num_native_fields());
}
- // If the super class is parameterized, use the same type_arguments field.
+ // If the super class is parameterized, use the same type_arguments field,
+ // otherwise, if this class is the first in the super chain to be
+ // parameterized, introduce a new type_arguments field.
if (type_args_field_offset == kNoTypeArguments) {
const TypeArguments& type_params = TypeArguments::Handle(type_parameters());
if (!type_params.IsNull()) {
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698