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

Unified Diff: runtime/vm/object.cc

Issue 2509013002: Allocate generic types in new-space before canonicalizing. (Closed)
Patch Set: formatting Created 4 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/object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 2d92205554635666901ee1a3882c8cc812ab28f3..4ebeda44c793f5933f684f0cec9ddeb13dd3e455 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -15407,7 +15407,7 @@ bool Instance::CheckIsCanonical(Thread* thread) const {
#endif // DEBUG
-RawAbstractType* Instance::GetType() const {
+RawAbstractType* Instance::GetType(Heap::Space space) const {
if (IsNull()) {
return Type::NullType();
}
@@ -15427,8 +15427,8 @@ RawAbstractType* Instance::GetType() const {
const Class& scope_cls = Class::Handle(type.type_class());
ASSERT(scope_cls.NumTypeArguments() > 0);
TypeArguments& type_arguments = TypeArguments::Handle(GetTypeArguments());
- type = Type::New(scope_cls, type_arguments, TokenPosition::kNoSource,
- Heap::kNew);
+ type =
+ Type::New(scope_cls, type_arguments, TokenPosition::kNoSource, space);
type.set_signature(signature);
type.SetIsFinalized();
type ^= type.Canonicalize();
@@ -15443,7 +15443,7 @@ RawAbstractType* Instance::GetType() const {
if (cls.NumTypeArguments() > 0) {
type_arguments = GetTypeArguments();
}
- type = Type::New(cls, type_arguments, TokenPosition::kNoSource);
+ type = Type::New(cls, type_arguments, TokenPosition::kNoSource, space);
type.SetIsFinalized();
type ^= type.Canonicalize();
}
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698