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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 1368173002: Do not eagerly finalize when optimizing. Remove allocation of temporary strings in new space. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Improve comments Created 5 years, 3 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 | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 83df7a90bdbff590ac223574eccbae48de1ed4c7..e6d61bc4ce34aa2b3dc39377edb946b08a2eed98 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -845,8 +845,10 @@ void ClassFinalizer::CheckTypeArgumentBounds(const Class& cls,
TypeParameter::Cast(type_arg).bound());
ResolveType(type_arg_cls, bound);
}
- if (!type_param.CheckBound(type_arg, instantiated_bound, &error) &&
- error.IsNull()) {
+ // This may be called only if type needs to be finalized, therefore
+ // seems OK to allocate finalized types in old space.
+ if (!type_param.CheckBound(type_arg, instantiated_bound,
+ &error, Heap::kOld) && error.IsNull()) {
// The bound cannot be checked at compile time; postpone to run time.
type_arg = BoundedType::New(type_arg, instantiated_bound, type_param);
arguments.SetTypeAt(offset + i, type_arg);
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698