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

Unified Diff: runtime/vm/object.h

Issue 693693003: Resubmit fix for Function::Clone() and Field::Clone() to adjust the class owner (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 41473)
+++ runtime/vm/object.h (working copy)
@@ -1563,6 +1563,11 @@
// Finalized type arguments are shared.
RawTypeArguments* CloneUnfinalized() const;
+ // Clone this type argument vector and clone all uninstantiated type
+ // arguments, changing the class owner of type parameters.
+ // Instantiated type arguments are shared.
+ RawTypeArguments* CloneUninstantiated(const Class& new_owner) const;
+
// Canonicalize only if instantiated, otherwise returns 'this'.
RawTypeArguments* Canonicalize(GrowableObjectArray* trail = NULL) const;
@@ -4664,6 +4669,13 @@
// type arguments of an unfinalized type are not cloned, but shared.
virtual RawAbstractType* CloneUnfinalized() const;
+ // Return a clone of this uninstantiated type where all references to type
+ // parameters are replaced with references to type parameters of the same name
+ // but belonging to the new owner class.
+ // Apply recursively to type arguments, i.e. instantiated type arguments of
+ // an uninstantiated type are not cloned, but shared.
+ virtual RawAbstractType* CloneUninstantiated(const Class& new_owner) const;
+
virtual RawInstance* CheckAndCanonicalize(const char** error_str) const {
return Canonicalize();
}
@@ -4824,6 +4836,7 @@
Error* malformed_error,
GrowableObjectArray* trail = NULL) const;
virtual RawAbstractType* CloneUnfinalized() const;
+ virtual RawAbstractType* CloneUninstantiated(const Class& new_owner) const;
virtual RawAbstractType* Canonicalize(
GrowableObjectArray* trail = NULL) const;
@@ -5023,6 +5036,7 @@
Error* bound_error,
GrowableObjectArray* trail = NULL) const;
virtual RawAbstractType* CloneUnfinalized() const;
+ virtual RawAbstractType* CloneUninstantiated(const Class& new_owner) const;
virtual RawAbstractType* Canonicalize(
GrowableObjectArray* trail = NULL) const {
return raw();
@@ -5107,6 +5121,7 @@
Error* bound_error,
GrowableObjectArray* trail = NULL) const;
virtual RawAbstractType* CloneUnfinalized() const;
+ virtual RawAbstractType* CloneUninstantiated(const Class& new_owner) const;
virtual RawAbstractType* Canonicalize(
GrowableObjectArray* trail = NULL) const {
return raw();
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698