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

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: "Cleanup" 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') | runtime/vm/flow_graph_optimizer.cc » ('J')
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..f9abf3a5f8bbd3fe29e9b31bd10dd2ff986d40d1 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 temporary type in old space.
regis 2015/09/25 20:55:23 The comment is hard to read. I am not sure what is
srdjan 2015/09/25 21:15:59 Done.
+ 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') | runtime/vm/flow_graph_optimizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698